diff options
author | 2021-04-11 02:02:41 +0530 | |
---|---|---|
committer | 2021-04-11 02:02:41 +0530 | |
commit | c988b866d56dc7e99097567b9ce400c4a5f94394 (patch) | |
tree | ba549b206f01cbe79865d7eb477982ef7879a2d8 /src | |
parent | f6da6ffa0e33e243ee9a53f93a8eb587cfa602e3 (diff) | |
download | whatsie-c988b866d56dc7e99097567b9ce400c4a5f94394.tar.gz whatsie-c988b866d56dc7e99097567b9ce400c4a5f94394.zip |
fix app shortcut popup layout
Diffstat (limited to 'src')
-rw-r--r-- | src/settingswidget.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/settingswidget.cpp b/src/settingswidget.cpp index 0b51099..d90b673 100644 --- a/src/settingswidget.cpp +++ b/src/settingswidget.cpp @@ -275,8 +275,12 @@ void SettingsWidget::on_showShortcutsButton_clicked() auto *w = qobject_cast<MainWindow*>(parent()); if(w != 0){ foreach (QAction *action, w->actions()) { - QLabel *label = new QLabel(action->text()+" | "+action->shortcut().toString(),sheet); - layout->addWidget(label); + QString shortcutStr = action->shortcut().toString(); + if(shortcutStr.isEmpty()==false){ + QLabel *label = new QLabel(action->text().remove("&")+" | "+shortcutStr,sheet); + label->setAlignment(Qt::AlignHCenter); + layout->addWidget(label); + } } } sheet->setAttribute(Qt::WA_DeleteOnClose); @@ -288,10 +292,10 @@ void SettingsWidget::on_showPermissionsButton_clicked() PermissionDialog *permissionDialog = new PermissionDialog(this); permissionDialog->setWindowTitle(QApplication::applicationName()+" | "+tr("Feature permissions")); permissionDialog->setWindowFlag(Qt::Dialog); + permissionDialog->setAttribute(Qt::WA_DeleteOnClose,true); permissionDialog->move(this->geometry().center()-permissionDialog->geometry().center()); permissionDialog->setMinimumSize(485,310); permissionDialog->adjustSize(); permissionDialog->show(); - } |