- Timestamp:
- Nov 4, 2021, 2:59:11 PM (3 years ago)
- Location:
- branches/highdpi
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Global.pas
r405 r412 10 10 CevoHomepageShort = 'app.zdechov.net/c-evo'; 11 11 CevoHomepage = 'https://' + CevoHomepageShort; 12 CevoContactShort = 'app.zdechov.net/c-evo# Contact';12 CevoContactShort = 'app.zdechov.net/c-evo#Support'; 13 13 CevoContact = 'https://' + CevoContactShort; 14 14 CevoContactBug = 'https://app.zdechov.net/c-evo/report/1'; -
branches/highdpi/Inp.pas
r361 r412 5 5 6 6 uses 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; 10 9 11 10 type … … 38 37 TitleHeight := Height; 39 38 InitButtons; 40 Center := true;39 Center := True; 41 40 end; 42 41 … … 64 63 ModalResult := mrCancel 65 64 else 66 ModalResult := mrOK 65 ModalResult := mrOK; 67 66 end; 68 67 … … 72 71 begin 73 72 Key := #0; 74 ModalResult := mrOK 73 ModalResult := mrOK; 75 74 end 76 75 else if Key = #27 then 77 76 begin 78 77 Key := #0; 79 ModalResult := mrCancel 80 end 78 ModalResult := mrCancel; 79 end; 81 80 end; 82 81 … … 93 92 procedure TInputDlg.FormClose(Sender: TObject; var Action: TCloseAction); 94 93 begin 95 Center := true94 Center := True; 96 95 end; 97 96 98 97 procedure TInputDlg.CenterToRect(Rect: TRect); 99 98 begin 100 Center := false;99 Center := False; 101 100 Left := Rect.Left + (Rect.Right - Rect.Left - Width) div 2; 102 101 Top := Rect.Top + (Rect.Bottom - Rect.Top - Height) div 2; -
branches/highdpi/Install/win/C-evo 32-bit.iss
r246 r412 2 2 3 3 [Setup] 4 OutputBaseFilename=Install-{#MyAppName }-{#MyAppVersion}-win324 OutputBaseFilename=Install-{#MyAppNameShort}-{#MyAppVersion}{#MyAppVersionSuffix}-win32 5 5 6 6 [Components] -
branches/highdpi/Install/win/C-evo 64-bit.iss
r246 r412 4 4 ArchitecturesAllowed=x64 5 5 ArchitecturesInstallIn64BitMode=x64 6 OutputBaseFilename=Install-{#MyAppName }-{#MyAppVersion}-win646 OutputBaseFilename=Install-{#MyAppNameShort}-{#MyAppVersion}{#MyAppVersionSuffix}-win64 7 7 8 8 [Files] -
branches/highdpi/Install/win/C-evo.iss
r405 r412 10 10 ; installation to run on all architectures (including Itanium, 11 11 ; since it's capable of running 32-bit code too). 12 OutputBaseFilename=Install-{#MyAppName }-{#MyAppVersion}12 OutputBaseFilename=Install-{#MyAppNameShort}-{#MyAppVersion}{#MyAppVersionSuffix} 13 13 14 14 [Components] -
branches/highdpi/Install/win/Common.iss
r349 r412 3 3 4 4 #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" 6 9 #define MyAppPublisher "Chronosoft" 7 10 #define MyAppPublisherShort "Chronosoft" … … 17 20 WizardStyle=modern 18 21 AppId={{6B40AF4D-C38C-4474-9614-8F0C4376C1CF} 19 AppName={#MyAppName} 20 AppVersion={#MyAppVersion} 21 AppVerName={#MyAppName} {#MyAppVersion} 22 UninstallDisplayName={#MyAppName} 22 AppName={#MyAppTitle} 23 #ifdef MyAppVersionSuffix 24 #define MyAppVersionSuffix "-" + MyAppVersionSuffix 25 #else 26 #define MyAppVersionSuffix "" 27 #endif 28 AppVersion={#MyAppVersion}{#MyAppVersionSuffix} 29 AppVerName={#MyAppName} {#MyAppVersion}{#MyAppVersionSuffix} 30 UninstallDisplayName={#MyAppTitle} 23 31 UninstallDisplayIcon="{app}\{#MyAppExeName}" 24 32 VersionInfoVersion={#MyAppVersion} -
branches/highdpi/LocalPlayer/Help.pas
r361 r412 2057 2057 Search(InputDlg.EInput.Text); 2058 2058 case SearchResult.Count of 2059 0: 2059 0: begin 2060 Gtk2Fix; 2060 2061 SimpleMessage(Format(HelpText.Lookup('NOMATCHES'), 2061 2062 [InputDlg.EInput.Text])); 2063 end; 2062 2064 1: 2063 2065 with THelpLineInfo(SearchResult.Objects[0]) do -
branches/highdpi/LocalPlayer/MessgEx.pas
r405 r412 543 543 end; 544 544 545 546 initialization 547 545 548 end. -
branches/highdpi/Log.lfm
r246 r412 19 19 PixelsPerInch = 96 20 20 Scaled = False 21 object List: T Memo21 object List: TDpiMemo 22 22 Left = 0 23 23 Top = 0 -
branches/highdpi/Log.pas
r244 r412 21 21 mInvalid: TDpiMenuItem; 22 22 mTime: TDpiMenuItem; 23 List: T Memo;23 List: TDpiMemo; 24 24 mNegotiation: TDpiMenuItem; 25 25 procedure mLogClick(Sender: TObject); -
branches/highdpi/Packages/CevoComponents/BaseWin.pas
r361 r412 14 14 TBufferedDrawDlg = class(TDrawDlg) 15 15 public 16 UserLeft, UserTop: integer; 16 UserLeft: Integer; 17 UserTop: Integer; 17 18 constructor Create(AOwner: TComponent); override; 18 19 destructor Destroy; override; … … 21 22 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 22 23 procedure FormDeactivate(Sender: TObject); 23 procedure SmartUpdateContent(ImmUpdate: boolean = false);24 procedure SmartUpdateContent(ImmUpdate: Boolean = false); 24 25 procedure StayOnTop_Workaround; 25 26 protected 26 FWindowMode, ModalFrameIndent: integer; 27 FWindowMode: Integer; 28 ModalFrameIndent: Integer; 27 29 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); 30 32 procedure OffscreenPaint; virtual; 31 33 procedure VPaint; virtual; 32 34 public 33 UsedOffscreenWidth, UsedOffscreenHeight: integer; 35 UsedOffscreenWidth: Integer; 36 UsedOffscreenHeight: Integer; 34 37 Offscreen: TDpiBitmap; 35 38 OffscreenUser: TDpiForm; … … 53 56 procedure InitWindowRegion; 54 57 procedure VPaint; override; 55 procedure FillOffscreen(Left, Top, Width, Height: integer);58 procedure FillOffscreen(Left, Top, Width, Height: Integer); 56 59 end; 57 60 … … 155 158 procedure TBufferedDrawDlg.OffscreenPaint; 156 159 begin 157 if (OffscreenUser <> nil) and (OffscreenUser <> self) then160 if (OffscreenUser <> nil) and (OffscreenUser <> Self) then 158 161 OffscreenUser.Update; // complete working with old owner to prevent rebound 159 OffscreenUser := self;162 OffscreenUser := Self; 160 163 end; 161 164 … … 165 168 end; 166 169 167 procedure TBufferedDrawDlg.ShowNewContent(NewMode: integer; 168 forceclose: boolean); 169 begin 170 if Visible then 171 begin 172 assert((NewMode = wmModal) or (FWindowMode <> wmModal)); 170 procedure TBufferedDrawDlg.ShowNewContent(NewMode: Integer; 171 ForceClose: Boolean); 172 begin 173 if Visible then begin 174 Assert((NewMode = wmModal) or (FWindowMode <> wmModal)); 173 175 // don't make modal window non-modal 174 176 if (NewMode = wmModal) and (forceclose or (FWindowMode <> wmModal)) then … … 194 196 OnShow(nil); 195 197 Invalidate; 196 BringToFront 197 end 198 BringToFront; 199 end; 198 200 end 199 201 else … … 205 207 ShowModal 206 208 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; 211 end; 212 213 procedure TBufferedDrawDlg.SmartUpdateContent(ImmUpdate: Boolean); 214 begin 215 if Visible then begin 215 216 OffscreenPaint; 216 217 SmartInvalidate; … … 220 221 end; 221 222 222 procedure TBufferedDrawDlg.MarkUsedOffscreen(xMax, yMax: integer);223 procedure TBufferedDrawDlg.MarkUsedOffscreen(xMax, yMax: Integer); 223 224 begin 224 225 if xMax > UsedOffscreenWidth then … … 256 257 CaptionLeft := 0; 257 258 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; 262 263 Canvas.Brush.Style := bsClear; 263 264 InnerWidth := Width - 2 * SideFrame; … … 284 285 DeleteObject(r1); 285 286 end; 286 InvalidateRgn(Handle, r0, false);287 InvalidateRgn(Handle, r0, False); 287 288 DeleteObject(r0); 288 289 end; … … 348 349 // RFrame(Canvas,SideFrame-2,TitleHeight-2,ClientWidth-SideFrame+1, 349 350 // InnerBottom+1,MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); 350 if FullCaption then 351 begin 351 if FullCaption then begin 352 352 if (FWindowMode <> wmModal) or not ModalIndication then 353 353 begin … … 479 479 // DeleteObject(r1); 480 480 end; 481 SetWindowRgn(Handle, r0, false);481 SetWindowRgn(Handle, r0, False); 482 482 // DeleteObject(r0); // causes crash with Windows 95 483 483 end; 484 484 485 procedure TFramedDlg.FillOffscreen(Left, Top, Width, Height: integer);485 procedure TFramedDlg.FillOffscreen(Left, Top, Width, Height: Integer); 486 486 begin 487 487 Fill(Offscreen.Canvas, Left, Top, Width, Height, … … 493 493 begin 494 494 if Offscreen <> nil then 495 exit;495 Exit; 496 496 Offscreen := TDpiBitmap.Create; 497 497 Offscreen.PixelFormat := pf24bit; -
branches/highdpi/Packages/CevoComponents/DrawDlg.pas
r405 r412 46 46 MessgText: string; 47 47 protected 48 Lines, TopSpace: integer; 48 Lines: Integer; 49 TopSpace: Integer; 49 50 procedure SplitText(preview: boolean); 50 51 procedure CorrectHeight; … … 71 72 begin 72 73 inherited; 74 Color := clBlack; 73 75 TitleHeight := 0; 74 76 MoveActive := False; -
branches/highdpi/Packages/Common
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
branches/highdpi/Packages/DpiControls/UDpiControls.pas
r405 r412 981 981 NativeMemo: TMemo; 982 982 function GetLines: TStrings; 983 function GetReadOnly: Boolean; 984 function GetScrollBars: TScrollStyle; 985 function GetWordWrap: Boolean; 983 986 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; 984 993 public 985 994 procedure Clear; 986 function GetNativeMemo: TMemo;987 995 constructor Create(TheOwner: TComponent); override; 988 996 destructor Destroy; override; 997 published 989 998 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; 990 1002 end; 991 1003 … … 1658 1670 end; 1659 1671 1672 function TDpiMemo.GetReadOnly: Boolean; 1673 begin 1674 Result := GetNativeMemo.ReadOnly; 1675 end; 1676 1677 function TDpiMemo.GetScrollBars: TScrollStyle; 1678 begin 1679 Result := GetNativeMemo.ScrollBars; 1680 end; 1681 1682 function TDpiMemo.GetWordWrap: Boolean; 1683 begin 1684 Result := GetNativeMemo.WordWrap; 1685 end; 1686 1660 1687 procedure TDpiMemo.SetLines(AValue: TStrings); 1661 1688 begin 1662 1689 GetNativeMemo.Lines := AValue; 1690 end; 1691 1692 procedure TDpiMemo.SetReadOnly(AValue: Boolean); 1693 begin 1694 GetNativeMemo.ReadOnly := AValue; 1695 end; 1696 1697 procedure TDpiMemo.SetScrollBars(AValue: TScrollStyle); 1698 begin 1699 GetNativeMemo.ScrollBars := AValue; 1700 end; 1701 1702 procedure TDpiMemo.SetWordWrap(AValue: Boolean); 1703 begin 1704 GetNativeMemo.WordWrap := AValue; 1705 end; 1706 1707 function TDpiMemo.GetNativeWinControl: TWinControl; 1708 begin 1709 Result := GetNativeMemo; 1663 1710 end; 1664 1711 -
branches/highdpi/Settings.lfm
r405 r412 113 113 object EditShortCutPrimary: TDpiEdit 114 114 Left = 176 115 Height = 42 115 Height = 19 116 BorderStyle = bsNone 116 117 Top = 256 117 118 Width = 136 119 Color = clBlack 118 120 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] 119 126 OnKeyUp = EditShortCutPrimaryKeyUp 127 ParentFont = False 120 128 TabOrder = 2 121 129 end 122 130 object EditShortCutSecondary: TDpiEdit 123 131 Left = 328 124 Height = 42 132 Height = 19 133 BorderStyle = bsNone 125 134 Top = 257 126 135 Width = 136 136 Color = clBlack 127 137 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] 128 143 OnKeyUp = EditShortCutSecondaryKeyUp 144 ParentFont = False 129 145 TabOrder = 3 130 146 end -
branches/highdpi/Settings.pas
r405 r412 37 37 procedure FormPaint(Sender: TObject); 38 38 procedure FormShow(Sender: TObject); 39 procedure ListKeyBindingsSelectionChange(Sender: TObject; User: boolean);39 procedure ListKeyBindingsSelectionChange(Sender: TObject; User: Boolean); 40 40 procedure ButtonOkClick(Sender: TObject); 41 41 procedure Up2BtnClick(Sender: TObject); … … 166 166 Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 167 167 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 168 EditFrame(Canvas, EditShortCutPrimary.BoundsRect, MainTexture); 169 EditFrame(Canvas, EditShortCutSecondary.BoundsRect, MainTexture); 168 170 EditFrame(Canvas, ListLanguages.BoundsRect, MainTexture); 169 171 BtnFrame(Canvas, ButtonOk.BoundsRect, MainTexture); … … 196 198 LoadData; 197 199 LocalKeyBindings.LoadToStrings(ListKeyBindings.Items); 200 EditShortCutPrimary.Font.Color := MainTexture.ColorMark; 201 EditShortCutSecondary.Font.Color := MainTexture.ColorMark; 198 202 end; 199 203 200 204 procedure TSettingsDlg.ListKeyBindingsSelectionChange(Sender: TObject; 201 User: boolean);205 User: Boolean); 202 206 begin 203 207 if Assigned(CurrentKeyBinding) then begin
Note:
See TracChangeset
for help on using the changeset viewer.