Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcd7490d

Browse files
trop[bot]zcbenz
andauthored
fix: consider dock space when showing menu (#35198)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
1 parentb990bd6 commitcd7490d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎shell/browser/api/electron_api_menu_mac.mm‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
if (!item) {
135135
CGFloat windowBottom =CGRectGetMinY([viewwindow].frame);
136136
CGFloat lowestMenuPoint = windowBottom + position.y - [menusize].height;
137-
CGFloat screenBottom =CGRectGetMinY([viewwindow].screen.frame);
137+
CGFloat screenBottom =CGRectGetMinY([viewwindow].screen.visibleFrame);
138138
CGFloat distanceFromBottom = lowestMenuPoint - screenBottom;
139139
if (distanceFromBottom <0)
140140
position.y = position.y - distanceFromBottom +4;
@@ -143,7 +143,7 @@
143143
// Place the menu left of cursor if it is overflowing off right of screen.
144144
CGFloat windowLeft =CGRectGetMinX([viewwindow].frame);
145145
CGFloat rightmostMenuPoint = windowLeft + position.x + [menusize].width;
146-
CGFloat screenRight =CGRectGetMaxX([viewwindow].screen.frame);
146+
CGFloat screenRight =CGRectGetMaxX([viewwindow].screen.visibleFrame);
147147
if (rightmostMenuPoint > screenRight)
148148
position.x = position.x - [menusize].width;
149149

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp