Skip to content
Snippets Groups Projects
Commit 89f37041 authored by Sébastien Blin's avatar Sébastien Blin Committed by Kateryna Kostiuk
Browse files

pluginview: use ToggleSwitch to homogeneize style

Change-Id: I9c3a0e146173c16414e000080086c805cbbd6c95
GitLab: #601
parent d82e3820
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ import net.jami.Adapters 1.1
import net.jami.Constants 1.1
import "../commoncomponents"
import "../settingsview/components"
ItemDelegate {
id: root
......@@ -130,7 +131,7 @@ ItemDelegate {
opacity: enabled ? 1.0 : 0.5
}
Switch {
ToggleSwitch {
id: btnPreferenceSwitch
visible: preferenceType === PreferenceItemDelegate.SWITCH
......@@ -140,7 +141,7 @@ ItemDelegate {
Layout.preferredWidth: 30
checked: preferenceCurrentValue === "1"
onToggled: getNewPreferenceValueSlot(checked)
onSwitchToggled: getNewPreferenceValueSlot(checked)
opacity: enabled ? 1.0 : 0.5
}
......
......@@ -94,7 +94,7 @@ ItemDelegate {
verticalAlignment: Text.AlignVCenter
}
Switch {
ToggleSwitch {
id: loadSwitch
Layout.fillHeight: true
property bool isHovering: false
......@@ -106,29 +106,10 @@ ItemDelegate {
ToolTip.text: qsTr("Load/Unload")
checked: isLoaded
onClicked: {
onSwitchToggled: {
btnLoadPluginToggled()
pluginListPreferencesView.isLoaded = root.isLoaded
}
background: Rectangle {
id: switchBackground
color: "transparent"
MouseArea {
id: btnMouseArea
hoverEnabled: true
onReleased: {
loadSwitch.clicked()
}
onEntered: {
loadSwitch.isHovering = true
}
onExited: {
loadSwitch.isHovering = false
}
}
}
}
PushButton {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment