on xenial help sign in
add a gsettings option for the launcher's width
commitf6aeb817f02d300989e783491d72bd1598742e90 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 10 Dec 2015, 20:14 (11 years ago) parent4834324
4 files changed+20−4
data/com.canonical.Unity8.gschema.xml+11 qml/Launcher/Launcher.qml+1−1 qml/Shell.qml+7−2 qml/Stages/DesktopStage.qml+1−1
data/com.canonical.Unity8.gschema.xml+11
@@ -32,6 +32,17 @@
3232 <summary>Autohide the launcher</summary>
3333 <description>This will only be applied in windowed mode. In staged mode, the launcher will always hide.</description>
3434 </key>
35+ <key type="b" name="override-launcher-width">
36+ <default>false</default>
37+ <summary>Override the launcher's size.</summary>
38+ <description>When this is true, the launcher's size will be set to launcher-size on all usage modes. When this is false, the launcher will have some defaults per usage mode.</description>
39+ </key>
40+ <key type="u" name="launcher-width">
41+ <default>8</default>
42+ <range min="6" max="12"/>
43+ <summary>Width of the launcher in grid units.</summary>
44+ <description>This width will applied to the launcher in all usage modes if "override-launcher-size" is true.</description>
45+ </key>
3546 </schema>
3647
3748 <schema path="/com/canonical/unity8/greeter/" id="com.canonical.Unity8.Greeter" gettext-domain="unity8">
qml/Launcher/Launcher.qml+1−1
@@ -292,7 +292,7 @@ FocusScope {
292292
293293 MouseArea {
294294 id: launcherDragArea
295− enabled: root.available && (root.state == "visible" || root.state == "visibleTemporary")
295+ enabled: root.available && (root.state == "visible" || root.state == "visibleTemporary") && !root.lockedVisible
296296 anchors.fill: panel
297297 anchors.rightMargin: -units.gu(2)
298298 drag {
qml/Shell.qml+7−2
@@ -372,7 +372,11 @@ Item {
372372 InputMethod {
373373 id: inputMethod
374374 objectName: "inputMethod"
375− anchors { fill: parent; topMargin: panel.panelHeight }
375+ anchors {
376+ fill: parent
377+ topMargin: panel.panelHeight
378+ leftMargin: launcher.lockedVisible ? launcher.panelWidth : 0
379+ }
376380 z: notifications.useModal || panel.indicators.shown || wizard.active ? overlay.z + 1 : overlay.z - 1
377381 }
378382
@@ -558,7 +562,8 @@ Item {
558562 shadeBackground: !tutorial.running
559563 superPressed: physicalKeysMapper.superPressed
560564 superTabPressed: physicalKeysMapper.superTabPressed
561− panelWidth: shell.usageScenario == "desktop" ? units.gu(10) : units.gu(8)
565+ panelWidth: launcherSettings.overrideLauncherWidth ? units.gu(launcherSettings.launcherWidth)
566+ : (shell.usageScenario == "desktop" ? units.gu(10) : units.gu(8))
562567 lockedVisible: shell.usageScenario == "desktop" && !launcherSettings.autohideLauncher
563568
564569 GSettings {
qml/Stages/DesktopStage.qml+1−1
@@ -459,7 +459,7 @@ AbstractStage {
459459
460460 BlurLayer {
461461 id: blurLayer
462− anchors.fill: parent
462+ anchors.fill: appContainer
463463 source: appContainer
464464 visible: false
465465 }