Fix Aero button alignment on multiple monitors (#1310)

Shift Aero button slightly when it is positioned in corner of any
monitor (not just primary one).

Moreover this shift should be done only for top/bottom taskbar.
This commit is contained in:
ge0rdi
2023-01-30 19:21:15 +01:00
parent 073035bee9
commit 4705b35694

View File

@@ -1313,12 +1313,12 @@ static void UpdateStartButtonPosition(const TaskbarInfo* taskBar, const WINDOWPO
y = rcTask.top;
else
y = rcTask.bottom - taskBar->startButtonSize.cy;
}
// Start button on Win11 is a bit shifted to the right
// We will shift our Aero button to cover original button
if (IsWin11() && (x == 0) && (GetStartButtonType() == START_BUTTON_AERO))
x += ScaleForDpi(taskBar->taskBar, 6);
// Start button on Win11 is a bit shifted to the right
// We will shift our Aero button to cover original button
if (IsWin11() && (x == info.rcMonitor.left) && (GetStartButtonType() == START_BUTTON_AERO))
x += ScaleForDpi(taskBar->taskBar, 6);
}
RECT rcButton = { x, y, x + taskBar->startButtonSize.cx, y + taskBar->startButtonSize.cy };
RECT rc;