Fixed dropdowns would cut-off bottom part of contents

This commit is contained in:
Dimitris Panokostas 2020-05-16 01:27:05 +02:00
parent 440dd1a073
commit 6776d9b1f3
3 changed files with 4 additions and 4 deletions

View file

@ -172,7 +172,7 @@ namespace gcn
*
* @return the widget height in pixels.
*/
auto getHeight() const -> int;
[[nodiscard]] auto getHeight() const -> int;
/**
* Sets the size of the widget.

View file

@ -591,7 +591,7 @@ namespace gcn
if (getParent() != nullptr)
{
return (mFocusHandler->getModalFocused() == this) || getParent()->hasModalFocus();
return mFocusHandler->getModalFocused() == this || getParent()->hasModalFocus();
}
return mFocusHandler->getModalFocused() == this;
@ -606,7 +606,7 @@ namespace gcn
if (getParent() != nullptr)
{
return (mFocusHandler->getModalMouseInputFocused() == this) || getParent()->hasModalMouseInputFocus();
return mFocusHandler->getModalMouseInputFocused() == this || getParent()->hasModalMouseInputFocus();
}
return mFocusHandler->getModalMouseInputFocused() == this;

View file

@ -110,7 +110,7 @@ namespace gcn
// Check the current clip area so we don't draw unnecessary items
// that are not visible.
const auto currentClipArea = graphics->getCurrentClipArea();
const int rowHeight = getFont()->getHeight() + 2;
const int rowHeight = getFont()->getHeight();
// Calculate the number of rows to draw by checking the clip area.
// The addition of two makes covers a partial visible row at the top