You've already forked lazarus-ccr
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:
@ -827,11 +827,13 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
AnchorSideLeft.Control = AlarmAdvanceType
|
AnchorSideLeft.Control = AlarmAdvanceType
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = AlarmAdvanceType
|
AnchorSideTop.Control = AlarmAdvanceType
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideBottom.Control = AlarmAdvanceType
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 356
|
Left = 356
|
||||||
Height = 24
|
Height = 23
|
||||||
Top = 177
|
Top = 178
|
||||||
Width = 24
|
Width = 24
|
||||||
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Left = 16
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
F6000000424DF600000000000000760000002800000010000000100000000100
|
F6000000424DF600000000000000760000002800000010000000100000000100
|
||||||
|
@ -247,9 +247,6 @@ begin
|
|||||||
EndTime.TabOrder := EndDate.TabOrder + 1;
|
EndTime.TabOrder := EndDate.TabOrder + 1;
|
||||||
EndTimePlaceHolder.Free;
|
EndTimePlaceHolder.Free;
|
||||||
|
|
||||||
SoundFinderBtn.Height := AlarmAdvanceType.Height;
|
|
||||||
SoundFinderBtn.Width := SoundFinderBtn.Height;
|
|
||||||
|
|
||||||
ReturnCode := rtAbandon;
|
ReturnCode := rtAbandon;
|
||||||
PopLists;
|
PopLists;
|
||||||
LoadCaptions;
|
LoadCaptions;
|
||||||
@ -656,10 +653,11 @@ begin
|
|||||||
cnv.Free;
|
cnv.Free;
|
||||||
end;
|
end;
|
||||||
RepeatUntil.Width := StartDate.Width;
|
RepeatUntil.Width := StartDate.Width;
|
||||||
// CustomInterval.Left := RepeatUntil.Left;
|
|
||||||
AlarmAdvance.Width := AdvanceUpDown.Left - 2 - AlarmAdvance.Left;
|
AlarmAdvance.Width := AdvanceUpDown.Left - 2 - AlarmAdvance.Left;
|
||||||
AlarmAdvanceType.Width := StartTime.Width;
|
AlarmAdvanceType.Width := StartTime.Width;
|
||||||
|
|
||||||
|
SoundFinderBtn.Width := SoundFinderBtn.Height;
|
||||||
|
|
||||||
AlignOKCancel(OKBtn, CancelBtn, ButtonPanel);
|
AlignOKCancel(OKBtn, CancelBtn, ButtonPanel);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -10,8 +10,9 @@ object FrmSoundDialog: TFrmSoundDialog
|
|||||||
ClientWidth = 736
|
ClientWidth = 736
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '1.9.0.0'
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 474
|
Height = 474
|
||||||
@ -30,24 +31,26 @@ object FrmSoundDialog: TFrmSoundDialog
|
|||||||
Left = 209
|
Left = 209
|
||||||
Height = 446
|
Height = 446
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 519
|
Width = 515
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
BorderSpacing.Right = 4
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 446
|
ClientHeight = 446
|
||||||
ClientWidth = 519
|
ClientWidth = 515
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 27
|
Height = 27
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 519
|
Width = 515
|
||||||
Align = alTop
|
Align = alTop
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 27
|
ClientHeight = 27
|
||||||
ClientWidth = 519
|
ClientWidth = 515
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object CBDefault: TCheckBox
|
object CBDefault: TCheckBox
|
||||||
|
AnchorSideTop.Control = Panel1
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 4
|
Top = 4
|
||||||
@ -60,18 +63,21 @@ object FrmSoundDialog: TFrmSoundDialog
|
|||||||
end
|
end
|
||||||
object ButtonPanel: TPanel
|
object ButtonPanel: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 38
|
Height = 33
|
||||||
Top = 408
|
Top = 413
|
||||||
Width = 519
|
Width = 515
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
|
AutoSize = True
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 38
|
ClientHeight = 33
|
||||||
ClientWidth = 519
|
ClientWidth = 515
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object PlayButton: TSpeedButton
|
object PlayButton: TSpeedButton
|
||||||
Left = 4
|
AnchorSideTop.Control = ButtonPanel
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 0
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 8
|
Top = 4
|
||||||
Width = 29
|
Width = 29
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
DE010000424DDE01000000000000760000002800000024000000120000000100
|
DE010000424DDE01000000000000760000002800000024000000120000000100
|
||||||
@ -95,11 +101,17 @@ object FrmSoundDialog: TFrmSoundDialog
|
|||||||
OnClick = PlayButtonClick
|
OnClick = PlayButtonClick
|
||||||
end
|
end
|
||||||
object OkBtn: TButton
|
object OkBtn: TButton
|
||||||
Left = 356
|
AnchorSideTop.Control = ButtonPanel
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = CancelBtn
|
||||||
|
Left = 361
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 8
|
Top = 4
|
||||||
Width = 75
|
Width = 75
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Left = 4
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
Caption = 'OkBtn'
|
Caption = 'OkBtn'
|
||||||
Default = True
|
Default = True
|
||||||
ModalResult = 1
|
ModalResult = 1
|
||||||
@ -107,11 +119,17 @@ object FrmSoundDialog: TFrmSoundDialog
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object CancelBtn: TButton
|
object CancelBtn: TButton
|
||||||
Left = 436
|
AnchorSideTop.Control = ButtonPanel
|
||||||
|
AnchorSideRight.Control = ButtonPanel
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 440
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 8
|
Top = 4
|
||||||
Width = 75
|
Width = 75
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Left = 4
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
Cancel = True
|
Cancel = True
|
||||||
Caption = 'CancelBtn'
|
Caption = 'CancelBtn'
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
@ -121,11 +139,11 @@ object FrmSoundDialog: TFrmSoundDialog
|
|||||||
end
|
end
|
||||||
object ShellListView: TShellListView
|
object ShellListView: TShellListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 381
|
Height = 386
|
||||||
Top = 27
|
Top = 27
|
||||||
Width = 515
|
Width = 515
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Right = 4
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
Color = clDefault
|
Color = clDefault
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
Mask = '*.wav'
|
Mask = '*.wav'
|
||||||
|
@ -68,6 +68,7 @@ type
|
|||||||
procedure CancelBtnClick(Sender: TObject);
|
procedure CancelBtnClick(Sender: TObject);
|
||||||
procedure CBDefaultClick(Sender: TObject);
|
procedure CBDefaultClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
procedure OkBtnClick(Sender: TObject);
|
procedure OkBtnClick(Sender: TObject);
|
||||||
procedure PlayButtonClick(Sender: TObject);
|
procedure PlayButtonClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
@ -131,7 +132,11 @@ begin
|
|||||||
ShellTreeView.Align := alClient;
|
ShellTreeView.Align := alClient;
|
||||||
Label4.Align := alClient;
|
Label4.Align := alClient;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
procedure TFrmSoundDialog.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
AlignOKCancel(OkBtn, CancelBtn, ButtonPanel);
|
||||||
|
end;
|
||||||
|
|
||||||
function TFrmSoundDialog.GetSelectedFileName: String;
|
function TFrmSoundDialog.GetSelectedFileName: String;
|
||||||
begin
|
begin
|
||||||
@ -151,7 +156,6 @@ begin
|
|||||||
DingPath := GetSelectedFileName;
|
DingPath := GetSelectedFileName;
|
||||||
PlaySound;
|
PlaySound;
|
||||||
end;
|
end;
|
||||||
{=====}
|
|
||||||
|
|
||||||
procedure TFrmSoundDialog.PlaySound;
|
procedure TFrmSoundDialog.PlaySound;
|
||||||
begin
|
begin
|
||||||
@ -160,10 +164,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFrmSoundDialog.Populate;
|
procedure TFrmSoundDialog.Populate;
|
||||||
var
|
|
||||||
DIST: Integer = 8;
|
|
||||||
VDIST: Integer = 8;
|
|
||||||
HBORDER: Integer = 8;
|
|
||||||
begin
|
begin
|
||||||
TabSheet1.Caption := RSSelectASound;
|
TabSheet1.Caption := RSSelectASound;
|
||||||
Self.Caption := RSSoundFinder;
|
Self.Caption := RSSoundFinder;
|
||||||
@ -173,6 +173,7 @@ begin
|
|||||||
Label3.Caption := RSNothingToSelectFrom;
|
Label3.Caption := RSNothingToSelectFrom;
|
||||||
Label4.Caption := RSNothingToSelectFrom;
|
Label4.Caption := RSNothingToSelectFrom;
|
||||||
|
|
||||||
|
(*
|
||||||
DIST := ScaleX(DIST, DesignTimeDPI);
|
DIST := ScaleX(DIST, DesignTimeDPI);
|
||||||
VDist := ScaleY(VDist, DesignTimeDPI);
|
VDist := ScaleY(VDist, DesignTimeDPI);
|
||||||
HBORDER := ScaleX(HBORDER, DesignTimeDPI);
|
HBORDER := ScaleX(HBORDER, DesignTimeDPI);
|
||||||
@ -197,6 +198,7 @@ begin
|
|||||||
CancelBtn.TabOrder := 0;
|
CancelBtn.TabOrder := 0;
|
||||||
OKBtn.TabOrder := 1;
|
OKBtn.TabOrder := 1;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
*)
|
||||||
if DingPath = '' then begin
|
if DingPath = '' then begin
|
||||||
CBDefault.Checked := true;
|
CBDefault.Checked := true;
|
||||||
if (MediaFolder <> '') and DirectoryExists(MediaFolder) then
|
if (MediaFolder <> '') and DirectoryExists(MediaFolder) then
|
||||||
|
Reference in New Issue
Block a user