ToolStatus: Improve rebar menu redrawing, Fix rebar position changes when there are multiple menu plugins
This commit is contained in:
@@ -412,15 +412,25 @@ VOID NTAPI LayoutPaddingCallback(
|
||||
if (RebarHandle && ToolStatusConfig.ToolBarEnabled)
|
||||
{
|
||||
RECT rebarRect;
|
||||
//RECT clientRect;
|
||||
RECT clientRect;
|
||||
//INT x, y, cx, cy;
|
||||
|
||||
SendMessage(RebarHandle, WM_SIZE, 0, 0);
|
||||
|
||||
// TODO: GetClientRect with PhMainWndHandle causes crash.
|
||||
//GetClientRect(PhMainWndHandle, &clientRect);
|
||||
GetClientRect(PhMainWindowHandle, &clientRect);
|
||||
GetClientRect(RebarHandle, &rebarRect);
|
||||
|
||||
//SendMessage(RebarHandle, WM_SIZE, 0, 0);
|
||||
SetWindowPos(
|
||||
RebarHandle,
|
||||
NULL,
|
||||
rebarRect.left,
|
||||
layoutPadding->Padding.top,
|
||||
clientRect.right - clientRect.left,
|
||||
rebarRect.bottom - rebarRect.top,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER
|
||||
);
|
||||
|
||||
UpdateWindow(RebarHandle);
|
||||
|
||||
// Adjust the PH client area and exclude the rebar width.
|
||||
layoutPadding->Padding.top += rebarRect.bottom;
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ VOID RebarLoadSettings(
|
||||
WS_EX_TOOLWINDOW,
|
||||
REBARCLASSNAME,
|
||||
NULL,
|
||||
WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NODIVIDER | CCS_TOP | RBS_VARHEIGHT, // | RBS_AUTOSIZE CCS_NOPARENTALIGN
|
||||
WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NODIVIDER | CCS_NOPARENTALIGN | RBS_VARHEIGHT | RBS_AUTOSIZE, // | RBS_AUTOSIZE | CCS_TOP
|
||||
0, 0, 0, 0,
|
||||
PhMainWndHandle,
|
||||
NULL,
|
||||
|
||||
Reference in New Issue
Block a user