mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-27 13:14:26 -04:00
[loc] fix tooltip justification for RTL languages
* Left alignment was used instead of right * Also improve device tooltip display
This commit is contained in:
parent
070e28aa5a
commit
db6a5bb749
3 changed files with 14 additions and 9 deletions
10
src/rufus.c
10
src/rufus.c
|
@ -843,10 +843,14 @@ static BOOL PopulateProperties(void)
|
|||
SizeToHumanReadable(SelectedDrive.DiskSize, FALSE, use_fake_units));
|
||||
|
||||
// Add a tooltip (with the size of the device in parenthesis)
|
||||
device_tooltip = (char*) malloc(safe_strlen(DriveID.String[device_index]) + 16);
|
||||
device_tooltip = (char*) malloc(safe_strlen(DriveID.String[device_index]) + 32);
|
||||
if (device_tooltip != NULL) {
|
||||
safe_sprintf(device_tooltip, safe_strlen(DriveID.String[device_index]) + 16, "%s (%s)",
|
||||
DriveID.String[device_index], SizeToHumanReadable(SelectedDrive.DiskSize, FALSE, FALSE));
|
||||
if (right_to_left_mode)
|
||||
safe_sprintf(device_tooltip, safe_strlen(DriveID.String[device_index]) + 32, "(%s) %s",
|
||||
SizeToHumanReadable(SelectedDrive.DiskSize, FALSE, FALSE), DriveID.String[device_index]);
|
||||
else
|
||||
safe_sprintf(device_tooltip, safe_strlen(DriveID.String[device_index]) + 32, "%s (%s)",
|
||||
DriveID.String[device_index], SizeToHumanReadable(SelectedDrive.DiskSize, FALSE, FALSE));
|
||||
CreateTooltip(hDeviceList, device_tooltip, -1);
|
||||
free(device_tooltip);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue