Qt: set color to mdiArea if we are fsMDIForm in case when color <> clDefault.

git-svn-id: trunk@44932 -
This commit is contained in:
zeljko 2014-05-06 13:51:00 +00:00
parent 67cb9cc43c
commit ba53e7f947

View File

@ -650,6 +650,7 @@ type
function MdiChildCount: integer;
procedure OffsetMousePos(APoint: PQtPoint); override;
procedure setAcceptDropFiles(AValue: Boolean);
procedure setColor(const Value: PQColor); override;
procedure setFocusPolicy(const APolicy: QtFocusPolicy); override;
procedure SlotActivateWindow(vActivate: Boolean); cdecl;
procedure slotWindowStateChange; cdecl;
@ -6890,6 +6891,19 @@ begin
QWidget_setAcceptDrops(Widget, AValue);
end;
procedure TQtMainWindow.setColor(const Value: PQColor);
var
p: QPaletteH;
begin
inherited setColor(Value);
if Assigned(MDIAreaHandle) and Assigned(FCentralWidget) then
begin
p := QWidget_palette(FCentralWidget);
if p <> nil then
QMdiArea_setBackground(QMdiAreaH(MdiAreaHandle.Widget), QPalette_background(P));
end;
end;
procedure TQtMainWindow.setFocusPolicy(const APolicy: QtFocusPolicy);
begin
{$IFDEF QTSCROLLABLEFORMS}