diff --git a/src/mainview/MainView.qml b/src/mainview/MainView.qml index aa22b3078cdca04e96fc0b86af92ae8d2902b403..a416ba27a19ffb1944e0a23c994597c8ff350fb9 100644 --- a/src/mainview/MainView.qml +++ b/src/mainview/MainView.qml @@ -479,7 +479,7 @@ Rectangle { if (!inSettingsView) { toggleSettingsView() } - settingsMenu.btnMediaSettings.clicked() + settingsMenu.buttonSelectedManually(SettingsView.Media) } } @@ -490,7 +490,7 @@ Rectangle { if (!inSettingsView) { toggleSettingsView() } - settingsMenu.btnGeneralSettings.clicked() + settingsMenu.buttonSelectedManually(SettingsView.General) } } @@ -501,7 +501,7 @@ Rectangle { if (!inSettingsView) { toggleSettingsView() } - settingsMenu.btnAccountSettings.clicked() + settingsMenu.buttonSelectedManually(SettingsView.Account) } } @@ -512,7 +512,7 @@ Rectangle { if (!inSettingsView) { toggleSettingsView() } - settingsMenu.btnPluginSettings.clicked() + settingsMenu.buttonSelectedManually(SettingsView.Plugin) } } diff --git a/src/settingsview/components/SettingsMenu.qml b/src/settingsview/components/SettingsMenu.qml index 382ba3b4ffe0bbb7994ef7f393b14d0c40501ab6..b596c24372f3927f49057ec3949647a323802ed8 100644 --- a/src/settingsview/components/SettingsMenu.qml +++ b/src/settingsview/components/SettingsMenu.qml @@ -30,6 +30,7 @@ Rectangle { id: root signal itemSelected(int index) + signal buttonSelectedManually(int index) Component.onCompleted: { listModel.append({ 'type': SettingsView.Account, 'name': JamiStrings.accountSettingsMenuTitle, @@ -46,6 +47,8 @@ Rectangle { color: JamiTheme.backgroundColor ButtonGroup { + id: buttonGroup + buttons: buttons.children onCheckedButtonChanged: itemSelected(checkedButton.menuType) } @@ -64,8 +67,19 @@ Rectangle { model: ListModel { id: listModel } PushButton { + id: pushButton + property int menuType: type + Connections { + target: root + + function onButtonSelectedManually(index) { + if (pushButton.menuType === index) + buttonGroup.checkedButton = pushButton + } + } + Component.onCompleted: checked = type === SettingsView.Account preferredHeight: 64