vcl/source/control/ilstbox.cxx | 2 +- vcl/source/control/lstbox.cxx | 8 ++++---- vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit b7f15ab8271ff789aaab0d58a5da42738267cd6a Author: Caolán McNamara <caol...@redhat.com> Date: Sun Apr 26 15:09:04 2015 +0100 gtk3: sane height for list boxes too Change-Id: I40515c6cfe2a3ea8fc6e2577561c2e54ead09fac diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 0500a46..64d009a 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 131d0fe..a35c502 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 97c7929..7617890 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);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits