mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-20 18:05:21 -04:00
[ui] prevent the toolbars from disappearing
* Seriously, who at Microsoft devised this utterly broken TB_GETIDEALSIZE call?
This commit is contained in:
parent
180e6d4364
commit
0186949255
2 changed files with 10 additions and 5 deletions
5
src/ui.c
5
src/ui.c
|
@ -595,6 +595,9 @@ void ToggleAdvancedDeviceOptions(BOOL enable)
|
|||
GetWindowRect(hAdvancedDeviceToolbar, &rc);
|
||||
MapWindowPoints(NULL, hMainDialog, (POINT*)&rc, 2);
|
||||
SendMessage(hAdvancedDeviceToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
|
||||
// TB_GETIDEALSIZE may act up and report negative values
|
||||
if (sz.cx < 16)
|
||||
sz.cx = fw;
|
||||
SetWindowPos(hAdvancedDeviceToolbar, hTargetSystem, rc.left, rc.top, sz.cx, rc.bottom - rc.top, 0);
|
||||
|
||||
// Move the controls up or down
|
||||
|
@ -637,6 +640,8 @@ void ToggleAdvancedFormatOptions(BOOL enable)
|
|||
GetWindowRect(hAdvancedFormatToolbar, &rc);
|
||||
MapWindowPoints(NULL, hMainDialog, (POINT*)&rc, 2);
|
||||
SendMessage(hAdvancedFormatToolbar, TB_GETIDEALSIZE, (WPARAM)FALSE, (LPARAM)&sz);
|
||||
if (sz.cx < 16)
|
||||
sz.cx = fw;
|
||||
SetWindowPos(hAdvancedFormatToolbar, hClusterSize, rc.left, rc.top, sz.cx, rc.bottom - rc.top, 0);
|
||||
|
||||
// Move the controls up or down
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue