summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-26 15:09:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-26 15:09:32 +0100
commitb7f15ab8271ff789aaab0d58a5da42738267cd6a (patch)
treed33a97b490ccf2d593bfde2cd7d479617b61b155 /vcl
parentfcf8f4e6cba65e64f4439175f674aa4d200d5b59 (diff)
gtk3: sane height for list boxes too
Change-Id: I40515c6cfe2a3ea8fc6e2577561c2e54ead09fac
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/control/lstbox.cxx8
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 0500a46dc8ba..64d009ab9e34 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2661,7 +2661,7 @@ void ImplWin::ImplDraw( bool bLayout )
// vcl/source/window/brdwin.cxx
vcl::Window *pWin = GetParent();
- ImplControlValue aControlValue;
+ EditBoxValue aControlValue(GetTextHeight());
if ( !pWin->IsEnabled() )
nState &= ~ControlState::ENABLED;
if ( pWin->HasFocus() )
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 131d0fe8b31e..a35c502851fd 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -116,7 +116,7 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
if( IsNativeWidgetEnabled() &&
IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) )
{
- ImplControlValue aControlValue;
+ EditBoxValue aControlValue(GetTextHeight());
Rectangle aCtrlRegion( Point( 0, 0 ), Size( 20, mnDDHeight ) );
Rectangle aBoundingRgn( aCtrlRegion );
Rectangle aContentRgn( aCtrlRegion );
@@ -626,7 +626,7 @@ void ListBox::Resize()
// Note: in case of no border, pBorder will actually be this
vcl::Window *pBorder = GetWindow( WINDOW_BORDER );
- ImplControlValue aControlValue;
+ EditBoxValue aControlValue(GetTextHeight());
Point aPoint;
Rectangle aContent, aBound;
@@ -1212,7 +1212,7 @@ Size ListBox::CalcMinimumSize() const
{
// Try native borders; scrollbar size may not be a good indicator
// See how large the edit area inside is to estimate what is needed for the dropdown
- ImplControlValue aControlValue;
+ EditBoxValue aControlValue(GetTextHeight());
Point aPoint;
Rectangle aContent, aBound;
Size aTestSize( 100, 20 );
@@ -1231,7 +1231,7 @@ Size ListBox::CalcMinimumSize() const
if (IsDropDownBox()) // Check minimum height of dropdown box
{
- ImplControlValue aControlValue;
+ EditBoxValue aControlValue(GetTextHeight());
Rectangle aRect( Point( 0, 0 ), aSz );
Rectangle aContent, aBound;
if( GetNativeControlRegion( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aRect, ControlState::NONE,
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 97c792949ab3..7617890e9bc0 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -1069,7 +1069,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
{
aEditRect = NWGetComboBoxButtonRect( nType, nPart, rControlRegion );
}
- else if ((nType == CTRL_EDITBOX || nType == CTRL_COMBOBOX) && nPart == PART_ENTIRE_CONTROL)
+ else if ((nType == CTRL_EDITBOX || nType == CTRL_LISTBOX || nType == CTRL_COMBOBOX) && nPart == PART_ENTIRE_CONTROL)
{
gtk_style_context_save(mpEntryStyle);
gtk_style_context_add_class(mpEntryStyle, GTK_STYLE_CLASS_ENTRY);