mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00: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);
|
||||
}
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_ACCEPTFILES
|
||||
CAPTION "Rufus 3.0.1272"
|
||||
CAPTION "Rufus 3.0.1273"
|
||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||
|
@ -389,8 +389,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,0,1272,0
|
||||
PRODUCTVERSION 3,0,1272,0
|
||||
FILEVERSION 3,0,1273,0
|
||||
PRODUCTVERSION 3,0,1273,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -407,13 +407,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "3.0.1272"
|
||||
VALUE "FileVersion", "3.0.1273"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "3.0.1272"
|
||||
VALUE "ProductVersion", "3.0.1273"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -1112,7 +1112,8 @@ BOOL CreateTooltip(HWND hControl, const char* message, int duration)
|
|||
}
|
||||
|
||||
// Create the tooltip window
|
||||
ttlist[i].hTip = CreateWindowExW(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
|
||||
ttlist[i].hTip = CreateWindowExW(right_to_left_mode ? WS_EX_LAYOUTRTL : 0,
|
||||
TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog, NULL,
|
||||
hMainInstance, NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue