Changeset 577 for Common/FormEx.pas


Ignore:
Timestamp:
Aug 2, 2024, 9:14:09 AM (3 months ago)
Author:
chronos
Message:
  • Modified: Updated Common packaged.
  • Fixed: Fullscreen switching on Linux and Windows with newer Lazarus version.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/FormEx.pas

    r571 r577  
    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.