TextArea: Fix minimum size when scrollbars are disabled.
[GB.GTK] * BUG: TextArea: Fix minimum size when scrollbars are disabled. [GB.GTK3] * BUG: TextArea: Fix minimum size when scrollbars are disabled.
This commit is contained in:
parent
e64180ef5a
commit
6156d141bd
2 changed files with 19 additions and 1 deletions
gb.gtk/src
|
@ -1131,6 +1131,22 @@ void gTextArea::onLeaveEvent()
|
|||
|
||||
void gTextArea::setMinimumSize()
|
||||
{
|
||||
_min_h = gApplication::getScrollbarBigSize(); // + font()->height() + (hasBorder() ? 4 : 0);
|
||||
if (scrollBar())
|
||||
_min_h = gApplication::getScrollbarBigSize(); // + font()->height() + (hasBorder() ? 4 : 0);
|
||||
else
|
||||
_min_h = font()->height() + (hasBorder() ? 4 : 0);
|
||||
|
||||
_min_w = _min_h;
|
||||
}
|
||||
|
||||
void gTextArea::updateScrollBar()
|
||||
{
|
||||
gControl::updateScrollBar();
|
||||
setMinimumSize();
|
||||
}
|
||||
|
||||
void gTextArea::setFont(gFont *ft)
|
||||
{
|
||||
gControl::setFont(ft);
|
||||
setMinimumSize();
|
||||
}
|
||||
|
|
|
@ -95,7 +95,9 @@ public:
|
|||
|
||||
//"Private"
|
||||
virtual void updateCursor(GdkCursor *cursor);
|
||||
virtual void updateScrollBar();
|
||||
virtual void setMinimumSize();
|
||||
virtual void setFont(gFont *ft);
|
||||
#ifdef GTK3
|
||||
virtual GtkWidget *getStyleSheetWidget();
|
||||
virtual const char *getStyleSheetColorNode();
|
||||
|
|
Loading…
Reference in a new issue