diff --git a/lcl/interfaces/gtk/gtkwinapi.inc b/lcl/interfaces/gtk/gtkwinapi.inc index fce9d83cb9..d94396cb4e 100644 --- a/lcl/interfaces/gtk/gtkwinapi.inc +++ b/lcl/interfaces/gtk/gtkwinapi.inc @@ -5972,7 +5972,7 @@ var ComboWidget: PGtkCombo; DropDownWidget, ListWidget, FirstChildWidget: PGtkWidget; FirstChild: PGList; - CurWidth, CurHeight, CurItemHeight, BorderX, BorderY, + CurX, CurY, CurWidth, CurHeight, CurItemHeight, BorderX, BorderY, NewWidth, NewHeight: integer; ComboPopup: PGtkScrolledWindow; begin @@ -5999,6 +5999,8 @@ begin // calculate new width and height DropDownWidget:=ComboWidget^.popwin; if DropDownWidget=nil then exit; + CurX:=DropDownWidget^.Allocation.x; + CurY:=DropDownWidget^.Allocation.y; ComboPopup:=PGtkScrolledWindow(ComboWidget^.popup); if ComboPopup=nil then exit; // ToDo: add scrollbars only if needed @@ -6012,13 +6014,17 @@ begin inc(BorderX, ComboPopup^.vscrollbar^.requisition.width {+GTK_SCROLLED_WINDOW_GET_CLASS(ComboWidget^.popup)^.scrollbar_spacing}); - NewWidth:=MinItemsWidth+BorderX; - NewHeight:=MinItemsHeight+BorderY; + NewWidth := MinItemsWidth+BorderX; + NewHeight := MinItemsHeight+BorderY; + if NewWidth