Commit 62c05b07 authored by Juha Manninen's avatar Juha Manninen
Browse files

LCL-GTK2: Do not truncate Groupbox caption (fix for previous). Issue #32621, patch from accorp.

git-svn-id: trunk@59046 -
parent 7f272a8e
......@@ -6523,7 +6523,7 @@ procedure GetGTKDefaultWidgetSize(AWinControl: TWinControl;
var
Widget: PGtkWidget;
Requisition: TGtkRequisition;
FixedWidget: PGtkWidget;
FixedWidget, LblWidget: PGtkWidget;
begin
Widget := {%H-}PGtkWidget(AWinControl.Handle);
{$IFDEF VerboseCalculatePreferredSize}
......@@ -6547,7 +6547,6 @@ begin
{$ENDIF}
if GtkWidgetIsA(Widget,GTK_TYPE_EVENT_BOX)
and not (AWinControl is TCustomGroupBox)
and (AWinControl.ControlCount>0) then begin
// ignore client area (child controls)
FixedWidget:=PGtkWidget(GetFixedWidget(Widget));
......@@ -6563,6 +6562,13 @@ begin
end;
end;
// Do not truncate Groupbox caption. Issue #32621
if AWinControl is TCustomGroupBox then begin
LblWidget := gtk_frame_get_label_widget(PGtkFrame(PGtkBin(Widget)^.child));
if LblWidget <> nil then
PreferredWidth := Max(PreferredWidth, LblWidget^.allocation.x * 2 + LblWidget^.requisition.width);
end;
// restore size
gtk_widget_set_size_request(Widget, AWinControl.Width, AWinControl.Height);
{$IFDEF VerboseCalculatePreferredSize}
......
Supports Markdown
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