Changeset 207 for trunk/Forms


Ignore:
Timestamp:
May 22, 2018, 9:43:29 AM (6 years ago)
Author:
chronos
Message:
  • Fixed: Keep correctly main form dimensions in non-maximized state. Scaling DPI was affecting its size and position.
  • Added: Remember last opened tab in New game form.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormClient.pas

    r206 r207  
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
    99  UGame, LCLType, Menus, ActnList, ComCtrls, dateutils, XMLConf, DOM, UCommPin,
    10   UGeometry, UGameClient, UGameProtocol;
     10  UGeometry, UGameClient, UGameProtocol, UThreading;
    1111
    1212const
     
    231231    FClient.OnTurnStart := DoTurnStart;
    232232    FClient.OnDestroy := DoClientDestroy;
     233    FClient.View.DestRect := TRect.CreateBounds(TPoint.Create(0, 0), TPoint.Create(PaintBox1.Width, PaintBox1.Height));
    233234  end;
    234235  Redraw;
     
    243244begin
    244245  TurnActive := True;
    245   UpdateInterface;
     246  Synchronize(UpdateInterface);
    246247end;
    247248
  • trunk/Forms/UFormMain.pas

    r206 r207  
    149149  FormClient.ManualDock(PanelMain, nil, alClient);
    150150  FormClient.Align := alClient;
    151   FormClient.Show;
    152151end;
    153152
     
    179178procedure TFormMain.FormShow(Sender: TObject);
    180179begin
     180  Core.LoadConfig;
     181  Core.ScaleDPI;
     182  Core.PersistentForm.Load(Self, True);
    181183  Core.Init;
    182184  LoadConfig(Core.XMLConfig1, 'FormMain');
    183   Core.PersistentForm.Load(Self, True);
    184185  ReloadView;
     186  FormClient.Show;
    185187end;
    186188
  • trunk/Forms/UFormNew.pas

    r199 r207  
    342342  ReloadView;
    343343  //Height := Trunc(1.5 * Height);
    344   PageControl1.TabIndex := 0;
     344  //PageControl1.TabIndex := 0;
    345345end;
    346346
Note: See TracChangeset for help on using the changeset viewer.