Qt: fixed color changing of TCustomPanel. issue #26607

git-svn-id: trunk@46089 -
This commit is contained in:
zeljko 2014-08-29 18:33:26 +00:00
parent 108f83e4ef
commit 36ab86d76e
2 changed files with 8 additions and 1 deletions

View File

@ -779,7 +779,7 @@ type
destructor Destroy; override;
procedure ReloadPaletteBegin; // used in QEventPaletteChange !
procedure ReloadPaletteEnd; // used in QEventPaletteChange !
procedure setColor(const AColor: PQColor); overload;
procedure setColor(const AColor: PQColor);
procedure setTextColor(const AColor: PQColor);
property Handle: QPaletteH read FHandle;
property CurrentColor: TQColor read FCurrentColor;

View File

@ -2412,7 +2412,14 @@ begin
begin
AWidget := HwndFromWidgetH(QtDC.Parent);
if (AWidget <> 0) and Assigned(TQtWidget(AWidget).LCLObject) then
begin
ATransparent := not (csOpaque in TQtWidget(AWidget).LCLObject.ControlStyle);
// issue #26607
if ATransparent and (TQtWidget(AWidget).LCLObject is TCustomPanel) and
(TQtWidget(AWidget).LCLObject.Color <> clDefault) and
not TCustomPanel(TQtWidget(AWidget).LCLObject).ParentColor then
ATransparent := False;
end;
end;
case Style of