View Issue Details

IDProjectCategoryView StatusLast Update
0036259LazarusWidgetsetpublic2019-11-04 11:31
ReporterCudaText man Assigned ToZeljan Rikalo  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformUbuntu 19 x64 
Product Version2.1 (SVN) 
Summary0036259: gtk3: TPanel.Color is not used
DescriptionPatch fixes this, tested on small demo with clOlive, clRed, clDefault.
TagsNo tags attached.
Fixed in Revision62189
LazTarget-
WidgetsetGTK 3
Attached Files

Activities

CudaText man

2019-11-04 00:36

reporter  

pan.diff (898 bytes)   
Index: lcl/interfaces/gtk3/gtk3widgets.pas
===================================================================
--- lcl/interfaces/gtk3/gtk3widgets.pas	(revision 62182)
+++ lcl/interfaces/gtk3/gtk3widgets.pas	(working copy)
@@ -3063,6 +3063,7 @@
 procedure TGtk3Panel.DoBeforeLCLPaint;
 var
   DC: TGtk3DeviceContext;
+  NColor: TColor;
 begin
   inherited DoBeforeLCLPaint;
   // example how to paint borderstyle/bevels of TPanel before we send event to lcl
@@ -3069,6 +3070,14 @@
   DC := TGtk3DeviceContext(FContext);
   if not Visible then
     exit;
+
+  NColor := LCLObject.Color;
+  if (NColor <> clNone) and (NColor <> clDefault) then
+  begin
+    DC.CurrentBrush.Color := ColorToRGB(NColor);
+    DC.fillRect(0, 0, LCLObject.Width, LCLObject.Height);
+  end;
+
   if BorderStyle <> bsNone then
     DC.drawRect(0, 0, LCLObject.Width, LCLObject.Height, LCLObject.Color <> clDefault);
 end;
pan.diff (898 bytes)   

Zeljan Rikalo

2019-11-04 10:20

developer   ~0119040

Please test and close if ok. Thanks for the patch.

Issue History

Date Modified Username Field Change
2019-11-04 00:36 CudaText man New Issue
2019-11-04 00:36 CudaText man File Added: pan.diff
2019-11-04 09:18 Zeljan Rikalo Assigned To => Zeljan Rikalo
2019-11-04 09:18 Zeljan Rikalo Status new => assigned
2019-11-04 10:20 Zeljan Rikalo Status assigned => resolved
2019-11-04 10:20 Zeljan Rikalo Resolution open => fixed
2019-11-04 10:20 Zeljan Rikalo Fixed in Revision => 62189
2019-11-04 10:20 Zeljan Rikalo LazTarget => -
2019-11-04 10:20 Zeljan Rikalo Widgetset GTK 3 => GTK 3
2019-11-04 10:20 Zeljan Rikalo Note Added: 0119040