diff --git a/src/ui/globalshortcutssettingspage.cpp b/src/ui/globalshortcutssettingspage.cpp index c60a9561d..26192346f 100644 --- a/src/ui/globalshortcutssettingspage.cpp +++ b/src/ui/globalshortcutssettingspage.cpp @@ -47,7 +47,7 @@ GlobalShortcutsSettingsPage::GlobalShortcutsSettingsPage(SettingsDialog* dialog) connect(ui_->list, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), - SLOT(ItemClicked(QTreeWidgetItem*))); + SLOT(CurrentItemChanged(QTreeWidgetItem*))); connect(ui_->radio_none, SIGNAL(clicked()), SLOT(NoneClicked())); connect(ui_->radio_default, SIGNAL(clicked()), SLOT(DefaultClicked())); connect(ui_->radio_custom, SIGNAL(clicked()), SLOT(ChangeClicked())); @@ -86,7 +86,7 @@ void GlobalShortcutsSettingsPage::Load() { } ui_->list->sortItems(0, Qt::AscendingOrder); - ItemClicked(ui_->list->topLevelItem(0)); + ui_->list->setCurrentItem(ui_->list->topLevelItem(0)); } for (const Shortcut& s : shortcuts_.values()) { @@ -121,7 +121,7 @@ void GlobalShortcutsSettingsPage::Save() { dialog()->global_shortcuts_manager()->ReloadSettings(); } -void GlobalShortcutsSettingsPage::ItemClicked(QTreeWidgetItem* item) { +void GlobalShortcutsSettingsPage::CurrentItemChanged(QTreeWidgetItem* item) { current_id_ = item->data(0, Qt::UserRole).toString(); Shortcut& shortcut = shortcuts_[current_id_]; diff --git a/src/ui/globalshortcutssettingspage.h b/src/ui/globalshortcutssettingspage.h index 1a23c5d30..e6f620976 100644 --- a/src/ui/globalshortcutssettingspage.h +++ b/src/ui/globalshortcutssettingspage.h @@ -44,7 +44,7 @@ class GlobalShortcutsSettingsPage : public SettingsPage { void Save(); private slots: - void ItemClicked(QTreeWidgetItem*); + void CurrentItemChanged(QTreeWidgetItem*); void NoneClicked(); void DefaultClicked(); void ChangeClicked(); diff --git a/src/ui/globalshortcutssettingspage.ui b/src/ui/globalshortcutssettingspage.ui index fda8aedec..70f3a594e 100644 --- a/src/ui/globalshortcutssettingspage.ui +++ b/src/ui/globalshortcutssettingspage.ui @@ -21,7 +21,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -53,7 +62,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -83,85 +101,97 @@ - - - QAbstractItemView::NoEditTriggers + + + + 0 + 0 + - - true - - - false - - - true - - - - Action - - - - - Shortcut - - - - - - - - true - - - Shortcut for %1 - - + - + + + QAbstractItemView::NoEditTriggers + + + true + + + false + + + true + + + + Action + + + + + Shortcut + + + + + + true - - &None - - - true - - - - - - - De&fault - - - - - - - &Custom - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Change shortcut... + + Shortcut for %1 + + + + + true + + + &None + + + true + + + + + + + De&fault + + + + + + + &Custom + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Change shortcut... + + + + @@ -170,6 +200,9 @@ + gnome_checkbox + gnome_open + mac_open list radio_none radio_default @@ -183,7 +216,7 @@ gnome_checkbox toggled(bool) - list + list_container setDisabled(bool) @@ -191,24 +224,8 @@ 25 - 82 - 63 - - - - - gnome_checkbox - toggled(bool) - shortcut_options - setDisabled(bool) - - - 244 - 26 - - - 122 - 298 + 253 + 247