Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show menu bar in full screen #3682

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ Ross Brown <[email protected]>
Lukas Sommer <[email protected]>
Niclas Heinz <[email protected]>
Omar Kohl <[email protected]>
Kartik Sharma <github.com/KartikSharma0>

********************

Expand Down
10 changes: 9 additions & 1 deletion qt/aqt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ def eventFilter(self, obj, evt):
self.mw.bottomWeb.hide_timer.start()
return True

if evt.type() == QEvent.Type.MouseMove:
if self.mw.fullscreen and not is_mac:
cursor_pos = self.mapFromGlobal(QCursor.pos())
if cursor_pos.y() < 1:
self.mw.show_menubar()
else:
self.mw.hide_menubar()
return True

return False


Expand Down Expand Up @@ -1433,7 +1442,6 @@ def on_toggle_full_screen(self) -> None:
window.windowState() ^ Qt.WindowState.WindowFullScreen
)

# Hide Menubar on Windows and Linux
if window.windowState() & Qt.WindowState.WindowFullScreen and not is_mac:
self.fullscreen = True
self.hide_menubar()
Expand Down