Quote:
Originally Posted by KaktoR
@César
Code:
[ProgressBarSI]
//Width=0 // integer (Default = SmallInstaller >> Width - 30)
Could you change this to "Default = SmallInstaller TextWidth"? This is the case with [ProgressBar], where this is correct in my opinion.
|
I think it's already like this, see:
Code:
SIProgressGauge := TNewProgressBar.Create(WizardForm);
with SIProgressGauge do begin
Parent := WizardForm;
Left := GetValInt('ProgressBarSI', 'Left', GetValInt('SmallInstaller', 'TextLeft', 15)) + GetValInt('ProgressBarSI', 'MoveX', 0);
if SIProgressVertical then
begin
Top := GetValInt('ProgressBarSI', 'Top', GetValInt('SmallInstaller', 'TextTop', 15)) + GetValInt('ProgressBarSI', 'MoveY', 0);
Width := GetValInt('ProgressBar' + IfThen(IsSectionEmpty('ProgressBarSI'), '', 'SI'), 'Width', 14);
Height := GetValInt('ProgressBarSI', 'Height', GetValInt('SmallInstaller', 'TextHeight', GetValInt('SmallInstaller', 'Height', 220) - 30));
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) or PBS_VERTICAL);
SetWindowPos(Handle, 0, 0, 0, 0, 0, SWP_FRAMECHANGED or SWP_NOZORDER or SWP_NOSIZE or SWP_NOMOVE);
end else
begin
Top := GetValInt('ProgressBarSI', 'Top', GetValInt('SmallInstaller', 'TextTop', 15) + 65) + GetValInt('ProgressBarSI', 'MoveY', 0);
Width := GetValInt('ProgressBarSI', 'Width', GetValInt('SmallInstaller', 'TextWidth', GetValInt('SmallInstaller', 'Width', 500) - 30));
Height := GetValInt('ProgressBar' + IfThen(IsSectionEmpty('ProgressBarSI'), '', 'SI'), 'Height', 14);
end;
Min := 0;
Max := 1000;
Position := 0;
if CustomCursor then
OldCursor := SetClassLong(Handle, GCL_HCURSOR, NewCursor);
Visible := False;
end;
Code:
Width := GetValInt('ProgressBarSI', 'Width', GetValInt('SmallInstaller', 'TextWidth', GetValInt('SmallInstaller', 'Width', 500) - 30));
GetValInt('SmallInstaller', 'Width', 500) - 30
This will only be used if [SmallInstaller] TextWidth= does not exist.
If the key Width does not exist it will be 500.
Default To ProgressBarSI WIDTH === read ini: ProgressBarSI/Width << SmallInstaller/TextWidth << SmallInstaller/Width-30 << 500-30