2008/6/17 Henry Vermaak <[EMAIL PROTECTED]>:
> 2008/6/17 Paul Csanyi <[EMAIL PROTECTED]>:
>>
>> I read now the GTK Tutorial at:
>> http://www.gtk.org/tutorial1.2/gtk_tut-21.html
>>
>
> this is a good place to get info:
>
> http://developer.gnome.org/arch/gtk/themes.html
>
> with the section "Resource Files" most relevant to you.
>

or you can try this patch (can a lazarus dev please review?).

the result: http://imagebin.org/21183

henry
Index: lcl/interfaces/gtk2/gtk2wscontrols.pp
===================================================================
--- lcl/interfaces/gtk2/gtk2wscontrols.pp	(revision 15453)
+++ lcl/interfaces/gtk2/gtk2wscontrols.pp	(working copy)
@@ -70,6 +70,8 @@
     
     class procedure SetBiDiMode(const AWinControl: TWinControl; UseRightToLeftAlign, UseRightToLeftReading, UseRightToLeftScrollBar : Boolean); override;
     
+    class procedure SetColor(const AWinControl: TWinControl); override;
+
     class function  GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
     class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
     class procedure SetBorderStyle(const AWinControl: TWinControl; const ABorderStyle: TBorderStyle); override;
@@ -255,6 +257,20 @@
        end;
 end;
 
+class procedure TGtk2WSWinControl.SetColor(const AWinControl: TWinControl);
+var
+  Widget: PGtkWidget;
+  Col: TGdkColor;
+begin
+  if not WSCheckHandleAllocated(AWinControl, 'SetColor')
+    then Exit;
+
+  Widget := PGtkWidget(AWinControl.Handle);
+
+  Col := TColortoTGDKColor(AWinControl.Brush.Color);
+  gtk_widget_modify_fg(Widget, GTK_STATE_NORMAL, @Col);
+end;
+
 class function TGtk2WSWinControl.GetText(const AWinControl: TWinControl;
   var AText: String): Boolean;
 var
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to