View Issue Details

IDProjectCategoryView StatusLast Update
0000480Double CommanderGraphical user interfacepublic2021-10-29 23:21
Reportervitaliyg Assigned ToAlexx2000  
PrioritynormalSeverityminorReproducibilityrandom
Status closedResolutionfixed 
ProjectionnoneETAnone 
Product Version0.6.0 (trunk) 
Target Version0.9.3Fixed in Version0.9.3 
Summary0000480: Blinking of file list panel while switching tabs
DescriptionWhen switching tabs with mouse light gray background is painted over black file list panels
Check this video http://db.tt/JpulHdCN
TagsNo tags attached.
Attached Files
colors.diff (1,130 bytes)   
Index: ufileviewnotebook.pas
===================================================================
--- ufileviewnotebook.pas	(wersja 4850)
+++ ufileviewnotebook.pas	(kopia robocza)
@@ -154,6 +154,7 @@
 implementation
 
 uses
+  Graphics,
   LCLIntf,
   LCLProc,
   DCStrUtils,
@@ -193,6 +194,7 @@
   FSettingCaption := False;
   {$ENDIF}
   inherited Create(TheOwner);
+  Color := clYellow;
 end;
 
 {$IF DEFINED(LCLQT) and (LCL_FULLVERSION < 093100)}
@@ -369,7 +371,7 @@
   PageClass := TFileViewPage;
   inherited Create(ParentControl);
   ControlStyle := ControlStyle + [csNoFocus];
-
+  Color := clRed;
   Parent := ParentControl;
   TabStop := False;
 
Index: fmain.pas
===================================================================
--- fmain.pas	(wersja 4850)
+++ fmain.pas	(kopia robocza)
@@ -784,6 +784,9 @@
 
   nbLeft := CreateNotebook(pnlLeft, fpLeft);
   nbRight := CreateNotebook(pnlRight, fpRight);
+  pnlLeft.Color := clLime;
+  pnlNotebooks.Color := clBlue;
+  Self.Color := clPurple;
 
   FDrivesListPopup := TDrivesListPopup.Create(Self, Self);
   FDrivesListPopup.OnDriveSelected := @DriveListDriveSelected;
colors.diff (1,130 bytes)   
disable_draw_panels.diff (4,867 bytes)   
Index: components/KASToolBar/kascombobox.pas
===================================================================
--- components/KASToolBar/kascombobox.pas	(revision 4851)
+++ components/KASToolBar/kascombobox.pas	(working copy)
@@ -28,7 +28,7 @@
 interface
 
 uses
-  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls;
+  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,LMessages,LCLType;
 
 type
 
@@ -42,18 +42,69 @@
     procedure KeyDown(var Key: Word; Shift: TShiftState); override;
   end;
 
+  { TPanelContainer }
+
+  {en
+     Panel that doesn't paint anything, just serves as a container for other controls.
+     It doesn't paint background so other controls cannot be transparent (for example TLabel).
+  }
+
+  TPanelContainer = class(TPanel)
+  protected
+    procedure WMEraseBkgnd(var Message: TLMEraseBkgnd); message LM_ERASEBKGND;
+  public
+    constructor Create(TheOwner: TComponent); override;
+    procedure Paint; override;
+  published
+    property Align;
+    property Anchors;
+    property AutoSize;
+    property BevelInner default bvNone;
+    property BevelOuter default bvNone;
+    property BorderSpacing;
+    property BorderWidth;
+    property BorderStyle;
+    property ChildSizing;
+    property Color;
+    property Constraints;
+    property Enabled;
+    property TabStop default False;
+    property Visible;
+  end;
+
 procedure Register;
 
 implementation
 
-uses
-  LCLType;
-
 procedure Register;
 begin
-  RegisterComponents('KASComponents',[TComboBoxWithDelItems]);
+  RegisterComponents('KASComponents',[TComboBoxWithDelItems, TPanelContainer]);
 end;
 
