mirror of https://gitlab.com/basile.b/dexed.git
added option, floating widget always on top
This commit is contained in:
parent
efbe83144a
commit
1ea6b7d0c4
|
@ -226,6 +226,7 @@ type
|
||||||
fMainMenuSubj: TCEMainMenuSubject;
|
fMainMenuSubj: TCEMainMenuSubject;
|
||||||
fAppliOpts: TCEApplicationOptions;
|
fAppliOpts: TCEApplicationOptions;
|
||||||
procedure updateMainMenuProviders;
|
procedure updateMainMenuProviders;
|
||||||
|
procedure updateFloatingWidgetOnTop(onTOp: boolean);
|
||||||
|
|
||||||
// action provider handling;
|
// action provider handling;
|
||||||
procedure clearActProviderEntries;
|
procedure clearActProviderEntries;
|
||||||
|
@ -348,10 +349,12 @@ type
|
||||||
|
|
||||||
TCEApplicationOptionsBase = class(TWritableLfmTextComponent)
|
TCEApplicationOptionsBase = class(TWritableLfmTextComponent)
|
||||||
private
|
private
|
||||||
|
fFloatingWidgetOnTop: boolean;
|
||||||
fReloadLastDocuments: boolean;
|
fReloadLastDocuments: boolean;
|
||||||
fMaxRecentProjs: integer;
|
fMaxRecentProjs: integer;
|
||||||
fMaxRecentDocs: integer;
|
fMaxRecentDocs: integer;
|
||||||
published
|
published
|
||||||
|
property floatingWidgetOnTop: boolean read fFloatingWidgetOnTop write fFloatingWidgetOnTop;
|
||||||
property reloadLastDocuments: boolean read fReloadLastDocuments write fReloadLastDocuments;
|
property reloadLastDocuments: boolean read fReloadLastDocuments write fReloadLastDocuments;
|
||||||
property maxRecentProjects: integer read fMaxRecentProjs write fMaxRecentProjs;
|
property maxRecentProjects: integer read fMaxRecentProjs write fMaxRecentProjs;
|
||||||
property maxRecentDocuments: integer read fMaxRecentDocs write fMaxRecentDocs;
|
property maxRecentDocuments: integer read fMaxRecentDocs write fMaxRecentDocs;
|
||||||
|
@ -407,6 +410,7 @@ begin
|
||||||
fMaxRecentDocs:= fBackup.fMaxRecentDocs;
|
fMaxRecentDocs:= fBackup.fMaxRecentDocs;
|
||||||
fMaxRecentProjs:= fBackup.fMaxRecentProjs;
|
fMaxRecentProjs:= fBackup.fMaxRecentProjs;
|
||||||
fReloadLastDocuments:=fBackup.fReloadLastDocuments;
|
fReloadLastDocuments:=fBackup.fReloadLastDocuments;
|
||||||
|
fFloatingWidgetOnTop := fBackup.fFloatingWidgetOnTop;
|
||||||
end
|
end
|
||||||
else inherited;
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
@ -417,11 +421,13 @@ begin
|
||||||
begin
|
begin
|
||||||
CEMainForm.fProjMru.maxCount := fMaxRecentProjs;
|
CEMainForm.fProjMru.maxCount := fMaxRecentProjs;
|
||||||
CEMainForm.fFileMru.maxCount := fMaxRecentDocs;
|
CEMainForm.fFileMru.maxCount := fMaxRecentDocs;
|
||||||
|
CEMainForm.updateFloatingWidgetOnTop(fFloatingWidgetOnTop);
|
||||||
end else if dst = fBackup then
|
end else if dst = fBackup then
|
||||||
begin
|
begin
|
||||||
fBackup.fMaxRecentDocs:= fMaxRecentDocs;
|
fBackup.fMaxRecentDocs:= fMaxRecentDocs;
|
||||||
fBackup.fMaxRecentProjs:= fMaxRecentProjs;
|
fBackup.fMaxRecentProjs:= fMaxRecentProjs;
|
||||||
fBackup.fReloadLastDocuments:=fReloadLastDocuments;
|
fBackup.fReloadLastDocuments:=fReloadLastDocuments;
|
||||||
|
fBackup.fFloatingWidgetOnTop:=fFloatingWidgetOnTop;
|
||||||
end
|
end
|
||||||
else inherited;
|
else inherited;
|
||||||
end;
|
end;
|
||||||
|
@ -1958,6 +1964,22 @@ begin
|
||||||
layoutSaveToFile(getCoeditDocPath + 'layouts' + DirectorySeparator + fname);
|
layoutSaveToFile(getCoeditDocPath + 'layouts' + DirectorySeparator + fname);
|
||||||
layoutUpdateMenu;
|
layoutUpdateMenu;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.updateFloatingWidgetOnTop(onTOp: boolean);
|
||||||
|
var
|
||||||
|
widg: TCEWidget;
|
||||||
|
const
|
||||||
|
fstyle: array[boolean] of TFormStyle = (fsNormal, fsStayOnTop);
|
||||||
|
begin
|
||||||
|
for widg in fWidgList do if (widg.Parent <> nil) and
|
||||||
|
(widg.Parent.Parent = nil) and widg.isDockable then
|
||||||
|
begin
|
||||||
|
TForm(widg.Parent).FormStyle := fstyle[onTOp];
|
||||||
|
//TODO: floating widg on top from true to false, widg remains on top
|
||||||
|
if TForm(widg.Parent).Visible then if not onTOp then
|
||||||
|
TForm(widg.Parent).SendToBack;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$REGION project ---------------------------------------------------------------}
|
{$REGION project ---------------------------------------------------------------}
|
||||||
|
|
Loading…
Reference in New Issue