Ignore:
Timestamp:
Jun 23, 2019, 3:15:29 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Use DpiControls package for High DPI support.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Locale.pas

    r167 r178  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ScreenTools, Messg, ButtonA, Registry, fgl, Directories, DrawDlg, ButtonC;
     9  ScreenTools, Messg, ButtonA, Registry, fgl, Directories, DrawDlg, UDpiControls;
    1010
    1111type
     
    2727
    2828  TLocaleDlg = class(TDrawDlg)
    29     ButtonFullscreen: TButtonC;
    30     List: TListBox;
     29    List: TDpiListBox;
    3130    OKBtn: TButtonA;
    3231    CancelBtn: TButtonA;
    33     procedure ButtonFullscreenClick(Sender: TObject);
    3432    procedure CancelBtnClick(Sender: TObject);
    3533    procedure FormCreate(Sender: TObject);
     
    103101  OkBtn.Graphic := GrExt[HGrSystem].Data;
    104102  CancelBtn.Graphic := GrExt[HGrSystem].Data;
    105 
    106   ButtonFullscreen.Graphic := GrExt[HGrSystem].Data;
    107   if FullScreen then ButtonFullscreen.ButtonIndex := 3
    108     else ButtonFullscreen.ButtonIndex := 2;
    109103end;
    110104
     
    112106begin
    113107  ModalResult := mrOk;
    114 end;
    115 
    116 procedure TLocaleDlg.ButtonFullscreenClick(Sender: TObject);
    117 begin
    118   FullScreen := not FullScreen;
    119   ButtonFullscreen.ButtonIndex := ButtonFullscreen.ButtonIndex xor 1;
    120108end;
    121109
     
    126114
    127115procedure TLocaleDlg.FormPaint(Sender: TObject);
    128 var
    129   S: string;
    130   W: Integer;
    131116begin
    132117  PaintBackground(self, 3, 3, ClientWidth - 6, ClientHeight - 6);
     
    139124  BtnFrame(Canvas, OKBtn.BoundsRect, MainTexture);
    140125  BtnFrame(Canvas, CancelBtn.BoundsRect, MainTexture);
    141 
    142   RFrame(Canvas, ButtonFullscreen.Left - 1, ButtonFullscreen.Top - 1,
    143     ButtonFullscreen.Left + 12, ButtonFullscreen.Top + 12, MainTexture.clBevelShade,
    144     MainTexture.clBevelLight);
    145 
    146   s := Phrases.Lookup('SETTINGS', 0);
    147   LoweredTextOut(Canvas, -2, MainTexture, ButtonFullscreen.Left + 32,
    148     ButtonFullscreen.Top - 4, s);
    149126end;
    150127
Note: See TracChangeset for help on using the changeset viewer.