mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[ui] improve selection dialog when there exist more than 6 options
* Closes #891
This commit is contained in:
parent
371b1b4d94
commit
db234442e3
2 changed files with 11 additions and 10 deletions
12
src/rufus.rc
12
src/rufus.rc
|
@ -33,7 +33,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
|
||||
EXSTYLE WS_EX_ACCEPTFILES
|
||||
CAPTION "Rufus 2.12.1035"
|
||||
CAPTION "Rufus 2.12.1036"
|
||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -161,7 +161,7 @@ BEGIN
|
|||
CONTROL "Choice 13",IDC_SELECTION_CHOICE13,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,35,174,269,10,WS_EX_TRANSPARENT
|
||||
CONTROL "Choice 14",IDC_SELECTION_CHOICE14,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,35,187,269,10,WS_EX_TRANSPARENT
|
||||
CONTROL "Choice 15",IDC_SELECTION_CHOICE15,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,35,200,269,10,WS_EX_TRANSPARENT
|
||||
CONTROL "Choice 16",IDC_SELECTION_CHOICEMAX,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,35,21,269,10,WS_EX_TRANSPARENT
|
||||
CONTROL "Choice 16",IDC_SELECTION_CHOICEMAX,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,35,213,269,10,WS_EX_TRANSPARENT
|
||||
END
|
||||
|
||||
IDD_UPDATE_POLICY DIALOGEX 0, 0, 287, 198
|
||||
|
@ -334,8 +334,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,12,1035,0
|
||||
PRODUCTVERSION 2,12,1035,0
|
||||
FILEVERSION 2,12,1036,0
|
||||
PRODUCTVERSION 2,12,1036,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -352,13 +352,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.12.1035"
|
||||
VALUE "FileVersion", "2.12.1036"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "2.12.1035"
|
||||
VALUE "ProductVersion", "2.12.1036"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -849,7 +849,7 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA
|
|||
static HBRUSH background_brush, separator_brush;
|
||||
// To use the system message font
|
||||
NONCLIENTMETRICS ncm;
|
||||
RECT rect;
|
||||
RECT rect, rect2;
|
||||
HFONT hDlgFont;
|
||||
HWND hCtrl;
|
||||
HDC hDC;
|
||||
|
@ -857,8 +857,8 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA
|
|||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
// Don't overflow our max radio button
|
||||
if (nChoices > (IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1)) {
|
||||
uprintf("WARNING: Too many options requested for Selection (%d vs %d)",
|
||||
if (nChoices > (IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1 + 1)) {
|
||||
uprintf("Warning: Too many options requested for Selection (%d vs %d)",
|
||||
nChoices, IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1);
|
||||
nChoices = IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1;
|
||||
}
|
||||
|
@ -913,7 +913,8 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA
|
|||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i), 0, dh, 0, 0, 1.0f);
|
||||
if (nChoices > 2) {
|
||||
GetWindowRect(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1), &rect);
|
||||
dh += (nChoices - 1) * (rect.bottom - rect.top) - 5;
|
||||
GetWindowRect(GetDlgItem(hDlg, IDC_SELECTION_CHOICE2), &rect2);
|
||||
dh += (nChoices - 2) * (rect2.top - rect.top) + 5;
|
||||
}
|
||||
ResizeMoveCtrl(hDlg, hDlg, 0, 0, 0, dh, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, -1), 0, 0, 0, dh, 1.0f); // IDC_STATIC = -1
|
||||
|
|
Loading…
Reference in a new issue