Revision: 4286
http://sourceforge.net/p/gexperts/code/4286
Author: akalwahome
Date: 2024-07-07 20:32:51 +0000 (Sun, 07 Jul 2024)
Log Message:
-----------
Merged changes from trunk.
Modified Paths:
--------------
branches/dark-mode/Source/RenameComponents/GX_CompRename.dfm
branches/dark-mode/Source/RenameComponents/GX_CompRename.pas
Modified: branches/dark-mode/Source/RenameComponents/GX_CompRename.dfm
===================================================================
--- branches/dark-mode/Source/RenameComponents/GX_CompRename.dfm 2024-07-07 20:22:52 UTC (rev 4285)
+++ branches/dark-mode/Source/RenameComponents/GX_CompRename.dfm 2024-07-07 20:32:51 UTC (rev 4286)
@@ -16,6 +16,7 @@
Position = poScreenCenter
Scaled = False
PixelsPerInch = 96
+ OnShow = FormShow
TextHeight = 14
object lblOldName: TLabel
Left = 8
Modified: branches/dark-mode/Source/RenameComponents/GX_CompRename.pas
===================================================================
--- branches/dark-mode/Source/RenameComponents/GX_CompRename.pas 2024-07-07 20:22:52 UTC (rev 4285)
+++ branches/dark-mode/Source/RenameComponents/GX_CompRename.pas 2024-07-07 20:32:51 UTC (rev 4286)
@@ -71,6 +71,7 @@
procedure b_Margins3Click(Sender: TObject);
procedure b_Margins6Click(Sender: TObject);
procedure b_Margins8Click(Sender: TObject);
+ procedure FormShow(Sender: TObject);
private
FIsValidComponentName: TIsValidComponentName;
FProperties: TObjectList;
@@ -200,7 +201,6 @@
begin
ActiveControl := edtNewName;
// lblReason.Top := btnOK.Top + Round((btnOK.Height / 2) - (lblReason.Height / 2));
- InitDpiScaler;
FixTabOrder;
Result := ShowModal;
end;
@@ -225,6 +225,17 @@
pc_Additional.TabOrder := FProperties.Count + 5;
end;
+procedure TfmCompRename.FormShow(Sender: TObject);
+begin
+ inherited;
+ // Adjust some button positons and size after scaling
+ // DisableAlign;
+ b_AlignRight.Left := b_AlignTop.Left + b_AlignTop.Width - b_AlignRight.Width;
+ b_AlignClient.Left := b_AlignLeft.Left + b_AlignLeft.Width + 1;
+ b_AlignClient.Width := b_AlignRight.Left - b_AlignClient.Left - 2;
+ // EnableAlign;
+end;
+
function TfmCompRename.GetNewName: WideString;
begin
Result := Trim(edtNewName.Text);
@@ -470,6 +481,8 @@
constructor TfmCompRename.Create(Owner: TComponent);
begin
inherited;
+ TControl_SetMinConstraints(Self);
+
FProperties := TObjectList.Create(False);
FAlignButtons[alTop] := TdzSpeedBitBtn.Create(b_AlignTop);
@@ -873,6 +886,7 @@
frm.OldName := CompName;
frm.SetComponent(Component);
+ frm.InitDpiScaler;
Index := RenameRuleList.IndexOfName(Component.GetComponentType);
if Index <> -1 then
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|