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:
parent
ec0c41d4c2
commit
daf039ee18
3 changed files with 14 additions and 8 deletions
|
@ -1,8 +1,9 @@
|
|||
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 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 an UI scaling issue with high DPI displays for non English languages
|
||||
Update most of the translations
|
||||
|
||||
o Version 2.3 (2015.08.28)
|
||||
|
|
|
@ -1664,7 +1664,6 @@ void InitDialog(HWND hDlg)
|
|||
// High DPI scaling
|
||||
i16 = GetSystemMetrics(SM_CXSMICON);
|
||||
hDC = GetDC(hDlg);
|
||||
fScale = GetDeviceCaps(hDC, LOGPIXELSX) / 96.0f;
|
||||
lfHeight = -MulDiv(9, GetDeviceCaps(hDC, LOGPIXELSY), 72);
|
||||
if (hDC != NULL)
|
||||
ReleaseDC(hDlg, hDC);
|
||||
|
@ -2066,6 +2065,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
POINT Point;
|
||||
RECT DialogRect, DesktopRect, LangToolbarRect;
|
||||
LONG progress_style;
|
||||
HDC hDC;
|
||||
int nDeviceIndex, fs, tt, i, nWidth, nHeight, nb_devices, selected_language, offset;
|
||||
char tmp[128];
|
||||
loc_cmd* lcmd = NULL;
|
||||
|
@ -2114,6 +2114,11 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
|
||||
case WM_INITDIALOG:
|
||||
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);
|
||||
SetUpdateCheck();
|
||||
togo_mode = TRUE; // We display the ToGo controls by default and need to hide them
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
|
||||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||
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
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -317,8 +317,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,4,749,0
|
||||
PRODUCTVERSION 2,4,749,0
|
||||
FILEVERSION 2,4,750,0
|
||||
PRODUCTVERSION 2,4,750,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -335,13 +335,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.4.749"
|
||||
VALUE "FileVersion", "2.4.750"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "2.4.749"
|
||||
VALUE "ProductVersion", "2.4.750"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue