Fixed dropdowns would cut-off bottom part of contents
This commit is contained in:
parent
440dd1a073
commit
6776d9b1f3
3 changed files with 4 additions and 4 deletions
2
external/libguisan/include/guisan/widget.hpp
vendored
2
external/libguisan/include/guisan/widget.hpp
vendored
|
@ -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.
|
||||
|
|
4
external/libguisan/src/widget.cpp
vendored
4
external/libguisan/src/widget.cpp
vendored
|
@ -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;
|
||||
|
|
2
external/libguisan/src/widgets/listbox.cpp
vendored
2
external/libguisan/src/widgets/listbox.cpp
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue