on xenial help sign in
gross hack for hiding the indicator-session for < 50GU screens
65f868cLukáš Tinkl
qml/Panel/IndicatorItemRow.qml+5−2
@@ -15,6 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18+import QtQuick.Window 2.2
18import Ubuntu.Components 1.3
19import Ubuntu.Components 1.3
19
20
20Item {
21Item {
@@ -183,7 +184,9 @@ Item {
183
184
184 property int ownIndex: index
185 property int ownIndex: index
185 property bool overflow: row.width - x > overFlowWidth
186 property bool overflow: row.width - x > overFlowWidth
186− property bool hidden: !expanded && (overflow || !indicatorVisible)
187+ property bool hidden: !expanded && (overflow || !indicatorVisible || hideSessionIndicator)
188+ // HACK for indicator-session
189+ readonly property bool hideSessionIndicator: identifier == "indicator-session" && Screen.width < units.gu(50)
187
190
188 height: row.height
191 height: row.height
189 expanded: root.expanded
192 expanded: root.expanded
@@ -199,7 +202,7 @@ Item {
199 NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing }
202 NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing }
200 }
203 }
201
204
202− width: (expanded || indicatorVisible) ? implicitWidth : 0
205+ width: ((expanded || indicatorVisible) && !hideSessionIndicator) ? implicitWidth : 0
203
206
204 Behavior on width {
207 Behavior on width {
205 NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing }
208 NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing }