on xenial help sign in
make units.gu(60) the threshold between phone and tablet for the session indicator
commitf30d6f054a3d0d3bc8b4feb97a335302fbd1f00f authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 16 Mar 2016, 00:07 (11 years ago) parent3b2a6df
2 files changed+2−2
qml/Panel/IndicatorItemRow.qml+1−1 qml/Panel/Indicators/MenuItemFactory.qml+1−1
qml/Panel/IndicatorItemRow.qml+1−1
@@ -186,7 +186,7 @@ Item {
186186 property bool overflow: row.width - x > overFlowWidth
187187 property bool hidden: !expanded && (overflow || !indicatorVisible || hideSessionIndicator)
188188 // HACK for indicator-session
189− readonly property bool hideSessionIndicator: identifier == "indicator-session" && Screen.width < units.gu(50)
189+ readonly property bool hideSessionIndicator: identifier == "indicator-session" && Math.min(Screen.width, Screen.height) <= units.gu(60)
190190
191191 height: row.height
192192 expanded: root.expanded
qml/Panel/Indicators/MenuItemFactory.qml+1−1
@@ -67,7 +67,7 @@ Item {
6767 "indicator-session": {
6868 "indicator.user-menu-item": Platform.isPC ? userMenuItem : null,
6969 "indicator.guest-menu-item": Platform.isPC ? userMenuItem : null,
70− "com.canonical.indicator.switch": Screen.width >= units.gu(90) ? switchMenu : null // Desktop mode switch
70+ "com.canonical.indicator.switch": Math.min(Screen.width, Screen.height) > units.gu(60) ? switchMenu : null // Desktop mode switch
7171 },
7272 "indicator-messages" : {
7373 "com.canonical.indicator.button" : messagesButtonMenu