Commit bdf3d566 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/modules/Linphone/TelKeypad/TelKeypadButton): add a line below each button

parent e56412e9
...@@ -18,9 +18,18 @@ QtObject { ...@@ -18,9 +18,18 @@ QtObject {
property color pressed: Colors.i property color pressed: Colors.i
} }
property QtObject line: QtObject {
property color color: Colors.l50
property int bottomMargin: 4
property int height: 2
property int leftMargin: 8
property int rightMargin: 8
property int topMargin: 0
}
property QtObject text: QtObject { property QtObject text: QtObject {
property color color: Colors.d property color color: Colors.d
property int fontSize: 10 property int fontSize: 11
} }
} }
} }
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3
import Linphone.Styles 1.0 import Linphone.Styles 1.0
...@@ -16,30 +16,44 @@ Item { ...@@ -16,30 +16,44 @@ Item {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Button { Rectangle {
anchors.fill: parent anchors.fill: parent
color: button.color
background: Rectangle { ColumnLayout {
color: button.color anchors.fill: parent
}
contentItem: Text { spacing: 0
color: TelKeypadStyle.button.text.color
font { Text {
bold: true Layout.fillHeight: true
pointSize: TelKeypadStyle.button.text.fontSize Layout.fillWidth: true
}
elide: Text.ElideRight color: TelKeypadStyle.button.text.color
text: button.text elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter font {
verticalAlignment: Text.AlignVCenter bold: true
} pointSize: TelKeypadStyle.button.text.fontSize
}
hoverEnabled: true text: button.text
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: button.clicked() Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: TelKeypadStyle.button.line.height
Layout.bottomMargin: TelKeypadStyle.button.line.bottomMargin
Layout.leftMargin: TelKeypadStyle.button.line.leftMargin
Layout.rightMargin: TelKeypadStyle.button.line.rightMargin
Layout.topMargin: TelKeypadStyle.button.line.topMargin
color: TelKeypadStyle.button.line.color
}
}
} }
} }
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