Skip to content

Commit

Permalink
Fix dropdown scrollbars (kallisti5#130)
Browse files Browse the repository at this point in the history
* Use const in more places

* Revert "Use const in more places"

This reverts commit 125b4aa.

* Fixed dropdown scrollbars obstructing content

In some cases, the dropdown would show the scollbars on top of the content, obstructing it.
This was very apparent in cases where the content has only one entry, and the horizontal scrollbar is drawn on top of it, making it impossible to see or select that entry.
  • Loading branch information
midwan authored Nov 9, 2024
1 parent cc17cf8 commit ae0a35c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/widgets/dropdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ namespace gcn
else
{
setHeight(listBoxHeight + h2 + 2);
mScrollArea->setHeight(listBoxHeight);
mScrollArea->setHeight(listBoxHeight + mScrollArea->getScrollbarWidth());
}
}

mScrollArea->setWidth(getWidth());
mScrollArea->setWidth(getWidth() + mScrollArea->getScrollbarWidth());
// Resize the ListBox to exactly fit the ScrollArea.
mListBox->setWidth(mScrollArea->getChildrenArea().width);
mScrollArea->setPosition(0, 0);
Expand Down

0 comments on commit ae0a35c

Please sign in to comment.