Changeset 412 for branches


Ignore:
Timestamp:
Nov 4, 2021, 2:59:11 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Merged changes from trunk r411.
Location:
branches/highdpi
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Global.pas

    r405 r412  
    1010  CevoHomepageShort = 'app.zdechov.net/c-evo';
    1111  CevoHomepage = 'https://' + CevoHomepageShort;
    12   CevoContactShort = 'app.zdechov.net/c-evo#Contact';
     12  CevoContactShort = 'app.zdechov.net/c-evo#Support';
    1313  CevoContact = 'https://' + CevoContactShort;
    1414  CevoContactBug = 'https://app.zdechov.net/c-evo/report/1';
  • branches/highdpi/Inp.pas

    r361 r412  
    55
    66uses
    7   UDpiControls, ScreenTools, Messg,
    8   LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, DrawDlg,
    9   ButtonA, StdCtrls;
     7  UDpiControls, ScreenTools, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms,
     8  DrawDlg, ButtonA, StdCtrls;
    109
    1110type
     
    3837  TitleHeight := Height;
    3938  InitButtons;
    40   Center := true;
     39  Center := True;
    4140end;
    4241
     
    6463    ModalResult := mrCancel
    6564  else
    66     ModalResult := mrOK
     65    ModalResult := mrOK;
    6766end;
    6867
     
    7271  begin
    7372    Key := #0;
    74     ModalResult := mrOK
     73    ModalResult := mrOK;
    7574  end
    7675  else if Key = #27 then
    7776  begin
    7877    Key := #0;
    79     ModalResult := mrCancel
    80   end
     78    ModalResult := mrCancel;
     79  end;
    8180end;
    8281
     
    9392procedure TInputDlg.FormClose(Sender: TObject; var Action: TCloseAction);
    9493begin
    95   Center := true
     94  Center := True;
    9695end;
    9796
    9897procedure TInputDlg.CenterToRect(Rect: TRect);
    9998begin
    100   Center := false;
     99  Center := False;
    101100  Left := Rect.Left + (Rect.Right - Rect.Left - Width) div 2;
    102101  Top := Rect.Top + (Rect.Bottom - Rect.Top - Height) div 2;
  • branches/highdpi/Install/win/C-evo 32-bit.iss

    r246 r412  
    22
    33[Setup]
    4 OutputBaseFilename=Install-{#MyAppName}-{#MyAppVersion}-win32
     4OutputBaseFilename=Install-{#MyAppNameShort}-{#MyAppVersion}{#MyAppVersionSuffix}-win32
    55
    66[Components]
  • branches/highdpi/Install/win/C-evo 64-bit.iss

    r246 r412  
    44ArchitecturesAllowed=x64
    55ArchitecturesInstallIn64BitMode=x64
    6 OutputBaseFilename=Install-{#MyAppName}-{#MyAppVersion}-win64
     6OutputBaseFilename=Install-{#MyAppNameShort}-{#MyAppVersion}{#MyAppVersionSuffix}-win64
    77
    88[Files]
  • branches/highdpi/Install/win/C-evo.iss

    r405 r412  
    1010; installation to run on all architectures (including Itanium,
    1111; since it's capable of running 32-bit code too).
    12 OutputBaseFilename=Install-{#MyAppName}-{#MyAppVersion}
     12OutputBaseFilename=Install-{#MyAppNameShort}-{#MyAppVersion}{#MyAppVersionSuffix}
    1313
    1414[Components]
  • branches/highdpi/Install/win/Common.iss

    r349 r412  
    33
    44#define MyAppName "C-evo"
    5 #define MyAppVersion "1.3.0"
     5#define MyAppTitle "C-evo: New Horizons"
     6#define MyAppNameShort "C-evo-nh"
     7#define MyAppVersion "1.4.0"
     8#define MyAppVersionSuffix "alfa"
    69#define MyAppPublisher "Chronosoft"
    710#define MyAppPublisherShort "Chronosoft"
     
    1720WizardStyle=modern
    1821AppId={{6B40AF4D-C38C-4474-9614-8F0C4376C1CF}
    19 AppName={#MyAppName}
    20 AppVersion={#MyAppVersion}
    21 AppVerName={#MyAppName} {#MyAppVersion}
    22 UninstallDisplayName={#MyAppName}
     22AppName={#MyAppTitle}
     23#ifdef MyAppVersionSuffix
     24#define MyAppVersionSuffix "-" + MyAppVersionSuffix
     25#else
     26#define MyAppVersionSuffix ""
     27#endif
     28AppVersion={#MyAppVersion}{#MyAppVersionSuffix}
     29AppVerName={#MyAppName} {#MyAppVersion}{#MyAppVersionSuffix}
     30UninstallDisplayName={#MyAppTitle}
    2331UninstallDisplayIcon="{app}\{#MyAppExeName}"
    2432VersionInfoVersion={#MyAppVersion}
  • branches/highdpi/LocalPlayer/Help.pas

    r361 r412  
    20572057    Search(InputDlg.EInput.Text);
    20582058    case SearchResult.Count of
    2059       0:
     2059      0: begin
     2060        Gtk2Fix;
    20602061        SimpleMessage(Format(HelpText.Lookup('NOMATCHES'),
    20612062          [InputDlg.EInput.Text]));
     2063      end;
    20622064      1:
    20632065        with THelpLineInfo(SearchResult.Objects[0]) do
  • branches/highdpi/LocalPlayer/MessgEx.pas

    r405 r412  
    543543end;
    544544
     545
     546initialization
     547
    545548end.
  • branches/highdpi/Log.lfm

    r246 r412  
    1919  PixelsPerInch = 96
    2020  Scaled = False
    21   object List: TMemo
     21  object List: TDpiMemo
    2222    Left = 0
    2323    Top = 0
  • branches/highdpi/Log.pas

    r244 r412  
    2121    mInvalid: TDpiMenuItem;
    2222    mTime: TDpiMenuItem;
    23     List: TMemo;
     23    List: TDpiMemo;
    2424    mNegotiation: TDpiMenuItem;
    2525    procedure mLogClick(Sender: TObject);
  • branches/highdpi/Packages/CevoComponents/BaseWin.pas

    r361 r412  
    1414  TBufferedDrawDlg = class(TDrawDlg)
    1515  public
    16     UserLeft, UserTop: integer;
     16    UserLeft: Integer;
     17    UserTop: Integer;
    1718    constructor Create(AOwner: TComponent); override;
    1819    destructor Destroy; override;
     
    2122    procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    2223    procedure FormDeactivate(Sender: TObject);
    23     procedure SmartUpdateContent(ImmUpdate: boolean = false);
     24    procedure SmartUpdateContent(ImmUpdate: Boolean = false);
    2425    procedure StayOnTop_Workaround;
    2526  protected
    26     FWindowMode, ModalFrameIndent: integer;
     27    FWindowMode: Integer;
     28    ModalFrameIndent: Integer;
    2729    HelpContext: string;
    28     procedure ShowNewContent(NewMode: integer; forceclose: boolean = false);
    29     procedure MarkUsedOffscreen(xMax, yMax: integer);
     30    procedure ShowNewContent(NewMode: Integer; ForceClose: Boolean = False);
     31    procedure MarkUsedOffscreen(xMax, yMax: Integer);
    3032    procedure OffscreenPaint; virtual;
    3133    procedure VPaint; virtual;
    3234  public
    33     UsedOffscreenWidth, UsedOffscreenHeight: integer;
     35    UsedOffscreenWidth: Integer;
     36    UsedOffscreenHeight: Integer;
    3437    Offscreen: TDpiBitmap;
    3538    OffscreenUser: TDpiForm;
     
    5356    procedure InitWindowRegion;
    5457    procedure VPaint; override;
    55     procedure FillOffscreen(Left, Top, Width, Height: integer);
     58    procedure FillOffscreen(Left, Top, Width, Height: Integer);
    5659  end;
    5760
     
    155158procedure TBufferedDrawDlg.OffscreenPaint;
    156159begin
    157   if (OffscreenUser <> nil) and (OffscreenUser <> self) then
     160  if (OffscreenUser <> nil) and (OffscreenUser <> Self) then
    158161    OffscreenUser.Update; // complete working with old owner to prevent rebound
    159   OffscreenUser := self;
     162  OffscreenUser := Self;
    160163end;
    161164
     
    165168end;
    166169
    167 procedure TBufferedDrawDlg.ShowNewContent(NewMode: integer;
    168   forceclose: boolean);
    169 begin
    170   if Visible then
    171   begin
    172     assert((NewMode = wmModal) or (FWindowMode <> wmModal));
     170procedure TBufferedDrawDlg.ShowNewContent(NewMode: Integer;
     171  ForceClose: Boolean);
     172begin
     173  if Visible then begin
     174    Assert((NewMode = wmModal) or (FWindowMode <> wmModal));
    173175    // don't make modal window non-modal
    174176    if (NewMode = wmModal) and (forceclose or (FWindowMode <> wmModal)) then
     
    194196        OnShow(nil);
    195197      Invalidate;
    196       BringToFront
    197     end
     198      BringToFront;
     199    end;
    198200  end
    199201  else
     
    205207      ShowModal
    206208    else
    207       Show
    208   end
    209 end;
    210 
    211 procedure TBufferedDrawDlg.SmartUpdateContent(ImmUpdate: boolean);
    212 begin
    213   if Visible then
    214   begin
     209      Show;
     210  end;
     211end;
     212
     213procedure TBufferedDrawDlg.SmartUpdateContent(ImmUpdate: Boolean);
     214begin
     215  if Visible then begin
    215216    OffscreenPaint;
    216217    SmartInvalidate;
     
    220221end;
    221222
    222 procedure TBufferedDrawDlg.MarkUsedOffscreen(xMax, yMax: integer);
     223procedure TBufferedDrawDlg.MarkUsedOffscreen(xMax, yMax: Integer);
    223224begin
    224225  if xMax > UsedOffscreenWidth then
     
    256257  CaptionLeft := 0;
    257258  CaptionRight := $FFFF;
    258   WideBottom := false;
    259   FullCaption := true;
    260   TexOverride := false;
    261   ModalIndication := true;
     259  WideBottom := False;
     260  FullCaption := True;
     261  TexOverride := False;
     262  ModalIndication := True;
    262263  Canvas.Brush.Style := bsClear;
    263264  InnerWidth := Width - 2 * SideFrame;
     
    284285      DeleteObject(r1);
    285286    end;
    286   InvalidateRgn(Handle, r0, false);
     287  InvalidateRgn(Handle, r0, False);
    287288  DeleteObject(r0);
    288289end;
     
    348349  // RFrame(Canvas,SideFrame-2,TitleHeight-2,ClientWidth-SideFrame+1,
    349350  // InnerBottom+1,MainTexture.ColorBevelShade,MainTexture.ColorBevelLight);
    350   if FullCaption then
    351   begin
     351  if FullCaption then begin
    352352    if (FWindowMode <> wmModal) or not ModalIndication then
    353353    begin
     
    479479    // DeleteObject(r1);
    480480  end;
    481   SetWindowRgn(Handle, r0, false);
     481  SetWindowRgn(Handle, r0, False);
    482482  // DeleteObject(r0); // causes crash with Windows 95
    483483end;
    484484
    485 procedure TFramedDlg.FillOffscreen(Left, Top, Width, Height: integer);
     485procedure TFramedDlg.FillOffscreen(Left, Top, Width, Height: Integer);
    486486begin
    487487  Fill(Offscreen.Canvas, Left, Top, Width, Height,
     
    493493begin
    494494  if Offscreen <> nil then
    495     exit;
     495    Exit;
    496496  Offscreen := TDpiBitmap.Create;
    497497  Offscreen.PixelFormat := pf24bit;
  • branches/highdpi/Packages/CevoComponents/DrawDlg.pas

    r405 r412  
    4646    MessgText: string;
    4747  protected
    48     Lines, TopSpace: integer;
     48    Lines: Integer;
     49    TopSpace: Integer;
    4950    procedure SplitText(preview: boolean);
    5051    procedure CorrectHeight;
     
    7172begin
    7273  inherited;
     74  Color := clBlack;
    7375  TitleHeight := 0;
    7476  MoveActive := False;
  • branches/highdpi/Packages/Common

    • Property svn:ignore set to
      lib
  • branches/highdpi/Packages/DpiControls/UDpiControls.pas

    r405 r412  
    981981    NativeMemo: TMemo;
    982982    function GetLines: TStrings;
     983    function GetReadOnly: Boolean;
     984    function GetScrollBars: TScrollStyle;
     985    function GetWordWrap: Boolean;
    983986    procedure SetLines(AValue: TStrings);
     987    procedure SetReadOnly(AValue: Boolean);
     988    procedure SetScrollBars(AValue: TScrollStyle);
     989    procedure SetWordWrap(AValue: Boolean);
     990  protected
     991    function GetNativeWinControl: TWinControl; override;
     992    function GetNativeMemo: TMemo; virtual;
    984993  public
    985994    procedure Clear;
    986     function GetNativeMemo: TMemo;
    987995    constructor Create(TheOwner: TComponent); override;
    988996    destructor Destroy; override;
     997  published
    989998    property Lines: TStrings read GetLines write SetLines;
     999    property WordWrap: Boolean read GetWordWrap write SetWordWrap default True;
     1000    property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;
     1001    property ScrollBars: TScrollStyle read GetScrollBars write SetScrollBars default ssNone;
    9901002  end;
    9911003
     
    16581670end;
    16591671
     1672function TDpiMemo.GetReadOnly: Boolean;
     1673begin
     1674  Result := GetNativeMemo.ReadOnly;
     1675end;
     1676
     1677function TDpiMemo.GetScrollBars: TScrollStyle;
     1678begin
     1679  Result := GetNativeMemo.ScrollBars;
     1680end;
     1681
     1682function TDpiMemo.GetWordWrap: Boolean;
     1683begin
     1684  Result := GetNativeMemo.WordWrap;
     1685end;
     1686
    16601687procedure TDpiMemo.SetLines(AValue: TStrings);
    16611688begin
    16621689  GetNativeMemo.Lines := AValue;
     1690end;
     1691
     1692procedure TDpiMemo.SetReadOnly(AValue: Boolean);
     1693begin
     1694  GetNativeMemo.ReadOnly := AValue;
     1695end;
     1696
     1697procedure TDpiMemo.SetScrollBars(AValue: TScrollStyle);
     1698begin
     1699  GetNativeMemo.ScrollBars := AValue;
     1700end;
     1701
     1702procedure TDpiMemo.SetWordWrap(AValue: Boolean);
     1703begin
     1704  GetNativeMemo.WordWrap := AValue;
     1705end;
     1706
     1707function TDpiMemo.GetNativeWinControl: TWinControl;
     1708begin
     1709  Result := GetNativeMemo;
    16631710end;
    16641711
  • branches/highdpi/Settings.lfm

    r405 r412  
    113113  object EditShortCutPrimary: TDpiEdit
    114114    Left = 176
    115     Height = 42
     115    Height = 19
     116        BorderStyle = bsNone
    116117    Top = 256
    117118    Width = 136
     119    Color = clBlack
    118120    Enabled = False
     121    Font.Charset = DEFAULT_CHARSET
     122    Font.Color = 4176863
     123    Font.Height = -15
     124    Font.Name = 'Times New Roman'
     125    Font.Style = [fsBold]
    119126    OnKeyUp = EditShortCutPrimaryKeyUp
     127    ParentFont = False
    120128    TabOrder = 2
    121129  end
    122130  object EditShortCutSecondary: TDpiEdit
    123131    Left = 328
    124     Height = 42
     132    Height = 19
     133        BorderStyle = bsNone
    125134    Top = 257
    126135    Width = 136
     136    Color = clBlack
    127137    Enabled = False
     138    Font.Charset = DEFAULT_CHARSET
     139    Font.Color = 4176863
     140    Font.Height = -15
     141    Font.Name = 'Times New Roman'
     142    Font.Style = [fsBold]
    128143    OnKeyUp = EditShortCutSecondaryKeyUp
     144    ParentFont = False
    129145    TabOrder = 3
    130146  end
  • branches/highdpi/Settings.pas

    r405 r412  
    3737    procedure FormPaint(Sender: TObject);
    3838    procedure FormShow(Sender: TObject);
    39     procedure ListKeyBindingsSelectionChange(Sender: TObject; User: boolean);
     39    procedure ListKeyBindingsSelectionChange(Sender: TObject; User: Boolean);
    4040    procedure ButtonOkClick(Sender: TObject);
    4141    procedure Up2BtnClick(Sender: TObject);
     
    166166  Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3,
    167167    MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
     168  EditFrame(Canvas, EditShortCutPrimary.BoundsRect, MainTexture);
     169  EditFrame(Canvas, EditShortCutSecondary.BoundsRect, MainTexture);
    168170  EditFrame(Canvas, ListLanguages.BoundsRect, MainTexture);
    169171  BtnFrame(Canvas, ButtonOk.BoundsRect, MainTexture);
     
    196198  LoadData;
    197199  LocalKeyBindings.LoadToStrings(ListKeyBindings.Items);
     200  EditShortCutPrimary.Font.Color := MainTexture.ColorMark;
     201  EditShortCutSecondary.Font.Color := MainTexture.ColorMark;
    198202end;
    199203
    200204procedure TSettingsDlg.ListKeyBindingsSelectionChange(Sender: TObject;
    201   User: boolean);
     205  User: Boolean);
    202206begin
    203207  if Assigned(CurrentKeyBinding) then begin
Note: See TracChangeset for help on using the changeset viewer.