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
......@@ -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 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment