Changeset 176


Ignore:
Timestamp:
Jul 19, 2024, 8:29:45 PM (4 months ago)
Author:
chronos
Message:
  • Fixed: Main form was not visible on Windows task bar.
  • Fixed: Do not load/save form dimensions in design time.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Core.pas

    r174 r176  
    486486  TFormEx.PersistentForm := PersistentForm1;
    487487
    488   FormMain := TFormMain.Create(nil);
     488  Application.CreateForm(TFormMain, FormMain);
    489489  FormMain.Show;
    490490end;
     
    496496  if Assigned(ProfileImage) then
    497497    FreeAndNil(ProfileImage);
    498   FreeAndNil(FormMain);
    499498end;
    500499
  • trunk/Forms/FormMain.pas

    r174 r176  
    127127procedure TFormMain.FormDestroy(Sender: TObject);
    128128begin
     129  Core.Core.OnDataFileChange := nil;
     130  Core.Core.OnLastOpenedListChange := nil;
    129131  FreeAndNil(FormContacts);
    130132end;
  • trunk/Packages/Common/FormEx.pas

    r174 r176  
    1313  private
    1414    FCounter: Integer; static;
     15    FFirstShow: Boolean;
    1516  protected
    1617    procedure DoShow; override;
     
    4546begin
    4647  inherited;
    47   PersistentForm.Load(Self);
    48   FullScreen := PersistentForm.FormFullScreen;
     48  if not FFirstShow and (not (csDesigning in ComponentState)) then begin
     49    FFirstShow := True;
     50    PersistentForm.Load(Self);
     51    FullScreen := PersistentForm.FormFullScreen;
     52  end;
    4953end;
    5054
     
    7882procedure TFormEx.DoClose(var CloseAction: TCloseAction);
    7983begin
    80   PersistentForm.FormFullScreen := FullScreen;
    81   PersistentForm.Save(Self);
     84  if  (not (csDesigning in ComponentState)) then begin
     85    PersistentForm.FormFullScreen := FullScreen;
     86    PersistentForm.Save(Self);
     87  end;
    8288  inherited;
    8389end;
  • trunk/Packages/Common/PersistentForm.pas

    r175 r176  
    303303
    304304procedure TPersistentForm.SetFullScreen(State: Boolean);
     305{$IFDEF UNIX}
    305306var
    306307  OldHandler: TNotifyEvent;
    307308var
    308309  I: Integer;
     310{$ENDIF}
    309311begin
    310312  if State then begin
Note: See TracChangeset for help on using the changeset viewer.