[gimp/gimp-2-8] Installer: automatically adjust width of Customize button when the text doesn't fit
- From: Jernej Simončič <jernejs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Installer: automatically adjust width of Customize button when the text doesn't fit
- Date: Thu, 18 Feb 2016 19:01:59 +0000 (UTC)
commit 3c729611618a502127ea667a1c126cc7deb8d5cd
Author: Jernej Simončič <jernej|s-cccp eternallybored org>
Date: Thu Feb 18 20:01:13 2016 +0100
Installer: automatically adjust width of Customize button when the text doesn't fit
build/windows/installer/gimp3264.iss | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/build/windows/installer/gimp3264.iss b/build/windows/installer/gimp3264.iss
index 504b39d..6c2be9b 100644
--- a/build/windows/installer/gimp3264.iss
+++ b/build/windows/installer/gimp3264.iss
@@ -664,6 +664,7 @@ var lblAssocInfo: TNewStaticText;
btnSelectAll,btnSelectUnused: TNewButton;
i,ButtonWidth: Integer;
ButtonText: TArrayOfString;
+ MeasureLabel: TNewStaticText;
//lblInfo: TNewStaticText;
begin
DebugMsg('InitCustomPages','pgAssociations');
@@ -784,11 +785,26 @@ begin
OnClick := @InstallOnClick;
end;
+ //used to measure text width
+ MeasureLabel := TNewStaticText.Create(WizardForm);
+ with MeasureLabel do
+ begin
+ Parent := WizardForm;
+ Left := 0;
+ Top := 0;
+ AutoSize := True;
+ Caption := CustomMessage('Customize');
+ end;
+
btnCustomize := TNewButton.Create(WizardForm);
with btnCustomize do
begin
Parent := WizardForm;
Width := WizardForm.NextButton.Width;
+
+ if Width < (MeasureLabel.Width + ScaleX(8)) then
+ Width := MeasureLabel.Width + ScaleX(8);
+
Height := WizardForm.NextButton.Height;
Left := WizardForm.ClientWidth - (WizardForm.CancelButton.Left +
WizardForm.CancelButton.Width);
//Left := WizardForm.BackButton.Left;
@@ -800,6 +816,8 @@ begin
OnClick := @CustomizeOnClick;
end;
+ MeasureLabel.Free;
+
end;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]