mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-13 17:22:57 +02:00
Added missing shortcut to toggle fullscreen for windows on macOS.
This commit is contained in:
parent
64df9222dd
commit
d06a9e2e5c
2 changed files with 13 additions and 0 deletions
|
@ -6751,6 +6751,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"lng_mac_menu_new_channel" = "New Channel";
|
||||
"lng_mac_menu_show" = "Show Telegram";
|
||||
"lng_mac_menu_emoji_and_symbols" = "Emoji & Symbols";
|
||||
"lng_mac_menu_fullscreen" = "Toggle Full Screen";
|
||||
|
||||
"lng_mac_menu_player_pause" = "Pause";
|
||||
"lng_mac_menu_player_resume" = "Resume";
|
||||
|
|
|
@ -529,6 +529,18 @@ void MainWindow::createGlobalMenu() {
|
|||
)->setShortcutContext(Qt::WidgetShortcut);
|
||||
|
||||
QMenu *window = psMainMenu.addMenu(tr::lng_mac_menu_window(tr::now));
|
||||
|
||||
window->addAction(
|
||||
tr::lng_mac_menu_fullscreen(tr::now),
|
||||
this,
|
||||
[=] {
|
||||
NSWindow *nsWindow = [reinterpret_cast<NSView*>(winId()) window];
|
||||
[nsWindow toggleFullScreen:nsWindow];
|
||||
},
|
||||
QKeySequence(Qt::MetaModifier | Qt::ControlModifier | Qt::Key_F)
|
||||
)->setShortcutContext(Qt::WidgetShortcut);
|
||||
window->addSeparator();
|
||||
|
||||
psContacts = window->addAction(tr::lng_mac_menu_contacts(tr::now));
|
||||
connect(psContacts, &QAction::triggered, psContacts, crl::guard(this, [=] {
|
||||
Expects(sessionController() != nullptr && !controller().locked());
|
||||
|
|
Loading…
Add table
Reference in a new issue