+{ TPanelContainer }
+
+constructor TPanelContainer.Create(TheOwner: TComponent);
+begin
+  inherited Create(TheOwner);
+
+  ControlStyle := ControlStyle + [csOpaque, csNoFocus] - [csCaptureMouse, csSetCaption];
+  TabStop := False;
+  FullRepaint := False;
+
+  BevelInner := bvNone;
+  BevelOuter := bvNone;
+end;
+
+procedure TPanelContainer.Paint;
+begin
+  // Don't paint anything.
+end;
+
+procedure TPanelContainer.WMEraseBkgnd(var Message: TLMEraseBkgnd);
+begin
+  Message.Result := 1; // Don't erase.
+end;
+
 { TComboBoxWithDelItems }
 
 procedure TComboBoxWithDelItems.KeyDown(var Key: Word; Shift: TShiftState);
Index: src/fmain.pas
===================================================================
--- src/fmain.pas	(revision 4851)
+++ src/fmain.pas	(working copy)
@@ -281,7 +281,7 @@
     pnlLeftTools: TPanel;
     pnlRightTools: TPanel;
     pnlRight: TPanel;
-    pnlLeft: TPanel;
+    pnlLeft: TPanelContainer;
     btnLeftDrive: TSpeedButton;
     btnLeftHome: TSpeedButton;
     btnLeftUp: TSpeedButton;
@@ -303,7 +303,7 @@
     tbDelete: TMenuItem;
     tbEdit: TMenuItem;
     mnuMain: TMainMenu;
-    pnlNotebooks: TPanel;
+    pnlNotebooks: TPanelContainer;
     pnlDisk: TPanel;
     mnuHelp: TMenuItem;
     mnuHelpAbout: TMenuItem;
@@ -426,6 +426,7 @@
     procedure miTrayIconExitClick(Sender: TObject);
     procedure miTrayIconRestoreClick(Sender: TObject);
     procedure PanelButtonClick(Button: TSpeedButton; FileView: TFileView);
+    procedure pnlLeftPaint(Sender: TObject);
     procedure tbDeleteClick(Sender: TObject);
     procedure dskLeftToolButtonClick(Sender: TObject);
     procedure dskRightToolButtonClick(Sender: TObject);
@@ -784,7 +785,11 @@
 
   nbLeft := CreateNotebook(pnlLeft, fpLeft);
   nbRight := CreateNotebook(pnlRight, fpRight);
+  pnlLeft.OnPaint  := @pnlLeftPaint;
+  pnlNotebooks.OnPaint := @pnlLeftPaint;
+  self.OnPaint := @pnlLeftPaint;
 
+
   FDrivesListPopup := TDrivesListPopup.Create(Self, Self);
   FDrivesListPopup.OnDriveSelected := @DriveListDriveSelected;
   FDrivesListPopup.OnClose := @DriveListClose;
@@ -3054,6 +3059,11 @@
   tbPaste.Visible:= bPaste;
 end;
 
+procedure TfrmMain.pnlLeftPaint(Sender: TObject);
+begin
+  writeln('Paint ', tcomponent(sender).Name);
+end;
+
 procedure TfrmMain.pnlLeftResize(Sender: TObject);
 begin
   if gDriveBar1 and gDriveBar2 and not gHorizontalFilePanels then
Index: src/fmain.lfm
===================================================================
--- src/fmain.lfm	(revision 4851)
+++ src/fmain.lfm	(working copy)
@@ -20,7 +20,7 @@
   SessionProperties = 'nbConsole.Height;seLogWindow.Height'
   ShowHint = True
   ShowInTaskBar = stAlways
-  LCLVersion = '0.9.30.4'
+  LCLVersion = '1.1'
   Visible = True
   object MainToolBar: TKASToolBar
     AnchorSideTop.Control = Owner
@@ -119,7 +119,7 @@
       end
     end
   end
-  object pnlNotebooks: TPanel
+  object pnlNotebooks: TPanelContainer
     Left = 0
     Height = 157
     Top = 46
@@ -130,7 +130,7 @@
     FullRepaint = False
     TabOrder = 1
     OnResize = pnlNotebooksResize
-    object pnlLeft: TPanel
+    object pnlLeft: TPanelContainer
       Left = 1
       Height = 155
       Top = 1
disable_draw_panels.diff (4,867 bytes)   
Fixed in Revision4845-4847, 8807-8808
Operating systemWindows
WidgetsetWin32
Architecture64-bit

Relationships

related to 0001109 closedAlexx2000 Tabcontrol instead of PageControl, to be flat like TC 

Activities

vitaliyg

2012-05-18 10:28

developer   ~0000759

It looks like it blinks faster, but it still blinking.

cobines

2012-05-18 18:55

administrator   ~0000760

Try with attached diff and tell with which color it blinks.

vitaliyg

2012-05-18 19:10

developer   ~0000762

I would say light gray
Check this video http://dl.dropbox.com/u/49647350/DC4850_colorpatch.avi
Video does not capture really short blinks

There is also no blinking when switching tabs with keyboard

vitaliyg

2012-05-19 17:45

developer   ~0000764

This is LCL TPageControl bug

cobines

2012-05-19 19:08

administrator   ~0000765

Yes, but r4847 fixed it for me on Windows XP. I'm not sure with which control is the problem.

vitaliyg

2012-05-19 19:18

developer   ~0000766

if you put breakpoint in notebook DoActivate procedure you will see that when switching tabs (tab is painted empty (solid gray) and only later it is repainted as it should be.

http://bugs.freepascal.org/view.php?id=21352

cobines

2012-05-19 20:32

administrator   ~0000767

I don't have this on my system.
The gray color must be coming from when Windows erases background, but it is disabled for the page and for the notebook. LCL would erase with Brush color not with gray. The panels that contain notebook are not repainted or erased when switching tabs. So, I don't know from which control the gray is coming from, so that we could disable it.

cobines

2012-05-19 22:04

administrator   ~0000768

Try with disable_draw_panels.diff.

vitaliyg

2012-05-19 22:46

developer   ~0000769

I have found and posted solution here:
http://bugs.freepascal.org/view.php?id=22080

This completely removes blinking when switching tabs in DC.

cobines

2012-05-19 23:21

administrator   ~0000770

OK.

Issue History

Date Modified Username Field Change
2012-05-14 17:25 vitaliyg New Issue
2012-05-16 00:42 cobines Assigned To => cobines
2012-05-16 00:42 cobines Status new => assigned
2012-05-17 02:57 cobines Fixed in Revision => 4845
2012-05-18 04:07 cobines Fixed in Revision 4845 => 4845-4847
2012-05-18 04:07 cobines Status assigned => resolved
2012-05-18 04:07 cobines Resolution open => fixed
2012-05-18 04:07 cobines Fixed in Version => 0.5.5
2012-05-18 10:28 vitaliyg Note Added: 0000759
2012-05-18 18:55 cobines Status resolved => assigned
2012-05-18 18:55 cobines Resolution fixed => reopened
2012-05-18 18:55 cobines Note Added: 0000760
2012-05-18 18:56 cobines File Added: colors.diff
2012-05-18 19:10 vitaliyg Note Added: 0000762
2012-05-19 17:45 vitaliyg Note Added: 0000764
2012-05-19 19:08 cobines Note Added: 0000765
2012-05-19 19:18 vitaliyg Note Added: 0000766
2012-05-19 20:32 cobines Note Added: 0000767
2012-05-19 22:03 cobines File Added: disable_draw_panels.diff
2012-05-19 22:04 cobines Note Added: 0000768
2012-05-19 22:46 vitaliyg Note Added: 0000769
2012-05-19 23:21 cobines Note Added: 0000770
2018-09-03 07:00 Alexx2000 Assigned To cobines => Alexx2000
2018-09-03 07:00 Alexx2000 Status assigned => resolved
2018-09-03 07:00 Alexx2000 Resolution reopened => fixed
2018-09-03 07:00 Alexx2000 Fixed in Version 0.5.5 => 0.9.0
2018-09-03 07:00 Alexx2000 Target Version => 0.9.0
2018-09-03 07:00 Alexx2000 Relationship added related to 0001109
2019-05-10 13:28 Alexx2000 Fixed in Revision 4845-4847 => 4845-4847, 8807-8808
2019-05-10 13:28 Alexx2000 Fixed in Version 0.9.0 => 0.9.3
2019-05-10 13:35 Alexx2000 Target Version 0.9.0 => 0.9.3
2021-10-29 23:21 Alexx2000 Status resolved => closed