diff --git a/tests/resources.qrc b/tests/resources.qrc
index 68170319f..7ac6e814c 100644
--- a/tests/resources.qrc
+++ b/tests/resources.qrc
@@ -63,6 +63,7 @@
ui/modules/Linphone/Styles/ForceScrollBarStyle.qml
ui/modules/Linphone/Styles/Form/AbstractTextButtonStyle.qml
ui/modules/Linphone/Styles/Form/ActionBarStyle.qml
+ ui/modules/Linphone/Styles/Form/CheckBoxTextStyle.qml
ui/modules/Linphone/Styles/Form/ExclusiveButtonsStyle.qml
ui/modules/Linphone/Styles/Form/SmallButtonStyle.qml
ui/modules/Linphone/Styles/Form/TextButtonAStyle.qml
diff --git a/tests/ui/modules/Linphone/Form/CheckBoxText.qml b/tests/ui/modules/Linphone/Form/CheckBoxText.qml
index b741acc05..7baeb0944 100644
--- a/tests/ui/modules/Linphone/Form/CheckBoxText.qml
+++ b/tests/ui/modules/Linphone/Form/CheckBoxText.qml
@@ -1,35 +1,54 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
+import Linphone.Styles 1.0
+
// ===================================================================
// Checkbox with clickable text.
// ===================================================================
CheckBox {
- contentItem: Text {
- color: checkBox.down ? '#FE5E00' : '#8E8E8E'
- font: checkBox.font
- leftPadding: checkBox.indicator.width + checkBox.spacing
- text: checkBox.text
- verticalAlignment: Text.AlignVCenter
- }
- id: checkBox
- indicator: Rectangle {
- border.color: checkBox.down ? '#FE5E00' : '#8E8E8E'
- implicitHeight: 18
- implicitWidth: 18
- radius: 3
- x: checkBox.leftPadding
- y: parent.height / 2 - height / 2
+ id: checkBox
- Rectangle {
- color: checkBox.down ? '#FE5E00' : '#8E8E8E'
- height: 10
- radius: 2
- visible: checkBox.checked
- width: 10
- x: 4
- y: 4
- }
+ contentItem: Text {
+ color: checkBox.down
+ ? CheckBoxTextStyle.color.pressed
+ : (checkBox.hovered
+ ? CheckBoxTextStyle.color.hovered
+ : CheckBoxTextStyle.color.normal
+ )
+ font: checkBox.font
+ leftPadding: checkBox.indicator.width + checkBox.spacing
+ text: checkBox.text
+ verticalAlignment: Text.AlignVCenter
+ }
+ hoverEnabled: true
+ indicator: Rectangle {
+ border.color: checkBox.down
+ ? CheckBoxTextStyle.color.pressed
+ : (checkBox.hovered
+ ? CheckBoxTextStyle.color.hovered
+ : CheckBoxTextStyle.color.normal
+ )
+ implicitHeight: CheckBoxTextStyle.size
+ implicitWidth: CheckBoxTextStyle.size
+ radius: CheckBoxTextStyle.radius
+ x: checkBox.leftPadding
+ y: parent.height / 2 - height / 2
+
+ Rectangle {
+ color: checkBox.down
+ ? CheckBoxTextStyle.color.pressed
+ : (checkBox.hovered
+ ? CheckBoxTextStyle.color.hovered
+ : CheckBoxTextStyle.color.normal
+ )
+ height: parent.height - y * 2
+ radius: CheckBoxTextStyle.radius
+ visible: checkBox.checked
+ width: parent.width - x * 2
+ x: 4 // Fixed, no style.
+ y: 4 // Fixed, no style.
}
+ }
}
diff --git a/tests/ui/modules/Linphone/Styles/Form/CheckBoxTextStyle.qml b/tests/ui/modules/Linphone/Styles/Form/CheckBoxTextStyle.qml
new file mode 100644
index 000000000..c957e299b
--- /dev/null
+++ b/tests/ui/modules/Linphone/Styles/Form/CheckBoxTextStyle.qml
@@ -0,0 +1,15 @@
+pragma Singleton
+import QtQuick 2.7
+
+import Linphone 1.0
+
+QtObject {
+ property int radius: 3
+ property int size: 18
+
+ property QtObject color: QtObject {
+ property color pressed: '#FE5E00'
+ property color hovered: '#6E6E6E'
+ property color normal: '#8E8E8E'
+ }
+}
diff --git a/tests/ui/modules/Linphone/Styles/qmldir b/tests/ui/modules/Linphone/Styles/qmldir
index 539dff7c5..c8326e18e 100644
--- a/tests/ui/modules/Linphone/Styles/qmldir
+++ b/tests/ui/modules/Linphone/Styles/qmldir
@@ -13,6 +13,7 @@ singleton TimelineStyle 1.0 TimelineStyle.qml
singleton AbstractTextButtonStyle 1.0 Form/AbstractTextButtonStyle.qml
singleton ActionBarStyle 1.0 Form/ActionBarStyle.qml
+singleton CheckBoxTextStyle 1.0 Form/CheckBoxTextStyle.qml
singleton ExclusiveButtonsStyle 1.0 Form/ExclusiveButtonsStyle.qml
singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml
diff --git a/tests/ui/views/MainWindow/MainWindow.qml b/tests/ui/views/MainWindow/MainWindow.qml
index af99fc5be..68e5c99a1 100644
--- a/tests/ui/views/MainWindow/MainWindow.qml
+++ b/tests/ui/views/MainWindow/MainWindow.qml
@@ -275,7 +275,7 @@ ApplicationWindow {
Loader {
Layout.fillHeight: true
Layout.fillWidth: true
- source: 'qrc:/ui/views/MainWindow/Contacts.qml'
+ source: 'qrc:/ui/views/MainWindow/Home.qml'
}
}