diff --git a/src/commoncomponents/PreferenceItemDelegate.qml b/src/commoncomponents/PreferenceItemDelegate.qml index 17d2593edbf273da28f4b6052973c67ac6421523..c0b3e886b9fa5178fb1a1b28383264020d8314b5 100644 --- a/src/commoncomponents/PreferenceItemDelegate.qml +++ b/src/commoncomponents/PreferenceItemDelegate.qml @@ -134,32 +134,27 @@ ItemDelegate { currentIndex: pluginListPreferenceModel.getCurrentSettingIndex() textRole: "PreferenceValue" tooltipText: JamiStrings.select - onActivated: { - getNewPreferenceValueSlot(index) - } + onActivated: getNewPreferenceValueSlot(index) } - PushButton { + MaterialButton { id: pathPreferenceButton visible: preferenceType === PreferenceItemDelegate.PATH - Layout.maximumWidth: root.width / 2 - 16 - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - Layout.rightMargin: 30 - width: root.width / 2 - 16 Layout.preferredWidth: width - Layout.preferredHeight: 32 - - source: "qrc:/images/icons/round-folder-24px.svg" + Layout.preferredHeight: 30 + Layout.alignment: Qt.AlignRight | Qt.AlignVCenter + Layout.rightMargin: 30 + text: UtilsAdapter.fileName(preferenceCurrentValue) toolTipText: JamiStrings.chooseImageFile - buttonText: UtilsAdapter.fileName(preferenceCurrentValue) - fontPointSize: JamiTheme.buttonFontSize + source: "qrc:/images/icons/round-folder-24px.svg" + color: JamiTheme.buttonTintedGrey + hoveredColor: JamiTheme.buttonTintedGreyHovered + pressedColor: JamiTheme.buttonTintedGreyPressed - onClicked: { - getNewPreferenceValueSlot(0) - } + onClicked: getNewPreferenceValueSlot(0) } } } diff --git a/src/settingsview/components/PluginItemDelegate.qml b/src/settingsview/components/PluginItemDelegate.qml index 9e864a0fb236d84d0e5beda28b6f728a5b885ca0..698f5fdb25e6b745fde3296b7d6ea21a8930db95 100644 --- a/src/settingsview/components/PluginItemDelegate.qml +++ b/src/settingsview/components/PluginItemDelegate.qml @@ -38,26 +38,28 @@ ItemDelegate { signal btnLoadPluginToggled signal btnPreferencesPluginClicked - RowLayout{ + RowLayout { anchors.fill: parent - Label{ + Label { id: pluginImage Layout.leftMargin: 8 Layout.alignment: Qt.AlignLeft | Qt.AlingVCenter width: 30 - background: Rectangle{ + background: Rectangle { Image { anchors.centerIn: parent - source: "file:"+pluginIcon - width: 30 - height: 30 + source: "file:" + pluginIcon + sourceSize: Qt.size(256, 256) + mipmap: true + width: 32 + height: 32 } } } - Label{ + Label { id: labelDeviceId Layout.fillWidth: true Layout.leftMargin: 8 @@ -74,22 +76,16 @@ ItemDelegate { width: 20 ToolTip.visible: hovered - ToolTip.text: { - return qsTr("Load/Unload") - } + ToolTip.text: qsTr("Load/Unload") checked: isLoaded - onClicked: { - btnLoadPluginToggled() - } + onClicked: btnLoadPluginToggled() background: Rectangle { id: switchBackground MouseArea { id: btnMouseArea hoverEnabled: true - onPressed: { - } onReleased: { loadSwitch.clicked() } diff --git a/src/settingsview/components/PluginListPreferencesView.qml b/src/settingsview/components/PluginListPreferencesView.qml index 39e8e64db25d39121c0703e0e4b3df2b02162590..d89d33de8d1a4118a39e46b367ba2334d370bb94 100644 --- a/src/settingsview/components/PluginListPreferencesView.qml +++ b/src/settingsview/components/PluginListPreferencesView.qml @@ -110,8 +110,9 @@ Rectangle { Image { anchors.centerIn: parent source: pluginIcon === "" ? "" : "file:" + pluginIcon - height: 36 - width: 36 + sourceSize: Qt.size(256, 256) + height: 48 + width: 48 mipmap: true } } @@ -119,7 +120,7 @@ Rectangle { Label { Layout.alignment: Qt.AlignHCenter - Layout.topMargin: 10 + Layout.topMargin: 16 text: qsTr(pluginName + "\npreferences") font.pointSize: JamiTheme.headerFontSize @@ -133,26 +134,38 @@ Rectangle { Layout.topMargin: 10 height: 30 - PushButton { + MaterialButton { id: resetButton Layout.fillWidth: true + Layout.preferredHeight: JamiTheme.preferredFieldHeight + + color: JamiTheme.buttonTintedBlack + hoveredColor: JamiTheme.buttonTintedBlackHovered + pressedColor: JamiTheme.buttonTintedBlackPressed + outlined: true source: "qrc:/images/icons/settings_backup_restore-24px.svg" - buttonText: JamiStrings.reset - fontPointSize: JamiTheme.settingsFontSize + + text: JamiStrings.reset onClicked: resetPluginSlot() } - PushButton { + MaterialButton { id: uninstallButton Layout.fillWidth: true + Layout.preferredHeight: JamiTheme.preferredFieldHeight + + color: JamiTheme.buttonTintedBlack + hoveredColor: JamiTheme.buttonTintedBlackHovered + pressedColor: JamiTheme.buttonTintedBlackPressed + outlined: true source: "qrc:/images/icons/delete-24px.svg" - buttonText: qsTr("Uninstall") - fontPointSize: JamiTheme.settingsFontSize + + text: qsTr("Uninstall") onClicked: uninstallPluginSlot() } @@ -166,12 +179,13 @@ Rectangle { Layout.preferredHeight: childrenRect.height + 30 model: PluginAdapter.getPluginPreferencesModel(pluginId) + interactive: false delegate: PreferenceItemDelegate { id: preferenceItemDelegate width: pluginPreferenceView.width - height: childrenRect.height + height: 50 preferenceName: PreferenceName preferenceSummary: PreferenceSummary @@ -182,19 +196,21 @@ Rectangle { preferenceKey: PreferenceKey fileFilters: FileFilters isImage: IsImage - pluginListPreferenceModel: PluginListPreferenceModel{ + pluginListPreferenceModel: PluginListPreferenceModel { id: pluginListPreferenceModel preferenceKey : PreferenceKey pluginId: PluginId } - onClicked: { - pluginPreferenceView.currentIndex = index - } onBtnPreferenceClicked: { setPreference(pluginId, preferenceKey, preferenceNewValue) pluginPreferenceView.model = PluginAdapter.getPluginPreferencesModel(pluginId) } + + background: Rectangle { + anchors.fill: parent + color: "white" + } } } } diff --git a/src/settingsview/components/PluginListSettingsView.qml b/src/settingsview/components/PluginListSettingsView.qml index 7fad13a975bcea0f01f2f200041f1ce9dbe5c1f1..c630633413842e4b99fb7136697109132c2b2144 100644 --- a/src/settingsview/components/PluginListSettingsView.qml +++ b/src/settingsview/components/PluginListSettingsView.qml @@ -138,6 +138,7 @@ Rectangle { Layout.preferredHeight: childrenRect.height model: PluginAdapter.getPluginSelectableModel() + interactive: false delegate: PluginItemDelegate { id: pluginItemDelegate @@ -150,14 +151,17 @@ Rectangle { pluginIcon: PluginIcon isLoaded: IsLoaded - onClicked: pluginListView.currentIndex = index - onBtnLoadPluginToggled: { loadPluginSlot(pluginId, isLoaded) pluginListView.model = PluginAdapter.getPluginSelectableModel() } onBtnPreferencesPluginClicked: openPreferencesPluginSlot(pluginName, pluginIcon, pluginId, isLoaded) + + background: Rectangle { + anchors.fill: parent + color: "white" + } } } }