mirror of https://github.com/pbatard/rufus.git
[internal] UI redesign, part 14
* Should look a bit better at 100% scaling...
This commit is contained in:
parent
a8d5c9f6c3
commit
bdb0d3fedc
48
src/rufus.c
48
src/rufus.c
|
@ -65,11 +65,10 @@ static BOOL user_changed_label = FALSE;
|
||||||
static BOOL app_changed_label = FALSE;
|
static BOOL app_changed_label = FALSE;
|
||||||
static BOOL allowed_filesystem[FS_MAX] = { 0 };
|
static BOOL allowed_filesystem[FS_MAX] = { 0 };
|
||||||
static int64_t last_iso_blocking_status;
|
static int64_t last_iso_blocking_status;
|
||||||
// TODO: rename 'selection_default' to something more explicit
|
|
||||||
static int selection_default, row_height, advanced_device_section_height, advanced_format_section_height, image_index;
|
static int selection_default, row_height, advanced_device_section_height, advanced_format_section_height, image_index;
|
||||||
static int device_vpos, format_vpos, status_vpos;
|
static int device_vpos, format_vpos, status_vpos;
|
||||||
static int bw, hw, fw; // Main button width, half dropdown width, full dropdown width
|
static int ddh, bw, hw, fw; // DropDown Height, Main button width, half dropdown width, full dropdown width
|
||||||
static int sw, mw, bsw, hbw, sbw, ssw;
|
static int sw, mw, bsw, hbw, sbw, ssw, tw;
|
||||||
static UINT_PTR UM_LANGUAGE_MENU_MAX = UM_LANGUAGE_MENU;
|
static UINT_PTR UM_LANGUAGE_MENU_MAX = UM_LANGUAGE_MENU;
|
||||||
static RECT relaunch_rc = { -65536, -65536, 0, 0};
|
static RECT relaunch_rc = { -65536, -65536, 0, 0};
|
||||||
static UINT uQFChecked = BST_CHECKED, uMBRChecked = BST_UNCHECKED;
|
static UINT uQFChecked = BST_CHECKED, uMBRChecked = BST_UNCHECKED;
|
||||||
|
@ -384,7 +383,6 @@ static BOOL SetFileSystemAndClusterSize(char* fs_type)
|
||||||
LONGLONG i;
|
LONGLONG i;
|
||||||
char tmp[128] = "", *entry;
|
char tmp[128] = "", *entry;
|
||||||
|
|
||||||
// TODO: something better with FS reselection
|
|
||||||
IGNORE_RETVAL(ComboBox_ResetContent(hFileSystem));
|
IGNORE_RETVAL(ComboBox_ResetContent(hFileSystem));
|
||||||
IGNORE_RETVAL(ComboBox_ResetContent(hClusterSize));
|
IGNORE_RETVAL(ComboBox_ResetContent(hClusterSize));
|
||||||
default_fs = FS_UNKNOWN;
|
default_fs = FS_UNKNOWN;
|
||||||
|
@ -1784,10 +1782,10 @@ static void CreateAdditionalControls(HWND hDlg)
|
||||||
hDll = GetLibraryHandle("Shell32");
|
hDll = GetLibraryHandle("Shell32");
|
||||||
hIconSave = (HICON)LoadImage(hDll, MAKEINTRESOURCE(16761), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
hIconSave = (HICON)LoadImage(hDll, MAKEINTRESOURCE(16761), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
||||||
hIconLog = (HICON)LoadImage(hDll, MAKEINTRESOURCE(281), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
hIconLog = (HICON)LoadImage(hDll, MAKEINTRESOURCE(281), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
||||||
|
hIconAbout = (HICON)LoadImage(hDll, MAKEINTRESOURCE(16783), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
||||||
hIconSettings = (HICON)LoadImage(hDll, MAKEINTRESOURCE(16826), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
hIconSettings = (HICON)LoadImage(hDll, MAKEINTRESOURCE(16826), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
||||||
|
if (hIconSettings == NULL)
|
||||||
hDll = GetLibraryHandle("User32");
|
hIconSettings = (HICON)LoadImage(hDll, MAKEINTRESOURCE(153), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
||||||
hIconAbout = (HICON)LoadImage(hDll, MAKEINTRESOURCE(104), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED);
|
|
||||||
|
|
||||||
if (nWindowsVersion >= WINDOWS_8) {
|
if (nWindowsVersion >= WINDOWS_8) {
|
||||||
// Use the icon from the Windows 8+ 'Language' Control Panel
|
// Use the icon from the Windows 8+ 'Language' Control Panel
|
||||||
|
@ -1962,6 +1960,14 @@ static void GetBasicControlsWidth(HWND hDlg)
|
||||||
GetWindowRect(GetDlgItem(hDlg, IDC_HASH), &rc);
|
GetWindowRect(GetDlgItem(hDlg, IDC_HASH), &rc);
|
||||||
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
||||||
hbw = rc.right - rc.left;
|
hbw = rc.right - rc.left;
|
||||||
|
|
||||||
|
// CSM tooltip separator width
|
||||||
|
GetWindowRect(GetDlgItem(hDlg, IDS_CSM_HELP_TXT), &rc);
|
||||||
|
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
||||||
|
tw = rc.left;
|
||||||
|
GetWindowRect(hTargetSystem, &rc);
|
||||||
|
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
||||||
|
tw -= rc.right;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the minimum size of the main buttons
|
// Compute the minimum size of the main buttons
|
||||||
|
@ -2097,7 +2103,7 @@ static void PositionControls(HWND hDlg)
|
||||||
HWND hCtrl;
|
HWND hCtrl;
|
||||||
SIZE sz;
|
SIZE sz;
|
||||||
// TODO: dynamicize button_fudge
|
// TODO: dynamicize button_fudge
|
||||||
int i, x, dropdown_height, button_fudge = 2;
|
int i, x, button_fudge = 2;
|
||||||
|
|
||||||
// Start by resizing the whole dialog
|
// Start by resizing the whole dialog
|
||||||
GetWindowRect(hDlg, &rc);
|
GetWindowRect(hDlg, &rc);
|
||||||
|
@ -2109,14 +2115,14 @@ static void PositionControls(HWND hDlg)
|
||||||
hCtrl = GetDlgItem(hDlg, IDC_DEVICE);
|
hCtrl = GetDlgItem(hDlg, IDC_DEVICE);
|
||||||
GetWindowRect(hCtrl, &rc);
|
GetWindowRect(hCtrl, &rc);
|
||||||
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
||||||
dropdown_height = rc.bottom - rc.top;
|
ddh = rc.bottom - rc.top;
|
||||||
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, dropdown_height, SWP_NOZORDER);
|
SetWindowPos(hCtrl, NULL, 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, dropdown_height, SWP_NOZORDER);
|
SetWindowPos(hProgress, NULL, 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);
|
||||||
|
@ -2142,7 +2148,7 @@ static void PositionControls(HWND hDlg)
|
||||||
GetWindowRect(hCtrl, &rc);
|
GetWindowRect(hCtrl, &rc);
|
||||||
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
||||||
advanced_format_section_height = rc.top;
|
advanced_format_section_height = rc.top;
|
||||||
hCtrl = GetDlgItem(hDlg, IDC_EXTENDED_LABEL);
|
hCtrl = GetDlgItem(hDlg, IDC_BAD_BLOCKS);
|
||||||
GetWindowRect(hCtrl, &rc);
|
GetWindowRect(hCtrl, &rc);
|
||||||
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
||||||
advanced_format_section_height = rc.bottom - advanced_format_section_height;
|
advanced_format_section_height = rc.bottom - advanced_format_section_height;
|
||||||
|
@ -2169,7 +2175,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, dropdown_height, 0);
|
SetWindowPos(hMultiToolbar, HWND_TOP, rc.left, rc.top, sz.cx, ddh, 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++) {
|
||||||
|
@ -2179,7 +2185,7 @@ 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, rc.bottom - rc.top, 0);
|
SetWindowPos(hCtrl, HWND_TOP, x, rc.top, bw, ddh + button_fudge, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reposition the Hash button
|
// Reposition the Hash button
|
||||||
|
@ -2199,8 +2205,7 @@ static void PositionControls(HWND hDlg)
|
||||||
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);
|
||||||
// TODO: measure space and avoid button fudging
|
SetWindowPos(hCtrl, HWND_TOP, mw + fw + tw, rc.top, sbw, rc.bottom - rc.top, 0);
|
||||||
SetWindowPos(hCtrl, HWND_TOP, mw + fw + 5 * button_fudge / 2, 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
|
||||||
|
@ -2242,7 +2247,7 @@ static void PositionControls(HWND hDlg)
|
||||||
GetWindowRect(hCtrl, &rc);
|
GetWindowRect(hCtrl, &rc);
|
||||||
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
||||||
SetWindowPos(hCtrl, NULL, rc.left, sz.cy - 1,
|
SetWindowPos(hCtrl, NULL, rc.left, sz.cy - 1,
|
||||||
rc.right - rc.left, dropdown_height + button_fudge, SWP_NOZORDER);
|
rc.right - rc.left, ddh + button_fudge, SWP_NOZORDER);
|
||||||
|
|
||||||
hCtrl = GetDlgItem(hDlg, IDC_BOOT_SELECTION);
|
hCtrl = GetDlgItem(hDlg, IDC_BOOT_SELECTION);
|
||||||
GetWindowRect(hCtrl, &rcSelectedImage);
|
GetWindowRect(hCtrl, &rcSelectedImage);
|
||||||
|
@ -2251,7 +2256,7 @@ static void PositionControls(HWND hDlg)
|
||||||
GetWindowRect(hCtrl, &rc);
|
GetWindowRect(hCtrl, &rc);
|
||||||
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
|
||||||
SetWindowPos(hCtrl, NULL, rc.left, rcSelectedImage.top - 1,
|
SetWindowPos(hCtrl, NULL, rc.left, rcSelectedImage.top - 1,
|
||||||
rc.right - rc.left, dropdown_height + button_fudge, SWP_NOZORDER);
|
rc.right - rc.left, ddh + button_fudge, SWP_NOZORDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetSectionHeaders(HWND hDlg)
|
static void SetSectionHeaders(HWND hDlg)
|
||||||
|
@ -2264,7 +2269,7 @@ static void SetSectionHeaders(HWND hDlg)
|
||||||
int i, control[3] = { IDS_DRIVE_PROPERTIES_TXT, IDS_FORMAT_OPTIONS_TXT, IDS_STATUS_TXT };
|
int i, control[3] = { IDS_DRIVE_PROPERTIES_TXT, IDS_FORMAT_OPTIONS_TXT, IDS_STATUS_TXT };
|
||||||
|
|
||||||
// Set the section header fonts and resize the static controls accordingly
|
// Set the section header fonts and resize the static controls accordingly
|
||||||
hf = CreateFontA(48, 0, 0, 0, FW_SEMIBOLD, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
|
hf = CreateFontA(-MulDiv(14, GetDeviceCaps(GetDC(hMainDialog), LOGPIXELSY), 72), 0, 0, 0, FW_SEMIBOLD, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
|
||||||
0, 0, PROOF_QUALITY, 0, "Segoe UI");
|
0, 0, PROOF_QUALITY, 0, "Segoe UI");
|
||||||
|
|
||||||
for (i = 0; i < ARRAYSIZE(control); i++) {
|
for (i = 0; i < ARRAYSIZE(control); i++) {
|
||||||
|
@ -2284,7 +2289,7 @@ static void SetSectionHeaders(HWND hDlg)
|
||||||
// Create the horizontal section lines
|
// Create the horizontal section lines
|
||||||
void OnPaint(HDC hdc)
|
void OnPaint(HDC hdc)
|
||||||
{
|
{
|
||||||
HPEN hp = CreatePen(0, 3, RGB(0, 0, 0));
|
HPEN hp = CreatePen(0, (fScale < 1.5f)?2:3, RGB(0, 0, 0));
|
||||||
SelectObject(hdc, hp);
|
SelectObject(hdc, hp);
|
||||||
MoveToEx(hdc, mw + 10, device_vpos, NULL);
|
MoveToEx(hdc, mw + 10, device_vpos, NULL);
|
||||||
LineTo(hdc, mw + fw, device_vpos);
|
LineTo(hdc, mw + fw, device_vpos);
|
||||||
|
@ -2938,15 +2943,12 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
bt = (int)ComboBox_GetItemData(hBootType, ComboBox_GetCurSel(hBootType));
|
bt = (int)ComboBox_GetItemData(hBootType, ComboBox_GetCurSel(hBootType));
|
||||||
if ((HIWORD(wParam) != CBN_SELCHANGE) || (bt == selection_default))
|
if ((HIWORD(wParam) != CBN_SELCHANGE) || (bt == selection_default))
|
||||||
break;
|
break;
|
||||||
// TODO: do we really need both bt and selection_default?
|
|
||||||
selection_default = bt;
|
selection_default = bt;
|
||||||
SetPartitionSchemeAndTargetSystem(FALSE);
|
SetPartitionSchemeAndTargetSystem(FALSE);
|
||||||
SetFileSystemAndClusterSize(NULL);
|
SetFileSystemAndClusterSize(NULL);
|
||||||
// TODO: SetToGo() would be better invoked from ShowImageSettings()
|
|
||||||
SetToGo();
|
SetToGo();
|
||||||
SetProposedLabel(ComboBox_GetCurSel(hDeviceList));
|
SetProposedLabel(ComboBox_GetCurSel(hDeviceList));
|
||||||
EnableControls(TRUE);
|
EnableControls(TRUE);
|
||||||
// TODO: Might wanna do this in PopulateProperties
|
|
||||||
tt = (int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme));
|
tt = (int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme));
|
||||||
pt = (int)ComboBox_GetItemData(hTargetSystem, ComboBox_GetCurSel(hTargetSystem));
|
pt = (int)ComboBox_GetItemData(hTargetSystem, ComboBox_GetCurSel(hTargetSystem));
|
||||||
return (INT_PTR)TRUE;
|
return (INT_PTR)TRUE;
|
||||||
|
|
66
src/rufus.rc
66
src/rufus.rc
|
@ -37,43 +37,43 @@ CAPTION "Rufus 3.0.1220"
|
||||||
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
|
||||||
LTEXT "Device",IDS_DEVICE_TXT,8,22,216,8
|
LTEXT "Device",IDS_DEVICE_TXT,8,21,216,8
|
||||||
COMBOBOX IDC_DEVICE,8,31,196,10,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_DEVICE,8,30,196,10,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
PUSHBUTTON "...",IDC_SAVE,210,31,14,10,BS_ICON
|
PUSHBUTTON "...",IDC_SAVE,210,30,14,10,BS_ICON
|
||||||
LTEXT "Boot selection",IDS_BOOT_SELECTION_TXT,8,44,216,8
|
LTEXT "Boot selection",IDS_BOOT_SELECTION_TXT,8,43,216,8
|
||||||
COMBOBOX IDC_BOOT_SELECTION,8,53,148,10,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
COMBOBOX IDC_BOOT_SELECTION,8,52,148,10,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||||
PUSHBUTTON "#",IDC_HASH,162,53,10,10,BS_ICON
|
PUSHBUTTON "#",IDC_HASH,162,52,10,10,BS_ICON
|
||||||
PUSHBUTTON "SELECT",IDC_SELECT,180,53,45,10
|
PUSHBUTTON "SELECT",IDC_SELECT,180,52,45,10
|
||||||
LTEXT "Image option",IDS_IMAGE_OPTION_TXT,8,66,216,8
|
LTEXT "Image option",IDS_IMAGE_OPTION_TXT,8,65,216,8
|
||||||
COMBOBOX IDC_IMAGE_OPTION,8,75,216,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_IMAGE_OPTION,8,74,216,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Partition scheme",IDS_PARTITION_TYPE_TXT,8,88,96,8
|
LTEXT "Partition scheme",IDS_PARTITION_TYPE_TXT,8,87,96,8
|
||||||
COMBOBOX IDC_PARTITION_TYPE,8,97,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_PARTITION_TYPE,8,96,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Target system",IDS_TARGET_SYSTEM_TXT,128,88,96,8
|
LTEXT "Target system",IDS_TARGET_SYSTEM_TXT,128,87,96,8
|
||||||
COMBOBOX IDC_TARGET_SYSTEM,128,97,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_TARGET_SYSTEM,128,96,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "?",IDS_CSM_HELP_TXT,226,98,6,15,SS_NOTIFY | NOT WS_VISIBLE
|
LTEXT "?",IDS_CSM_HELP_TXT,226,97,8,15,SS_NOTIFY | NOT WS_VISIBLE
|
||||||
CONTROL "Show advanced drive properties",IDC_ADVANCED_DRIVE_PROPERTIES,
|
CONTROL "Show advanced drive properties",IDC_ADVANCED_DRIVE_PROPERTIES,
|
||||||
"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,8,110,216,10
|
"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,8,109,216,10
|
||||||
CONTROL "List USB Hard Drives",IDC_LIST_USB_HDD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,120,216,10
|
CONTROL "List USB Hard Drives",IDC_LIST_USB_HDD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,119,216,10
|
||||||
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_OLD_BIOS_FIXES,
|
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_OLD_BIOS_FIXES,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,130,216,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,129,216,10
|
||||||
CONTROL "Use Rufus MBR with BIOS ID",IDC_RUFUS_MBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,140,110,10
|
CONTROL "Use Rufus MBR with BIOS ID",IDC_RUFUS_MBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,139,110,10
|
||||||
COMBOBOX IDC_DISK_ID,128,140,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_DISK_ID,128,139,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Format Options",IDS_FORMAT_OPTIONS_TXT,8,152,57,12,NOT WS_GROUP
|
LTEXT "Format Options",IDS_FORMAT_OPTIONS_TXT,8,152,57,12,NOT WS_GROUP
|
||||||
LTEXT "Volume label",IDS_LABEL_TXT,8,166,216,8
|
LTEXT "Volume label",IDS_LABEL_TXT,8,167,216,8
|
||||||
EDITTEXT IDC_LABEL,8,175,216,12,ES_AUTOHSCROLL
|
EDITTEXT IDC_LABEL,8,176,216,12,ES_AUTOHSCROLL
|
||||||
LTEXT "File system",IDS_FILE_SYSTEM_TXT,8,188,96,8
|
LTEXT "File system",IDS_FILE_SYSTEM_TXT,8,189,96,8
|
||||||
COMBOBOX IDC_FILE_SYSTEM,8,197,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_FILE_SYSTEM,8,198,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Cluster size",IDS_CLUSTER_SIZE_TXT,128,188,96,8
|
LTEXT "Cluster size",IDS_CLUSTER_SIZE_TXT,128,189,96,8
|
||||||
COMBOBOX IDC_CLUSTER_SIZE,128,197,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_CLUSTER_SIZE,128,198,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
CONTROL "Show advanced format options",IDC_ADVANCED_FORMAT_OPTIONS,
|
CONTROL "Show advanced format options",IDC_ADVANCED_FORMAT_OPTIONS,
|
||||||
"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,8,210,216,10
|
"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,8,211,216,10
|
||||||
CONTROL "Quick format",IDC_QUICK_FORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,220,216,10
|
CONTROL "Quick format",IDC_QUICK_FORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,221,216,10
|
||||||
CONTROL "Check device for bad blocks",IDC_BAD_BLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,230,112,10
|
|
||||||
COMBOBOX IDC_NB_PASSES,128,230,96,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
|
||||||
CONTROL "Create extended label and icon files",IDC_EXTENDED_LABEL,
|
CONTROL "Create extended label and icon files",IDC_EXTENDED_LABEL,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,240,216,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,231,216,10
|
||||||
LTEXT "Status",IDS_STATUS_TXT,8,252,23,9,NOT WS_GROUP
|
CONTROL "Check device for bad blocks",IDC_BAD_BLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,241,112,10
|
||||||
CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,8,272,216,9
|
COMBOBOX IDC_NB_PASSES,128,241,96,10,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
|
LTEXT "Status",IDS_STATUS_TXT,8,254,23,9,NOT WS_GROUP
|
||||||
|
CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,8,273,216,9
|
||||||
PUSHBUTTON "Multi Toolbar",IDC_ABOUT,8,294,74,10,NOT WS_VISIBLE
|
PUSHBUTTON "Multi Toolbar",IDC_ABOUT,8,294,74,10,NOT WS_VISIBLE
|
||||||
PUSHBUTTON "T",IDC_TEST,90,294,12,10,NOT WS_VISIBLE
|
PUSHBUTTON "T",IDC_TEST,90,294,12,10,NOT WS_VISIBLE
|
||||||
DEFPUSHBUTTON "START",IDC_START,124,294,45,10
|
DEFPUSHBUTTON "START",IDC_START,124,294,45,10
|
||||||
|
@ -204,7 +204,7 @@ FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
|
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
|
||||||
DEFPUSHBUTTON "Close",IDCANCEL,221,173,50,11,WS_GROUP
|
DEFPUSHBUTTON "Close",IDCANCEL,221,173,50,11,WS_GROUP
|
||||||
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL | WS_TABSTOP,46,8,235,132,WS_EX_STATICEDGE
|
CONTROL "",IDC_POLICY,"RichEdit20W",WS_VSCROLL | WS_TABSTOP | 0x804,46,8,235,132,WS_EX_STATICEDGE
|
||||||
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
|
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
|
||||||
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,158,80,10
|
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,158,80,10
|
||||||
COMBOBOX IDC_UPDATE_FREQUENCY,133,158,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_UPDATE_FREQUENCY,133,158,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
|
|
10
src/stdlg.c
10
src/stdlg.c
|
@ -404,6 +404,7 @@ void CreateStatusBar(void)
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
int edge[2];
|
int edge[2];
|
||||||
|
HFONT hFont;
|
||||||
|
|
||||||
// Create the status bar
|
// Create the status bar
|
||||||
hStatus = CreateWindowExW(0, STATUSCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | SBARS_TOOLTIPS,
|
hStatus = CreateWindowExW(0, STATUSCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | SBARS_TOOLTIPS,
|
||||||
|
@ -415,6 +416,12 @@ void CreateStatusBar(void)
|
||||||
edge[0] = rect.right - (int)(SB_TIMER_SECTION_SIZE * fScale);
|
edge[0] = rect.right - (int)(SB_TIMER_SECTION_SIZE * fScale);
|
||||||
edge[1] = rect.right;
|
edge[1] = rect.right;
|
||||||
SendMessage(hStatus, SB_SETPARTS, (WPARAM)ARRAYSIZE(edge), (LPARAM)&edge);
|
SendMessage(hStatus, SB_SETPARTS, (WPARAM)ARRAYSIZE(edge), (LPARAM)&edge);
|
||||||
|
|
||||||
|
// Set the font
|
||||||
|
hFont = CreateFontA(-MulDiv(9, GetDeviceCaps(GetDC(hMainDialog), LOGPIXELSY), 72),
|
||||||
|
0, 0, 0, FW_MEDIUM, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
|
||||||
|
0, 0, PROOF_QUALITY, 0, "Segoe UI");
|
||||||
|
SendMessage(hStatus, WM_SETFONT, (WPARAM)hFont, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -789,7 +796,6 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA
|
||||||
nDialogItems, IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1);
|
nDialogItems, IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1);
|
||||||
nDialogItems = IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1;
|
nDialogItems = IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1;
|
||||||
}
|
}
|
||||||
// TODO: This shouldn't be needed when using DS_SHELLFONT
|
|
||||||
// Get the system message box font. See http://stackoverflow.com/a/6057761
|
// Get the system message box font. See http://stackoverflow.com/a/6057761
|
||||||
ncm.cbSize = sizeof(ncm);
|
ncm.cbSize = sizeof(ncm);
|
||||||
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
|
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
|
||||||
|
@ -921,7 +927,6 @@ INT_PTR CALLBACK ListCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
nDialogItems, IDC_LIST_ITEMMAX - IDC_LIST_ITEM1);
|
nDialogItems, IDC_LIST_ITEMMAX - IDC_LIST_ITEM1);
|
||||||
nDialogItems = IDC_LIST_ITEMMAX - IDC_LIST_ITEM1;
|
nDialogItems = IDC_LIST_ITEMMAX - IDC_LIST_ITEM1;
|
||||||
}
|
}
|
||||||
// TODO: This shouldn't be needed when using DS_SHELLFONT
|
|
||||||
// Get the system message box font. See http://stackoverflow.com/a/6057761
|
// Get the system message box font. See http://stackoverflow.com/a/6057761
|
||||||
ncm.cbSize = sizeof(ncm);
|
ncm.cbSize = sizeof(ncm);
|
||||||
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
|
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
|
||||||
|
@ -1217,7 +1222,6 @@ BOOL SetTaskbarProgressValue(ULONGLONG ullCompleted, ULONGLONG ullTotal)
|
||||||
return !FAILED(ptbl->lpVtbl->SetProgressValue(ptbl, hMainDialog, ullCompleted, ullTotal));
|
return !FAILED(ptbl->lpVtbl->SetProgressValue(ptbl, hMainDialog, ullCompleted, ullTotal));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Something like this in main?
|
|
||||||
static void Reposition(HWND hDlg, int id, int dx, int dw)
|
static void Reposition(HWND hDlg, int id, int dx, int dw)
|
||||||
{
|
{
|
||||||
HWND hCtrl;
|
HWND hCtrl;
|
||||||
|
|
Loading…
Reference in New Issue