From e0012b328b07ad72b0f98e3f8cc92116d81d2a67 Mon Sep 17 00:00:00 2001 From: zeljko Date: Sun, 3 Jul 2011 08:17:22 +0000 Subject: [PATCH] Gtk2: set proper margins for GtkFrame. patch by Max Vlasov. issue #19658 git-svn-id: trunk@31534 - --- lcl/interfaces/gtk2/gtk2wsextctrls.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lcl/interfaces/gtk2/gtk2wsextctrls.pp b/lcl/interfaces/gtk2/gtk2wsextctrls.pp index 7fe3350345..d6d57fe162 100644 --- a/lcl/interfaces/gtk2/gtk2wsextctrls.pp +++ b/lcl/interfaces/gtk2/gtk2wsextctrls.pp @@ -772,11 +772,24 @@ var Frame, WidgetClient: PGtkWidget; WidgetInfo: PWidgetInfo; Allocation: TGTKAllocation; + bwidth: gint; + Style: PGtkRCStyle; begin Frame := gtk_frame_new(nil); gtk_frame_set_shadow_type(PGtkFrame(Frame), BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]); + case TCustomPanel(AWinControl).BorderStyle of + bsSingle: + bwidth:=1 + else + bwidth:=0 + end; + style := gtk_widget_get_modifier_style(Frame); + style^.xthickness := bwidth; + style^.ythickness := bwidth; + gtk_widget_modify_style(Frame, style); + {$IFDEF DebugLCLComponents} DebugGtkWidgets.MarkCreated(Frame, dbgsName(AWinControl)); {$ENDIF}