[dialer] Put the sub-label under the number label

This commit is contained in:
Martin Klapetek 2015-06-24 19:37:17 +02:00
parent 86cafaf72e
commit 7fd8ef1922
3 changed files with 13 additions and 16 deletions

View file

@ -56,6 +56,9 @@ Item {
} }
Dialpad { Dialpad {
Layout.fillWidth: true
Layout.fillHeight: true
callback: function (string) { callback: function (string) {
addNumber(string); addNumber(string);
} }

View file

@ -110,17 +110,15 @@ PlasmaComponents.Label {
PlasmaComponents.Label { PlasmaComponents.Label {
id: longHold id: longHold
anchors { anchors {
verticalCenter: parent.verticalCenter bottom: parent.bottom
right: parent.right
rightMargin: units.smallSpacing
} }
height: parent.height * 0.4 height: parent.height * 0.4
width: parent.width / 3 width: parent.width
verticalAlignment: Qt.AlignVCenter verticalAlignment: Text.AlignBottom
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter
visible: text.length > 0 visible: text.length > 0
opacity: 0.6 opacity: 0.4
fontSizeMode: Text.Fit fontSizeMode: Text.VerticalFit
} }
} }

View file

@ -33,9 +33,6 @@ GridLayout {
property int buttonHeight: parent.height / 6 property int buttonHeight: parent.height / 6
Layout.fillWidth: true
Layout.fillHeight: true
DialerButton { id: one; text: "1" } DialerButton { id: one; text: "1" }
DialerButton { text: "2"; sub: "ABC" } DialerButton { text: "2"; sub: "ABC" }
DialerButton { text: "3"; sub: "DEF" } DialerButton { text: "3"; sub: "DEF" }
@ -55,8 +52,8 @@ GridLayout {
DialerIconButton { DialerIconButton {
id: callButton id: callButton
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.maximumHeight: buttonHeight
Layout.minimumHeight: buttonHeight Layout.minimumHeight: Layout.maximumHeight
enabled: status.text.length > 0 enabled: status.text.length > 0
opacity: enabled ? 1 : 0.5 opacity: enabled ? 1 : 0.5
@ -67,12 +64,11 @@ GridLayout {
} }
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true
} }
DialerIconButton { DialerIconButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.maximumHeight: buttonHeight
Layout.minimumHeight: buttonHeight Layout.minimumHeight: Layout.maximumHeight
enabled: status.text.length > 0 enabled: status.text.length > 0
opacity: enabled ? 1 : 0.5 opacity: enabled ? 1 : 0.5