Kaydet (Commit) b7f15ab8 authored tarafından Caolán McNamara's avatar Caolán McNamara

gtk3: sane height for list boxes too

Change-Id: I40515c6cfe2a3ea8fc6e2577561c2e54ead09fac
üst fcf8f4e6
......@@ -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() )
......
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment