1
1
Fork 0
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:
Pete Batard 2018-05-22 17:14:31 +01:00
parent f48dec11c3
commit d1d6e0f8b4
2 changed files with 17 additions and 7 deletions

View file

@ -2090,7 +2090,7 @@ static void CreateAdditionalControls(HWND hDlg)
tbToolbarButtons[6].fsState = TBSTATE_ENABLED;
tbToolbarButtons[6].iBitmap = 3;
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
@ -2286,6 +2286,7 @@ static void PositionControls(HWND hDlg)
RECT rc;
HWND hCtrl, hPrevCtrl;
SIZE sz;
DWORD padding;
int i, x, button_fudge = 2;
// Start by resizing the whole dialog
@ -2379,6 +2380,11 @@ static void PositionControls(HWND hDlg)
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SendMessage(hSaveToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
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);
// Reposition the Hash button
@ -2387,7 +2393,11 @@ static void PositionControls(HWND hDlg)
MapWindowPoints(NULL, hDlg, (POINT*)&rc, 2);
SendMessage(hHashToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
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
hCtrl = GetDlgItem(hDlg, IDS_CSM_HELP_TXT);

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.0.1292"
CAPTION "Rufus 3.0.1293"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -389,8 +389,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,0,1292,0
PRODUCTVERSION 3,0,1292,0
FILEVERSION 3,0,1293,0
PRODUCTVERSION 3,0,1293,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -407,13 +407,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.0.1292"
VALUE "FileVersion", "3.0.1293"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.0.1292"
VALUE "ProductVersion", "3.0.1293"
END
END
BLOCK "VarFileInfo"