1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[ui] fix an UI scaling issue with high DPI displays for non English languages

* Closes #601
This commit is contained in:
Pete Batard 2015-09-24 23:59:10 +01:00
parent ec0c41d4c2
commit daf039ee18
3 changed files with 14 additions and 8 deletions

View file

@ -1,8 +1,9 @@
o Version 2.4 (2015.09.??) o Version 2.4 (2015.09.??)
Allow some settings and cheat modes to be persisted Allow some settings and cheat modes to be persisted between sessions
Fix multiple issues with flash drive detection Fix multiple issues with flash drive detection
Fix removal of drives that contain no media Fix listing of drives that contain no media
Fix cheat mode to save the current USB to *uncompressed* VHD (Alt-V) Fix cheat mode to save the current USB to *uncompressed* VHD (Alt-V)
Fix an UI scaling issue with high DPI displays for non English languages
Update most of the translations Update most of the translations
o Version 2.3 (2015.08.28) o Version 2.3 (2015.08.28)

View file

@ -1664,7 +1664,6 @@ void InitDialog(HWND hDlg)
// High DPI scaling // High DPI scaling
i16 = GetSystemMetrics(SM_CXSMICON); i16 = GetSystemMetrics(SM_CXSMICON);
hDC = GetDC(hDlg); hDC = GetDC(hDlg);
fScale = GetDeviceCaps(hDC, LOGPIXELSX) / 96.0f;
lfHeight = -MulDiv(9, GetDeviceCaps(hDC, LOGPIXELSY), 72); lfHeight = -MulDiv(9, GetDeviceCaps(hDC, LOGPIXELSY), 72);
if (hDC != NULL) if (hDC != NULL)
ReleaseDC(hDlg, hDC); ReleaseDC(hDlg, hDC);
@ -2066,6 +2065,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
POINT Point; POINT Point;
RECT DialogRect, DesktopRect, LangToolbarRect; RECT DialogRect, DesktopRect, LangToolbarRect;
LONG progress_style; LONG progress_style;
HDC hDC;
int nDeviceIndex, fs, tt, i, nWidth, nHeight, nb_devices, selected_language, offset; int nDeviceIndex, fs, tt, i, nWidth, nHeight, nb_devices, selected_language, offset;
char tmp[128]; char tmp[128];
loc_cmd* lcmd = NULL; loc_cmd* lcmd = NULL;
@ -2114,6 +2114,11 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
case WM_INITDIALOG: case WM_INITDIALOG:
PF_INIT(SHChangeNotifyRegister, shell32); PF_INIT(SHChangeNotifyRegister, shell32);
// Make sure fScale is set before the first call to apply localization, so that move/resize scale appropriately
hDC = GetDC(hDlg);
fScale = GetDeviceCaps(hDC, LOGPIXELSX) / 96.0f;
if (hDC != NULL)
ReleaseDC(hDlg, hDC);
apply_localization(IDD_DIALOG, hDlg); apply_localization(IDD_DIALOG, hDlg);
SetUpdateCheck(); SetUpdateCheck();
togo_mode = TRUE; // We display the ToGo controls by default and need to hide them togo_mode = TRUE; // We display the ToGo controls by default and need to hide them

View file

@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376 IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.4.749" CAPTION "Rufus 2.4.750"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0 FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -317,8 +317,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,4,749,0 FILEVERSION 2,4,750,0
PRODUCTVERSION 2,4,749,0 PRODUCTVERSION 2,4,750,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -335,13 +335,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.4.749" VALUE "FileVersion", "2.4.750"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.4.749" VALUE "ProductVersion", "2.4.750"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"