Commit bcf304f1 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(Form/ActionBar): use style file

parent 2509d01c
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
<file>ui/modules/Linphone/Styles/DialogStyle.qml</file> <file>ui/modules/Linphone/Styles/DialogStyle.qml</file>
<file>ui/modules/Linphone/Styles/ForceScrollBarStyle.qml</file> <file>ui/modules/Linphone/Styles/ForceScrollBarStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/AbstractTextButtonStyle.qml</file> <file>ui/modules/Linphone/Styles/Form/AbstractTextButtonStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/ActionBarStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/ExclusiveButtonsStyle.qml</file> <file>ui/modules/Linphone/Styles/Form/ExclusiveButtonsStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/SmallButtonStyle.qml</file> <file>ui/modules/Linphone/Styles/Form/SmallButtonStyle.qml</file>
<file>ui/modules/Linphone/Styles/Form/TextButtonAStyle.qml</file> <file>ui/modules/Linphone/Styles/Form/TextButtonAStyle.qml</file>
......
import QtQuick 2.7 import QtQuick 2.7
import Linphone.Styles 1.0
// =================================================================== // ===================================================================
// Bar which can contains ActionButtons. // Bar which can contains ActionButtons.
// =================================================================== // ===================================================================
Row { Row {
property int iconSize property int iconSize
spacing: 8
spacing: ActionBarStyle.spacing
} }
...@@ -8,16 +8,19 @@ import Linphone 1.0 ...@@ -8,16 +8,19 @@ import Linphone 1.0
// =================================================================== // ===================================================================
Button { Button {
property int iconSize property alias icon: icon.icon
property alias icon: icon.icon property int iconSize
// Ugly hack, use current size, ActionBar size, flat: true
// or other parent height.
height: iconSize || parent.iconSize || parent.height
width: iconSize || parent.iconSize || parent.height
Icon { // Ugly hack, use current size, ActionBar size,
anchors.fill: parent // or other parent height.
id: icon height: iconSize || parent.iconSize || parent.height
} width: iconSize || parent.iconSize || parent.height
Icon {
id: icon
anchors.fill: parent
}
} }
pragma Singleton
import QtQuick 2.7
QtObject {
property int spacing: 8
}
...@@ -12,6 +12,7 @@ singleton SearchBoxStyle 1.0 SearchBoxStyle.qml ...@@ -12,6 +12,7 @@ singleton SearchBoxStyle 1.0 SearchBoxStyle.qml
singleton TimelineStyle 1.0 TimelineStyle.qml singleton TimelineStyle 1.0 TimelineStyle.qml
singleton AbstractTextButtonStyle 1.0 Form/AbstractTextButtonStyle.qml singleton AbstractTextButtonStyle 1.0 Form/AbstractTextButtonStyle.qml
singleton ActionBarStyle 1.0 Form/ActionBarStyle.qml
singleton ExclusiveButtonsStyle 1.0 Form/ExclusiveButtonsStyle.qml singleton ExclusiveButtonsStyle 1.0 Form/ExclusiveButtonsStyle.qml
singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml singleton SmallButtonStyle 1.0 Form/SmallButtonStyle.qml
singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.qml singleton TextButtonAStyle 1.0 Form/TextButtonAStyle.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