mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[ui] improve centering of the toolbar icons
* Microsoft, how I loathe thee!!!
This commit is contained in:
parent
f48dec11c3
commit
d1d6e0f8b4
2 changed files with 17 additions and 7 deletions
14
src/rufus.c
14
src/rufus.c
|
@ -2090,7 +2090,7 @@ static void CreateAdditionalControls(HWND hDlg)
|
||||||
tbToolbarButtons[6].fsState = TBSTATE_ENABLED;
|
tbToolbarButtons[6].fsState = TBSTATE_ENABLED;
|
||||||
tbToolbarButtons[6].iBitmap = 3;
|
tbToolbarButtons[6].iBitmap = 3;
|
||||||
SendMessage(hMultiToolbar, TB_ADDBUTTONS, (WPARAM)7, (LPARAM)&tbToolbarButtons);
|
SendMessage(hMultiToolbar, TB_ADDBUTTONS, (WPARAM)7, (LPARAM)&tbToolbarButtons);
|
||||||
SendMessage(hMultiToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(0, ddbh));
|
SendMessage(hMultiToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(i16, ddbh));
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://stackoverflow.com/a/20926332/1069307
|
// https://stackoverflow.com/a/20926332/1069307
|
||||||
|
@ -2286,6 +2286,7 @@ static void PositionControls(HWND hDlg)
|
||||||
RECT rc;
|
RECT rc;
|
||||||
HWND hCtrl, hPrevCtrl;
|
HWND hCtrl, hPrevCtrl;
|
||||||
SIZE sz;
|
SIZE sz;
|
||||||
|
DWORD padding;
|
||||||
int i, x, button_fudge = 2;
|
int i, x, button_fudge = 2;
|
||||||
|
|
||||||
// Start by resizing the whole dialog
|
// Start by resizing the whole dialog
|
||||||
|
@ -2379,6 +2380,11 @@ 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));
|
||||||
|
// Microsoft, how I loathe thee!!!
|
||||||
|
padding = SendMessage(hSaveToolbar, TB_GETPADDING, 0, 0);
|
||||||
|
sz.cx = padding & 0xFFFF;
|
||||||
|
sz.cy = padding >> 16;
|
||||||
|
SendMessage(hSaveToolbar, TB_SETPADDING, 0, MAKELPARAM(sz.cx + 3, sz.cy + 2));
|
||||||
SetWindowPos(hSaveToolbar, hDeviceList, 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
|
||||||
|
@ -2387,7 +2393,11 @@ 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, hBootType, mw + bsw + ssw, rc.top, sz.cx, ddbh, 0);
|
padding = SendMessage(hHashToolbar, TB_GETPADDING, 0, 0);
|
||||||
|
sz.cx = padding & 0xFFFF;
|
||||||
|
sz.cy = padding >> 16;
|
||||||
|
SendMessage(hHashToolbar, TB_SETPADDING, 0, MAKELPARAM(sz.cx + 3, sz.cy + 2));
|
||||||
|
SetWindowPos(hHashToolbar, hBootType, mw + bsw + ssw, rc.top, sbw, 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);
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -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.1292"
|
CAPTION "Rufus 3.0.1293"
|
||||||
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,1292,0
|
FILEVERSION 3,0,1293,0
|
||||||
PRODUCTVERSION 3,0,1292,0
|
PRODUCTVERSION 3,0,1293,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.1292"
|
VALUE "FileVersion", "3.0.1293"
|
||||||
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.1292"
|
VALUE "ProductVersion", "3.0.1293"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue