2
* This file is part of system-settings
4
* Copyright (C) 2016 Canonical Ltd.
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License version 3, as published
8
* by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranties of
12
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13
* PURPOSE. See the GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License along
16
* with this program. If not, see <http://www.gnu.org/licenses/>.
21
import SystemSettings 1.0
22
import SystemSettings.ListItems 1.0 as SettingsListItems
23
import Ubuntu.Components 1.3
24
import Ubuntu.Settings.Components 0.1 as USC
25
import Ubuntu.Settings.Menus 0.1 as Menus
26
import Ubuntu.SystemSettings.Launcher 1.0
30
objectName: "launcherPage"
31
title: i18n.tr("Launcher")
33
/* The introductory label “On large displays:” should be present if the
34
current display does not fall into <the large screen> category (to explain
35
why the settings aren’t applying to the display that you’re looking at). */
36
property bool largeScreenAvailable: {
37
var currentScreen = LauncherPanelPlugin.getCurrentScreenNumber();
38
for (var i=0; i < LauncherPanelPlugin.screens; i++) {
39
if (LauncherPanelPlugin.screenGeometry(i).width > units.gu(90)) {
40
if (currentScreen === i) {
45
return true; // No large screens were the current one.
51
contentWidth: parent.width
52
contentHeight: contentItem.childrenRect.height
53
boundsBehavior: (contentHeight > root.height) ?
54
Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
64
text: i18n.tr("On large screens:")
65
objectName: "largeScreenLabel"
66
visible: largeScreenAvailable
69
SettingsListItems.Standard {
70
id: alwaysShowLauncher
71
objectName: "alwaysShowLauncher"
72
text: i18n.tr("Always show the launcher")
73
layout.subtitle.text: i18n.tr("Videos and full-screen games may hide it temporarily.")
76
id: alwaysShowLauncherSwitch
77
objectName: "alwaysShowLauncherSwitch"
78
checked: !unity8Settings.autohideLauncher
79
onTriggered: unity8Settings.autohideLauncher = !checked
84
text: i18n.tr("Icon size:")
87
objectName: "iconWidth"
88
function formatValue(v) { return v.toFixed(2) }
91
value: unity8Settings.launcherWidth
94
property real serverValue: unity8Settings.launcherWidth
95
USC.ServerPropertySynchroniser {
98
serverTarget: iconWidth
99
serverProperty: "serverValue"
100
maximumWaitBufferInterval: 16
102
onSyncTriggered: unity8Settings.launcherWidth = value
110
objectName: "unity8Settings"
111
schema.id: "com.canonical.Unity8"