~ci-train-bot/ubuntu-settings-components/ubuntu-settings-components-ubuntu-zesty-2202

« back to all changes in this revision

Viewing changes to plugins/Ubuntu/Settings/Menus/ModemInfoItem.qml

  • Committer: Bileto Bot
  • Date: 2016-11-16 18:52:43 UTC
  • mfrom: (146.4.57 touch+pointer-styles)
  • Revision ID: ci-train-bot@canonical.com-20161116185243-o399ryjh002umz1a
* Menus: add Pointer and Touch styles to be used depending on the user
  interaction with components
  Menu items now have a new Style property that defines some common properties
  such as shared colors and sizes that change depending on the UX journey. I'm
  only defining Pointer and TouchStyles for now, but they can be easily
  overridden in case.
  Removed some deprecated properties and adapted colors and sizes to new
  style.
* Bump package version as there's a new API for various components

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    property bool roaming: false
32
32
    signal unlock
33
33
 
34
 
    implicitHeight: slotsLayout.height + (divider.visible ? divider.height : 0)
 
34
    menuHeight: slotsLayout.height
35
35
 
36
 
    SlotsLayout {
 
36
    StyledSlotsLayout {
37
37
        id: slotsLayout
38
38
        objectName: "menuItemInfoSlotsLayout"
 
39
        style: menuStyle
39
40
 
40
41
        mainSlot: ColumnLayout {
41
42
            spacing: units.gu(0.5)
44
45
                id: labelSimIdentifier
45
46
                elide: Text.ElideRight
46
47
                visible: text !== ""
 
48
                opacity: menu.locked ? 0.6 : 1.0
 
49
                color: menu.foregroundColor
47
50
                font.bold: true
48
 
                opacity: menu.locked ? 0.6 : 1.0
 
51
                font.pixelSize: menuStyle.fontSize
49
52
            }
50
53
 
51
54
            Row {
57
60
                    id: labelStatus
58
61
                    elide: Text.ElideRight
59
62
                    opacity: 0.6
 
63
                    color: menu.foregroundColor
 
64
                    font.pixelSize: menuStyle.fontSize
60
65
                }
61
66
 
62
67
                Row {
64
69
                    height: parent.height
65
70
                    Icon {
66
71
                        id: statusIcon
67
 
                        color: theme.palette.normal.backgroundText
 
72
                        color: menuStyle.iconColor
68
73
 
69
 
                        height: labelStatus.height
 
74
                        height: menuStyle.iconSize
70
75
                        width: height
71
76
 
72
77
                        visible: name !== ""
74
79
 
75
80
                    Icon {
76
81
                        id: iconConnectivity
77
 
                        color: theme.palette.normal.backgroundText
 
82
                        color: menuStyle.iconColor
78
83
 
79
 
                        width: statusIcon.width // fix lp:1585645 by breaking the binding loop
 
84
                        width: menuStyle.iconSize
80
85
                        height: width
81
86
 
82
87
                        visible: name !== ""
91
96
                        id: labelRoaming
92
97
                        visible: menu.roaming
93
98
                        elide: Text.ElideRight
94
 
                        fontSize: "x-small"
95
99
                        text: i18n.dtr("ubuntu-settings-components", "Roaming")
 
100
                        font.pixelSize: menuStyle.subtitleFontSize
 
101
                        color: menu.foregroundColor
96
102
                        opacity: 0.6
97
103
                    }
98
104
 
99
105
                    Icon {
100
106
                        id: iconRoaming
101
 
                        color: theme.palette.normal.backgroundText
 
107
                        color: menuStyle.iconColor
102
108
                        visible: menu.roaming
103
109
 
104
 
                        height: labelStatus.height
 
110
                        height: menuStyle.iconSize
105
111
                        width: height
106
112
 
107
113
                        name: "network-cellular-roaming"
113
119
                id: buttonUnlock
114
120
                objectName: "buttonUnlockSim"
115
121
                visible: menu.locked
 
122
                color: menuStyle.buttonColor
116
123
 
117
124
                text: i18n.dtr("ubuntu-settings-components", "Unlock SIM")
 
125
                font.pixelSize: menuStyle.buttonFontSize
118
126
                Layout.preferredWidth: implicitWidth + units.gu(5)
 
127
                Layout.preferredHeight: menuStyle.buttonHeight
 
128
                height: menuStyle.buttonHeight
119
129
 
120
130
                onTriggered: menu.unlock()
121
131
            }