FLHDE / freelancer-hd-edition-installer

Installer for Freelancer: HD Edition.
https://github.com/BC46/freelancer-hd-edition
10 stars 4 forks source link

Entire label text should be clickable #38

Closed BC46 closed 9 months ago

BC46 commented 3 years ago

image

In standard HTML, it's possible to check a checkbox by clicking its label text. In the current installer this is also possible. However, it seems that only half of the text is actually clickable, the other part isn't.

I'm not sure if this can be changed in Inno setup installers though.

oliverpechey commented 3 years ago

We might be able to do some fancy on click event for the label which checks the checkbox. Will leave open but don't think this should be a blocker for 0.4.1

BC46 commented 1 year ago

Turns out we're not meant to actually create separate TLabel elements for each option. Instead, we should use the Caption property for elements like TCheckBox and TRadioButton to set labels directly. Though with this approach the element's Width must be increased manually if the caption is too large, otherwise the text will get cut off.

Example:

RussianFonts := TCheckBox.Create(PageEnglishImprovements);
RussianFonts.Parent := PageEnglishImprovements.Surface;
RussianFonts.Top := descEnglishImprovements.Top + ScaleY(160);
RussianFonts.Caption := 'Use Russian fonts';
RussianFonts.Width := 200;

Edit: I believe this'll also remove the need to decrease the width of the custom checkboxes and radio buttons for Wine users: https://github.com/oliverpechey/Freelancer-hd-edition-install-script/blob/9f2383b722a07cf9b6a371fbdb72059fb653fce4/ui.iss#L1327