Skip to content

Commit

Permalink
Fixed editing box position when points list is scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisAsanaka committed Mar 23, 2020
1 parent 991c327 commit a687e14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/simController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,12 @@ void SimController::editRow(int index) {
tgui::ListView::Ptr pointsList = gui.get<tgui::ListView>("pointsList");

tgui::EditBox::Ptr editBox = tgui::EditBox::create();
editBox->setSize({POINTS_LIST_WIDTH, 30});
editBox->setSize({POINTS_LIST_WIDTH, pointsList->getItemHeight()});
editBox->setPosition({
pointsList->getPosition().x,
MENU_BAR_HEIGHT + index * pointsList->getItemHeight() +
pointsList->getHeaderHeight() + pointsList->getHeaderSeparatorHeight() * 2});
pointsList->getHeaderHeight() + pointsList->getHeaderSeparatorHeight() * 2
- pointsList->getVerticalScrollbarValue()});
editBox->setTextSize(24);
editBox->setText(
pointsList->getItemCell(index, 0) + ", " +
Expand Down

0 comments on commit a687e14

Please sign in to comment.