mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #4141
Yuri (1): feat(shortcut): Implemented F11 shortcut for toggling fullscreen.
This commit is contained in:
commit
1e7fc8cc52
|
@ -415,6 +415,7 @@ The following shortcuts are currently supported:
|
|||
| `CTRL` + `TAB` | Switch to the next contact |
|
||||
| `CTRL` + `SHIFT` + `TAB` | Switch to the previous contact|
|
||||
| `ALT` + `q` | Quote selected text |
|
||||
| `F11` | Toggle fullscreen mode |
|
||||
|
||||
## Emoji Packs
|
||||
|
||||
|
|
|
@ -261,6 +261,7 @@ void Widget::init()
|
|||
new QShortcut(Qt::CTRL + Qt::Key_Tab, this, SLOT(nextContact()));
|
||||
new QShortcut(Qt::CTRL + Qt::Key_PageUp, this, SLOT(previousContact()));
|
||||
new QShortcut(Qt::CTRL + Qt::Key_PageDown, this, SLOT(nextContact()));
|
||||
new QShortcut(Qt::Key_F11, this, SLOT(toggleFullscreen()));
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
QMenuBar* globalMenu = Nexus::getInstance().globalMenuBar;
|
||||
|
@ -1576,6 +1577,17 @@ void Widget::onGroupDialogShown(Group* g)
|
|||
onDialogShown(g->getGroupWidget());
|
||||
}
|
||||
|
||||
void Widget::toggleFullscreen() {
|
||||
if (windowState().testFlag(Qt::WindowFullScreen))
|
||||
{
|
||||
setWindowState(windowState() & ~Qt::WindowFullScreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
setWindowState(windowState() | Qt::WindowFullScreen);
|
||||
}
|
||||
}
|
||||
|
||||
ContentDialog* Widget::createContentDialog() const
|
||||
{
|
||||
ContentDialog* contentDialog = new ContentDialog(settingsWidget);
|
||||
|
|
|
@ -151,6 +151,7 @@ public slots:
|
|||
void previousContact();
|
||||
void onFriendDialogShown(Friend* f);
|
||||
void onGroupDialogShown(Group* g);
|
||||
void toggleFullscreen();
|
||||
|
||||
signals:
|
||||
void friendRequestAccepted(const ToxPk& friendPk);
|
||||
|
|
Loading…
Reference in New Issue
Block a user