mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Added missing shortcut to toggle fullscreen for windows on macOS.
This commit is contained in:
@@ -6751,6 +6751,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
"lng_mac_menu_new_channel" = "New Channel";
|
"lng_mac_menu_new_channel" = "New Channel";
|
||||||
"lng_mac_menu_show" = "Show Telegram";
|
"lng_mac_menu_show" = "Show Telegram";
|
||||||
"lng_mac_menu_emoji_and_symbols" = "Emoji & Symbols";
|
"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_pause" = "Pause";
|
||||||
"lng_mac_menu_player_resume" = "Resume";
|
"lng_mac_menu_player_resume" = "Resume";
|
||||||
|
@@ -529,6 +529,18 @@ void MainWindow::createGlobalMenu() {
|
|||||||
)->setShortcutContext(Qt::WidgetShortcut);
|
)->setShortcutContext(Qt::WidgetShortcut);
|
||||||
|
|
||||||
QMenu *window = psMainMenu.addMenu(tr::lng_mac_menu_window(tr::now));
|
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));
|
psContacts = window->addAction(tr::lng_mac_menu_contacts(tr::now));
|
||||||
connect(psContacts, &QAction::triggered, psContacts, crl::guard(this, [=] {
|
connect(psContacts, &QAction::triggered, psContacts, crl::guard(this, [=] {
|
||||||
Expects(sessionController() != nullptr && !controller().locked());
|
Expects(sessionController() != nullptr && !controller().locked());
|
||||||
|
Reference in New Issue
Block a user