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

[ui] fix tabbing order for the new UI design

* Accessibility *IS* a thankless job...
This commit is contained in:
Pete Batard 2018-05-11 17:35:48 +01:00
parent 40b0d9e0d2
commit 9815a18009
5 changed files with 55 additions and 50 deletions

View file

@ -1,8 +1,9 @@
o Version 3.0 (2018.??.??) o Version 3.0 (2018.??.??)
UI redesign to follow the flow of user operations (with thanks to Fahad Al-Riyami for the concept) UI redesign to follow the flow of user operations (with thanks to Fahad Al-Riyami for the concept)
Drop XP and Vista platform support Drop XP and Vista platform support
Switch all downloads to SSL and use rufus.ie as base URL Switch all downloads to SSL and use https://rufus.ie as the new base URL
Improve support of efi.img files on Linux ISOs Improve support of efi.img files on Linux ISOs
Add ARM64 support for UEFI:NTFS
Fix delays when querying floppy drives during device enumeration Fix delays when querying floppy drives during device enumeration
Improve translation support and remove manual positioning Improve translation support and remove manual positioning
Internal fixes and improvements Internal fixes and improvements

View file

@ -784,8 +784,7 @@ static void EnableControls(BOOL bEnable)
SendMessage(hMultiToolbar, TB_ENABLEBUTTON, (WPARAM)IDC_SETTINGS, (LPARAM)bEnable); SendMessage(hMultiToolbar, TB_ENABLEBUTTON, (WPARAM)IDC_SETTINGS, (LPARAM)bEnable);
// Checksum button is enabled if an image has been selected // Checksum button is enabled if an image has been selected
SendMessage(hHashToolbar, TB_ENABLEBUTTON, (WPARAM)IDC_HASH, EnableWindow(hHashToolbar, bEnable && (bt == BT_IMAGE) && (image_path != NULL));
(LPARAM)(bEnable && (bt == BT_IMAGE) && (image_path != NULL)));
// Toggle CLOSE/CANCEL // Toggle CLOSE/CANCEL
SetDlgItemTextU(hMainDialog, IDCANCEL, bEnable ? uppercase_close : uppercase_cancel); SetDlgItemTextU(hMainDialog, IDCANCEL, bEnable ? uppercase_close : uppercase_cancel);
@ -793,7 +792,7 @@ static void EnableControls(BOOL bEnable)
// Only enable the following controls if a device is active // Only enable the following controls if a device is active
bEnable = (ComboBox_GetCurSel(hDeviceList) < 0) ? FALSE : bEnable; bEnable = (ComboBox_GetCurSel(hDeviceList) < 0) ? FALSE : bEnable;
EnableWindow(GetDlgItem(hMainDialog, IDC_IMAGE_OPTION), bEnable); EnableWindow(GetDlgItem(hMainDialog, IDC_IMAGE_OPTION), bEnable);
SendMessage(hSaveToolbar, TB_ENABLEBUTTON, (WPARAM)IDC_SAVE, (LPARAM)bEnable); EnableWindow(hSaveToolbar, bEnable);
// Enable or disable the Start button and the other boot options // Enable or disable the Start button and the other boot options
bEnable = ((bt == BT_IMAGE) && (image_path == NULL)) ? FALSE : bEnable; bEnable = ((bt == BT_IMAGE) && (image_path == NULL)) ? FALSE : bEnable;
@ -1213,7 +1212,7 @@ static void ToggleAdvancedDeviceOptions(BOOL enable)
GetWindowRect(hAdvancedDeviceToolbar, &rc); GetWindowRect(hAdvancedDeviceToolbar, &rc);
MapWindowPoints(NULL, hMainDialog, (POINT*)&rc, 2); MapWindowPoints(NULL, hMainDialog, (POINT*)&rc, 2);
SendMessage(hAdvancedDeviceToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz); SendMessage(hAdvancedDeviceToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
SetWindowPos(hAdvancedDeviceToolbar, HWND_TOP, rc.left, rc.top, sz.cx, rc.bottom - rc.top, 0); SetWindowPos(hAdvancedDeviceToolbar, hTargetSystem, rc.left, rc.top, sz.cx, rc.bottom - rc.top, 0);
// Move the controls up or down // Move the controls up or down
for (i = 0; i<ARRAYSIZE(advanced_device_move_ids); i++) for (i = 0; i<ARRAYSIZE(advanced_device_move_ids); i++)
@ -1225,8 +1224,7 @@ static void ToggleAdvancedDeviceOptions(BOOL enable)
GetWindowRect(hDeviceList, &rc); GetWindowRect(hDeviceList, &rc);
MapWindowPoints(NULL, hMainDialog, (POINT*)&rc, 2); MapWindowPoints(NULL, hMainDialog, (POINT*)&rc, 2);
SetWindowPos(hDeviceList, HWND_TOP, rc.left, rc.top, SetWindowPos(hDeviceList, HWND_TOP, rc.left, rc.top, enable ? fw - ssw - sbw : fw, rc.bottom - rc.top, 0);
enable ? fw - ssw - sbw : fw, rc.bottom - rc.top, 0);
// Resize the main dialog and log window // Resize the main dialog and log window
ResizeDialogs(shift); ResizeDialogs(shift);
@ -1256,7 +1254,7 @@ static void ToggleAdvancedFormatOptions(BOOL enable)
GetWindowRect(hAdvancedFormatToolbar, &rc); GetWindowRect(hAdvancedFormatToolbar, &rc);
MapWindowPoints(NULL, hMainDialog, (POINT*)&rc, 2); MapWindowPoints(NULL, hMainDialog, (POINT*)&rc, 2);
SendMessage(hAdvancedFormatToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz); SendMessage(hAdvancedFormatToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
SetWindowPos(hAdvancedFormatToolbar, HWND_TOP, rc.left, rc.top, sz.cx, rc.bottom - rc.top, 0); SetWindowPos(hAdvancedFormatToolbar, hClusterSize, rc.left, rc.top, sz.cx, rc.bottom - rc.top, 0);
// Move the controls up or down // Move the controls up or down
for (i = 0; i<ARRAYSIZE(advanced_format_move_ids); i++) for (i = 0; i<ARRAYSIZE(advanced_format_move_ids); i++)
@ -1927,9 +1925,7 @@ static void CreateSmallButtons(HWND hDlg)
else if (i16 >= 20) else if (i16 >= 20)
icon_offset = 10; icon_offset = 10;
hSaveToolbar = CreateWindowExW(0, TOOLBARCLASSNAME, NULL, hSaveToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, TOOLBAR_STYLE,
WS_CHILD | WS_TABSTOP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NOPARENTALIGN |
CCS_NODIVIDER | TBSTYLE_BUTTON | TBSTYLE_TOOLTIPS | TBSTYLE_AUTOSIZE,
0, 0, 0, 0, hMainDialog, (HMENU)IDC_SAVE_TOOLBAR, hMainInstance, NULL); 0, 0, 0, 0, hMainDialog, (HMENU)IDC_SAVE_TOOLBAR, hMainInstance, NULL);
hImageList = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_HIGHQUALITYSCALE | ILC_MIRROR, 1, 0); hImageList = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_HIGHQUALITYSCALE | ILC_MIRROR, 1, 0);
buffer = GetResource(hMainInstance, MAKEINTRESOURCEA(IDI_SAVE_16 + icon_offset), _RT_RCDATA, "save icon", &bufsize, FALSE); buffer = GetResource(hMainInstance, MAKEINTRESOURCEA(IDI_SAVE_16 + icon_offset), _RT_RCDATA, "save icon", &bufsize, FALSE);
@ -1945,9 +1941,7 @@ static void CreateSmallButtons(HWND hDlg)
tbToolbarButtons[0].iBitmap = 0; tbToolbarButtons[0].iBitmap = 0;
SendMessage(hSaveToolbar, TB_ADDBUTTONS, (WPARAM)1, (LPARAM)&tbToolbarButtons); SendMessage(hSaveToolbar, TB_ADDBUTTONS, (WPARAM)1, (LPARAM)&tbToolbarButtons);
hHashToolbar = CreateWindowExW(0, TOOLBARCLASSNAME, NULL, hHashToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, TOOLBAR_STYLE,
WS_CHILD | WS_TABSTOP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NOPARENTALIGN |
CCS_NODIVIDER | TBSTYLE_BUTTON | TBSTYLE_TOOLTIPS | TBSTYLE_AUTOSIZE,
0, 0, 0, 0, hMainDialog, (HMENU)IDC_HASH_TOOLBAR, hMainInstance, NULL); 0, 0, 0, 0, hMainDialog, (HMENU)IDC_HASH_TOOLBAR, hMainInstance, NULL);
hImageList = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_HIGHQUALITYSCALE | ILC_MIRROR, 1, 0); hImageList = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_HIGHQUALITYSCALE | ILC_MIRROR, 1, 0);
buffer = GetResource(hMainInstance, MAKEINTRESOURCEA(IDI_HASH_16 + icon_offset), _RT_RCDATA, "hash icon", &bufsize, FALSE); buffer = GetResource(hMainInstance, MAKEINTRESOURCEA(IDI_HASH_16 + icon_offset), _RT_RCDATA, "hash icon", &bufsize, FALSE);
@ -2008,9 +2002,7 @@ static void CreateAdditionalControls(HWND hDlg)
// Create the advanced options toolbars // Create the advanced options toolbars
memset(wtbtext, 0, sizeof(wtbtext)); memset(wtbtext, 0, sizeof(wtbtext));
utf8_to_wchar_no_alloc(lmprintf((advanced_mode_device) ? MSG_122 : MSG_121, lmprintf(MSG_119)), wtbtext[0], ARRAYSIZE(wtbtext[0])); utf8_to_wchar_no_alloc(lmprintf((advanced_mode_device) ? MSG_122 : MSG_121, lmprintf(MSG_119)), wtbtext[0], ARRAYSIZE(wtbtext[0]));
hAdvancedDeviceToolbar = CreateWindowExW(0, TOOLBARCLASSNAME, NULL, hAdvancedDeviceToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, TOOLBAR_STYLE,
WS_CHILD | WS_TABSTOP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NOPARENTALIGN |
CCS_NODIVIDER | TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_TRANSPARENT | TBSTYLE_TOOLTIPS | TBSTYLE_AUTOSIZE,
0, 0, 0, 0, hMainDialog, (HMENU)IDC_ADVANCED_DEVICE_TOOLBAR, hMainInstance, NULL); 0, 0, 0, 0, hMainDialog, (HMENU)IDC_ADVANCED_DEVICE_TOOLBAR, hMainInstance, NULL);
SendMessage(hAdvancedDeviceToolbar, CCM_SETVERSION, (WPARAM)6, 0); SendMessage(hAdvancedDeviceToolbar, CCM_SETVERSION, (WPARAM)6, 0);
memset(tbToolbarButtons, 0, sizeof(TBBUTTON)); memset(tbToolbarButtons, 0, sizeof(TBBUTTON));
@ -2028,12 +2020,10 @@ static void CreateAdditionalControls(HWND hDlg)
// Yeah, so, like, TB_GETIDEALSIZE totally super doesn't work on Windows 7, for low zoom factor and when compiled with MSVC... // Yeah, so, like, TB_GETIDEALSIZE totally super doesn't work on Windows 7, for low zoom factor and when compiled with MSVC...
if (sz.cx < 16) if (sz.cx < 16)
sz.cx = fw; sz.cx = fw;
SetWindowPos(hAdvancedDeviceToolbar, HWND_TOP, rc.left + toolbar_dx, rc.top, sz.cx, rc.bottom - rc.top, 0); SetWindowPos(hAdvancedDeviceToolbar, hTargetSystem, rc.left + toolbar_dx, rc.top, sz.cx, rc.bottom - rc.top, 0);
utf8_to_wchar_no_alloc(lmprintf((advanced_mode_format) ? MSG_122 : MSG_121, lmprintf(MSG_120)), wtbtext[1], ARRAYSIZE(wtbtext[1])); utf8_to_wchar_no_alloc(lmprintf((advanced_mode_format) ? MSG_122 : MSG_121, lmprintf(MSG_120)), wtbtext[1], ARRAYSIZE(wtbtext[1]));
hAdvancedFormatToolbar = CreateWindowExW(0, TOOLBARCLASSNAME, NULL, hAdvancedFormatToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, TOOLBAR_STYLE,
WS_CHILD | WS_TABSTOP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NOPARENTALIGN |
CCS_NODIVIDER | TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_TRANSPARENT | TBSTYLE_TOOLTIPS | TBSTYLE_AUTOSIZE,
0, 0, 0, 0, hMainDialog, (HMENU)IDC_ADVANCED_FORMAT_TOOLBAR, hMainInstance, NULL); 0, 0, 0, 0, hMainDialog, (HMENU)IDC_ADVANCED_FORMAT_TOOLBAR, hMainInstance, NULL);
SendMessage(hAdvancedFormatToolbar, CCM_SETVERSION, (WPARAM)6, 0); SendMessage(hAdvancedFormatToolbar, CCM_SETVERSION, (WPARAM)6, 0);
memset(tbToolbarButtons, 0, sizeof(TBBUTTON)); memset(tbToolbarButtons, 0, sizeof(TBBUTTON));
@ -2050,12 +2040,10 @@ static void CreateAdditionalControls(HWND hDlg)
SendMessage(hAdvancedFormatToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz); SendMessage(hAdvancedFormatToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
if (sz.cx < 16) if (sz.cx < 16)
sz.cx = fw; sz.cx = fw;
SetWindowPos(hAdvancedFormatToolbar, HWND_TOP, rc.left + toolbar_dx, rc.top, sz.cx, rc.bottom - rc.top, 0); SetWindowPos(hAdvancedFormatToolbar, hClusterSize, rc.left + toolbar_dx, rc.top, sz.cx, rc.bottom - rc.top, 0);
// Create the multi toolbar // Create the multi toolbar
hMultiToolbar = CreateWindowExW(0, TOOLBARCLASSNAME, NULL, hMultiToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, TOOLBAR_STYLE,
WS_CHILD | WS_TABSTOP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NOPARENTALIGN |
CCS_NODIVIDER | TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_TRANSPARENT | TBSTYLE_TOOLTIPS | TBSTYLE_AUTOSIZE,
0, 0, 0, 0, hMainDialog, (HMENU)IDC_MULTI_TOOLBAR, hMainInstance, NULL); 0, 0, 0, 0, hMainDialog, (HMENU)IDC_MULTI_TOOLBAR, hMainInstance, NULL);
hToolbarImageList = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_HIGHQUALITYSCALE, 8, 0); hToolbarImageList = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_HIGHQUALITYSCALE, 8, 0);
for (i = 0; i < ARRAYSIZE(multitoolbar_icons); i++) { for (i = 0; i < ARRAYSIZE(multitoolbar_icons); i++) {
@ -2294,7 +2282,7 @@ static void GetFullWidth(HWND hDlg)
static void PositionControls(HWND hDlg) static void PositionControls(HWND hDlg)
{ {
RECT rc; RECT rc;
HWND hCtrl; HWND hCtrl, hPrevCtrl;
SIZE sz; SIZE sz;
int i, x, button_fudge = 2; int i, x, button_fudge = 2;
@ -2313,10 +2301,10 @@ static void PositionControls(HWND hDlg)
hCtrl = GetDlgItem(hDlg, IDC_LABEL); hCtrl = GetDlgItem(hDlg, IDC_LABEL);
GetWindowRect(hCtrl, &rc); GetWindowRect(hCtrl, &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hCtrl, NULL, rc.left, rc.top, rc.right - rc.left, ddh, SWP_NOZORDER); SetWindowPos(hCtrl, hAdvancedFormatToolbar, rc.left, rc.top, rc.right - rc.left, ddh, SWP_NOZORDER);
GetWindowRect(hProgress, &rc); GetWindowRect(hProgress, &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hProgress, NULL, rc.left, rc.top, rc.right - rc.left, ddh, SWP_NOZORDER); SetWindowPos(hProgress, hNBPasses, rc.left, rc.top, rc.right - rc.left, ddh, SWP_NOZORDER);
// Get the height of a typical row // Get the height of a typical row
hCtrl = GetDlgItem(hDlg, IDS_BOOT_SELECTION_TXT); hCtrl = GetDlgItem(hDlg, IDS_BOOT_SELECTION_TXT);
@ -2369,7 +2357,7 @@ static void PositionControls(HWND hDlg)
SendMessage(hMultiToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz); SendMessage(hMultiToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
GetWindowRect(GetDlgItem(hDlg, IDC_ABOUT), &rc); GetWindowRect(GetDlgItem(hDlg, IDC_ABOUT), &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hMultiToolbar, HWND_TOP, rc.left, rc.top, sz.cx, ddbh, 0); SetWindowPos(hMultiToolbar, hProgress, rc.left, rc.top, sz.cx, ddbh, 0);
// Reposition the main buttons // Reposition the main buttons
for (i = 0; i < ARRAYSIZE(main_button_ids); i++) { for (i = 0; i < ARRAYSIZE(main_button_ids); i++) {
@ -2379,7 +2367,8 @@ static void PositionControls(HWND hDlg)
x = mw + fw - bw; x = mw + fw - bw;
if (i % 2 == 1) if (i % 2 == 1)
x -= bw + ssw; x -= bw + ssw;
SetWindowPos(hCtrl, HWND_TOP, x, rc.top, bw, ddbh, 0); hPrevCtrl = GetNextWindow(hCtrl, GW_HWNDPREV);
SetWindowPos(hCtrl, hPrevCtrl, x, rc.top, bw, ddbh, 0);
} }
// Reposition the Save button // Reposition the Save button
@ -2388,7 +2377,7 @@ static void PositionControls(HWND hDlg)
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SendMessage(hSaveToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz); SendMessage(hSaveToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
SendMessage(hSaveToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(sz.cx, ddbh)); SendMessage(hSaveToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(sz.cx, ddbh));
SetWindowPos(hSaveToolbar, HWND_TOP, mw + fw - sbw, rc.top, sbw, ddbh, 0); SetWindowPos(hSaveToolbar, hDeviceList, mw + fw - sbw, rc.top, sbw, ddbh, 0);
// Reposition the Hash button // Reposition the Hash button
hCtrl = GetDlgItem(hDlg, IDC_HASH); hCtrl = GetDlgItem(hDlg, IDC_HASH);
@ -2396,13 +2385,13 @@ static void PositionControls(HWND hDlg)
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SendMessage(hHashToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz); SendMessage(hHashToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
SendMessage(hHashToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(sz.cx, ddbh)); SendMessage(hHashToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(sz.cx, ddbh));
SetWindowPos(hHashToolbar, HWND_TOP, mw + bsw + ssw, rc.top, sz.cx, ddbh, 0); SetWindowPos(hHashToolbar, hBootType, mw + bsw + ssw, rc.top, sz.cx, ddbh, 0);
// Reposition the CSM help tip // Reposition the CSM help tip
hCtrl = GetDlgItem(hDlg, IDS_CSM_HELP_TXT); hCtrl = GetDlgItem(hDlg, IDS_CSM_HELP_TXT);
GetWindowRect(hCtrl, &rc); GetWindowRect(hCtrl, &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hCtrl, HWND_TOP, mw + fw + tw, rc.top, sbw, rc.bottom - rc.top, 0); SetWindowPos(hCtrl, hTargetSystem, mw + fw + tw, rc.top, sbw, rc.bottom - rc.top, 0);
if (advanced_mode_device) { if (advanced_mode_device) {
// Still need to adjust the width of the device selection dropdown // Still need to adjust the width of the device selection dropdown
@ -2416,7 +2405,8 @@ static void PositionControls(HWND hDlg)
hCtrl = GetDlgItem(hDlg, full_width_controls[i]); hCtrl = GetDlgItem(hDlg, full_width_controls[i]);
GetWindowRect(hCtrl, &rc); GetWindowRect(hCtrl, &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hCtrl, HWND_TOP, rc.left, rc.top, fw, rc.bottom - rc.top, 0); hPrevCtrl = GetNextWindow(hCtrl, GW_HWNDPREV);
SetWindowPos(hCtrl, hPrevCtrl, rc.left, rc.top, fw, rc.bottom - rc.top, 0);
} }
// Resize the half drowpdowns // Resize the half drowpdowns
@ -2426,7 +2416,8 @@ static void PositionControls(HWND hDlg)
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
// First 5 controls are on the left handside // First 5 controls are on the left handside
// First 2 controls may overflow into separator // First 2 controls may overflow into separator
SetWindowPos(hCtrl, HWND_TOP, (i < 5) ? rc.left : mw + hw + sw, rc.top, hPrevCtrl = GetNextWindow(hCtrl, GW_HWNDPREV);
SetWindowPos(hCtrl, hPrevCtrl, (i < 5) ? rc.left : mw + hw + sw, rc.top,
(i <2) ? hw + sw : hw, rc.bottom - rc.top, 0); (i <2) ? hw + sw : hw, rc.bottom - rc.top, 0);
} }
@ -2434,7 +2425,8 @@ static void PositionControls(HWND hDlg)
hCtrl = GetDlgItem(hDlg, IDC_BOOT_SELECTION); hCtrl = GetDlgItem(hDlg, IDC_BOOT_SELECTION);
GetWindowRect(hCtrl, &rc); GetWindowRect(hCtrl, &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hCtrl, HWND_TOP, rc.left, rc.top, bsw, rc.bottom - rc.top, 0); hPrevCtrl = GetNextWindow(hCtrl, GW_HWNDPREV);
SetWindowPos(hCtrl, hPrevCtrl, rc.left, rc.top, bsw, rc.bottom - rc.top, 0);
} }
// Thanks to Microsoft atrocious DPI handling, we must adjust for low DPI // Thanks to Microsoft atrocious DPI handling, we must adjust for low DPI
@ -2443,7 +2435,7 @@ static void AdjustForLowDPI(HWND hDlg)
static int ddy = 4; static int ddy = 4;
int i, j; int i, j;
RECT rc; RECT rc;
HWND hCtrl; HWND hCtrl, hPrevCtrl;
int dy = 0; int dy = 0;
if (fScale >= 1.3f) if (fScale >= 1.3f)
@ -2462,7 +2454,8 @@ static void AdjustForLowDPI(HWND hDlg)
hCtrl = GetDlgItem(hDlg, adjust_dpi_ids[i][j]); hCtrl = GetDlgItem(hDlg, adjust_dpi_ids[i][j]);
GetWindowRect(hCtrl, &rc); GetWindowRect(hCtrl, &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hCtrl, HWND_TOP, rc.left, rc.top + dy, hPrevCtrl = GetNextWindow(hCtrl, GW_HWNDPREV);
SetWindowPos(hCtrl, hPrevCtrl, rc.left, rc.top + dy,
rc.right - rc.left, rc.bottom - rc.top, 0); rc.right - rc.left, rc.bottom - rc.top, 0);
} }
} }

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326 IDD_DIALOG DIALOGEX 12, 12, 232, 326
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
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.0.1275" CAPTION "Rufus 3.0.1276"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0 FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -389,8 +389,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,0,1275,0 FILEVERSION 3,0,1276,0
PRODUCTVERSION 3,0,1275,0 PRODUCTVERSION 3,0,1276,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -407,13 +407,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", "3.0.1275" VALUE "FileVersion", "3.0.1276"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2018 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", "3.0.1275" VALUE "ProductVersion", "3.0.1276"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -407,7 +407,7 @@ void CreateStatusBar(void)
HFONT hFont; HFONT hFont;
// Create the status bar // Create the status bar
hStatus = CreateWindowExW(0, STATUSCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | SBARS_TOOLTIPS, hStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | SBARS_TOOLTIPS,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog,
(HMENU)IDC_STATUS, hMainInstance, NULL); (HMENU)IDC_STATUS, hMainInstance, NULL);
@ -490,7 +490,7 @@ void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh, float
void ResizeButtonHeight(HWND hDlg, int id) void ResizeButtonHeight(HWND hDlg, int id)
{ {
HWND hCtrl; HWND hCtrl, hPrevCtrl;
RECT rc; RECT rc;
int dy = 0; int dy = 0;
@ -499,7 +499,8 @@ void ResizeButtonHeight(HWND hDlg, int id)
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
if (rc.bottom - rc.top < bh) if (rc.bottom - rc.top < bh)
dy = (bh - (rc.bottom - rc.top)) / 2; dy = (bh - (rc.bottom - rc.top)) / 2;
SetWindowPos(hCtrl, HWND_TOP, rc.left, rc.top - dy, rc.right - rc.left, bh, 0); hPrevCtrl = GetNextWindow(hCtrl, GW_HWNDPREV);
SetWindowPos(hCtrl, hPrevCtrl, rc.left, rc.top - dy, rc.right - rc.left, bh, 0);
} }
/* /*
@ -1112,7 +1113,7 @@ BOOL CreateTooltip(HWND hControl, const char* message, int duration)
} }
// Create the tooltip window // Create the tooltip window
ttlist[i].hTip = CreateWindowExW(right_to_left_mode ? WS_EX_LAYOUTRTL : 0, ttlist[i].hTip = CreateWindowEx(right_to_left_mode ? WS_EX_LAYOUTRTL : 0,
TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog, NULL, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hMainDialog, NULL,
hMainInstance, NULL); hMainInstance, NULL);
@ -1265,7 +1266,7 @@ static void Reposition(HWND hDlg, int id, int dx, int dw)
static void PositionControls(HWND hDlg) static void PositionControls(HWND hDlg)
{ {
RECT rc; RECT rc;
HWND hCtrl; HWND hCtrl, hPrevCtrl;
int i, ow, dw; // original width, delta int i, ow, dw; // original width, delta
// Get the original size of the control // Get the original size of the control
@ -1320,11 +1321,13 @@ static void PositionControls(HWND hDlg)
hCtrl = GetDlgItem(hDlg, IDC_CHECK_NOW); hCtrl = GetDlgItem(hDlg, IDC_CHECK_NOW);
GetWindowRect(hCtrl, &rc); GetWindowRect(hCtrl, &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hCtrl, HWND_TOP, rc.left, rc.top, rc.right - rc.left, ddbh, 0); hPrevCtrl = GetNextWindow(hCtrl, GW_HWNDPREV);
SetWindowPos(hCtrl, hPrevCtrl, rc.left, rc.top, rc.right - rc.left, ddbh, 0);
hCtrl = GetDlgItem(hDlg, IDCANCEL); hCtrl = GetDlgItem(hDlg, IDCANCEL);
GetWindowRect(hCtrl, &rc); GetWindowRect(hCtrl, &rc);
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2); MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SetWindowPos(hCtrl, HWND_TOP, rc.left, rc.top, rc.right - rc.left, ddbh, 0); hPrevCtrl = GetNextWindow(hCtrl, GW_HWNDPREV);
SetWindowPos(hCtrl, hPrevCtrl, rc.left, rc.top, rc.right - rc.left, ddbh, 0);
} }
/* /*

View file

@ -34,6 +34,14 @@
// Toolbar icons main color // Toolbar icons main color
#define TOOLBAR_ICON_COLOR RGB(0x29, 0x80, 0xB9) #define TOOLBAR_ICON_COLOR RGB(0x29, 0x80, 0xB9)
// Toolbar default style
#define TOOLBAR_STYLE ( WS_CHILD | WS_TABSTOP | WS_VISIBLE | \
WS_CLIPSIBLINGS | WS_CLIPCHILDREN | \
CCS_NOPARENTALIGN | CCS_NODIVIDER | \
TBSTYLE_FLAT | TBSTYLE_BUTTON | \
TBSTYLE_AUTOSIZE | TBSTYLE_LIST | \
TBSTYLE_TOOLTIPS )
static int section_control_ids[] = { static int section_control_ids[] = {
IDS_DRIVE_PROPERTIES_TXT, IDS_DRIVE_PROPERTIES_TXT,
IDS_FORMAT_OPTIONS_TXT, IDS_FORMAT_OPTIONS_TXT,