Changeset 132 for trunk/Forms


Ignore:
Timestamp:
Jun 19, 2017, 10:06:50 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Some application states were not stored/restored correctly after application restart.
  • Fixed: Default maximized form state for PersistentForm.
  • Fixed: Do not scale up maximized forms according DPI settings.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r128 r132  
    11object FormMain: TFormMain
    2   Left = 784
     2  Left = 577
    33  Height = 621
    4   Top = 435
     4  Top = 309
    55  Width = 775
    66  Caption = 'xTactics'
    7   ClientHeight = 589
     7  ClientHeight = 596
    88  ClientWidth = 775
    99  Menu = MainMenu1
    10   OnActivate = FormActivate
    1110  OnClose = FormClose
    1211  OnCreate = FormCreate
     
    1413  OnKeyUp = FormKeyUp
    1514  OnShow = FormShow
    16   LCLVersion = '1.6.4.0'
     15  LCLVersion = '1.6.2.0'
    1716  WindowState = wsMaximized
    1817  object StatusBar1: TStatusBar
    1918    Left = 0
    2019    Height = 28
    21     Top = 561
     20    Top = 568
    2221    Width = 775
    2322    Panels = <   
     
    3534  object ToolBar1: TToolBar
    3635    Left = 0
    37     Height = 561
     36    Height = 568
    3837    Top = 0
    3938    Width = 80
     
    118117  object PaintBox1: TPaintBox
    119118    Left = 80
    120     Height = 561
     119    Height = 568
    121120    Top = 0
    122121    Width = 695
  • trunk/Forms/UFormMain.pas

    r128 r132  
    7575    procedure AZoomInExecute(Sender: TObject);
    7676    procedure AZoomOutExecute(Sender: TObject);
    77     procedure FormActivate(Sender: TObject);
    7877    procedure FormShow(Sender: TObject);
    7978    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     
    242241end;
    243242
    244 procedure TFormMain.FormActivate(Sender: TObject);
    245 begin
    246   if not Core.Initialized then begin
    247     Core.Init;
    248   end;
    249 end;
    250 
    251243procedure TFormMain.AZoomAllExecute(Sender: TObject);
    252244var
     
    313305begin
    314306  Core.Game.Running := False;
     307  Core.PersistentForm.Save(Self);
    315308  SaveConfig(Core.XMLConfig1, 'FormMain');
    316   Core.PersistentForm.Save(Self);
     309  Core.XMLConfig1.Flush;
    317310end;
    318311
     
    334327procedure TFormMain.FormShow(Sender: TObject);
    335328begin
    336   Core.XMLConfig1.Filename := 'Config.xml';
     329  Core.Init;
    337330  LoadConfig(Core.XMLConfig1, 'FormMain');
    338   Core.PersistentForm.Load(Self, True);
     331  Core.PersistentForm.Load(Self, wsMaximized);
    339332  ReloadView;
    340333  Redraw;
Note: See TracChangeset for help on using the changeset viewer.