From c988b866d56dc7e99097567b9ce400c4a5f94394 Mon Sep 17 00:00:00 2001 From: keshavbhatt Date: Sun, 11 Apr 2021 02:02:41 +0530 Subject: fix app shortcut popup layout --- src/settingswidget.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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(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(); - } -- cgit v1.2.3