Changeset 210 for branches/highdpi/Locale.pas
- Timestamp:
- May 9, 2020, 4:02:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Locale.pas
r178 r210 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,9 ScreenTools, Messg, ButtonA, Registry, fgl, Directories, DrawDlg, UDpiControls;8 UDpiControls, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ScreenTools, Messg, ButtonA, Registry, fgl, Directories, DrawDlg, ButtonC; 10 10 11 11 type … … 27 27 28 28 TLocaleDlg = class(TDrawDlg) 29 ButtonFullscreen: TButtonC; 29 30 List: TDpiListBox; 30 31 OKBtn: TButtonA; 31 32 CancelBtn: TButtonA; 33 procedure ButtonFullscreenClick(Sender: TObject); 32 34 procedure CancelBtnClick(Sender: TObject); 33 35 procedure FormCreate(Sender: TObject); … … 101 103 OkBtn.Graphic := GrExt[HGrSystem].Data; 102 104 CancelBtn.Graphic := GrExt[HGrSystem].Data; 105 106 ButtonFullscreen.Graphic := GrExt[HGrSystem].Data; 107 if FullScreen then ButtonFullscreen.ButtonIndex := 3 108 else ButtonFullscreen.ButtonIndex := 2; 103 109 end; 104 110 105 111 procedure TLocaleDlg.CancelBtnClick(Sender: TObject); 106 112 begin 107 ModalResult := mrOk; 113 ModalResult := mrCancel; 114 end; 115 116 procedure TLocaleDlg.ButtonFullscreenClick(Sender: TObject); 117 begin 118 FullScreen := not FullScreen; 119 ButtonFullscreen.ButtonIndex := ButtonFullscreen.ButtonIndex xor 1; 108 120 end; 109 121 … … 114 126 115 127 procedure TLocaleDlg.FormPaint(Sender: TObject); 128 var 129 S: string; 116 130 begin 117 131 PaintBackground(self, 3, 3, ClientWidth - 6, ClientHeight - 6); … … 124 138 BtnFrame(Canvas, OKBtn.BoundsRect, MainTexture); 125 139 BtnFrame(Canvas, CancelBtn.BoundsRect, MainTexture); 140 141 RFrame(Canvas, ButtonFullscreen.Left - 1, ButtonFullscreen.Top - 1, 142 ButtonFullscreen.Left + 12, ButtonFullscreen.Top + 12, MainTexture.clBevelShade, 143 MainTexture.clBevelLight); 144 145 s := Phrases.Lookup('SETTINGS', 0); 146 LoweredTextOut(Canvas, -2, MainTexture, ButtonFullscreen.Left + 32, 147 ButtonFullscreen.Top - 4, s); 126 148 end; 127 149 … … 138 160 begin 139 161 LocaleCode := Languages[List.ItemIndex].ShortName; 140 ModalResult := mr Cancel;162 ModalResult := mrOk; 141 163 end; 142 164
Note:
See TracChangeset
for help on using the changeset viewer.