mirror of
https://github.com/henrypp/simplewall.git
synced 2026-10-22 02:52:54 -05:00
fix searchbar show/hide
This commit is contained in:
2 files changed
+14
-2
No files matched your search
+10
-2
@@ -1338,7 +1338,7 @@ VOID _app_toolbar_resize (_In_ HWND hwnd, _In_ LONG dpi_value)
|
||||
RtlZeroMemory (&rbi, sizeof (rbi));
|
||||
|
||||
rbi.cbSize = sizeof (rbi);
|
||||
rbi.fMask = RBBIM_ID | RBBIM_IDEALSIZE | RBBIM_CHILDSIZE;
|
||||
rbi.fMask = RBBIM_ID | RBBIM_CHILD | RBBIM_IDEALSIZE | RBBIM_CHILDSIZE;
|
||||
|
||||
if (!SendMessage (config.hrebar, RB_GETBANDINFO, (WPARAM)i, (LPARAM)&rbi))
|
||||
continue;
|
||||
@@ -1356,7 +1356,15 @@ VOID _app_toolbar_resize (_In_ HWND hwnd, _In_ LONG dpi_value)
|
||||
}
|
||||
else if (rbi.wID == REBAR_SEARCH_ID)
|
||||
{
|
||||
rbi.cxIdeal = (UINT)_r_dc_getdpi (180, dpi_value);
|
||||
if (_r_wnd_isvisible (rbi.hwndChild))
|
||||
{
|
||||
rbi.cxIdeal = (UINT)_r_dc_getdpi (180, dpi_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
rbi.cxIdeal = 0;
|
||||
}
|
||||
|
||||
rbi.cxMinChild = rbi.cxIdeal;
|
||||
rbi.cyMinChild = 20;
|
||||
}
|
||||
|
||||
@@ -2879,8 +2879,12 @@ INT_PTR CALLBACK DlgProc (_In_ HWND hwnd, _In_ UINT msg, _In_ WPARAM wparam, _In
|
||||
_r_config_setboolean (L"IsShowSearchBar", new_val);
|
||||
|
||||
if (config.hsearchbar)
|
||||
{
|
||||
_app_search_setvisible (hwnd, config.hsearchbar);
|
||||
|
||||
SendMessage (hwnd, WM_SIZE, 0, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user