Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into original
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Nov 10, 2024
2 parents 265fde6 + ae0a35c commit f685b62
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/widgets/checkbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ namespace gcn
{
const int height = getFont()->getHeight();

setHeight(height);
// Add two pixels to avoid font clipping
setHeight(height + 2);
setWidth(getFont()->getWidth(mCaption) + height + height / 2);
}

Expand Down
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
2 changes: 1 addition & 1 deletion src/widgets/listbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace gcn
startRow = 0;
}

const auto inactive_color = Color(170, 170, 170);
const auto inactive_color = getSelectionColor() - 0x303030;

// The y coordinate where we start to draw the text is
// simply the y coordinate multiplied with the font height.
Expand Down

0 comments on commit f685b62

Please sign in to comment.