Ignore:
Timestamp:
Jul 19, 2024, 11:05:07 PM (4 months ago)
Author:
chronos
Message:
  • Fixed: Full screen mode switching.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/FormEx.pas

    r88 r99  
    1313  private
    1414    FCounter: Integer; static;
     15    FFirstShow: Boolean;
    1516  protected
    1617    procedure DoShow; override;
     
    1920    procedure DoDestroy; override;
    2021  public
     22    FullScreen: Boolean;
    2123    PersistentForm: TPersistentForm; static;
    2224    ThemeManager: TThemeManager; static;
     
    4446begin
    4547  inherited;
    46   PersistentForm.Load(Self);
     48  if not FFirstShow and (not (csDesigning in ComponentState)) then begin
     49    FFirstShow := True;
     50    PersistentForm.Load(Self);
     51    FullScreen := PersistentForm.FormFullScreen;
     52  end;
    4753end;
    4854
     
    7682procedure TFormEx.DoClose(var CloseAction: TCloseAction);
    7783begin
    78   PersistentForm.Save(Self);
     84  if  (not (csDesigning in ComponentState)) then begin
     85    PersistentForm.FormFullScreen := FullScreen;
     86    PersistentForm.Save(Self);
     87  end;
    7988  inherited;
    8089end;
Note: See TracChangeset for help on using the changeset viewer.