mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 20:56:28 +02:00
qt: set correct windows state in TQtWSCustomControl.ShowHide
git-svn-id: trunk@18681 -
This commit is contained in:
parent
bde55b119f
commit
38ed3d71cc
@ -165,6 +165,12 @@ end;
|
||||
Shows or hides a widget.
|
||||
------------------------------------------------------------------------------}
|
||||
class procedure TQtWSCustomControl.ShowHide(const AWinControl: TWinControl);
|
||||
const
|
||||
LCLToQtWindowState: array[TWindowState] of QtWindowState = (
|
||||
{ wsNormal } QtWindowNoState,
|
||||
{ wsMinimized } QtWindowMinimized,
|
||||
{ wsMaximized } QtWindowMaximized
|
||||
);
|
||||
var
|
||||
Widget: TQtWidget;
|
||||
R: TRect;
|
||||
@ -204,9 +210,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
if TCustomForm(AWinControl).WindowState in [wsMaximized] then
|
||||
TQtMainWindow(Widget).setWindowState(QtWindowMaximized);
|
||||
|
||||
TQtMainWindow(Widget).setWindowState(LCLToQtWindowState[TCustomForm(AWinControl).WindowState]);
|
||||
end;
|
||||
|
||||
Widget.setVisible(AWinControl.HandleObjectShouldBeVisible);
|
||||
|
Loading…
Reference in New Issue
Block a user