Commit c74b0fbe authored by Ronan Abhamon's avatar Ronan Abhamon

feat(Form/TransparentComboBox): use style file

parent fbcbb7e1
......@@ -68,6 +68,7 @@
<file>ui/modules/Linphone/Styles/Form/SmallButtonStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/TextButtonAStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/TextButtonBStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/TransparentComboBoxStyle.qml</file>
<file>ui/modules/Linphone/Styles/MenuStyle.qml</file>
<file>ui/modules/Linphone/Styles/PopupStyle.qml</file>
<file>ui/modules/Linphone/Styles/qmldir</file>
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import Linphone.Styles 1.0
// ===================================================================
// Discrete ComboBox which can be integrated in text.
// Discrete ComboBox that can be integrated in text.
// ===================================================================
ComboBox {
id: comboBox
background: Rectangle {
color: 'transparent'
color: 'transparent' // No Style constant, see component name.
}
id: comboBox
delegate: ItemDelegate {
id: item
background: Rectangle {
color: delegate.down
? '#FE5E00'
color: item.down
? TransparentComboBoxStyle.item.color.pressed
: (comboBox.currentIndex === index
? '#F0F0F0'
: '#FFFFFF'
? TransparentComboBoxStyle.item.color.selected
: TransparentComboBoxStyle.item.color.normal
)
opacity: enabled ? 1 : 0.3
}
font.weight: comboBox.currentIndex === index
? Font.DemiBold
: Font.Normal
id: delegate
font.bold: comboBox.currentIndex === index
text: key || modelData
width: comboBox.width
}
......
......@@ -19,9 +19,9 @@ QtObject {
}
property QtObject description: QtObject {
property color color: Colors.l
property int fontSize: 12
property int verticalMargin: 25
property color color: Colors.l
}
}
......@@ -4,8 +4,8 @@ import QtQuick 2.7
QtObject {
property QtObject background: QtObject {
property int height: 30
property int width: 160
property int radius: 4
property int width: 160
}
property QtObject text: QtObject {
......
......@@ -6,13 +6,13 @@ import Linphone 1.0
QtObject {
property QtObject backgroundColor: QtObject {
property color hovered: Colors.o
property color pressed: Colors.i
property color normal: Colors.j
property color pressed: Colors.i
}
property QtObject textColor: QtObject {
property color hovered: Colors.k
property color pressed: Colors.k
property color normal: Colors.k
property color pressed: Colors.k
}
}
......@@ -6,13 +6,13 @@ import Linphone 1.0
QtObject {
property QtObject backgroundColor: QtObject {
property color hovered: Colors.p
property color pressed: Colors.i
property color normal: Colors.m
property color pressed: Colors.i
}
property QtObject textColor: QtObject {
property color hovered: Colors.d
property color pressed: Colors.k
property color normal: Colors.d
property color pressed: Colors.k
}
}
......@@ -18,3 +18,4 @@ singleton ExclusiveButtonsStyle 1.0 Form/ExclusiveButtonsStyle.qml
singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml
singleton TextButtonBStyle 1.0 Form/TextButtonBStyle.qml
singleton TransparentComboBoxStyle 1.0 Form/TransparentComboBoxStyle.qml
Markdown is supported
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