|
@@ -700,7 +700,7 @@ end;
|
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-procedure LoadBitmap(Image: TBitmapImage; FileName: string; BackgroundColor: TColor);
|
|
|
|
|
|
+procedure LoadBitmap(Image: TBitmapImage; FileName: string);
|
|
var
|
|
var
|
|
Bitmap: TBitmap;
|
|
Bitmap: TBitmap;
|
|
begin
|
|
begin
|
|
@@ -709,16 +709,15 @@ begin
|
|
Bitmap.LoadFromFile(FileName);
|
|
Bitmap.LoadFromFile(FileName);
|
|
Image.Bitmap := Bitmap;
|
|
Image.Bitmap := Bitmap;
|
|
Bitmap.Free;
|
|
Bitmap.Free;
|
|
- Image.BackColor := BackgroundColor;
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure LoadEmbededBitmap(Image: TBitmapImage; Name: string; BackgroundColor: TColor);
|
|
|
|
|
|
+procedure LoadEmbededBitmap(Image: TBitmapImage; Name: string);
|
|
var
|
|
var
|
|
FileName: string;
|
|
FileName: string;
|
|
begin
|
|
begin
|
|
ExtractTemporaryFile(Name);
|
|
ExtractTemporaryFile(Name);
|
|
FileName := ExpandConstant('{tmp}\' + Name);
|
|
FileName := ExpandConstant('{tmp}\' + Name);
|
|
- LoadBitmap(Image, FileName, BackgroundColor);
|
|
|
|
|
|
+ LoadBitmap(Image, FileName);
|
|
// we won't need this anymore
|
|
// we won't need this anymore
|
|
DeleteFile(FileName);
|
|
DeleteFile(FileName);
|
|
end;
|
|
end;
|
|
@@ -733,12 +732,12 @@ begin
|
|
else Result := 100;
|
|
else Result := 100;
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure LoadEmbededScaledIcon(Image: TBitmapImage; NameBase: string; SizeBase: Integer; BackgroundColor: TColor);
|
|
|
|
|
|
+procedure LoadEmbededScaledIcon(Image: TBitmapImage; NameBase: string; SizeBase: Integer);
|
|
var
|
|
var
|
|
Name: String;
|
|
Name: String;
|
|
begin
|
|
begin
|
|
Name := Format('%s %d.bmp', [NameBase, SizeBase * GetScalingFactor div 100]);
|
|
Name := Format('%s %d.bmp', [NameBase, SizeBase * GetScalingFactor div 100]);
|
|
- LoadEmbededBitmap(Image, Name, BackgroundColor);
|
|
|
|
|
|
+ LoadEmbededBitmap(Image, Name);
|
|
Image.AutoSize := True;
|
|
Image.AutoSize := True;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1014,7 +1013,7 @@ begin
|
|
Image.Top := GetBottom(CommanderRadioButton) + ScaleY(6);
|
|
Image.Top := GetBottom(CommanderRadioButton) + ScaleY(6);
|
|
Image.Left := CommanderRadioButton.Left + ScaleX(45);
|
|
Image.Left := CommanderRadioButton.Left + ScaleX(45);
|
|
Image.Parent := InterfacePage.Surface;
|
|
Image.Parent := InterfacePage.Surface;
|
|
- LoadEmbededScaledIcon(Image, '{#CommanderFileBase}', 32, InterfacePage.Surface.Color);
|
|
|
|
|
|
+ LoadEmbededScaledIcon(Image, '{#CommanderFileBase}', 32);
|
|
Image.OnClick := @ImageClick;
|
|
Image.OnClick := @ImageClick;
|
|
Image.Tag := Integer(CommanderRadioButton);
|
|
Image.Tag := Integer(CommanderRadioButton);
|
|
#endif
|
|
#endif
|
|
@@ -1047,7 +1046,7 @@ begin
|
|
Image.Top := GetBottom(ExplorerRadioButton) + ScaleY(6);
|
|
Image.Top := GetBottom(ExplorerRadioButton) + ScaleY(6);
|
|
Image.Left := ExplorerRadioButton.Left + ScaleX(45);
|
|
Image.Left := ExplorerRadioButton.Left + ScaleX(45);
|
|
Image.Parent := InterfacePage.Surface;
|
|
Image.Parent := InterfacePage.Surface;
|
|
- LoadEmbededScaledIcon(Image, '{#ExplorerFileBase}', 32, InterfacePage.Surface.Color);
|
|
|
|
|
|
+ LoadEmbededScaledIcon(Image, '{#ExplorerFileBase}', 32);
|
|
Image.OnClick := @ImageClick;
|
|
Image.OnClick := @ImageClick;
|
|
Image.Tag := Integer(ExplorerRadioButton);
|
|
Image.Tag := Integer(ExplorerRadioButton);
|
|
#endif
|
|
#endif
|
|
@@ -1120,7 +1119,7 @@ begin
|
|
|
|
|
|
#ifdef ImagesDir
|
|
#ifdef ImagesDir
|
|
Image := TBitmapImage.Create(DonationPanel);
|
|
Image := TBitmapImage.Create(DonationPanel);
|
|
- LoadEmbededBitmap(Image, '{#PayPalCardImage}', DonationPanel.Color);
|
|
|
|
|
|
+ LoadEmbededBitmap(Image, '{#PayPalCardImage}');
|
|
Image.AutoSize := True;
|
|
Image.AutoSize := True;
|
|
Image.Cursor := crHand;
|
|
Image.Cursor := crHand;
|
|
Image.Parent := DonationPanel;
|
|
Image.Parent := DonationPanel;
|
|
@@ -1143,7 +1142,7 @@ begin
|
|
// Text does not scale as quick as with DPI,
|
|
// Text does not scale as quick as with DPI,
|
|
// so the icon may overlap the labels. Shift them.
|
|
// so the icon may overlap the labels. Shift them.
|
|
P := WizardForm.SelectDirBitmapImage.Width;
|
|
P := WizardForm.SelectDirBitmapImage.Width;
|
|
- LoadEmbededScaledIcon(WizardForm.SelectDirBitmapImage, '{#SelectDirFileBase}', 32, WizardForm.SelectDirPage.Color);
|
|
|
|
|
|
+ LoadEmbededScaledIcon(WizardForm.SelectDirBitmapImage, '{#SelectDirFileBase}', 32);
|
|
P := (WizardForm.SelectDirBitmapImage.Width - P);
|
|
P := (WizardForm.SelectDirBitmapImage.Width - P);
|
|
// Vertical change should be the same as horizontal
|
|
// Vertical change should be the same as horizontal
|
|
WizardForm.SelectDirLabel.Left := WizardForm.SelectDirLabel.Left + P;
|
|
WizardForm.SelectDirLabel.Left := WizardForm.SelectDirLabel.Left + P;
|
|
@@ -1735,7 +1734,7 @@ begin
|
|
SponsorImage.ShowHint := True;
|
|
SponsorImage.ShowHint := True;
|
|
SponsorImage.Stretch := True;
|
|
SponsorImage.Stretch := True;
|
|
try
|
|
try
|
|
- LoadBitmap(SponsorImage, ImagePath, SponsorPage.Surface.Color);
|
|
|
|
|
|
+ LoadBitmap(SponsorImage, ImagePath);
|
|
except
|
|
except
|
|
Log('Error loading sponsor image: ' + GetExceptionMessage);
|
|
Log('Error loading sponsor image: ' + GetExceptionMessage);
|
|
SponsorStatus := 'I';
|
|
SponsorStatus := 'I';
|