mirror of https://gitlab.com/basile.b/dexed.git
use native AnchorDocking feature to set if floating widgets stayontop
This commit is contained in:
parent
92fd118403
commit
bf24e5692b
|
@ -6,7 +6,7 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, AnchorDocking, AnchorDockOptionsDlg, XMLPropStorage,
|
Classes, SysUtils, AnchorDocking, AnchorDockOptionsDlg, XMLPropStorage,
|
||||||
AnchorDockStr, Forms, Controls, u_observer, u_interfaces;
|
AnchorDockStr, LCLVersion, Forms, Controls, u_observer, u_interfaces;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -50,7 +50,9 @@ begin
|
||||||
HideHeaderCaptionForFloatingCheckBox.OnChange := @doChanged;
|
HideHeaderCaptionForFloatingCheckBox.OnChange := @doChanged;
|
||||||
FlattenHeadersCheckBox.OnChange := @doChanged;
|
FlattenHeadersCheckBox.OnChange := @doChanged;
|
||||||
FilledHeadersCheckBox.OnChange := @doChanged;
|
FilledHeadersCheckBox.OnChange := @doChanged;
|
||||||
|
{$if lcl_fullversion >= 2020000}
|
||||||
FloatingWindowsOnTop.Visible := false;
|
FloatingWindowsOnTop.Visible := false;
|
||||||
|
{$endif}
|
||||||
//
|
//
|
||||||
HeaderStyleComboBox.OnChange := @doChanged;
|
HeaderStyleComboBox.OnChange := @doChanged;
|
||||||
//
|
//
|
||||||
|
|
|
@ -11,6 +11,7 @@ object MainForm: TMainForm
|
||||||
OnDropFiles = FormDropFiles
|
OnDropFiles = FormDropFiles
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
|
LCLVersion = '2.2.0.1'
|
||||||
object mainMenu: TMainMenu
|
object mainMenu: TMainMenu
|
||||||
Top = 1
|
Top = 1
|
||||||
object MenuItem1: TMenuItem
|
object MenuItem1: TMenuItem
|
||||||
|
|
|
@ -1723,6 +1723,9 @@ var
|
||||||
h: TAnchorDockHostSite;
|
h: TAnchorDockHostSite;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
{$if lcl_fullversion >= 2020000}
|
||||||
|
DockMaster.MainDockForm := self;
|
||||||
|
{$endif}
|
||||||
fDockingIsInitialized := true;
|
fDockingIsInitialized := true;
|
||||||
|
|
||||||
if not reset then
|
if not reset then
|
||||||
|
@ -3732,6 +3735,7 @@ begin
|
||||||
layoutUpdateMenu;
|
layoutUpdateMenu;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$if lcl_fullversion < 2020000}
|
||||||
procedure TMainForm.updateFloatingWidgetOnTop(onTop: boolean);
|
procedure TMainForm.updateFloatingWidgetOnTop(onTop: boolean);
|
||||||
var
|
var
|
||||||
widg: TDexedWidget;
|
widg: TDexedWidget;
|
||||||
|
@ -3742,6 +3746,12 @@ begin
|
||||||
widg.Parent.Parent.isNotAssigned and widg.isDockable then
|
widg.Parent.Parent.isNotAssigned and widg.isDockable then
|
||||||
TForm(widg.Parent).FormStyle := fstyle[onTop];
|
TForm(widg.Parent).FormStyle := fstyle[onTop];
|
||||||
end;
|
end;
|
||||||
|
{$else}
|
||||||
|
procedure TMainForm.updateFloatingWidgetOnTop(onTop: boolean);
|
||||||
|
begin
|
||||||
|
DockMaster.FloatingWindowsOnTop := onTop;
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
procedure TMainForm.snapTopSplitterToMenu;
|
procedure TMainForm.snapTopSplitterToMenu;
|
||||||
var
|
var
|
||||||
|
|
|
@ -71,8 +71,8 @@ begin
|
||||||
fIsDockable := false;
|
fIsDockable := false;
|
||||||
fIsModal:= true;
|
fIsModal:= true;
|
||||||
fEdOptsSubj := TEditableOptionsSubject.create;
|
fEdOptsSubj := TEditableOptionsSubject.create;
|
||||||
inspector.CheckboxForBoolean := true;
|
|
||||||
inspector.PropertyEditorHook.AddHandlerModified(@inspectorModified);
|
inspector.PropertyEditorHook.AddHandlerModified(@inspectorModified);
|
||||||
|
inspector.CheckboxForBoolean := true;
|
||||||
inspector.DefaultItemHeight := scaleY(22, 96);
|
inspector.DefaultItemHeight := scaleY(22, 96);
|
||||||
selCat.Width := ScaleX(180, 96);
|
selCat.Width := ScaleX(180, 96);
|
||||||
width := ScaleX(600, 96);
|
width := ScaleX(600, 96);
|
||||||
|
|
Loading…
Reference in New Issue