mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-06-14 03:16:38 +10:00
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:
@@ -1313,12 +1313,12 @@ static void UpdateStartButtonPosition(const TaskbarInfo* taskBar, const WINDOWPO
|
|||||||
y = rcTask.top;
|
y = rcTask.top;
|
||||||
else
|
else
|
||||||
y = rcTask.bottom - taskBar->startButtonSize.cy;
|
y = rcTask.bottom - taskBar->startButtonSize.cy;
|
||||||
}
|
|
||||||
|
|
||||||
// Start button on Win11 is a bit shifted to the right
|
// Start button on Win11 is a bit shifted to the right
|
||||||
// We will shift our Aero button to cover original button
|
// We will shift our Aero button to cover original button
|
||||||
if (IsWin11() && (x == 0) && (GetStartButtonType() == START_BUTTON_AERO))
|
if (IsWin11() && (x == info.rcMonitor.left) && (GetStartButtonType() == START_BUTTON_AERO))
|
||||||
x += ScaleForDpi(taskBar->taskBar, 6);
|
x += ScaleForDpi(taskBar->taskBar, 6);
|
||||||
|
}
|
||||||
|
|
||||||
RECT rcButton = { x, y, x + taskBar->startButtonSize.cx, y + taskBar->startButtonSize.cy };
|
RECT rcButton = { x, y, x + taskBar->startButtonSize.cx, y + taskBar->startButtonSize.cy };
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|||||||
Reference in New Issue
Block a user