tvplanit: Update VpWavDlg to scale correctly in the HighDpi mode of Lazarus 1.8. Fix scaled size of SoundFinderBtn in VpEvntEditDlg.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5877 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-05-19 21:42:06 +00:00
parent 748cdf1c53
commit 856b65b6bd
4 changed files with 51 additions and 31 deletions

View File

@ -827,11 +827,13 @@ object DlgEventEdit: TDlgEventEdit
AnchorSideLeft.Control = AlarmAdvanceType
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = AlarmAdvanceType
AnchorSideTop.Side = asrCenter
AnchorSideBottom.Control = AlarmAdvanceType
AnchorSideBottom.Side = asrBottom
Left = 356
Height = 24
Top = 177
Height = 23
Top = 178
Width = 24
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 16
Glyph.Data = {
F6000000424DF600000000000000760000002800000010000000100000000100

View File

@ -247,9 +247,6 @@ begin
EndTime.TabOrder := EndDate.TabOrder + 1;
EndTimePlaceHolder.Free;
SoundFinderBtn.Height := AlarmAdvanceType.Height;
SoundFinderBtn.Width := SoundFinderBtn.Height;
ReturnCode := rtAbandon;
PopLists;
LoadCaptions;
@ -656,10 +653,11 @@ begin
cnv.Free;
end;
RepeatUntil.Width := StartDate.Width;
// CustomInterval.Left := RepeatUntil.Left;
AlarmAdvance.Width := AdvanceUpDown.Left - 2 - AlarmAdvance.Left;
AlarmAdvanceType.Width := StartTime.Width;
SoundFinderBtn.Width := SoundFinderBtn.Height;
AlignOKCancel(OKBtn, CancelBtn, ButtonPanel);
end;

View File

@ -10,8 +10,9 @@ object FrmSoundDialog: TFrmSoundDialog
ClientWidth = 736
KeyPreview = True
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '1.7'
LCLVersion = '1.9.0.0'
object PageControl1: TPageControl
Left = 0
Height = 474
@ -30,24 +31,26 @@ object FrmSoundDialog: TFrmSoundDialog
Left = 209
Height = 446
Top = 0
Width = 519
Width = 515
Align = alClient
BorderSpacing.Right = 4
BevelOuter = bvNone
ClientHeight = 446
ClientWidth = 519
ClientWidth = 515
TabOrder = 2
object Panel1: TPanel
Left = 0
Height = 27
Top = 0
Width = 519
Width = 515
Align = alTop
AutoSize = True
BevelOuter = bvNone
ClientHeight = 27
ClientWidth = 519
ClientWidth = 515
TabOrder = 0
object CBDefault: TCheckBox
AnchorSideTop.Control = Panel1
Left = 4
Height = 19
Top = 4
@ -60,18 +63,21 @@ object FrmSoundDialog: TFrmSoundDialog
end
object ButtonPanel: TPanel
Left = 0
Height = 38
Top = 408
Width = 519
Height = 33
Top = 413
Width = 515
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 38
ClientWidth = 519
ClientHeight = 33
ClientWidth = 515
TabOrder = 2
object PlayButton: TSpeedButton
Left = 4
AnchorSideTop.Control = ButtonPanel
AnchorSideTop.Side = asrCenter
Left = 0
Height = 25
Top = 8
Top = 4
Width = 29
Glyph.Data = {
DE010000424DDE01000000000000760000002800000024000000120000000100
@ -95,11 +101,17 @@ object FrmSoundDialog: TFrmSoundDialog
OnClick = PlayButtonClick
end
object OkBtn: TButton
Left = 356
AnchorSideTop.Control = ButtonPanel
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = CancelBtn
Left = 361
Height = 25
Top = 8
Top = 4
Width = 75
Anchors = [akTop, akRight]
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Bottom = 4
Caption = 'OkBtn'
Default = True
ModalResult = 1
@ -107,11 +119,17 @@ object FrmSoundDialog: TFrmSoundDialog
TabOrder = 0
end
object CancelBtn: TButton
Left = 436
AnchorSideTop.Control = ButtonPanel
AnchorSideRight.Control = ButtonPanel
AnchorSideRight.Side = asrBottom
Left = 440
Height = 25
Top = 8
Top = 4
Width = 75
Anchors = [akTop, akRight]
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Bottom = 4
Cancel = True
Caption = 'CancelBtn'
ModalResult = 2
@ -121,11 +139,11 @@ object FrmSoundDialog: TFrmSoundDialog
end
object ShellListView: TShellListView
Left = 0
Height = 381
Height = 386
Top = 27
Width = 515
Align = alClient
BorderSpacing.Right = 4
Anchors = [akTop, akLeft, akBottom]
Color = clDefault
HideSelection = False
Mask = '*.wav'

View File

@ -68,6 +68,7 @@ type
procedure CancelBtnClick(Sender: TObject);
procedure CBDefaultClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure OkBtnClick(Sender: TObject);
procedure PlayButtonClick(Sender: TObject);
private
@ -131,7 +132,11 @@ begin
ShellTreeView.Align := alClient;
Label4.Align := alClient;
end;
{=====}
procedure TFrmSoundDialog.FormShow(Sender: TObject);
begin
AlignOKCancel(OkBtn, CancelBtn, ButtonPanel);
end;
function TFrmSoundDialog.GetSelectedFileName: String;
begin
@ -151,7 +156,6 @@ begin
DingPath := GetSelectedFileName;
PlaySound;
end;
{=====}
procedure TFrmSoundDialog.PlaySound;
begin
@ -160,10 +164,6 @@ begin
end;
procedure TFrmSoundDialog.Populate;
var
DIST: Integer = 8;
VDIST: Integer = 8;
HBORDER: Integer = 8;
begin
TabSheet1.Caption := RSSelectASound;
Self.Caption := RSSoundFinder;
@ -173,6 +173,7 @@ begin
Label3.Caption := RSNothingToSelectFrom;
Label4.Caption := RSNothingToSelectFrom;
(*
DIST := ScaleX(DIST, DesignTimeDPI);
VDist := ScaleY(VDist, DesignTimeDPI);
HBORDER := ScaleX(HBORDER, DesignTimeDPI);
@ -197,6 +198,7 @@ begin
CancelBtn.TabOrder := 0;
OKBtn.TabOrder := 1;
{$ENDIF}
*)
if DingPath = '' then begin
CBDefault.Checked := true;
if (MediaFolder <> '') and DirectoryExists(MediaFolder) then