.bazaar/Makefilenew file+6
@@ -0,0 +1,6 @@
2+ mkdir -p ~/.bazaar/plugins
3+ cp plugins/* ~/.bazaar/plugins
6+ rm ~/.bazaar/plugins/makecheck_unity_phablet.py*
.bazaar/plugins/makecheck_unity_phablet.pynew file+43
@@ -0,0 +1,43 @@
2+# Copyright 2013 Canonical Ltd.
4+# This program is free software; you can redistribute it and/or modify
5+# it under the terms of the GNU Lesser General Public License as published by
6+# the Free Software Foundation; version 3.
8+# This program is distributed in the hope that it will be useful,
9+# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+# GNU Lesser General Public License for more details.
13+# You should have received a copy of the GNU Lesser General Public License
14+# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+from bzrlib import branch, errors
18+from bzrlib.urlutils import dirname, local_path_from_url
20+def execute_makecheck(local_branch, master_branch, old_revision_number, old_revision_id, future_revision_number, future_revision_id, tree_delta, future_tree):
21+ if not master_branch.basis_tree().has_filename("Shell.qml"):
24+ os.chdir(local_path_from_url(master_branch.base))
26+ print "Executing 'make -C builddir test'.."
27+ os.environ['CTEST_OUTPUT_ON_FAILURE'] = "1"
28+ if (subprocess.call("make -C builddir test", shell=True) != 0):
30+ print("\n\n*** Warning ***\n\nBasic tests failed. This commit will not pass continuous integration.")
32+ branch = local_branch or master_branch
33+ revision = branch.repository.get_revision(future_revision_id)
34+ msg_file = open('message.txt', 'w')
35+ msg_file.write(revision.message)
38+ print("\n\nSaved commit message to $SRC_DIR/message.txt.")
39+ print("You can uncommit this revision, fix the tests and reuse your message running:\n\nbzr commit -F message.txt\n\n")
40+ elif os.path.isfile("message.txt"):
41+ os.remove("message.txt")
43+branch.Branch.hooks.install_named_hook('pre_commit', execute_makecheck, 'make check pre-commit')
.bzr-builddeb/default.confnew file+2
@@ -0,0 +1,10 @@
3+# QtCreator project files
5+# Eclipse project files
.crossbuilder/post_deploydeleted−1
@@ -2,15 +2,8 @@
3# QtCreator project files
3# QtCreator project files
7# Eclipse project files
5# Eclipse project files
11/.pydevproject
9/.pydevproject
12−# KDevelop project Files
@@ -1,17 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
9− <name>org.python.pydev.PyDevBuilder</name>
15− <nature>org.python.pydev.pythonNature</nature>
@@ -1,10 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<?eclipse-pydev version="1.0"?><pydev_project>
3−<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
4−<path>/Unity8/tests/autopilot</path>
5−<path>/Unity8/.bazaar</path>
6−<path>/Unity8/tests/whitespace</path>
8−<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
9−<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
.settings/Autopilot List.launchdeleted−14
@@ -1,14 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<launchConfiguration type="org.python.pydev.debug.regularLaunchConfigurationType">
3−<stringAttribute key="bad_container_name" value="/Unity8/.pyd"/>
4−<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
5−<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
6−<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
7−<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
9−<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/autopilot"/>
10−<stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value=""/>
11−<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="list unity8"/>
12−<stringAttribute key="org.python.pydev.debug.ATTR_INTERPRETER" value="__default"/>
13−<stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Unity8"/>
14−</launchConfiguration>
.settings/Autopilot Run.launchdeleted−14
@@ -1,14 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<launchConfiguration type="org.python.pydev.debug.regularLaunchConfigurationType">
3−<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"/>
4−<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"/>
5−<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
6−<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
7−<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
9−<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/autopilot"/>
10−<stringAttribute key="org.eclipse.ui.externaltools.ATTR_OTHER_WORKING_DIRECTORY" value=""/>
11−<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="run ${string_prompt:the test suite to run:unity8}"/>
12−<stringAttribute key="org.python.pydev.debug.ATTR_INTERPRETER" value="__default"/>
13−<stringAttribute key="org.python.pydev.debug.ATTR_PROJECT" value="Unity8"/>
14−</launchConfiguration>
data/51-unity8-greeter.conf → 51-unity8-greeter.confrenamed+1−1
@@ -1,2 +1,2 @@
1−[Seat:*]
1+[SeatDefaults]
2greeter-session=unity8-greeter
2greeter-session=unity8-greeter
ApplicationArguments.hnew file+49
@@ -0,0 +1,49 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
16+ * Authored by: Nick Dedekind <nick.dedekind@canonical.com>
20+#ifndef APPLICATION_ARGUMENTS_H
21+#define APPLICATION_ARGUMENTS_H
25+#include <QStringList>
27+class ApplicationArguments : public QObject
31+ ApplicationArguments(const QStringList& args) {
32+ if (args.contains(QLatin1String("-geometry")) && args.size() > args.indexOf(QLatin1String("-geometry")) + 1) {
33+ QStringList geometryArg = args.at(args.indexOf(QLatin1String("-geometry")) + 1).split('x');
34+ if (geometryArg.size() == 2) {
35+ m_size.rwidth() = geometryArg.at(0).toInt();
36+ m_size.rheight() = geometryArg.at(1).toInt();
41+ Q_INVOKABLE bool hasGeometry() const { return m_size.isValid(); }
42+ Q_INVOKABLE int width() const { return m_size.width(); }
43+ Q_INVOKABLE int height() const { return m_size.height(); }
49+#endif // APPLICATION_ARGUMENTS_H
Applications/Application.qmlnew file+54
@@ -0,0 +1,54 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "applications.js" as ApplicationsModel
19+import Unity.Application 0.1
21+/* This class is temporary. It is meant to be API compatible with qthybris' Application
23+ This class can be removed as soon as qthybris' Application is instantiable from QML
24+ and its 'desktopFile' property becomes writable.
25+ This also requires qthybris to be easily compilable on the desktop.
30+ property string desktopFile
32+ property string comment
35+ property string stage
36+ property bool fullscreen
38+ onDesktopFileChanged: {
39+ var applicationData = ApplicationsModel.__availableApplications[desktopFile];
40+ if (applicationData) {
41+ application.name = applicationData.name;
42+ application.icon = applicationData.icon;
43+ application.exec = applicationData.exec;
44+ application.stage = applicationData.stage ? applicationData.stage : ApplicationInfo.MainStage;
45+ application.fullscreen = applicationData.fullscreen ? applicationData.fullscreen : false;
47+ application.name = "";
48+ application.icon = "";
49+ application.exec = "";
50+ application.stage = "";
51+ application.fullscreen = false;
Applications/applications.jsnew file+115
@@ -0,0 +1,115 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+// mimic qtubuntu's Application.Stage enum
21+var __availableApplications = {
22+ '/usr/share/applications/phone-app.desktop': {
23+ 'name': i18n.tr("Phone"),
25+ 'exec': '/usr/bin/phone-app',
28+ '/usr/share/applications/camera-app.desktop': {
29+ 'name': i18n.tr("Camera"),
32+ 'exec': '/usr/bin/camera-app --fullscreen'
34+ '/usr/share/applications/gallery-app.desktop': {
35+ 'name': i18n.tr("Gallery"),
37+ 'exec': '/usr/bin/gallery-app'
39+ '/usr/share/applications/facebook-webapp.desktop': {
40+ 'name': i18n.tr("Facebook"),
42+ 'exec': '/usr/bin/webbrowser-app --chromeless http://m.facebook.com',
45+ '/usr/share/applications/webbrowser-app.desktop': {
46+ 'name': i18n.tr("Browser"),
48+ 'exec': '/usr/bin/webbrowser-app'
50+ '/usr/share/applications/twitter-webapp.desktop': {
51+ 'name': i18n.tr("Twitter"),
53+ 'exec': '/usr/bin/webbrowser-app --chromeless http://www.twitter.com',
56+ '/usr/share/applications/gmail-webapp.desktop': {
57+ 'name': i18n.tr("GMail"),
59+ 'exec': '/usr/bin/webbrowser-app --chromeless http://m.gmail.com'
61+ '/usr/share/applications/ubuntu-weather-app.desktop': {
62+ 'name': i18n.tr("Weather"),
64+ 'exec': '/usr/bin/qmlscene /usr/share/ubuntu-weather-app/ubuntu-weather-app.qml',
67+ '/usr/share/applications/notes-app.desktop': {
68+ 'name': i18n.tr("Notepad"),
70+ 'exec': '/usr/bin/qmlscene /usr/share/notes-app/NotesApp.qml',
73+ '/usr/share/applications/calendar-app.desktop': {
74+ 'name': i18n.tr("Calendar"),
76+ 'exec': '/usr/bin/qmlscene /usr/share/calendar-app/calendar.qml',
79+ '/usr/share/applications/mediaplayer-app.desktop': {
80+ 'name': i18n.tr("Media Player"),
81+ 'icon': 'mediaplayer-app',
83+ 'exec': '/usr/bin/mediaplayer-app'
85+ '/usr/share/applications/evernote.desktop': {
86+ 'name': i18n.tr("Evernote"),
90+ '/usr/share/applications/map.desktop': {
91+ 'name': i18n.tr("Map"),
95+ '/usr/share/applications/pinterest.desktop': {
96+ 'name': i18n.tr("Pinterest"),
100+ '/usr/share/applications/soundcloud.desktop': {
101+ 'name': i18n.tr("SoundCloud"),
102+ 'icon': 'soundcloud',
105+ '/usr/share/applications/wikipedia.desktop': {
106+ 'name': i18n.tr("Wikipedia"),
107+ 'icon': 'wikipedia',
110+ '/usr/share/applications/youtube.desktop': {
111+ 'name': i18n.tr("YouTube"),
Bottombar/Bottombar.qmlnew file+162
@@ -0,0 +1,162 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../Components"
19+import "../Components/Math.js" as MathLocal
21+import Unity.Application 0.1
22+import Ubuntu.Gestures 0.1
27+ // Whether there's an application on foreground (as opposed to have shell's Dash on foreground)
28+ property bool applicationIsOnForeground
30+ property variant theHud
31+ property bool enabled: false
32+ property bool preventHiding: dragArea.dragging
33+ readonly property real bottomEdgeButtonCenterDistance: units.gu(34)
38+ if (state == "hidden") {
41+ dismissTimer.restart()
45+ onPreventHidingChanged: {
46+ if (dismissTimer.running) {
47+ dismissTimer.restart();
55+ if (!bottombar.preventHiding) {
56+ bottombar.state = "hidden"
58+ dismissTimer.restart()
66+ readonly property bool centeredHud: parent.width < units.gu(68) // Nexus 7 has 67 gu width
68+ x: centeredHud ? parent.width / 2 - width / 2 : MathLocal.clamp(dragArea.touchStartX - (width / 2), 0, bottombar.width - width)
69+ y: bottombar.height - bottomEdgeButtonCenterDistance - (height / 2) - bottomMargin
71+ visible: opacity != 0
74+ if (dragArea.status === DirectionalDragArea.Recognized) {
75+ var touchLocal = mapFromItem(dragArea, dragArea.touchX, dragArea.touchY)
76+ return touchLocal.x > 0 && touchLocal.x < width
77+ && touchLocal.y > 0 && touchLocal.y < height
83+ onClicked: theHud.show()
85+ Behavior on bottomMargin {
86+ NumberAnimation{duration: hudButton.opacity < 0.01 ? 200 : 70; easing.type: Easing.OutQuart}
89+ Behavior on opacity {
90+ NumberAnimation{duration: 200; easing.type: Easing.OutCubic}
97+ bottomBarVisibilityCommunicatorShell.forceHidden = theHud.shown
99+ bottombar.state = "hidden"
107+ height: distanceThreshold
108+ anchors.bottom: parent.bottom
110+ distanceThreshold: units.gu(1)
111+ enabled: !theHud.shown && bottombar.enabled && applicationIsOnForeground
112+ direction: Direction.Upwards
114+ property int previousStatus: -1
115+ property real touchStartX: -1
118+ if (status === DirectionalDragArea.WaitingForTouch) {
119+ if (previousStatus == DirectionalDragArea.Recognized) {
120+ if (hudButton.mouseOver) {
123+ bottombar.state = "hidden"
126+ } else if (status === DirectionalDragArea.Undecided) {
127+ if (!hudButton.centeredHud) {
128+ touchStartX = touchX
130+ } else if (status === DirectionalDragArea.Recognized) {
131+ bottombar.state = "shown"
133+ previousStatus = status
138+ anchors.fill: parent
139+ enabled: bottombar.state == "shown"
141+ bottombar.state = "hidden"
146+ anchors.fill: parent
147+ blockInput: (hudButton.opacity == 1)
153+ PropertyChanges { target: hudButton; opacity: 0}
154+ PropertyChanges { target: hudButton; bottomMargin: units.gu(-1)}
158+ PropertyChanges { target: hudButton; opacity: 1}
159+ PropertyChanges { target: hudButton; bottomMargin: units.gu(0)}
Bottombar/HudButton.qmlnew file+64
@@ -0,0 +1,64 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
23+ property bool mouseOver
25+ property int bottomMargin: units.gu(2)
29+ readonly property real scaleOnMouseOver: 1.2
31+ width: hudButton.width * scaleOnMouseOver
32+ height: hudButton.height * scaleOnMouseOver
37+ anchors.centerIn: parent
40+ opacity: item.mouseOver || abstractButton.pressed ? 1 : 0.7
41+ scale: item.mouseOver || abstractButton.pressed ? scaleOnMouseOver : 1
42+ Behavior on opacity {NumberAnimation{duration: 200; easing.type: Easing.OutQuart}}
43+ Behavior on scale {NumberAnimation{duration: 200; easing.type: Easing.OutQuart}}
50+ source: "graphics/hud_invoke_button_active.png"
53+ onClicked: item.clicked()
59+ source: "graphics/hud.png"
60+ anchors.centerIn: parent
61+ fillMode: Image.PreserveAspectFit
Bottombar/graphics/hud@20.pngnew file
Binary file not shown.
Bottombar/graphics/hud_invoke_button_active@20.pngnew file
Binary file not shown.
@@ -13,9 +13,8 @@ endif()
14set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
14set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
16−# Instruct CMake to run moc and rcc automatically when needed.
16+# Instruct CMake to run moc automatically when needed.
17set(CMAKE_AUTOMOC ON)
17set(CMAKE_AUTOMOC ON)
20# enable QML debugging
19# enable QML debugging
21string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) # Build types should always be lowercase but sometimes they are not.
20string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) # Build types should always be lowercase but sometimes they are not.
@@ -40,19 +39,6 @@ if(cmake_build_type_lower MATCHES coverage)
40 ENABLE_COVERAGE_REPORT(TARGETS ${SHELL_APP} FILTER /usr/include ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*)
39 ENABLE_COVERAGE_REPORT(TARGETS ${SHELL_APP} FILTER /usr/include ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*)
43−find_package (ECM 1.7.0 QUIET NO_MODULE)
45− # Provides us with -DECM_ENABLE_SANITIZERS='X'
46− # Where X can be address, thread, memory, leak, undefined
47− include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake")
50−if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
51− if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
52− set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" )
56# Make sure we have all the needed symbols
42# Make sure we have all the needed symbols
57set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
43set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
58set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,defs")
44set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,defs")
@@ -62,41 +48,11 @@ add_custom_target(cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2
62 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
48 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
64include(FindPkgConfig)
50include(FindPkgConfig)
65−find_package(Qt5Core 5.6 REQUIRED)
51+find_package(Qt5Core)
66−find_package(Qt5Qml 5.6 REQUIRED)
52+find_package(Qt5Qml)
67−find_package(Qt5Quick 5.6 REQUIRED)
53+find_package(Qt5Quick)
68−find_package(Qt5Gui 5.6 REQUIRED)
54+find_package(Qt5Gui)
69−find_package(Qt5DBus 5.6 REQUIRED)
55+find_package(Qt5DBus)
70−find_package(Qt5Concurrent 5.6 REQUIRED)
71−find_package(Qt5Sql 5.6 REQUIRED)
72−find_package(Qt5Test 5.6 REQUIRED)
73−find_package(Qt5Svg 5.6 REQUIRED)
74−find_package(Qt5Network 5.6 REQUIRED)
75−find_package(Qt5Xml 5.6 REQUIRED)
77−pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=27)
78−pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)
79−pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)
80−pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
81−pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=13)
82−pkg_check_modules(QMENUMODEL REQUIRED qmenumodel)
83−pkg_check_modules(GD3 REQUIRED gnome-desktop-3.0)
84−pkg_check_modules(UAL REQUIRED ubuntu-app-launch-2)
85−pkg_check_modules(UBUNTUGESTURES REQUIRED UbuntuGestures)
86−pkg_check_modules(QTDBUSTEST REQUIRED
91−### Check UbuntuGestures private headers. No pkg-config (.pc) file is provided for them
92−find_path(UBUNTUGESTUREPRIV
93− NAMES UbuntuGestures/private/damper_p.h UbuntuGestures/private/ucswipearea_p.h UbuntuGestures/private/ucswipearea_p_p.h
94− PATHS ${UBUNTUGESTURES_INCLUDEDIR}/UbuntuGestures/${UBUNTUGESTURES_VERSION}
96−if (${UBUNTUGESTUREPRIV} STREQUAL UBUNTUGESTUREPRIV-NOTFOUND)
97− message(FATAL_ERROR "UbuntuGestures private headers not found.")
99−# end of UbuntuGesture private headers check
101# Standard install paths
57# Standard install paths
102include(GNUInstallDirs)
58include(GNUInstallDirs)
@@ -104,22 +60,18 @@ include(GNUInstallDirs)
104set(SHELL_APP_DIR ${CMAKE_INSTALL_DATADIR}/unity8)
60set(SHELL_APP_DIR ${CMAKE_INSTALL_DATADIR}/unity8)
105set(SHELL_PRIVATE_LIBDIR ${CMAKE_INSTALL_LIBDIR}/unity8)
61set(SHELL_PRIVATE_LIBDIR ${CMAKE_INSTALL_LIBDIR}/unity8)
107−execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=plugin_private_module_dir SystemSettings OUTPUT_VARIABLE USS_PRIVATE_PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
63+configure_file(paths.h.in ${CMAKE_CURRENT_BINARY_DIR}/paths.h @ONLY)
108−if(USS_PRIVATE_PLUGINDIR STREQUAL "")
109− message(FATAL_ERROR "Could not determine USS private plugin installation dir.")
112−execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=plugindir_suffix unity-shell-api OUTPUT_VARIABLE SHELL_INSTALL_QML OUTPUT_STRIP_TRAILING_WHITESPACE)
65+pkg_check_modules(UNITY-MIR REQUIRED unity-mir)
113−if(SHELL_INSTALL_QML STREQUAL "")
114− message(FATAL_ERROR "Could not determine plugin installation dir.")
117−set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
67+include_directories(
68+ ${CMAKE_CURRENT_BINARY_DIR}
69+ ${CMAKE_CURRENT_SOURCE_DIR}
70+ ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
71+ ${UNITY-MIR_INCLUDE_DIRS}
119−execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=plugindir unity-shell-api OUTPUT_VARIABLE SHELL_PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
74+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
120−if(SHELL_PLUGINDIR STREQUAL "")
121− message(FATAL_ERROR "Could not determine plugin import dir.")
124set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")
76set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")
@@ -137,72 +89,113 @@ endif()
137# "signals" and "slots"
89# "signals" and "slots"
138add_definitions(-DQT_NO_KEYWORDS)
90add_definitions(-DQT_NO_KEYWORDS)
140−# Save a few container detach and conversions
92+# Tests
141−add_definitions(-DQT_STRICT_ITERATORS)
93+include(CTest)
143−# Use the fast string builder
144−add_definitions(-DQT_USE_QSTRINGBUILDER)
146# Autopilot tests
96# Autopilot tests
147include(autopilot)
97include(autopilot)
148declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
98declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
99+declare_autopilot_test(indicators_client unity8.indicators_client ${CMAKE_SOURCE_DIR}/tests/autopilot/)
150set(SHELL_APP unity8)
101set(SHELL_APP unity8)
151−set(INDICATORS_CLIENT_APP indicators-client)
152set(GREETER_APP unity8-greeter)
102set(GREETER_APP unity8-greeter)
153−set(MOCK_INDICATOR_SERVICE_APP unity-mock-indicator-service)
155−include_directories(
104+set(shell_app_HDRS
156− ${CMAKE_SOURCE_DIR}/include
105+ )
157− ${CMAKE_BINARY_DIR}/include
158− ${APPLICATION_API_INCLUDE_DIRS}
162−set(QUIET_LOGGER OFF CACHE BOOL "Disable test output on stdout.")
164− set(STDOUT_LOGGER "-o" "-,txt")
167−execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH OUTPUT_VARIABLE ARCH)
107+add_executable(${SHELL_APP}
168−if (NOT ARCH MATCHES "arm*")
108+ ${shellapplication_MOC_SRCS}
169− set(ENABLE_TOUCH_EMULATION true)
109+ ApplicationArguments.h
170− add_definitions(-DUNITY8_ENABLE_TOUCH_EMULATION)
110+ main.cpp
111+ MouseTouchAdaptor.cpp
113+add_executable(${GREETER_APP}
114+ ${greeterapplication_MOC_SRCS}
115+ ApplicationArguments.h
117+ MouseTouchAdaptor.cpp
120+set_target_properties(${SHELL_APP} PROPERTIES
121+ COMPILE_DEFINITIONS "APP_NAME=\"Unity 8\";QML_FILE=\"Shell.qml\""
123+set_target_properties(${GREETER_APP} PROPERTIES
124+ COMPILE_DEFINITIONS "APP_NAME=\"Unity 8 Greeter\";QML_FILE=\"GreeterShell.qml\""
127+qt5_use_modules(${SHELL_APP} Qml Quick Test)
128+qt5_use_modules(${GREETER_APP} Qml Quick Test)
171− pkg_check_modules(MOUSETOUCHADAPTOR_LIBS REQUIRED x11 xcb xi)
129+pkg_check_modules(XCB REQUIRED xcb)
173− set(ENABLE_TOUCH_EMULATION false)
131+if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
174− message(STATUS "Touch emulation support disabled.")
132+ set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
135+target_link_libraries(${SHELL_APP}
137+ ${Qt5Quick_LIBRARIES}
141+target_link_libraries(${GREETER_APP}
143+ ${Qt5Quick_LIBRARIES}
148+install(TARGETS ${SHELL_APP} ${GREETER_APP}
149+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
152+# install top level qml and js files
153+file(GLOB QML_JS_FILES *.qml *.js)
155+install(FILES ${QML_JS_FILES}
156+ DESTINATION ${SHELL_APP_DIR}
177# add subdirectories to build
159# add subdirectories to build
178−add_subdirectory(include)
160+add_subdirectory(tests)
161+add_subdirectory(plugins)
179add_subdirectory(src)
162add_subdirectory(src)
180−add_subdirectory(tools)
181−add_subdirectory(qml)
183−# Tests
164+# install subdirectories
184−set(NO_TESTS OFF CACHE BOOL "Disable tests.")
165+set(QML_DIRS
185−if (NOT NO_TESTS)
166+ Applications
186− include(CTest)
167+ Bottombar
187− enable_testing()
168+ Components
188− add_subdirectory(tests)
169+ Dash
190− message(STATUS "Tests disabled")
171+ Greeter
193−add_subdirectory(plugins)
179+install(DIRECTORY ${QML_DIRS}
180+ DESTINATION ${SHELL_APP_DIR}
195−#
183+# generate desktop file
196−# Data files
184+configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
197−#
185+configure_file(${GREETER_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop @ONLY)
198−add_subdirectory(data)
186+
187+# install desktop file
188+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
189+ DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
191+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop
192+ DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/greeters
194+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/51-${GREETER_APP}.conf
195+ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/lightdm/lightdm.conf.d
201# Translation
199# Translation
203add_subdirectory(po)
201add_subdirectory(po)
208−add_subdirectory(doc)
@@ -1,7 +1,7 @@
1Building Unity 8
1Building Unity 8
2================
2================
4−Only Ubuntu 14.04 (trusty) is supported as a developement environment.
4+Only Ubuntu 13.10 (saucy) is supported as a developement environment.
6download source
6download source
7---------------
7---------------
@@ -15,17 +15,23 @@ download source
15 $ bzr branch lp:unity8 ~/unity8/trunk
15 $ bzr branch lp:unity8 ~/unity8/trunk
16 $ cd ~/unity8/trunk
16 $ cd ~/unity8/trunk
18−install dependencies and build Unity 8
18+install dependencies
19--------------------
19--------------------
20+If its your first time, install build dependencies
21$ cd ~/unity8/trunk
22$ cd ~/unity8/trunk
22−$ ./build.sh
23+$ ./build --setup
24− If its your first time, this will install the required dependencies to build and
26+ - install the required dependencies to build, as well as run on the desktop
27+ - it should also install unity-scope-home and unity-lens-application which
28+ are technically "recommends", not strict dependencies
25− build it.
30+build Unity 8
27− You might want to also install unity-scope-home and unity-scope-click which
33+$ cd ~/unity8/trunk
28− are technically "recommends", not strict dependencies
34+$ ./build
30You may also rebuild with the -c for clean, which just deletes the build
36You may also rebuild with the -c for clean, which just deletes the build
@@ -37,21 +43,17 @@ Running Unity 8 on your desktop
37run the Unity 8 shell
43run the Unity 8 shell
38---------------------
44---------------------
39$ cd ~/unity8/trunk
45$ cd ~/unity8/trunk
40−$ cd builddir
46+$ ./run
42−Each component of unity8 can be ran independently for development and testing
48+Options can be passed to test the lock screen
43−For example:
49+$ ./run -p OR -k
48−Check out the tests/qmltests/ directory for a list of things that can be ran.
51+-p is for pin lock, for which the default prompt answer is "1234"
52+-k is for keylock passphrase, for which the default prompt answer is "password"
52- to navigate, utilize the mouse left button as you would your finger
56- to navigate, utilize the mouse left button as you would your finger
53−- a three point drag (for side stage operations) can be performed by using
54− the Shift+Control+Alt (all together) keyboard modifiers while using the mouse.
55- to get the translations work, currently you have to do make install to
57- to get the translations work, currently you have to do make install to
56 put the *.mo files into correct structure. We'll look for a better solution
58 put the *.mo files into correct structure. We'll look for a better solution
@@ -66,15 +68,50 @@ Notes
67Running Unity 8 on devices
69Running Unity 8 on devices
68==========================
70==========================
71+- Ubuntu Touch builds are currently only available in 13.10 flavour
72+- supported hardware should match one of those listed here
73+ https://wiki.ubuntu.com/Touch/Devices#Running_fine
74+- follow the Ubuntu Touch install instructions for your chosen device
75+ https://wiki.ubuntu.com/Touch/Install
76+- make sure your device is connected to a network
77+- also make sure you have your SSH key in ~/.ssh/id_rsa.pub (or install one
78+ on the device yourself)
81+$ ./run_on_device --setup
83+ - install your public SSH key on the device
84+ - install the needed dependencies
70−Running unity8 on a device should be done using crossbuilder.
86+$ ./run_on_device
72−* https://launchpad.net/crossbuilder and
88+ - rsync the code to the device
73−* https://wiki.ubuntu.com/Touch/Crossbuilder
89+ - build on the device
74−for more details on crossbuilder.
90+ - replace the running shell
92+Options can be passed to test the lock screen
93+$ ./run_on_device -p OR -k
95+-p is for pin lock, for which the default prompt answer is "1234"
96+-k is for keylock passphrase, for which the default prompt answer is "password"
100+- using adb over TCP has some advantages, Google will be of help here
101+ - NOTE: this is not yet available for flipped images
102+ - TL;DR: `adb tcpip 5555; adb connect $your_device_ip`
103+ - you can persist the above via `adb shell setprop persist.adb.tcp.port 5555`
104+ - it's unsafe - anyone can connect to your device
105+ - with TCP the Nexus 10 doesn't drop the adb connection when locking
107+- exporting ANDROID_SERIAL=$your_device_serial or
108+ ANDROID_SERIAL=$your_device_ip:5555 will make adb not complain about
110+- you can export TARGET_IP=$your_device_ip TARGET_SSH_PORT=22 for run_on_device
111+ to not use adb forwarding - useful if you use multiple devices
112+- using Ninja (package ninja-build - run_on_device -s installs this now)
113+ will improve build times (especially in the nothing-to-build case)
76−unity8 will automatically restart on the phone once deployment
77−has finished due to post-build-steps set up in this repository.
79Coding guidelines
116Coding guidelines
80=================
117=================
@@ -90,99 +127,3 @@ Unity 8.
90If using VIM, make sure you install some syntax highlighting for QML, like
127If using VIM, make sure you install some syntax highlighting for QML, like
91https://github.com/peterhoeg/vim-qml
128https://github.com/peterhoeg/vim-qml
96−Tests are run from the build directory (which will be ./builddir if you used
97−the ./build.sh script).
99−To run the tests that do not require any graphical capability and therefore
108−To run all graphical tests, which can take a couple of minutes:
112−To run the tests for a single component/class:
114−$ make testComponentName
116−So, for the DragHandle component that would be:
118−$ make testDragHandle
120−To run the tests for a single component/class under gdb (so you can catch SEGFAULTS)
122−$ make gdbtestComponentName
124−To run a single test function of a single component/class:
126−$ make testComponentName FUNCTION="TestCaseName::functionName"
128−To run a test application that allow you to manually test or to simply try out
131−$ make tryComponentName
133−So to try out, for instance, the DragHandle component, you would do:
137−NB: Manual test or interation doesn't make sense for all components or classes,
138−particularly the non-graphical ones. In such cases no "tryFoo" make target is
141−Running autopilot tests
142−=======================
144−Autopilot tests are run from the build directory (which will be ./builddir if you used
145−the ./build.sh script).
149−If you want you can also run tests individually, for that you need to install first,
150−otherwise the tests will run on the system-installed version
154−To see the list of existing autopilot tests you can do
156−$ PYTHONPATH=../tests/autopilot autopilot3 list unity8
158−And then run a single test with
160−$ PYTHONPATH=../tests/autopilot autopilot3 run unity8.some.very.long.test.name
164−$ PYTHONPATH=../tests/autopilot autopilot3 run unity8
169−Unity8 heavily uses Qt and with that Qt debugging techniques mostly apply in the
170−same fashion. There are, however, some additional unity8-specific notes:
172−* Enable/disable Qt scenegraph visualizer on the fly:
174− $ qdbus com.canonical.Unity8.Debugging /com/canonical/Unity8/Debugging SetSceneGraphVisualizer <mode>
176− This is equivalent to exporting QSG_VISUALIZE=<mode> before running unity8, except it does it on the
179−* Toggle slow animations on the fly:
181− $ qdbus com.canonical.Unity8.Debugging /com/canonical/Unity8/Debugging SetSlowAnimations <true|false>
183−* Change logging filter rules on the fly:
185− $ qdbus com.canonical.Unity8.Debugging /com/canonical/Unity8/Debugging SetLoggingFilterRules <filter>
187− This is equivalent to exporting QT_LOGGING_RULES or defining them in QT_LOGGING_CONF, except it does
Components/AnimationControllerWithSignals.qmlnew file+64
@@ -0,0 +1,64 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20+ signal animationCompletedAtBeginning()
21+ signal animationCompletedAtEnd()
22+ readonly property bool completed: progress == 1.0 || progress == 0.0
23+ property bool completing: false
25+ function __completeAtBeginning() {
27+ animationCompletedAtBeginning();
30+ function __completeAtEnd() {
32+ animationCompletedAtEnd();
35+ function completeToBeginningWithSignal() {
36+ if (progress == 0.0) {
37+ __completeAtBeginning()
40+ completeToBeginning();
44+ function completeToEndWithSignal() {
45+ if (progress == 1.0) {
58+ if (progress == 0.0) {
59+ __completeAtBeginning()
60+ } else if (progress == 1.0) {
Components/ApplicationManagerWrapper.qmlnew file+186
@@ -0,0 +1,186 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Unity.Application 0.1
21+ id: applicationManager
23+ property alias mainStageApplications: mainStageModel
24+ property alias sideStageApplications: sideStageModel
25+ property variant mainStageFocusedApplication: null
26+ property variant sideStageFocusedApplication: null
27+ property bool sideStageEnabled: true
28+ signal focusRequested(string desktopFile)
29+ property bool keyboardVisible: ApplicationManager.keyboardVisible
30+ property int keyboardHeight: ApplicationManager.keyboardHeight
32+ property bool fake: ApplicationManager.fake ? ApplicationManager.fake : false
34+ ApplicationsModelStageFiltered {
36+ stage: ApplicationInfo.MainStage
39+ ApplicationsModelStageFiltered {
41+ stage: ApplicationInfo.SideStage
45+ target: ApplicationManager
46+ onFocusedApplicationIdChanged: {
47+ var app = ApplicationManager.findApplication(ApplicationManager.focusedApplicationId)
48+ if (!app) { //nothing at all focused, so clear all
49+ mainStageFocusedApplication = null;
50+ sideStageFocusedApplication = null;
52+ if (app.stage == ApplicationInfo.MainStage) {
53+ mainStageFocusedApplication = app;
54+ // possible the side stage app being unfocused fired this signal, so check for it
55+ if (sideStageFocusedApplication && !sideStageFocusedApplication.focused)
56+ sideStageFocusedApplication = null;
58+ sideStageFocusedApplication = app;
59+ // possible the main stage app being unfocused fired this signal, so check for it
60+ if (mainStageFocusedApplication && !mainStageFocusedApplication.focused)
61+ mainStageFocusedApplication = null;
67+ function activateApplication(desktopFile, argument) {
70+ // HACK: Applications identified sometimes with with appId, but mostly with desktopFile.
71+ // TODO: convert entire shell to use appId only.
72+ if (desktopFile.indexOf(".desktop") >= 0) {
73+ appId = desktopFileToAppId(desktopFile);
78+ var application = ApplicationManager.findApplication(appId);
79+ if (application !== null) {
83+ var execFlags = sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
86+ return ApplicationManager.startApplication(appId, execFlags, [argument]);
88+ return ApplicationManager.startApplication(appId, execFlags);
92+ function stopApplication(application) {
95+ // HACK: Applications identified sometimes with with appId, but mostly with desktopFile.
96+ // TODO: convert entire shell to use appId only.
97+ if (typeof application == "string") {
100+ appId = desktopFileToAppId(application.desktopFile);
103+ ApplicationManager.stopApplication(appId);
106+ function focusApplication(application) {
107+ if (application == null || application == undefined) {
111+ ApplicationManager.focusApplication(application.appId);
114+ function unfocusCurrentApplication() {
115+ ApplicationManager.unfocusCurrentApplication();
118+ function moveRunningApplicationStackPosition(from, to, stage) {
119+ if (from == to || from < 0 || to < 0) return;
121+ if (stage == ApplicationInfo.SideStage) {
122+ sideStageModel.move(from, to);
124+ mainStageModel.move(from, to);
128+ function getApplicationFromDesktopFile(desktopFile, stage) {
131+ // HACK: Applications identified sometimes with with appId, but mostly with desktopFile.
132+ // TODO: convert entire shell to use appId only.
133+ if (desktopFile.indexOf(".desktop") >= 0) {
134+ appId = desktopFileToAppId(desktopFile);
136+ appId = desktopFile;
139+ for (var i = 0, len = ApplicationManager.count; i < len; i++ ) {
140+ var app = ApplicationManager.get(i);
142+ // if stage not specified, return whichever app running on either stage
143+ if (app.appId == appId && (stage == undefined || app.stage == stage)) {
149+ function desktopFileToAppId(desktopFile) {
150+ var right = desktopFile.lastIndexOf(".desktop");
151+ var left = desktopFile.lastIndexOf("/");
152+ if (left == -1 || right == -1 || left == right) {
153+ console.log("ApplicationManagerWrapper: unable to extract appId from '" + desktopFile + "'");
156+ return desktopFile.substring(left+1, right);
160+ target: ApplicationManager
162+ // FIXME: hardcoded mapping from ApplicationManager.FavoriteApplications
163+ // enum to desktop files
165+ if (favoriteApplication == ApplicationManager.CameraApplication) {
166+ desktopFile = "/usr/share/applications/camera-app.desktop"
167+ } else if (favoriteApplication == ApplicationManager.GalleryApplication) {
168+ desktopFile = "/usr/share/applications/gallery-app.desktop"
169+ } else if (favoriteApplication == ApplicationManager.ShareApplication) {
170+ desktopFile = "/usr/share/applications/share-app.desktop"
171+ } else if (favoriteApplication == ApplicationManager.BrowserApplication) {
172+ desktopFile = "/usr/share/applications/webbrowser-app.desktop"
173+ } else if (favoriteApplication == ApplicationManager.PhoneApplication) {
174+ desktopFile = "/usr/share/applications/phone-app.desktop"
175+ } else if (favoriteApplication == ApplicationManager.DialerApplication) {
176+ desktopFile = "/usr/share/applications/dialer-app.desktop"
177+ } else if (favoriteApplication == ApplicationManager.MessagingApplication) {
178+ desktopFile = "/usr/share/applications/messaging-app.desktop"
179+ } else if (favoriteApplication == ApplicationManager.AddressbookApplication) {
180+ desktopFile = "/usr/share/applications/address-book-app.desktop"
183+ applicationManager.focusRequested(desktopFile);
Components/ApplicationScreenshot.qmlnew file+61
@@ -0,0 +1,61 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Unity.Application 0.1
22+ id: applicationScreenshot
24+ property var application: null
25+ property bool withBackground: false
26+ property bool ready: applicationImage.ready || withBackground
28+ function setApplication(application) {
29+ applicationScreenshot.application = application
32+ function clearApplication() {
33+ applicationScreenshot.withBackground = false;
34+ applicationScreenshot.application = null
35+ applicationScreenshot.scheduleUpdate();
38+ function scheduleUpdate() {
39+ applicationImage.scheduleUpdate()
42+ function updateFromCache() {
43+ applicationImage.updateFromCache()
49+ color: "white" // FIXME should use normal background color of Suru theme
50+ visible: applicationScreenshot.withBackground
55+ objectName: "screenshot image"
56+ width: applicationScreenshot.application ? parent.width : 0
57+ height: applicationScreenshot.application ? parent.height : 0
58+ visible: applicationScreenshot.application != null && ready
59+ source: ApplicationManager.findApplication((application) ? application.appId : "")
Components/ApplicationsModelStageFiltered.qmlnew file+49
@@ -0,0 +1,49 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19+import Unity.Application 0.1
21+SortFilterProxyModel {
25+ function get(index) {
26+ return model.get(mapRowToSource(index));
29+ function move(from, to) {
30+ var realFrom = mapRowToSource(from);
31+ if (realFrom == -1) {
32+ console.log("ERROR; invalid from=" + from + " index in move operation");
35+ var realTo = mapRowToSource(to);
37+ // assuming wanting to move to end of list
38+ realTo = model.count - 1;
41+ if (realFrom == realTo) return;
42+ model.move(realFrom, realTo);
45+ model: ApplicationManager
46+ dynamicSortFilter: true
47+ filterRole: ApplicationManager.RoleStage
48+ filterRegExp: RegExp(stage)
tests/plugins/Ubuntu/Gestures/empty.qml → Components/BaseCarouselDelegate.qmlrenamed+5−4
@@ -1,5 +1,5 @@
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,10 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Gestures 0.1
18+import Ubuntu.Components 0.1
21− width: 720; height: 720
21+ property bool explicitlyScaled
Components/BasicShell.qmlnew file+78
@@ -0,0 +1,78 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Unity.Application 0.1
20+import "../Components"
21+import "../Components/Math.js" as MathLocal
26+ // this is only here to select the width / height of the window if not running fullscreen
27+ property bool tablet: false
28+ width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
29+ height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
31+ property real edgeSize: units.gu(2)
33+ property url defaultBackground: shell.width >= units.gu(60) ? "../graphics/tablet_background.jpg" : "../graphics/phone_background.jpg"
34+ property url background
35+ property url backgroundSource
36+ property url backgroundFallbackSource
37+ property url backgroundFinal: (backgroundSource != undefined && backgroundSource != "") ? backgroundSource : (backgroundFallbackSource != undefined && backgroundFallbackSource != "") ? backgroundFallbackSource : shell.defaultBackground
38+ onBackgroundFinalChanged: shell.background = backgroundFinal
40+ // This is a dummy image that is needed to determine if the picture url
41+ // in backgroundSettings points to a valid picture file.
42+ // We can't do this with the real background image because setting a
43+ // new source in onStatusChanged triggers a binding loop detection
44+ // inside Image, which causes it not to render even though a valid source
45+ // would be set. We don't mind about this image staying black and just
46+ // use it for verification to populate the source for the real
49+ source: shell.background
55+ if (status == Image.Error) {
56+ if (source != shell.defaultBackground) {
57+ shell.background = defaultBackground
59+ // In case even our default background fails to load...
60+ shell.background = "data:image/svg+xml,<svg><rect width='100%' height='100%' fill='#000'/></svg>"
67+ anchors.fill: parent // as needs to know the geometry of the shell
74+ Keys.onVolumeUpPressed: volumeControl.volumeUp()
75+ Keys.onVolumeDownPressed: volumeControl.volumeDown()
Components/Carousel.qmlnew file+323
@@ -0,0 +1,323 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "carousel.js" as CarouselJS
21+/*! The Carousel component presents the items of a model in a carousel view. It's similar to a
22+ cover flow. But it stops at it's boundaries (therefore no PathView is used).
27+ clip: true // Don't leak horizontally to other dashes
29+ /// The component to be used as delegate. This component has to be derived from BaseCarouselDelegate
30+ property Component itemComponent
31+ /// Model for the Carousel, which has to be a model usable by a ListView
32+ property alias model: listView.model
33+ /// A minimal width of a tile can be set here. Per default a best fit will be calculated
34+ property alias minimumTileWidth: listView.minimumTileWidth
35+ /// Sets the number of tiles that are visible
36+ property alias pathItemCount: listView.pathItemCount
37+ /// Aspect ratio of the tiles width/height
38+ property alias tileAspectRatio: listView.tileAspectRatio
39+ /// Used to cache some delegates for performance reasons. See the ListView documentation for details
40+ property alias cacheBuffer: listView.cacheBuffer
41+ /// Width of the "draw buffer" in pixel. The drawBuffer is an additional area at start/end where
42+ /// items drawn, even if it is not in the visible area.
43+ /// cacheBuffer controls only the to retain delegates outside the visible area (and is used on top of the drawBuffer)
44+ /// see https://bugreports.qt-project.org/browse/QTBUG-29173
45+ property int drawBuffer: width / pathItemCount // an "ok" value - but values used from the listView cause loops
46+ /// The selected item can be shown in a different size controlled by selectedItemScaleFactor
47+ property real selectedItemScaleFactor: 1.1
49+ /// Emitted when the user clicked on an item
50+ /// @param index is the index of the clicked item
51+ /// @param delegateItem is the clicked component/delegate itself
52+ /// @param itemY is y of the clicked delegate
53+ signal clicked(int index, var delegateItem, real itemY)
55+ /// Emitted when the user pressed and held on an item
56+ /// @param index is the index of the held item
57+ /// @param delegateItem is the held component/delegate itself
58+ /// @param itemY is y of the held delegate
59+ signal pressAndHold(int index, var delegateItem, real itemY)
61+ implicitHeight: listView.tileHeight * selectedItemScaleFactor
63+ /* Basic idea behind the carousel effect is to move the items of the delegates (compacting /stuffing them).
64+ One drawback is, that more delegates have to be drawn than usually. As some items are moved from the
65+ invisible to the visible area. Setting the cacheBuffer does not fix this.
66+ See https://bugreports.qt-project.org/browse/QTBUG-29173
67+ Therefore the ListView has negative left and right anchors margins, and in addition a header
68+ and footer item to compensate that.
70+ The scaling of the items is controlled by the variable continuousIndex, described below. */
74+ property real minimumTileWidth: 0
75+ property real newContentX: -1
76+ property real pathItemCount: referenceWidth / referenceTileWidth
77+ property real tileAspectRatio: 1
79+ /* The positioning and scaling of the items in the carousel is based on the variable
80+ 'continuousIndex', a continuous real variable between [0, 'carousel.model.count'],
81+ roughly representing the index of the item that is prioritised over the others.
82+ 'continuousIndex' is not linear, but is weighted depending on if it is close
83+ to the beginning of the content (beginning phase), in the middle (middle phase)
84+ or at the end (end phase).
85+ Each tile is scaled and transformed in proportion to the difference between
86+ its own index and continuousIndex.
87+ To efficiently calculate continuousIndex, we have these values:
88+ - 'gapToMiddlePhase' gap in pixels between beginning and middle phase
89+ - 'gapToEndPhase' gap in pixels between middle and end phase
90+ - 'kGapEnd' constant used to calculate 'continuousIndex' in end phase
91+ - 'kMiddleIndex' constant used to calculate 'continuousIndex' in middle phase
92+ - 'kXBeginningEnd' constant used to calculate 'continuousIndex' in beginning and end phase
93+ - 'realContentWidth' the width of all the delegates only (without header/footer)
94+ - 'realContentX' the 'contentX' of the listview ignoring the 'drawBuffer'
95+ - 'realWidth' the 'width' of the listview, as it is used as component. */
97+ readonly property real gapToMiddlePhase: Math.min(realWidth / 2 - tileWidth / 2, (realContentWidth - realWidth) / 2)
98+ readonly property real gapToEndPhase: realContentWidth - realWidth - gapToMiddlePhase
99+ readonly property real kGapEnd: kMiddleIndex * (1 - gapToEndPhase / gapToMiddlePhase)
100+ readonly property real kMiddleIndex: (realWidth / 2) / tileWidth - 0.5
101+ readonly property real kXBeginningEnd: 1 / tileWidth + kMiddleIndex / gapToMiddlePhase
102+ readonly property real maximumItemTranslation: (listView.tileWidth * 3) / listView.scaleFactor
103+ readonly property real realContentWidth: contentWidth - 2 * carousel.drawBuffer
104+ readonly property real realContentX: contentX + carousel.drawBuffer
105+ readonly property real realPathItemCount: Math.min(realWidth / tileWidth, pathItemCount)
106+ readonly property real realWidth: carousel.width
107+ readonly property real referenceGapToMiddlePhase: realWidth / 2 - tileWidth / 2
108+ readonly property real referencePathItemCount: referenceWidth / referenceTileWidth
109+ readonly property real referenceWidth: 848
110+ readonly property real referenceTileWidth: 175
111+ readonly property real scaleFactor: tileWidth / referenceTileWidth
112+ readonly property real tileWidth: Math.max(realWidth / pathItemCount, minimumTileWidth)
113+ readonly property real tileHeight: tileWidth / tileAspectRatio
114+ readonly property real translationXViewFactor: 0.2 * (referenceGapToMiddlePhase / gapToMiddlePhase)
115+ readonly property real verticalMargin: (parent.height - tileHeight) / 2
116+ readonly property real visibleTilesScaleFactor: realPathItemCount / referencePathItemCount
120+ topMargin: verticalMargin
121+ bottomMargin: verticalMargin
122+ // extending the "drawing area"
123+ leftMargin: -carousel.drawBuffer
124+ rightMargin: -carousel.drawBuffer
127+ /* The header and footer help to "extend" the area, the listview draws items.
128+ This together with anchors.leftMargin and anchors.rightMargin. */
130+ width: carousel.drawBuffer
131+ height: listView.tileHeight
134+ width: carousel.drawBuffer
135+ height: listView.tileHeight
138+ boundsBehavior: Flickable.StopAtBounds
139+ cacheBuffer: carousel.cacheBuffer
140+ flickDeceleration: Math.max(1500 * Math.pow(realWidth / referenceWidth, 1.5), 1500) // 1500 is platform default
141+ maximumFlickVelocity: Math.max(2500 * Math.pow(realWidth / referenceWidth, 1.5), 2500) // 2500 is platform default
142+ orientation: ListView.Horizontal
144+ function itemClicked(index, delegateItem) {
145+ var x = CarouselJS.getXFromContinuousIndex(index,
151+ carousel.drawBuffer)
153+ if (Math.abs(x - contentX) < 1) {
154+ /* We're clicking the selected item and
155+ we're in the neighbourhood of radius 1 pixel from it.
156+ Let's emit the clicked signal. */
157+ carousel.clicked(index, delegateItem, delegateItem.y)
161+ stepAnimation.stop()
162+ newContentXAnimation.stop()
165+ newContentXAnimation.start()
168+ function itemPressAndHold(index, delegateItem) {
169+ var x = CarouselJS.getXFromContinuousIndex(index,
175+ carousel.drawBuffer);
177+ if (Math.abs(x - contentX) < 1) {
178+ /* We're pressAndHold the selected item and
179+ we're in the neighbourhood of radius 1 pixel from it.
180+ Let's emit the pressAndHold signal. */
181+ carousel.pressAndHold(index, delegateItem, delegateItem.y);
185+ stepAnimation.stop();
186+ newContentXAnimation.stop();
189+ newContentXAnimation.start();
192+ onMovementStarted: {
193+ stepAnimation.stop()
194+ newContentXAnimation.stop()
198+ if (realContentX > 0 && realContentX < realContentWidth - realWidth)
199+ stepAnimation.start()
206+ property: "contentX"
207+ to: CarouselJS.getXFromContinuousIndex(listView.selectedIndex,
209+ listView.realContentWidth,
211+ listView.gapToMiddlePhase,
212+ listView.gapToEndPhase,
213+ carousel.drawBuffer)
216+ easing.type: Easing.InOutQuad
219+ SequentialAnimation {
220+ id: newContentXAnimation
224+ property: "contentX"
225+ from: listView.contentX
226+ to: listView.newContentX
228+ easing.type: Easing.InOutQuad
231+ script: listView.newContentX = -1
235+ readonly property int selectedIndex: Math.round(continuousIndex)
236+ readonly property real continuousIndex: CarouselJS.getContinuousIndex(listView.realContentX,
238+ listView.gapToMiddlePhase,
239+ listView.gapToEndPhase,
241+ listView.kMiddleIndex,
242+ listView.kXBeginningEnd)
244+ property real viewTranslation: CarouselJS.getViewTranslation(listView.realContentX,
246+ listView.gapToMiddlePhase,
247+ listView.gapToEndPhase,
248+ listView.translationXViewFactor)
251+ property bool explicitlyScaled: explicitScaleFactor == carousel.selectedItemScaleFactor
252+ property real explicitScaleFactor: explicitScale ? carousel.selectedItemScaleFactor : 1.0
253+ readonly property bool explicitScale: (!listView.moving ||
254+ listView.realContentX <= 0 ||
255+ listView.realContentX >= listView.realContentWidth - listView.realWidth) &&
256+ listView.newContentX < 0 &&
257+ index === listView.selectedIndex
258+ readonly property real cachedTiles: listView.realPathItemCount + carousel.drawBuffer / listView.tileWidth
259+ readonly property real distance: listView.continuousIndex - index
260+ readonly property real itemTranslationScale: CarouselJS.getItemScale(0.5,
261+ (index + 0.5), // good approximation of scale while changing selected item
263+ listView.visibleTilesScaleFactor)
264+ readonly property real itemScale: CarouselJS.getItemScale(distance,
265+ listView.continuousIndex,
267+ listView.visibleTilesScaleFactor)
268+ readonly property real translationX: CarouselJS.getItemTranslation(index,
269+ listView.selectedIndex,
272+ itemTranslationScale,
273+ listView.maximumItemTranslation)
275+ width: listView.tileWidth
276+ height: listView.tileHeight
277+ scale: itemScale * explicitScaleFactor
278+ sourceComponent: itemComponent
279+ z: cachedTiles - Math.abs(index - listView.selectedIndex)
281+ transform: Translate {
282+ x: listView.viewTranslation + translationX * listView.scaleFactor
285+ Behavior on explicitScaleFactor {
286+ SequentialAnimation {
288+ script: if (!explicitScale)
289+ explicitlyScaled = false
292+ duration: explicitScaleFactor === 1.0 ? 250 : 150
293+ easing.type: Easing.InOutQuad
296+ script: if (explicitScale)
297+ explicitlyScaled = true
303+ item.explicitlyScaled = Qt.binding(function() { return explicitlyScaled; })
304+ item.model = Qt.binding(function() { return model; })
310+ anchors.fill: parent
313+ listView.itemClicked(index, item)
317+ listView.itemPressAndHold(index, item)
tests/mocks/QMenuModel/actionstateparser.cpp → Components/Circle.qmlrenamed+6−3
@@ -12,8 +12,11 @@
13 * You should have received a copy of the GNU General Public License
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16− * Authors: Nick Dedekind <nick.dedekind@canonical.com>
19−#include "actionstateparser.h"
17+import QtQuick 2.0
qml/Components/DragHandle.qml → Components/DragHandle.qmlrenamed+54−69
@@ -1,5 +1,5 @@
2− * Copyright (C) 2013,2016 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,10 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
20+import "Math.js" as MathLocal
22 Put a DragHandle inside a Showable to enable the user to drag it from that handle.
23 Put a DragHandle inside a Showable to enable the user to drag it from that handle.
@@ -38,13 +39,18 @@ import Ubuntu.Gestures 0.1
38 anchors.bottom: parent.bottom
39 anchors.bottom: parent.bottom
39 width: units.gu(2)
40 width: units.gu(2)
41− direction: SwipeArea::Leftwards
42+ direction: DirectionalDragArea::Leftwards
46−SwipeArea {
47+EdgeDragArea {
47 id: dragArea
48 id: dragArea
49+ objectName: "dragHandle"
51+ // Disable gesture detection by default when hinting is used.
52+ // It doesn't make sense to have both.
53+ distanceThreshold: hintDisplacement > 0 ? 0 : units.gu(1.5)
49 property bool stretch: false
55 property bool stretch: false
@@ -60,27 +66,21 @@ SwipeArea {
62 property real hintDisplacement: 0
68 property real hintDisplacement: 0
64− immediateRecognition: hintDisplacement > 0
66− property var overrideStartValue: undefined
67 SmoothedAnimation {
69 SmoothedAnimation {
68 id: hintingAnimation
70 id: hintingAnimation
69 target: hintingAnimation
71 target: hintingAnimation
70− objectName: "hintingAnimation"
71 property: "targetValue"
72 property: "targetValue"
72 duration: 150
73 duration: 150
73 velocity: -1
74 velocity: -1
75− to: d.incrementTargetProp ? d.startValue + hintDisplacement
75+ to: Direction.isPositive(direction) ? d.startValue + hintDisplacement
76− : d.startValue - hintDisplacement
76+ : d.startValue - hintDisplacement
77 property real targetValue
77 property real targetValue
78 onTargetValueChanged: {
78 onTargetValueChanged: {
79 if (!running) {
79 if (!running) {
83− if (d.incrementTargetProp) {
83+ if (Direction.isPositive(direction)) {
84 if (parent[d.targetProp] < targetValue) {
84 if (parent[d.targetProp] < targetValue) {
85 parent[d.targetProp] = targetValue;
85 parent[d.targetProp] = targetValue;
@@ -95,24 +95,12 @@ SwipeArea {
95 // Private stuff
95 // Private stuff
96 QtObject {
96 QtObject {
98−
98+ property var previousStatus: undefined
99− // Whether movement along the designated direction will increment the value of the target property
100− readonly property bool incrementTargetProp: (Direction.isPositive(direction) && !dragArea.stretch)
101− || (dragArea.stretch && !d.dragParent.shown)
103 property real startValue
99 property real startValue
104− property real minValue: {
100+ property real minValue: Direction.isPositive(direction) ? startValue
105− if (direction == Direction.Horizontal) {
106− return startValue - maxTotalDragDistance;
107− } else if (incrementTargetProp) {
110− return startValue - maxTotalDragDistance;
101+ : startValue - maxTotalDragDistance
114− property real maxValue: incrementTargetProp ? startValue + maxTotalDragDistance
102+ property real maxValue: Direction.isPositive(direction) ? startValue + maxTotalDragDistance
115− : startValue;
103+ : startValue
117 property var dragParent: dragArea.parent
105 property var dragParent: dragArea.parent
@@ -125,26 +113,26 @@ SwipeArea {
128− function limitMovement(distance) {
116+ function limitMovement(step) {
129− var targetValue = MathUtils.clamp(d.startValue + distance, minValue, maxValue);
117+ var targetValue = MathLocal.clamp(dragParent[targetProp] + step, minValue, maxValue);
130− var diff = targetValue - d.startValue;
118+ var step = targetValue - dragParent[targetProp];
132 if (hintDisplacement == 0) {
120 if (hintDisplacement == 0) {
133− return diff;
121+ return step;
136 // we should not go behind hintingAnimation's current value
124 // we should not go behind hintingAnimation's current value
137− if (d.incrementTargetProp) {
125+ if (Direction.isPositive(direction)) {
138− if (d.startValue + diff < hintingAnimation.targetValue) {
126+ if (dragParent[targetProp] + step < hintingAnimation.targetValue) {
139− diff = hintingAnimation.targetValue - d.startValue;
127+ step = hintingAnimation.targetValue - dragParent[targetProp];
142− if (d.startValue + diff > hintingAnimation.targetValue) {
130+ if (dragParent[targetProp] + step > hintingAnimation.targetValue) {
143− diff = hintingAnimation.targetValue - d.startValue;
131+ step = hintingAnimation.targetValue - dragParent[targetProp];
147− return diff;
135+ return step;
150 function onFinishedRecognizedGesture() {
138 function onFinishedRecognizedGesture() {
@@ -177,51 +165,48 @@ SwipeArea {
177 EdgeDragEvaluator {
165 EdgeDragEvaluator {
178 objectName: "edgeDragEvaluator"
166 objectName: "edgeDragEvaluator"
179 id: dragEvaluator
167 id: dragEvaluator
180− // Effectively convert distance into the drag position projected onto the gesture direction axis
168+ trackedPosition: sceneDistance
181− trackedPosition: Direction.isPositive(dragArea.direction) ? distance : -distance
182 maxDragDistance: maxTotalDragDistance
169 maxDragDistance: maxTotalDragDistance
183 direction: dragArea.direction
170 direction: dragArea.direction
186 onDistanceChanged: {
173 onDistanceChanged: {
187− if (dragging) {
174+ if (status === DirectionalDragArea.Recognized) {
188− if (!Direction.isPositive(direction))
175+ // don't go the whole distance in order to smooth out the movement
189− distance = -distance;
191− if (dragArea.stretch &&
192− ((!Direction.isPositive(direction) && !d.dragParent.shown)
194− (Direction.isPositive(direction) && d.dragParent.shown))
197− // This happens when you have a stretching showable being shown from the right or
198− // top edge (and consequently being hidden when dragged towards the right/top edge)
199− // In those situations, dimension expansion/retraction happens in the opposite
200− // sign of the axis direction
201− distance = -distance;
176+ var step = distance * 0.3;
178+ step = d.limitMovement(step);
204− var toAdd = d.limitMovement(distance);
205− parent[d.targetProp] = d.startValue + toAdd;
180+ parent[d.targetProp] += step;
209 onDraggingChanged: {
184 onDraggingChanged: {
210 if (dragging) {
185 if (dragging) {
211− dragEvaluator.reset();
212− if (overrideStartValue !== undefined) {
213− d.startValue = overrideStartValue;
215− d.startValue = parent[d.targetProp];
218 if (hintDisplacement > 0) {
186 if (hintDisplacement > 0) {
219 hintingAnimation.targetValue = d.startValue;
187 hintingAnimation.targetValue = d.startValue;
220 hintingAnimation.start();
188 hintingAnimation.start();
223 hintingAnimation.stop();
191 hintingAnimation.stop();
224− d.onFinishedRecognizedGesture();
196+ if (status === DirectionalDragArea.WaitingForTouch) {
197+ if (d.previousStatus === DirectionalDragArea.Recognized) {
198+ d.onFinishedRecognizedGesture();
200+ d.startValue = parent[d.targetProp];
203+ if (d.previousStatus === DirectionalDragArea.WaitingForTouch ||
204+ d.previousStatus === undefined) {
205+ dragEvaluator.reset();
206+ d.startValue = parent[d.targetProp];
209+ d.previousStatus = status;
qml/Components/DraggingArea.qml → Components/DraggingArea.qmlrenamed+4−7
@@ -14,8 +14,9 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
19+import "Math.js" as MathLocal
20MouseArea {
21MouseArea {
21 id: draggingArea
22 id: draggingArea
@@ -25,7 +26,7 @@ MouseArea {
25 property real dragVelocity: 0
26 property real dragVelocity: 0
26 property real dragValue: (orientation == Qt.Vertical ? (mouseY - __pressedPosition.y)
27 property real dragValue: (orientation == Qt.Vertical ? (mouseY - __pressedPosition.y)
27 : (mouseX - __pressedPosition.x))
28 : (mouseX - __pressedPosition.x))
28− property real lateralPosition: orientation == Qt.Horizontal ? MathUtils.clamp(mouseY, 0, height) : MathUtils.clamp(mouseX, 0, width)
29+ property real lateralPosition: orientation == Qt.Horizontal ? MathLocal.clamp(mouseY, 0, height) : MathLocal.clamp(mouseX, 0, width)
29 property point __pressedPosition: Qt.point(0, 0)
30 property point __pressedPosition: Qt.point(0, 0)
30 property var __dragEvents: []
31 property var __dragEvents: []
31 property bool clickValidated: true
32 property bool clickValidated: true
@@ -117,8 +118,4 @@ MouseArea {
117 dragging = false
118 dragging = false
118 __pressedPosition = Qt.point(mouse.x, mouse.y)
119 __pressedPosition = Qt.point(mouse.x, mouse.y)
Components/EdgeDemo.qmlnew file+187
@@ -0,0 +1,187 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+import AccountsService 0.1
24+ property Item launcher
25+ property Item indicators
26+ property Item underlay
28+ property bool launcherEnabled: true
29+ property bool dashEnabled: true
30+ property bool panelEnabled: true
31+ property bool panelContentEnabled: true
33+ property bool paused: false
36+ if (d.topEdgeDemo) d.topEdgeDemo.paused = paused
37+ if (d.bottomEdgeDemo) d.bottomEdgeDemo.paused = paused
38+ if (d.leftEdgeDemo) d.leftEdgeDemo.paused = paused
39+ if (d.finalEdgeDemo) d.finalEdgeDemo.paused = paused
42+ function hideEdgeDemoInShell() {
43+ AccountsService.demoEdges = false;
47+ function stopDemo() {
48+ launcherEnabled = true
51+ panelContentEnabled = true
52+ if (d.topEdgeDemo) d.topEdgeDemo.destroy()
53+ if (d.bottomEdgeDemo) d.bottomEdgeDemo.destroy()
54+ if (d.leftEdgeDemo) d.leftEdgeDemo.destroy()
55+ if (d.finalEdgeDemo) d.finalEdgeDemo.destroy()
58+ function startDemo() {
60+ d.overlay = Qt.createComponent("EdgeDemoOverlay.qml")
63+ launcherEnabled = false;
65+ panelEnabled = false;
66+ panelContentEnabled = false;
73+ property Component overlay
74+ property QtObject topEdgeDemo
75+ property QtObject bottomEdgeDemo
76+ property QtObject leftEdgeDemo
77+ property QtObject finalEdgeDemo
78+ property bool showEdgeDemo: AccountsService.demoEdges
80+ onShowEdgeDemoChanged: {
82+ if (d.showEdgeDemo) {
88+ function startTopEdgeDemo() {
89+ demo.panelEnabled = true;
90+ if (demo.dash && demo.underlay) {
91+ d.topEdgeDemo = d.overlay.createObject(demo.underlay, {
93+ "title": i18n.tr("Top edge"),
94+ "text": i18n.tr("Try swiping from the top edge to access the indicators"),
95+ "anchors.fill": demo.dash,
99+ d.topEdgeDemo.onSkip.connect(demo.hideEdgeDemoInShell)
106+ target: demo.indicators
107+ onFullyOpenedChanged: {
108+ if (d.topEdgeDemo && d.topEdgeDemo.available && demo.indicators.fullyOpened) {
109+ d.topEdgeDemo.hideNow()
110+ startBottomEdgeDemo()
115+ function startBottomEdgeDemo() {
116+ if (demo.indicators) {
117+ d.bottomEdgeDemo = d.overlay.createObject(demo.indicators, {
119+ "title": i18n.tr("Close"),
120+ "text": i18n.tr("Swipe up again to close the settings screen"),
121+ "anchors.fill": demo.indicators.content,
124+ if (d.bottomEdgeDemo) {
125+ d.bottomEdgeDemo.onSkip.connect(demo.hideEdgeDemoInShell)
132+ target: demo.indicators
133+ onPartiallyOpenedChanged: {
134+ if (d.bottomEdgeDemo && d.bottomEdgeDemo.available && !demo.indicators.partiallyOpened && !demo.indicators.fullyOpened) {
135+ d.bottomEdgeDemo.hideNow()
141+ function startLeftEdgeDemo() {
142+ demo.panelEnabled = false;
143+ demo.launcherEnabled = true;
144+ if (demo.dash && demo.underlay) {
145+ d.leftEdgeDemo = d.overlay.createObject(demo.underlay, {
147+ "title": i18n.tr("Left edge"),
148+ "text": i18n.tr("Swipe from the left to reveal the launcher for quick access to apps"),
149+ "anchors.fill": demo.dash,
152+ if (d.leftEdgeDemo) {
153+ d.leftEdgeDemo.onSkip.connect(demo.hideEdgeDemoInShell)
160+ target: demo.launcher
162+ if (d.leftEdgeDemo && d.leftEdgeDemo.available && launcher.state == "visible") {
163+ d.leftEdgeDemo.hide()
165+ startFinalEdgeDemo()
170+ function startFinalEdgeDemo() {
171+ demo.launcherEnabled = false;
172+ if (demo.dash && demo.underlay) {
173+ d.finalEdgeDemo = d.overlay.createObject(demo.underlay, {
175+ "title": i18n.tr("Well done"),
176+ "text": i18n.tr("You have now mastered the edge gestures and can start using the phone<br><br>Tap anywhere to start"),
177+ "anchors.fill": demo.dash,
181+ if (d.finalEdgeDemo) {
182+ d.finalEdgeDemo.onSkip.connect(demo.hideEdgeDemoInShell)
Components/EdgeDemoOverlay.qmlnew file+264
@@ -0,0 +1,264 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19+import QtGraphicalEffects 1.0
20+import Unity.Application 0.1
21+import Ubuntu.Components 0.1
27+ * Valid values are "left", "right", "top", "bottom", or "none".
29+ property string edge: "top"
32+ * This is the header displayed, like "Right edge".
34+ property alias title: titleLabel.text
37+ * This is the block of text displayed below the header.
39+ property alias text: textLabel.text
42+ * This is the text for the skip button.
44+ property alias skipText: skipLabel.text
47+ * This is the visible status of the skip button.
49+ property alias showSkip: skipLabel.visible
52+ * Whether this demo is running currently.
54+ readonly property bool active: available && visible
57+ * Whether animations are paused.
59+ property alias paused: wholeAnimation.paused
62+ * Whether animations are running.
64+ readonly property alias running: wholeAnimation.running
74+ overlay.visible = false;
75+ overlay.available = false;
81+ showAnimation: StandardAnimation {
84+ onRunningChanged: if (running) overlay.visible = true
86+ hideAnimation: StandardAnimation {
89+ duration: UbuntuAnimation.BriskDuration
90+ onRunningChanged: if (!running) overlay.hideNow()
95+ property bool skipOnHide: false
96+ property int edgeMargin: units.gu(4)
100+ objectName: "backgroundShade"
102+ anchors.fill: parent
105+ visible: overlay.active
108+ anchors.fill: parent
109+ enabled: overlay.edge == "none" && overlay.opacity == 1.0
110+ onClicked: overlay.doSkip()
119+ height: parent.height
120+ visible: overlay.active
124+ layer.enabled: true // otherwise the underlining on "Skip intro" jumps
125+ spacing: units.gu(3)
128+ margins: d.edgeMargin
130+ top: overlay.edge == "bottom" ? undefined : parent.top
131+ bottom: overlay.edge == "bottom" ? parent.bottom : undefined
138+ wrapMode: Text.WordWrap
144+ wrapMode: Text.WordWrap
149+ objectName: "skipLabel"
150+ text: i18n.tr("Skip intro")
151+ color: UbuntuColors.orange
153+ font.underline: true
156+ // Make clickable area bigger than just the link because
157+ // otherwise, the edge demo will feel hard to dismiss.
158+ anchors.fill: parent
159+ anchors.margins: -units.gu(5)
160+ onClicked: overlay.doSkip()
167+ property int size: 1
169+ visible: overlay.edge != "none"
170+ gradient: Gradient {
173+ color: Qt.hsla(16.0/360.0, 0.83, 0.47, 0.4) // UbuntuColors.orange, but transparent
177+ color: "transparent"
180+ anchors.fill: parent
182+ if (overlay.edge == "right") {
183+ return Qt.point(width, 0);
184+ } else if (overlay.edge == "left") {
185+ return Qt.point(0, 0);
186+ } else if (overlay.edge == "top") {
187+ return Qt.point(0, 0);
189+ return Qt.point(0, height);
193+ if (overlay.edge == "right") {
194+ return Qt.point(width - size, 0);
195+ } else if (overlay.edge == "left") {
196+ return Qt.point(size, 0);
197+ } else if (overlay.edge == "top") {
198+ return Qt.point(0, size);
200+ return Qt.point(0, height - size);
206+ SequentialAnimation {
208+ objectName: "wholeAnimation"
209+ running: overlay.active
217+ if (overlay.edge == "right" || overlay.edge == "left") {
218+ return "anchors.leftMargin";
219+ } else if (overlay.edge == "bottom") {
220+ return "anchors.bottomMargin";
222+ return "anchors.topMargin";
226+ if (overlay.edge == "right") {
227+ return d.edgeMargin + units.gu(3)
229+ return d.edgeMargin - units.gu(3)
233+ duration: overlay.edge == "none" ? 0 : UbuntuAnimation.SleepyDuration
240+ duration: UbuntuAnimation.SleepyDuration
244+ SequentialAnimation {
246+ loops: Animation.Infinite
247+ property string prop: (overlay.edge == "left" || overlay.edge == "right") ? "x" : "y"
248+ property double endVal: units.dp(5) * ((overlay.edge == "left" || overlay.edge == "top") ? 1 : -1)
249+ property double maxGlow: units.dp(20)
250+ property int duration: overlay.edge == "none" ? 0 : UbuntuAnimation.SleepyDuration
253+ StandardAnimation { target: hintGroup; property: hintAnimation.prop; from: 0; to: hintAnimation.endVal; duration: hintAnimation.duration }
254+ StandardAnimation { target: edgeHint; property: "size"; from: 1; to: hintAnimation.maxGlow; duration: hintAnimation.duration }
259+ StandardAnimation { target: hintGroup; property: hintAnimation.prop; from: hintAnimation.endVal; to: 0; duration: hintAnimation.duration }
260+ StandardAnimation { target: edgeHint; property: "size"; from: hintAnimation.maxGlow; to: 1; duration: hintAnimation.duration }
Components/EdgeDragArea.qmlnew file+36
@@ -0,0 +1,36 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Ubuntu.Gestures 0.1
22+ A DirectionalDragArea wrapper that provides some well-chosen defaults
23+ for its gesture recognition parameters.
27+ // TODO: Re-evaluate those or even the recognition heuristics itself once
28+ // we have gesture cancelling/forwarding in place.
30+ // The idea here is that it's better having lax rules than false negatives.
31+ // False negatives are very frustrating to the user.
32+ maxDeviation: units.gu(3)
34+ distanceThreshold: units.gu(1.5)
35+ minSpeed: units.gu(0) // some people were getting false negatives with it enabled.
qml/Components/EdgeDragEvaluator.qml → Components/EdgeDragEvaluator.qmlrenamed+11−20
@@ -14,8 +14,8 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
19import Ubuntu.Gestures 0.1
19import Ubuntu.Gestures 0.1
@@ -53,20 +53,20 @@ AxisVelocityCalculator {
53 // Returns whether the drag should continue by itself until completed.
53 // Returns whether the drag should continue by itself until completed.
54 function shouldAutoComplete() {
54 function shouldAutoComplete() {
55 var deltaPos = trackedPosition - __startPosition;
55 var deltaPos = trackedPosition - __startPosition;
57 if (Math.abs(deltaPos) < minDragDistance) {
56 if (Math.abs(deltaPos) < minDragDistance) {
58 velocity = 0;
57 velocity = 0;
59 minVelocity = 0;
58 minVelocity = 0;
60 return false;
59 return false;
62+ minVelocity = __calculateMinimumVelocityForAutoCompletion(deltaPos);
63 velocity = calculate();
63 velocity = calculate();
64− minVelocity = __calculateMinimumVelocityForAutoCompletion();
66− if (_dragDirectionIsPositive()) {
65+ if (Direction.isPositive(direction) && (velocity >= minVelocity)
67− return velocity >= minVelocity;
66+ || !Direction.isPositive(direction) && (velocity <= minVelocity)) {
69− return velocity <= minVelocity;
69+ return false;
@@ -75,20 +75,11 @@ AxisVelocityCalculator {
75 // speedThreshold in pixels per millisecond
75 // speedThreshold in pixels per millisecond
76 property real __speedThresholdMs: speedThreshold / 1000.0
76 property real __speedThresholdMs: speedThreshold / 1000.0
78− function _dragDirectionIsPositive() {
79− if (direction === Direction.Horizontal) {
80− return (trackedPosition - __startPosition) > 0;
82− return Direction.isPositive(direction);
86− function __calculateMinimumVelocityForAutoCompletion() {
87− // Minimum velocity when a drag total distance is zero
78+ // Minimum velocity when a drag total distance is zero
88− var v0 = _dragDirectionIsPositive() ? __speedThresholdMs : - __speedThresholdMs;
79+ property real __v0: Direction.isPositive(direction) ? __speedThresholdMs : - __speedThresholdMs
89− var deltaPos = trackedPosition - __startPosition;
81+ function __calculateMinimumVelocityForAutoCompletion(distance) {
91− return v0 - ((__speedThresholdMs / dragThreshold) * deltaPos);
82+ return __v0 - ((__speedThresholdMs / dragThreshold) * distance);
94 function reset() {
85 function reset() {
Components/FilterGrid.qmlnew file+107
@@ -0,0 +1,107 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
20+import "../Components"
23+ A ResponsiveGridView that can optionally have the number of rows being displayed
24+ reduced to collapsedRowCount, in which case a button saying "View all (123)"
25+ will be shown at the bottom. If clicked, FilterGrid will them expand vertically
31+ /* If true, the number of elements displayed will be limited by collapsedRowCount.
32+ If false, all elements will be displayed, effectively looking the same as a regular
33+ ResponsiveGridView. */
34+ property bool filter: true
36+ /* Whether, when collapsed, a button should be displayed enabling the user to expand
37+ the grid to its full size. */
38+ readonly property bool expandable: model.count > collapsedRowCount * iconTileGrid.columns
40+ property var model: null
42+ /* Maximum number of rows to be show when filter=true. */
43+ property int collapsedRowCount: 2
44+ readonly property int collapsedHeight: {
45+ return iconTileGrid.contentHeightForRows(Math.min(collapsedRowCount, Math.ceil(model.count / columns)))
47+ readonly property int uncollapsedHeight: {
48+ return iconTileGrid.contentHeightForRows(Math.ceil(model.count / columns))
51+ property alias minimumHorizontalSpacing: iconTileGrid.minimumHorizontalSpacing
52+ property alias maximumNumberOfColumns: iconTileGrid.maximumNumberOfColumns
53+ property alias columns: iconTileGrid.columns
54+ property alias delegateWidth: iconTileGrid.delegateWidth
55+ property alias delegateHeight: iconTileGrid.delegateHeight
56+ property alias verticalSpacing: iconTileGrid.verticalSpacing
57+ property alias delegate: iconTileGrid.delegate
58+ property alias cellWidth: iconTileGrid.cellWidth
59+ property alias cellHeight: iconTileGrid.cellHeight
60+ readonly property alias flicking: iconTileGrid.flicking
61+ readonly property alias moving: iconTileGrid.moving
62+ readonly property alias pressDelay: iconTileGrid.pressDelay
64+ height: !filterAnimation.running ? childrenRect.height : height
65+ clip: filterAnimation.running
68+ property bool filterEndValue
72+ to: filterEndValue ? root.collapsedHeight : root.uncollapsedHeight
73+ // Duration and easing here match the ListViewWithPageHeader::m_contentYAnimation
74+ // otherwise since both animations can run at the same time you'll get
75+ // some visual weirdness.
77+ easing.type: Easing.InOutQuad
79+ root.filter = filterEndValue;
83+ function startFilterAnimation(filter) {
84+ filterAnimation.filterEndValue = filter
85+ filterAnimation.start();
91+ anchors { left: parent.left; right: parent.right }
92+ height: totalContentHeight
95+ minimumHorizontalSpacing: units.gu(0.5)
96+ maximumNumberOfColumns: 6
97+ delegateWidth: units.gu(11)
98+ delegateHeight: units.gu(9.5)
99+ verticalSpacing: units.gu(2)
101+ model: LimitProxyModel {
103+ limit: (filter && !filterAnimation.running) ? collapsedRowCount * iconTileGrid.columns : -1
Components/ListItems/Base.qmlnew file+125
@@ -0,0 +1,125 @@
2+ * Copyright (C) 2012 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
22+ width: parent ? parent.width : units.gu(31)
23+ height: body.height + bottomDividerLine.height
27+ Specifies whether the list item is selected.
29+ property bool selected: false
33+ Highlight the list item when it is pressed.
34+ This is used to disable the highlighting of the full list item
35+ when custom highlighting needs to be implemented (for example in
36+ ListItem.Standard which can have a split).
38+ property bool highlightWhenPressed: true
42+ Set to show or hide the thin bottom divider line (drawn by the \l ThinDivider component).
43+ This line is shown by default except in cases where this item is the delegate of a ListView.
45+ property bool showDivider: __showDivider()
49+ Method to automatically determine if the bottom divider line should be drawn.
50+ This always returns true, unless item is a delegate in a ListView. If in a ListView
51+ it will return false only when:
52+ + if this is the final item in the list, and ListView.footer is set (again as thin
53+ divider line won't look well with footer below it)
55+ function __showDivider() {
56+ // if we're not in ListView, always show a thin dividing line at the bottom
58+ if (typeof ListViewWithPageHeader !== 'undefined') {
59+ if (typeof ListViewWithPageHeader.model !== 'undefined') {
60+ model = ListViewWithPageHeader.model;
62+ } else if (ListView.view !== null) {
63+ model = ListView.view.model;
65+ // if we're last item in ListView don't show divider
66+ if (model && index === model.count - 1) return false;
71+ /* Relevant really only for ListViewWithPageHeader case: specify how many pixels we can overlap with the section header */
72+ readonly property int allowedOverlap: units.dp(1)
74+ property real __heightToClip: {
75+ // Check this is in position where clipping is needed
76+ if (typeof ListViewWithPageHeader !== 'undefined') {
77+ if (typeof heightToClip !== 'undefined') {
78+ if (heightToClip >= allowedOverlap) {
79+ return heightToClip - allowedOverlap;
88+ Reparent so that the visuals of the children does not
89+ occlude the bottom divider line.
91+ default property alias children: body.children
94+ id: clippingContainer
95+ height: parent.height - __heightToClip
96+ anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
97+ clip: __heightToClip > 0
104+ bottom: bottomDividerLine.top
106+ height: childrenRect.height
110+ id: bottomDividerLine
111+ anchors.bottom: parent.bottom
112+ visible: showDivider
120+ bottom: bottomDividerLine.top
122+ pressed: (emptyListItem.selected || (emptyListItem.highlightWhenPressed && emptyListItem.pressed)) ? "pressed" : ""
Components/ListItems/Header.qmlnew file+84
@@ -0,0 +1,84 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
23+ The text that is shown as the header text.
24+ \qmlproperty string text
26+ property alias text: label.text
27+ property alias image: image.source
29+ signal clicked(variant mouse)
31+ height: units.gu(4.5)
37+ rightMargin: units.gu(0.5)
39+ bottom: bottomBorder.top
46+ leftMargin: units.gu(2)
47+ verticalCenter: parent.verticalCenter
50+ color: Theme.palette.selected.backgroundText //at 60%
52+ font.family: "Ubuntu"
54+ elide: Text.ElideRight
55+ textFormat: Text.PlainText
58+ width: parent.width - image.width - image.leftMargin - anchors.leftMargin
63+ readonly property double leftMargin: units.gu(1)
64+ x: label.x + label.contentWidth + leftMargin
66+ verticalCenter: parent.verticalCenter
76+ bottom: parent.bottom
82+ onClicked: parent.clicked(mouse)
Components/ListItems/Highlight.qmlnew file+46
@@ -0,0 +1,46 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
22+ property bool pressed: false
23+ property real pressedOpacity: 0.3
27+ state: pressed ? "pressed" : ""
31+ PropertyChanges { target: highlight; opacity: pressedOpacity}
38+ NumberAnimation { target: highlight; property: "opacity"; duration: 50}
43+ NumberAnimation { target: highlight; property: "opacity"; duration: 100}
Components/ListItems/ThinDivider.qmlnew file+27
@@ -0,0 +1,27 @@
2+ * Copyright (C) 2012 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21+ left: (parent) ? parent.left : null
22+ right: (parent) ? parent.right : null
24+ height: (visible) ? units.dp(2) : 0
26+ source: "graphics/ListItemDividerHorizontal.png"
tests/qmltests/Components/tst_EdgeDragEvaluator.qml → Components/ListItems/VerticalThinDivider.qmlrenamed+8−9
@@ -1,5 +1,5 @@
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2012 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,14 +14,13 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import "../../../qml/Components"
21− width: units.gu(70)
20+ anchors {
22− height: units.gu(70)
21+ top: (parent) ? parent.top : null
23−
22+ bottom: (parent) ? parent.bottom : null
25− objectName: "edgeDragEvaluator"
24+ width: (visible) ? units.dp(2) : 0
25+ source: "graphics/ListItemDividerVertical.png"
Components/ListItems/graphics/ListItemDividerHorizontal@18.pngnew file
Binary file not shown.
Components/ListItems/graphics/ListItemDividerVertical@18.pngnew file
Binary file not shown.
tests/mocks/Ubuntu/SystemSettings/Diagnostics/MockDiagnostics.qml → Components/Math.jsrenamed+8−6
@@ -1,5 +1,5 @@
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,11 +14,13 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+.pragma library
19−Item {
19+function clamp(value, min, max) {
20− property bool reportCrashes: true
20+ if (min <= max) {
21− function setReportCrashes(report) {
21+ return Math.max(min, Math.min(max, value))
22− reportCrashes = report;
22+ } else {
23+ // swap min/max if min > max
24+ return clamp(value, max, min)
Components/OpenEffect.qmlnew file+138
@@ -0,0 +1,138 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21+ property bool enabled: topGapPx != positionPx || bottomGapPx != positionPx
22+ property alias live: effectSource.live
23+ property Item sourceItem
24+ property ShaderEffectSource source: ShaderEffectSource {
26+ sourceItem: effect.enabled ? effect.sourceItem : null
27+ hideSource: effect.enabled
30+ if (effect.enabled) {
31+ Qt.rect(0, -effect.topOverflow, sourceItem.width, sourceItem.height + effect.topOverflow + effect.bottomOverflow)
38+ onEnabledChanged: if (!live && enabled) scheduleUpdate()
41+ \qmlproperty real positionPx
42+ The y coordinate of where to perform the split.
44+ \qmlproperty real topGapPx
47+ \qmlproperty real bottomGapPx
50+ \qmlproperty real topOverflow
51+ How much of the sourceItem should be sourced above its bounds.
53+ \qmlproperty real bottomOverflow
54+ How much of the sourceItem should be sourced below its bounds.
57+ property real positionPx: 0
58+ property real topGapPx: 0
59+ property real bottomGapPx: height
60+ property real topOverflow: 0.0
61+ property real bottomOverflow: 0.0
62+ property real topOpacity: 1.0
63+ property real bottomOpacity: 1.0
65+ property real __roundedPositionPx: Math.round(positionPx)
67+ function scheduleUpdate() {
68+ source.scheduleUpdate();
73+ visible: effect.enabled
75+ property ShaderEffectSource source: effect.source
76+ property real positionPx: __roundedPositionPx
77+ property real factor: effect.height / height
85+ topMargin: -topOverflow - positionPx + topGapPx
87+ height: topOverflow + positionPx
90+ uniform highp mat4 qt_Matrix;
91+ attribute highp vec4 qt_Vertex;
92+ attribute highp vec2 qt_MultiTexCoord0;
93+ varying highp vec2 qt_TexCoord0;
94+ uniform highp float factor;
97+ highp vec4 pos = qt_Vertex;
99+ gl_Position = qt_Matrix * pos;
100+ qt_TexCoord0 = qt_MultiTexCoord0;
107+ visible: effect.enabled
108+ opacity: bottomOpacity
109+ property ShaderEffectSource source: effect.source
110+ property real offset: effect.topOverflow + __roundedPositionPx
111+ property real factor: effect.height / height
119+ y: topOverflow + bottomGapPx
120+ height: sourceItem.height - positionPx + bottomOverflow
123+ uniform highp mat4 qt_Matrix;
124+ attribute highp vec4 qt_Vertex;
125+ attribute highp vec2 qt_MultiTexCoord0;
126+ varying highp vec2 qt_TexCoord0;
127+ uniform highp float factor;
128+ uniform highp float offset;
131+ highp vec4 pos = qt_Vertex;
132+ pos.y = (pos.y * factor) - offset;
133+ gl_Position = qt_Matrix * pos;
134+ qt_TexCoord0 = qt_MultiTexCoord0;
Components/PageHeader.qmlnew file+346
@@ -0,0 +1,346 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Ubuntu.Components.Popups 0.1
20+import Ubuntu.Components.ListItems 0.1 as ListItem
21+import SessionManager 0.1
26+ The text that is shown inside the Page Header
27+ \qmlproperty string text
29+ property alias text: label.text
31+ property bool searchEntryEnabled: false
32+ property alias searchQuery: searchField.text
33+ property ListModel searchHistory: SearchHistoryModel {}
35+ height: units.gu(8.5)
36+ implicitHeight: units.gu(8.5)
38+ function triggerSearch() {
39+ if (searchEntryEnabled) searchField.forceActiveFocus()
42+ function resetSearch() {
43+ if (!searchHistory) return;
45+ searchHistory.addQuery(searchField.text);
46+ searchField.text = "";
47+ searchField.focus = false;
51+ target: SessionManager
52+ onActiveChanged: if (!SessionManager.active) resetSearch()
62+ height: units.gu(6.5)
65+ contentHeight: headerContainer.height
68+ contentY: searchField.activeFocus || searchField.text != "" ? searchContainer.y : headerContainer.y
70+ Behavior on contentY { NumberAnimation { duration: 200; easing.type: Easing.OutQuad } }
72+ // FIXME this could potentially be simplified to avoid all the containers
77+ height: childrenRect.height
83+ height: header.height
89+ leftMargin: units.gu(2)
91+ verticalCenter: parent.verticalCenter
94+ color: Theme.palette.selected.backgroundText
96+ font.family: "Ubuntu"
97+ font.weight: Font.Light
99+ elide: Text.ElideRight
107+ objectName: "searchContainer"
109+ visible: searchEntryEnabled
111+ property bool narrowMode: parent.width < label.contentWidth + units.gu(50)
113+ property bool active: searchField.text != "" || searchField.activeFocus
114+ property var popover: null
116+ anchors.right: textContainer.right
117+ height: header.height
120+ if (active && narrowMode) "narrowActive"
121+ else if (!active && narrowMode) "narrowInactive"
122+ else if (active && !narrowMode) "active"
123+ else if (!active && !narrowMode) "inactive"
125+ function openPopover() {
126+ if (searchHistory.count > 0) {
127+ searchContainer.popover = PopupUtils.open(popoverComponent, searchField,
129+ "pointerTarget": pointerPositioner,
130+ "contentWidth": searchField.width,
131+ "edgeMargins": units.gu(1)
137+ function closePopover() {
138+ if (searchContainer.popover) PopupUtils.close(searchContainer.popover)
141+ onActiveFocusChanged: if (!activeFocus) { searchHistory.addQuery(searchField.text) }
146+ anchors.fill: parent
147+ anchors.margins: units.gu(1)
149+ hasClearButton: false
151+ primaryItem: AbstractButton {
152+ enabled: searchField.text != ""
154+ if (searchField.text != "") {
155+ searchHistory.addQuery(searchField.text)
156+ searchField.text = ""
159+ height: parent.height
165+ verticalCenter: parent.verticalCenter
167+ leftMargin: units.gu(0.5)
174+ id: pointerPositioner
175+ anchors.left: parent.right
176+ anchors.leftMargin: units.gu(0.5)
177+ anchors.top: parent.bottom
182+ if (text != "") searchContainer.closePopover()
183+ else if (text == "" && activeFocus) searchContainer.openPopover()
186+ onActiveFocusChanged: {
187+ if (!activeFocus) searchContainer.closePopover()
194+ AnchorChanges { target: textContainer; anchors.top: headerContainer.top }
195+ AnchorChanges { target: searchContainer; anchors.left: undefined; anchors.top: textContainer.top }
199+ PropertyChanges { target: searchField; highlighted: true }
200+ AnchorChanges { target: textContainer; anchors.top: searchContainer.bottom }
201+ AnchorChanges { target: searchContainer; anchors.left: headerContainer.left; anchors.top: headerContainer.top }
206+ PropertyChanges { target: searchContainer; width: units.gu(40) }
207+ PropertyChanges { target: primaryImage; source: searchField.text ? "../Dash/graphics/icon_clear.png" : "../Dash/graphics/icon_search_active.png" }
208+ PropertyChanges { target: searchField; highlighted: true }
213+ PropertyChanges { target: searchContainer; width: units.gu(25) }
214+ PropertyChanges { target: primaryImage; source: "../Dash/graphics/icon_search_inactive.png" }
215+ PropertyChanges { target: searchField; highlighted: false }
218+ name: "narrowActive"
220+ PropertyChanges { target: header; contentY: 0 }
221+ PropertyChanges { target: primaryImage; source: searchField.text ? "../Dash/graphics/icon_clear.png" : "../Dash/graphics/icon_search_active.png" }
224+ name: "narrowInactive"
226+ PropertyChanges { target: header; contentY: header.height }
227+ PropertyChanges { target: primaryImage; source: searchField.text ? "../Dash/graphics/icon_clear.png" : "../Dash/graphics/icon_search_active.png" }
234+ SequentialAnimation {
236+ NumberAnimation { targets: [searchContainer, searchField]; property: "width"; duration: 200; easing.type: Easing.InOutQuad }
237+ PropertyAction { target: primaryImage; property: "source" }
238+ AnchorAnimation { targets: [searchContainer, textContainer]; duration: 200; easing.type: Easing.InOutQuad }
240+ ScriptAction { script: searchContainer.openPopover() }
245+ ScriptAction { script: searchContainer.closePopover() }
246+ NumberAnimation { targets: [searchContainer, searchField] ; property: "width"; duration: 200; easing.type: Easing.InOutQuad }
247+ AnchorAnimation { targets: [searchContainer, textContainer]; duration: 200; easing.type: Easing.InOutQuad }
251+ SequentialAnimation {
253+ NumberAnimation { targets: [searchContainer, searchField] ; property: "width"; duration: 200; easing.type: Easing.OutQuad }
254+ AnchorAnimation { targets: [searchContainer, textContainer]; duration: 200; easing.type: Easing.InOutQuad }
256+ ScriptAction { script: searchContainer.openPopover() }
260+ to: "narrowInactive"
261+ ScriptAction { script: searchContainer.closePopover() }
262+ NumberAnimation { targets: [searchContainer, searchField] ; property: "width"; duration: 200; easing.type: Easing.OutQuad }
263+ AnchorAnimation { targets: [searchContainer, textContainer]; duration: 200; easing.type: Easing.InOutQuad }
268+ id: popoverComponent
272+ // FIXME: this should go into the first item below, but enable: false
273+ // prevents mouse events propagation
282+ onClicked: searchContainer.closePopover()
285+ anchors.centerIn: parent
288+ source: "../Dash/graphics/icon_listview_clear.png"
299+ ListItem.Standard { enabled: false; text: i18n.tr("Recent searches") }
303+ model: searchHistory
305+ delegate: ListItem.Standard {
306+ showDivider: index < recentSearches.count - 1
309+ searchHistory.addQuery(text)
310+ searchField.text = text
319+ enabled: searchField.activeFocus
327+ height: searchContainer.popover ? parent.height + searchContainer.popover.contentHeight + units.gu(2) : parent.height
329+ onPressed: searchField.focus = false
341+ bottom: parent.bottom
344+ source: "graphics/PageHeaderBaseDivider.sci"
Components/RatingStars.qmlnew file+41
@@ -0,0 +1,41 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
22+ property int maximumRating: 5
23+ property int starCount: 5
24+ height: childrenRect.height
25+ width: childrenRect.width
27+ readonly property int effectiveRating: Math.max(0, Math.min(root.starCount * root.rating / root.maximumRating, root.maximumRating))
30+ model: root.effectiveRating
32+ source: "graphics/icon_star_on.png"
36+ model: root.starCount - root.effectiveRating
38+ source: "graphics/icon_star_off.png"
Components/ResponsiveFlowView.qmlnew file+81
@@ -0,0 +1,81 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
23+ property int minimumHorizontalSpacing: units.gu(0.5)
24+ // property int minimumNumberOfColumns: 2 // FIXME: not implemented
25+ property int maximumNumberOfColumns: 6
26+ readonly property int columns: flow.columns
27+ property alias verticalSpacing: flow.verticalSpacing
28+ property alias horizontalSpacing: flow.horizontalSpacing
29+ property int referenceDelegateWidth
30+ property alias firstModel: repeater1.model
31+ property alias secondModel: repeater2.model
32+ property alias delegate: repeater1.delegate
33+ readonly property int cellWidth: referenceDelegateWidth + horizontalSpacing
34+ readonly property int cellHeight: referenceDelegateWidth + verticalSpacing
35+ property alias move: flow.move
37+ height: flow.height + flow.anchors.topMargin
46+ rightMargin: margin/2
47+ topMargin: verticalSpacing
50+ function pixelToGU(value) {
51+ return Math.floor(value / units.gu(1));
54+ function spacingForColumns(columns) {
55+ // spacing between columns as an integer number of GU, the remainder goes in the margins
56+ var spacingGU = pixelToGU(allocatableVerticalSpace / columns);
57+ return units.gu(spacingGU);
60+ function columnsForSpacing(space) {
61+ // minimum margin is half of the spacing
62+ return Math.floor((parent.width - space/2) / (referenceDelegateWidth + space));
65+ property real allocatableVerticalSpace: parent.width - columns * referenceDelegateWidth
66+ property int columns: Math.min(columnsForSpacing(minimumHorizontalSpacing), maximumNumberOfColumns)
67+ property real horizontalSpacing: spacingForColumns(columns)
68+ property real verticalSpacing: horizontalSpacing
69+ property int margin: allocatableVerticalSpace - columns * horizontalSpacing
73+ model: (root.model) ? root.model[0] : null
77+ model: (root.model) ? root.model[1] : null
78+ delegate: repeater1.delegate
Components/ResponsiveGridView.qmlnew file+82
@@ -0,0 +1,82 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
21+ Essentially a GridView where you can specify the maximum number of columns it can have.
24+ property int minimumHorizontalSpacing: units.gu(0.5)
25+ // property int minimumNumberOfColumns: 2 // FIXME: not implemented
26+ property int maximumNumberOfColumns: 6
27+ readonly property int columns: gridView.columns
28+ property alias verticalSpacing: gridView.verticalSpacing
29+ property int delegateWidth
30+ property int delegateHeight
31+ property alias model: gridView.model
32+ property alias delegate: gridView.delegate
33+ readonly property int cellWidth: gridView.cellWidth
34+ readonly property int cellHeight: gridView.cellHeight
35+ readonly property int totalContentHeight: {
36+ return contentHeightForRows(Math.ceil(gridView.model.count / columns))
38+ property alias interactive: gridView.interactive
39+ readonly property alias flicking: gridView.flicking
40+ readonly property alias moving: gridView.moving
41+ readonly property alias pressDelay: gridView.pressDelay
43+ function contentHeightForRows(rows) {
44+ return rows * cellHeight + verticalSpacing
49+ objectName: "responsiveGridViewGrid"
53+ rightMargin: margin/2
54+ topMargin: verticalSpacing
56+ clip: parent.height != totalContentHeight
58+ function pixelToGU(value) {
59+ return Math.floor(value / units.gu(1));
62+ function spacingForColumns(columns) {
63+ // spacing between columns as an integer number of GU, the remainder goes in the margins
64+ var spacingGU = pixelToGU(allocatableHorizontalSpace / columns);
65+ return units.gu(spacingGU);
68+ function columnsForSpacing(spacing) {
69+ // minimum margin is half of the spacing
70+ return Math.max(1, Math.floor((parent.width - spacing/2) / (delegateWidth + spacing)));
73+ property real allocatableHorizontalSpace: parent.width - columns * delegateWidth
74+ property int columns: Math.min(columnsForSpacing(minimumHorizontalSpacing), maximumNumberOfColumns)
75+ property real horizontalSpacing: spacingForColumns(columns)
76+ property real verticalSpacing: horizontalSpacing
77+ property int margin: allocatableHorizontalSpace - columns * horizontalSpacing
79+ cellWidth: delegateWidth + horizontalSpacing
80+ cellHeight: delegateHeight + verticalSpacing
Components/Revealer.qmlnew file+242
@@ -0,0 +1,242 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "Math.js" as MathLocal
24+ property Showable target
25+ property var hintingAnimation: hintingAnimation
26+ property string boundProperty: orientation == Qt.Vertical ? "y" : "x"
27+ property int orientation: Qt.Vertical
28+ property int direction: Qt.LeftToRight
29+ property real openedValue: orientation == Qt.Vertical ? y : x
30+ property real closedValue: orientation == Qt.Vertical ? y + (direction == Qt.LeftToRight ? -height : height) : x + (direction == Qt.LeftToRight ? -width : width)
31+ property real hintDisplacement: 0
32+ property real handleSize: units.gu(2)
33+ property real dragVelocity: draggingArea.dragVelocity != 0 ? Math.abs(draggingArea.dragVelocity) : -1
34+ property real dragVelocityThreshold: units.gu(5)
35+ property bool dragging: false
36+ property bool pressed: draggingArea.pressed
37+ property int lateralPosition: draggingArea.lateralPosition
38+ property real dragPosition
39+ property bool openOnPress: true
41+ signal openPressed(int mouseX, int mouseY)
42+ signal openReleased(int mouseX, int mouseY)
49+ if (orientation == Qt.Vertical) {
50+ value = draggingArea.dragValue + draggingArea.y
51+ if (direction == Qt.RightToLeft) {
52+ value += draggingArea.height - height
55+ value = draggingArea.dragValue + draggingArea.x
56+ if (direction == Qt.RightToLeft) {
57+ value += draggingArea.width - width
61+ if (direction == Qt.LeftToRight) {
66+ } else if (dragging) {
67+ if (direction == Qt.LeftToRight) {
68+ value += hintDisplacement
70+ value -= hintDisplacement
76+ property var draggingArea: leftDraggingArea.enabled ? leftDraggingArea : rightDraggingArea
78+ property real __hintValue: closedValue + (direction == Qt.LeftToRight ? hintDisplacement : -hintDisplacement)
80+ function dragToValue(dragPosition) {
81+ return dragPosition + closedValue
84+ property bool __opened: target.shown
85+ enabled: target.available
87+ // Can be replaced with a fake implementation during tests
88+ // property var __getCurrentTimeMs: function () { return new Date().getTime() }
89+ property var __dateTime: new function() {
90+ this.getCurrentTimeMs = function() {return new Date().getTime()}
93+ Component.onCompleted: target[boundProperty] = __opened ? openedValue : closedValue
94+ onOpenedValueChanged: if (__opened && !dragging) target[boundProperty] = openedValue
95+ onClosedValueChanged: if (!__opened && !dragging) target[boundProperty] = closedValue
97+ function __computeValue(dragPosition) {
98+ return MathLocal.clamp(dragToValue(dragPosition), __hintValue, openedValue)
102+ hintingAnimation.stop()
106+ function __close() {
107+ hintingAnimation.stop()
112+ target.showAnimation.stop()
113+ target.hideAnimation.stop()
114+ hintingAnimation.restart()
117+ function __settle() {
118+ hintingAnimation.stop()
119+ if (__opened) target.show()
123+ function __startDragging() {
124+ hintingAnimation.stop()
128+ function __endDragging(dragVelocity) {
130+ if (revealer.direction == Qt.RightToLeft) {
131+ dragVelocity = -dragVelocity
133+ if (Math.abs(dragVelocity) >= dragVelocityThreshold) {
134+ if (dragVelocity > 0) __open()
144+ target: revealer.target
145+ property: revealer.boundProperty
146+ value: __computeValue(dragPosition)
151+ id: hintingAnimation
153+ target: revealer.target
154+ property: revealer.boundProperty
156+ to: revealer.__hintValue
160+ id: leftDraggingArea
162+ property bool isOpeningArea: revealer.direction == Qt.LeftToRight
164+ height: orientation == Qt.Vertical ? handleSize : parent.height
165+ width: orientation == Qt.Horizontal ? handleSize : parent.width
166+ orientation: revealer.orientation
167+ enabled: isOpeningArea ? !revealer.__opened : revealer.__opened
169+ __dateTime: revealer.__dateTime
172+ if (isOpeningArea) {
173+ if (revealer.openOnPress) {
174+ revealer.openPressed(mouseX, mouseY)
178+ revealer.closePressed()
182+ if (isOpeningArea && revealer.openOnPress) {
183+ revealer.openReleased(mouseX, mouseY)
187+ onDragStart: __startDragging()
188+ onDragEnd: __endDragging(dragVelocity)
190+ if (clickValidated) {
191+ if (isOpeningArea) {
192+ if (revealer.openOnPress) revealer.openClicked()
194+ revealer.closeClicked()
201+ id: rightDraggingArea
203+ property bool isOpeningArea: revealer.direction == Qt.RightToLeft
205+ x: orientation == Qt.Vertical ? 0 : parent.width - width
206+ y: orientation == Qt.Vertical ? parent.height - height : 0
207+ height: orientation == Qt.Vertical ? handleSize : parent.height
208+ width: orientation == Qt.Horizontal ? handleSize : parent.width
209+ orientation: revealer.orientation
210+ enabled: isOpeningArea ? !revealer.__opened : revealer.__opened
212+ __dateTime: revealer.__dateTime
215+ if (isOpeningArea) {
216+ if (revealer.openOnPress) {
217+ revealer.openPressed(mouseX, mouseY)
221+ revealer.closePressed()
225+ if (isOpeningArea && revealer.openOnPress) {
226+ revealer.openReleased(mouseX, mouseY)
230+ onDragStart: __startDragging()
231+ onDragEnd: __endDragging(dragVelocity)
233+ if (clickValidated) {
234+ if (isOpeningArea) {
235+ if (revealer.openOnPress) revealer.openClicked()
237+ revealer.closeClicked()
qml/Components/SearchHistoryModel/SearchHistoryModel.qml → Components/SearchHistoryModel.qmlrenamed+1−2
@@ -14,8 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18−import QtQuick 2.4
17+import QtQuick 2.0
20// TODO sanitize input, move to persistent storage
19// TODO sanitize input, move to persistent storage
qml/Components/Showable.qml → Components/Showable.qmlrenamed+9−46
@@ -1,6 +1,5 @@
2 * Copyright (C) 2013 Canonical, Ltd.
2 * Copyright (C) 2013 Canonical, Ltd.
3− * Copyright (C) 2019 UBports Foundation
5 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -15,7 +14,7 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18−import QtQuick 2.4
17+import QtQuick 2.0
21 id: showable
20 id: showable
@@ -31,17 +30,15 @@ Item {
31 property bool created: true
30 property bool created: true
32 property bool required
31 property bool required
33 property bool __shouldShow: false
32 property bool __shouldShow: false
34− property bool __skipShowAnimation: false
35− property bool __skipHideAnimation: false
37 property list<QtObject> hides
34 property list<QtObject> hides
38− property Animation showAnimation
35+ property var showAnimation
39− property Animation hideAnimation
36+ property var hideAnimation
41 // automatically set the target on showAnimation and hideAnimation to be the
38 // automatically set the target on showAnimation and hideAnimation to be the
42 // showable itself
39 // showable itself
43− onShowAnimationChanged: if (showAnimation && showAnimation.hasOwnProperty("target")) showAnimation["target"] = showable
40+ onShowAnimationChanged: if (showAnimation) showAnimation["target"] = showable
44− onHideAnimationChanged: if (hideAnimation && hideAnimation.hasOwnProperty("target")) hideAnimation["target"] = showable
41+ onHideAnimationChanged: if (hideAnimation) hideAnimation["target"] = showable
46 Component.onCompleted: required = shown;
43 Component.onCompleted: required = shown;
@@ -61,11 +58,6 @@ Item {
65− __skipShowAnimation = true;
69 onCreatedChanged: {
61 onCreatedChanged: {
70 if (created && __shouldShow) {
62 if (created && __shouldShow) {
71 __reallyShow();
63 __reallyShow();
@@ -74,11 +66,7 @@ Item {
76 function __reallyShow() {
68 function __reallyShow() {
77− if (showAnimation != undefined && showAnimation.running)
80 if (!available) {
69 if (!available) {
81− __skipShowAnimation = false;
82 return false;
70 return false;
@@ -89,43 +77,24 @@ Item {
91 if (showAnimation != undefined) {
79 if (showAnimation != undefined) {
92− showAnimation.restart()
80+ if (!showAnimation.running) {
93− if (__skipShowAnimation || shown) {
94− showAnimation.complete();
81+ showAnimation.restart()
97 visible = true;
84 visible = true;
100 shown = true;
87 shown = true;
101− __skipShowAnimation = false;
102 return true;
88 return true;
106− Will be called right before starting the hideAnimation.
108− property var prepareToHide: function(){}
110 function hide() {
91 function hide() {
111− if (hideAnimation != undefined && hideAnimation.running)
114 if (showAnimation != undefined && showAnimation.running) {
92 if (showAnimation != undefined && showAnimation.running) {
115 showAnimation.stop()
93 showAnimation.stop()
118− if (typeof prepareToHide === "function") {
121− console.warn("Showable.prepareToHide should be a function, but it's a " +
122− (typeof prepareToHide) + " instead");
125 if (hideAnimation != undefined) {
95 if (hideAnimation != undefined) {
126− hideAnimation.restart()
96+ if (!hideAnimation.running) {
127− if (__skipHideAnimation || !shown) {
128− hideAnimation.complete();
97+ hideAnimation.restart()
131 visible = false
100 visible = false
@@ -133,12 +102,6 @@ Item {
135 shown = false
104 shown = false
136− __skipHideAnimation = false;
139− function hideNow() {
140− __skipHideAnimation = true;
144 Connections {
107 Connections {
Components/Stage.qmlnew file+554
@@ -0,0 +1,554 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Unity.Application 0.1
19+import Ubuntu.Components 0.1
20+import Ubuntu.Gestures 0.1
23+ Responsible for application switching.
25+ Drag from the right edge to switch to the next application.
26+ While being dragged, this component will show an animation for the user to
27+ visualize that he's changing the stacking of applications (next/new app comes from
28+ right edge and current/old app fades out).
36+ property int type: ApplicationInfo.MainStage
37+ property var applicationManager
38+ readonly property var applications:
39+ type == ApplicationInfo.MainStage ? applicationManager.mainStageApplications
40+ : applicationManager.sideStageApplications
41+ property bool fullyShown: false
42+ property bool fullyHidden: true
43+ readonly property var focusedApplication:
44+ type == ApplicationInfo.MainStage ? applicationManager.mainStageFocusedApplication
45+ : applicationManager.sideStageFocusedApplication
46+ property bool shouldUseScreenshots: true
48+ /* Will be true whenever application screenshots are being shown.
49+ i.e. during application window transitions */
50+ readonly property bool usingScreenshots: {
51+ if (newApplicationScreenshot.application != null && oldApplicationScreenshot.application != null) {
52+ return newApplicationScreenshot.ready && oldApplicationScreenshot.ready;
54+ return newApplicationScreenshot.ready || oldApplicationScreenshot.ready;
58+ property bool rightEdgeEnabled: true
59+ property bool switchingFromFullscreenToFullscreen: false
61+ property alias rightEdgeDraggingAreaWidth: rightEdgeDraggingArea.width
63+ // Y coordinate for non-fullscreen applications
64+ property int normalApplicationY: 0
66+ function activateApplication(desktopFile, addDelay) {
67+ var application = applicationManager.getApplicationFromDesktopFile(desktopFile, stage.type);
68+ if (application != null && application == stage.focusedApplication) {
73+ showStartingApplicationAnimation.prepare(application);
74+ if (!stage.fullyShown) {
75+ // if launching this app reveals the stage, make new application screenshot visible
76+ newApplicationScreenshot.visible = true;
79+ showStartingApplicationAnimation.start();
83+ stage.__startingApplicationDesktopFile = desktopFile;
87+ /* Keep a reference to the focused application so that we can safely
88+ unfocus it when the stage is not fully shown and refocus it when the stage
89+ is fully shown again.
91+ property var focusedApplicationWhenUsingScreenshots
92+ onShouldUseScreenshotsChanged: {
93+ if (showStartingApplicationAnimation.running || switchToApplicationAnimation.running) {
97+ if (shouldUseScreenshots) {
98+ stage.__focusApplicationUsingScreenshots(stage.focusedApplication);
100+ stage.__focusActualApplication(stage.focusedApplicationWhenUsingScreenshots);
105+ property Item newApplicationScreenshot: ApplicationScreenshot {
108+ height: stage.height - y
110+ property Item oldApplicationScreenshot: ApplicationScreenshot {
113+ height: stage.height - y
116+ function __getApplicationIndex(application) {
119+ for (var i = 0; i < stage.applications.count; i++ ) {
120+ if (stage.applications.get(i).desktopFile == application.desktopFile) {
128+ property string __startingApplicationDesktopFile
131+ id: delayedHideScreenshots
132+ interval: 500 // on Galaxy Nexus, Telephony app is slowest application to draw a frame so needs this delay
134+ __hideScreenshots();
138+ function __hideScreenshots() {
139+ newApplicationScreenshot.clearApplication();
140+ oldApplicationScreenshot.clearApplication();
141+ newApplicationScreenshot.visible = false;
142+ oldApplicationScreenshot.visible = false;
145+ function __focusApplication(application) {
146+ if (!application) return
147+ if (shouldUseScreenshots) {
148+ stage.__focusApplicationUsingScreenshots(application);
150+ stage.__focusActualApplication(application);
155+ function __focusActualApplication(application) {
156+ if (application == null) {
160+ if (stage.focusedApplication == application) {
161+ /* FIXME: this case is reached when showing the sidestage, we
162+ need to refocus the side stage app in order to show it.
163+ FIXME: this case is reached when doing a right edge swipe
164+ while in the dash to bring back the stage.
165+ FIXME: this case is reached when showStartingApplicationAnimation
166+ finishes after the newly started application has been focused
167+ automatically by the ApplicationManager.
169+ if (stage.type == ApplicationInfo.SideStage) {
170+ applicationManager.focusApplication(application);
172+ if (!delayedHideScreenshots.running) {
173+ stage.__hideScreenshots();
176+ /* FIXME: calling ApplicationManager::focusApplication does not focus
177+ the application immediately nor show the application's surface
178+ immediately. Delay hiding the screenshots until it has done so.
180+ delayedHideScreenshots.stop();
181+ applicationManager.focusApplication(application);
183+ stage.focusedApplicationWhenUsingScreenshots = null;
186+ function __focusApplicationUsingScreenshots(application) {
187+ delayedHideScreenshots.stop();
188+ if (application == null) {
192+ if (newApplicationScreenshot.application != null) {
193+ stage.focusedApplicationWhenUsingScreenshots = application;
197+ newApplicationScreenshot.setApplication(application);
198+ newApplicationScreenshot.scheduleUpdate();
199+ newApplicationScreenshot.opacity = 1.0;
200+ newApplicationScreenshot.x = 0.0;
201+ newApplicationScreenshot.y = __getApplicationY(application);
202+ newApplicationScreenshot.scale = 1.0;
203+ newApplicationScreenshot.visible = true;
204+ stage.focusedApplicationWhenUsingScreenshots = application;
205+ stage.switchingFromFullscreenToFullscreen = false;
208+ function __getApplicationY(application) {
209+ return Qt.binding( function(){
210+ return (application && application.fullscreen
211+ && application.stage !== ApplicationInfo.SideStage)
212+ ? 0 : normalApplicationY;
216+ /* FIXME: should hide the screenshots when the focused application's surface
217+ is visible. There is no API in QtUbuntu to support that yet.
221+ onFocusedApplicationChanged: {
222+ if (stage.focusedApplication != null) {
223+ /* Move application to the beginning of the list of running applications */
224+ var index = stage.__getApplicationIndex(stage.focusedApplication);
225+ applicationManager.moveRunningApplicationStackPosition(index, 0, stage.type);
227+ var startingApplication = applicationManager.getApplicationFromDesktopFile(
228+ stage.__startingApplicationDesktopFile, stage.type);
230+ if (stage.focusedApplication == startingApplication) {
231+ stage.__startingApplicationDesktopFile = "";
233+ /* Screenshots might still be in use at this point and their
234+ use can be stopped before delayedHideScreenshots is complete.
235+ Prepare for that case by setting appropriately
236+ stage.focusedApplicationWhenUsingScreenshots.
238+ stage.focusedApplicationWhenUsingScreenshots = stage.focusedApplication;
240+ /* FIXME: should hide the screenshots when the focused application's window
241+ is visible. There is no API in qtubuntu to support that yet. Therefore
242+ we delay their hiding to avoid a state where neither the screenshot nor
243+ the application's window is visible.
245+ delayedHideScreenshots.start();
247+ stage.__hideScreenshots();
254+ target: stage.applications
255+ onCountChanged: { __discardObsoleteScreenshots(); }
256+ ignoreUnknownSignals: true
258+ onFullyHiddenChanged: { __discardObsoleteScreenshots(); }
259+ function __discardObsoleteScreenshots() {
260+ if (stage.fullyHidden && stage.applications && stage.applications.count == 0) {
261+ stage.focusedApplicationWhenUsingScreenshots = undefined;
262+ stage.__hideScreenshots();
267+ SequentialAnimation {
268+ id: showStartingApplicationAnimation
270+ function prepare(newApplication) {
271+ var oldApplication = stage.focusedApplication;
272+ newApplicationScreenshot.setApplication(newApplication);
273+ newApplicationScreenshot.updateFromCache();
274+ oldApplicationScreenshot.setApplication(oldApplication);
275+ oldApplicationScreenshot.scheduleUpdate();
276+ newApplicationScreenshot.withBackground = true; // FIXME: should be withBackground = newApplication.state == Application.Starting
277+ newApplicationScreenshot.y = __getApplicationY(newApplication);
278+ oldApplicationScreenshot.y = __getApplicationY(oldApplication);
279+ stage.focusedApplicationWhenUsingScreenshots = newApplication;
280+ stage.switchingFromFullscreenToFullscreen = false;
283+ PropertyAction {target: newApplicationScreenshot; property: "visible"; value: false}
284+ PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: false}
285+ PropertyAction {target: newApplicationScreenshot; property: "z"; value: 0}
286+ PropertyAction {target: oldApplicationScreenshot; property: "z"; value: 1}
287+ PropertyAction {target: newApplicationScreenshot; property: "scale"; value: 0.8}
288+ PropertyAction {target: oldApplicationScreenshot; property: "scale"; value: 1.0}
289+ PropertyAction {target: newApplicationScreenshot; property: "opacity"; value: 0.0}
290+ PropertyAction {target: oldApplicationScreenshot; property: "opacity"; value: 1.0}
291+ PropertyAction {target: newApplicationScreenshot; property: "x"; value: 0.0}
292+ PropertyAction {target: oldApplicationScreenshot; property: "x"; value: 0.0}
295+ PropertyAction {target: newApplicationScreenshot; property: "visible"; value: true}
297+ target: newApplicationScreenshot
300+ easing.type: Easing.OutQuad
304+ target: newApplicationScreenshot
307+ easing.type: Easing.OutQuad
311+ PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: true}
314+ target: oldApplicationScreenshot
317+ easing.type: Easing.OutQuad
324+ if (!stage.focusedApplicationWhenUsingScreenshots) {
325+ // FIXME: only here to support case where application does
326+ // not exist yet but is about to
330+ stage.__focusApplication(stage.focusedApplicationWhenUsingScreenshots);
336+ SequentialAnimation {
337+ id: switchToApplicationAnimation
339+ function prepare(newApplication) {
340+ var oldApplication = stage.focusedApplication;
341+ newApplicationScreenshot.setApplication(newApplication);
342+ newApplicationScreenshot.updateFromCache();
343+ oldApplicationScreenshot.setApplication(oldApplication);
344+ oldApplicationScreenshot.scheduleUpdate();
345+ newApplicationScreenshot.withBackground = false;
346+ newApplicationScreenshot.y = __getApplicationY(newApplication);
347+ oldApplicationScreenshot.y = __getApplicationY(oldApplication);
348+ stage.focusedApplicationWhenUsingScreenshots = newApplication;
349+ stage.switchingFromFullscreenToFullscreen = newApplication && newApplication.fullscreen;
352+ PropertyAction {target: newApplicationScreenshot; property: "visible"; value: false}
353+ PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: false}
354+ PropertyAction {target: newApplicationScreenshot; property: "z"; value: 1}
355+ PropertyAction {target: oldApplicationScreenshot; property: "z"; value: 0}
356+ PropertyAction {target: newApplicationScreenshot; property: "scale"; value: 1.0}
357+ PropertyAction {target: oldApplicationScreenshot; property: "scale"; value: 1.0}
358+ PropertyAction {target: newApplicationScreenshot; property: "opacity"; value: 1.0}
359+ PropertyAction {target: oldApplicationScreenshot; property: "opacity"; value: 1.0}
360+ PropertyAction {target: newApplicationScreenshot; property: "x"; value: stage.width}
361+ PropertyAction {target: oldApplicationScreenshot; property: "x"; value: 0.0}
362+ PropertyAction {target: newApplicationScreenshot; property: "visible"; value: true}
363+ PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: true}
367+ target: oldApplicationScreenshot
370+ easing.type: Easing.OutQuad
374+ target: oldApplicationScreenshot
377+ easing.type: Easing.OutQuad
382+ target: newApplicationScreenshot
385+ easing.type: Easing.OutQuad
392+ // move previously focused application to the end of the list of running applications
393+ var oldApplication = oldApplicationScreenshot.application;
394+ if (oldApplication != null) {
395+ var oldApplicationIndex = stage.__getApplicationIndex(oldApplicationScreenshot.application);
396+ applicationManager.moveRunningApplicationStackPosition(
397+ oldApplicationIndex, stage.applications.count - 1, stage.type);
400+ stage.__focusApplication(stage.focusedApplicationWhenUsingScreenshots);
406+ function __dragValueToProgress(dragValue, startValue, applicationsCount) {
407+ if (applicationsCount == 0) {
409+ } else if (applicationsCount == 1) {
410+ // prevent the current app from moving more than 1/4 of the screen
411+ var elasticValue = __elastic(dragValue, startValue/4);
412+ return elasticValue / startValue;
414+ return dragValue / startValue;
418+ function __elastic(x, limit) {
419+ return limit * ( 1 - Math.pow( ( limit - 1 ) / limit, x ) )
422+ property real __startValue: stage.width
424+ AnimationControllerWithSignals {
425+ id: switchToApplicationAnimationController
427+ onAnimationCompletedAtBeginning: {
429+ stage.__focusApplication(oldApplicationScreenshot.application);
435+ trackedPosition: rightEdgeDraggingArea.touchX
436+ direction: rightEdgeDraggingArea.direction
437+ maxDragDistance: stage.width
441+ id: rightEdgeDraggingArea
444+ if (status == DirectionalDragArea.WaitingForTouch) {
445+ return switchToApplicationAnimationController.completed
446+ && stage.applications.count > 0 && stage.rightEdgeEnabled
447+ && !delayedHideScreenshots.running
453+ anchors.top: parent.top
454+ anchors.bottom: parent.bottom
455+ anchors.right: parent.right
457+ direction: Direction.Leftwards
459+ onDistanceChanged: {
460+ if (status !== DirectionalDragArea.Recognized)
463+ var targetProgress = __dragValueToProgress(-distance, __startValue,
464+ stage.applications.count)
465+ var delta = targetProgress - switchToApplicationAnimationController.progress
467+ // When the gesture finally gets recognized, the finger will likely be
468+ // reasonably far from the edge. If we made the progress immediately
469+ // follow the finger position it would be visually unpleasant as there
470+ // would be a jump to meet the finger's current position.
472+ // The trick is not to go all the way (1.0) as it would cause the
473+ // aforementioned jump.
474+ switchToApplicationAnimationController.progress += 0.4 * delta
477+ property bool gotRejected: false
480+ if (status == DirectionalDragArea.Undecided) {
483+ } else if (status == DirectionalDragArea.Rejected) {
484+ switchToApplicationAnimationController.completeToBeginningWithSignal();
486+ } else if (status == DirectionalDragArea.WaitingForTouch) {
492+ function onUndecided() {
493+ dragEvaluator.reset();
495+ var nextApplication = null;
496+ if (stage.applications.count > 1) {
497+ nextApplication = stage.applications.get(1);
499+ switchToApplicationAnimationController.progress = 0
500+ switchToApplicationAnimation.prepare(nextApplication);
501+ switchToApplicationAnimationController.animation = switchToApplicationAnimation;
505+ function onGestureEnded() {
506+ if (stage.applications.count > 1 && dragEvaluator.shouldAutoComplete()) {
507+ switchToApplicationAnimationController.completeToEndWithSignal();
509+ switchToApplicationAnimationController.completeToBeginningWithSignal();
515+ // FIXME: very bad hack to detect when an application was closed or crashed
516+ property var __previouslyFocusedApplication
519+ onFocusedApplicationChanged: {
520+ if (stage.focusedApplication == null
521+ && __getApplicationIndex(stage.__previouslyFocusedApplication) == -1) {
522+ stage.__onFocusedApplicationClosed();
524+ stage.__previouslyFocusedApplication = stage.focusedApplication;
528+ function __onFocusedApplicationClosed() {
533+ if (stage.applications.count > 0) {
534+ // Do not change the focused application from within onFocusedApplicationChanged.
535+ // This causes binding loop warnings besides being a bad practice in general
536+ // (setting a property from within its "changed" signal handling)
538+ focusTopmostAppTimer.start();
545+ id: focusTopmostAppTimer
546+ interval: 1; repeat: false
548+ if (stage.applications.count > 0) {
549+ stage.__focusApplication(stage.applications.get(0));
qml/Components/StandardAnimation.qml → Components/StandardAnimation.qmlrenamed+1−1
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
19NumberAnimation {
19NumberAnimation {
20 duration: 200
20 duration: 200
Components/Tile.qmlnew file+87
@@ -0,0 +1,87 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
22+ property alias source: image.source
23+ property alias fillMode: image.fillMode
24+ property alias horizontalAlignment: image.horizontalAlignment
25+ property alias verticalAlignment: image.verticalAlignment
26+ property alias text: label.text
27+ property int imageWidth
28+ property int imageHeight
34+ horizontalCenter: parent.horizontalCenter
42+ sourceSize { width: icon.width; height: icon.height }
50+ objectName: "borderPressed"
54+ borderSource: "radius_pressed.sci"
55+ opacity: root.pressed ? 1.0 : 0.0
56+ Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
71+ baseline: parent.bottom
74+ leftMargin: units.gu(1)
75+ rightMargin: units.gu(1)
78+ color: Theme.palette.selected.backgroundText
83+ elide: Text.ElideMiddle
84+ horizontalAlignment: Text.AlignHCenter
Components/Time.jsnew file+49
@@ -0,0 +1,49 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20+ "second": [ 1000, "a second ago", "in a second", "%1 seconds ago", "in %1 seconds" ],
21+ "minute": [ 60, "a minute ago", "in a minute", "%1 minutes ago", "in %1 minutes" ],
22+ "hour": [ 60, "an hour ago", "in an hour", "%1 hours ago", "in %1 hours" ],
23+ "day": [ 24, "yesterday", "tomorrow", "%1 days ago", "in %1 days" ],
24+ "week": [ 7, "a week ago", "in a week", "about %1 weeks ago", "in about %1 weeks" ],
25+ "month": [ 4.35, "a month ago", "in a month", "%1 months ago", "in %1 months" ], // == 365.25 days / 12 months / 7 days
26+ "year": [ 12, "a year ago", "in a year", "%1 years ago", "in %1 years" ]
29+function readableFromNow(date, now) {
30+ var then = new Date(date);
31+ if (isNaN(then)) return "";
32+ if (now === undefined) {
34+ } else if (isNaN(now)) throw "now is NaN";
35+ var diff = Math.abs(now - then);
36+ if (diff < 1000) return "just now";
38+ var future = now < then;
40+ for (var k in factors) {
41+ diff /= factors[k][0];
42+ if (Math.floor(diff) == 1) {
43+ humanDiff = factors[k][future ? 2 : 1];
44+ } else if (Math.floor(diff) > 1) {
45+ humanDiff = factors[k][future ? 4 : 3].arg(Math.round(diff));
qml/Components/BlurLayer.qml → Components/UbuntuShapeForItem.qmlrenamed+20−14
@@ -1,5 +1,5 @@
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2012 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,26 +14,32 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import QtGraphicalEffects 1.0
18+import Ubuntu.Components 0.1
20+/* FIXME: This component is duplicating the UbuntuShape from the SDK, but shapes more
21+ * general (Item-based) components. This ability should be incorporated into the SDK's
22+ * UbuntuShape so this file can be removed.
23+ * Bug: https://bugs.launchpad.net/tavastia/+bug/1089595
23− property alias source: fastBlur.source
29+ property alias radius: shape.radius
24− property real brightness: 1
30+ property alias image: source.sourceItem
25− property real blurRadius: 0
27− FastBlur {
32+ ShaderEffectSource {
28− id: fastBlur
33+ id: source
29− anchors.fill: parent
34+ width: 1
30− visible: radius > 0
35+ height: 1
31− radius: Math.max(root.blurRadius, 0)
36+ hideSource: true
34− Rectangle {
39+ Shape {
35 anchors.fill: parent
43 anchors.fill: parent
37− opacity: 1 - root.brightness
qml/Components/ItemSnapshot.qml → Components/VolumeControl.qmlrenamed+17−19
@@ -1,5 +1,5 @@
2− * Copyright (C) 2015-2016 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,32 +14,30 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
22+ objectName: "volumeControl"
22− property Item target
25+ QDBusActionGroup {
28+ busName: "com.canonical.indicator.sound"
29+ objectPath: "/com/canonical/indicator/sound"
24− property bool ready: image.status === Image.Ready
31+ property variant actionObject: action("scroll")
28− console.warn("ItemSnapshot.take(): no target set");
32− target.grabToImage(function(result) {
33− image.source = result.url;
37− // Unload the image to free up memory
38− function discard() {
34+ function volumeUp() {
39− image.source = "";
35+ actionGroup.actionObject.activate(1);
42− Image {
38+ function volumeDown() {
43− id: image
39+ actionGroup.actionObject.activate(-1);
42+ Component.onCompleted: actionGroup.start()
qml/Components/WrongPasswordAnimation.qml → Components/WrongPasswordAnimation.qmlrenamed+1−1
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
19SequentialAnimation {
19SequentialAnimation {
qml/Components/carousel.js → Components/carousel.jsrenamed
The content is the same.
Components/graphics/PageHeaderBaseDivider@18.pngnew file
Binary file not shown.
Components/graphics/PageHeaderBaseDivider@18.scinew file+5
@@ -0,0 +1,5 @@
5+source: PageHeaderBaseDivider@18.png
Components/graphics/icon_star_off@20.pngnew file
Binary file not shown.
Components/graphics/icon_star_on@20.pngnew file
Binary file not shown.
Components/graphics/non-selected@18.pngnew file
Binary file not shown.
qml/Components/graphics/non-selected@18.sci → Components/graphics/non-selected@18.scirenamed
The content is the same.
Dash/Apps/AppInfo.qmlnew file+89
@@ -0,0 +1,89 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../../Components"
23+ property alias icon: image.source
24+ property alias appName: appNameLabel.text
25+ property alias rating: ratingStars.rating
26+ property int rated: 0
27+ property int reviews: 0
37+ sourceSize { width: imageShape.width; height: imageShape.height }
39+ fillMode: Image.PreserveAspectFit
56+ visible: root.rating >= 0
66+ objectName: "ratedLabel"
72+ //TRANSLATORS: Number of persons who rated this app
73+ text: i18n.tr("(%1)").arg(root.rated)
78+ objectName: "reviewsLabel"
84+ //TRANSLATORS: Number of persons who wrote reviews for this app
85+ text: i18n.tr("%1 review", "%1 reviews", root.reviews).arg(root.reviews)
Dash/Apps/AppPreview.qmlnew file+210
@@ -0,0 +1,210 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Ubuntu.Components.ListItems 0.1 as ListItem
20+import Ubuntu.DownloadDaemonListener 0.1
22+import "../../Components"
27+ signal sendUserReview(string review)
29+ title: root.previewData.title
33+ orientation: ListView.Horizontal
40+ model: previewData.infoMap["more-screenshots"] != null ? previewData.infoMap["more-screenshots"].value : [previewData.image]
42+ delegate: UbuntuShape {
46+ bottom: parent.bottom
53+ sourceSize { width: shape.width; height: shape.height }
54+ source: modelData ? modelData : ""
55+ fillMode: Image.PreserveAspectCrop
65+ objectName: "gridButtons"
67+ property int numOfRows: (count + 1) / 2
68+ property int spacing: units.gu(1)
69+ height: Math.max(units.gu(5), units.gu(5)*numOfRows + spacing*(numOfRows - 1))
72+ cellWidth: Math.max(units.gu(9), width / 2)
73+ cellHeight: buttonHeight + spacing
74+ property int buttonWidth: count > 1 ? Math.max(0, width / 2 - spacing) : width
75+ property int buttonHeight: units.gu(5)
78+ width: Math.max(units.gu(4), buttonsGrid.buttonWidth)
79+ height: buttonsGrid.buttonHeight
80+ color: Theme.palette.selected.foreground
81+ text: modelData.displayName
82+ iconSource: modelData.iconHint
83+ iconPosition: "right"
84+ onClicked: root.previewData.execute(modelData.id, { })
90+ id: progressComponent
94+ objectName: "progressBar"
102+ service: "com.canonical.applications.Downloader"
103+ dbusPath: root.previewData.infoMap["progressbar_source"] ? root.previewData.infoMap["progressbar_source"].value : ""
106+ var percentage = parseInt(received * 100 / total);
107+ progressBar.value = percentage;
111+ root.previewData.execute(progressBar.model[0].id, { })
115+ root.previewData.execute(progressBar.model[1].id, { "error": error });
128+ sourceComponent: root.previewData.infoMap["show_progressbar"] ? progressComponent : buttonsComponent
131+ item.model = root.previewData.actions;
136+ spacing: units.gu(1)
139+ objectName: "appInfo"
140+ anchors { left: parent.left; right: parent.right }
142+ appName: root.previewData.title
143+ icon: root.previewData.appIcon
144+ rating: Math.round(root.previewData.rating * 10)
145+ reviews: root.previewData.numRatings
146+ rated: root.previewData.infoMap["rated"] ? root.previewData.infoMap["rated"].value : 0
150+ anchors { left: parent.left; right: parent.right }
151+ text: root.previewData.description
153+ color: Theme.palette.selected.backgroundText
155+ wrapMode: Text.WordWrap
161+ visible: root.previewData.rating >= 0
162+ anchors { left: parent.left; right: parent.right }
163+ spacing: parent.spacing
165+ ListItem.ThinDivider { }
168+ anchors { left: parent.left; right: parent.right }
169+ height: rateLabel.height
178+ text: i18n.tr("Rate this")
180+ anchors.left: parent.left
181+ anchors.verticalCenter: parent.verticalCenter
184+ // FIXME these need to be made interactive and connected to the scope
186+ anchors.right: parent.right
187+ anchors.verticalCenter: parent.verticalCenter
191+ ListItem.ThinDivider { }
195+ objectName: "appReviews"
196+ // TODO: This should make this visible when the feature for reviews/comments is complete.
198+ anchors { left: parent.left; right: parent.right }
200+ model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
202+ onSendReview: root.sendUserReview(review);
205+ root.ensureVisible(appReviews.textArea);
Dash/Apps/AppReviews.qmlnew file+194
@@ -0,0 +1,194 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Ubuntu.Components.ListItems 0.1 as ListItem
20+import "../../Components"
26+ property alias textArea: reviewField
28+ signal sendReview(string review)
37+ PropertyChanges { target: reviewField; width: root.width }
38+ PropertyChanges { target: sendButton; opacity: 0 }
39+ PropertyChanges { target: inverseArea; enabled: false }
43+ PropertyChanges { target: reviewField; width: (root.width - row.spacing - sendButton.width) }
44+ PropertyChanges { target: sendButton; opacity: 1 }
45+ PropertyChanges { target: inverseArea; enabled: true }
53+ SequentialAnimation {
54+ UbuntuNumberAnimation { target: reviewField; properties: "width"; duration: UbuntuAnimation.SlowDuration }
55+ UbuntuNumberAnimation { target: sendButton; properties: "opacity"; duration: UbuntuAnimation.SlowDuration }
61+ SequentialAnimation {
62+ UbuntuNumberAnimation { target: sendButton; properties: "opacity"; duration: UbuntuAnimation.SlowDuration }
63+ UbuntuNumberAnimation { target: reviewField; properties: "width"; duration: UbuntuAnimation.SlowDuration }
74+ text: i18n.tr("Add a review")
82+ // FIXME: needs to react to Qt.inputMethod geometry
85+ objectName: "reviewField"
86+ placeholderText: i18n.tr("Review")
88+ verticalAlignment: Text.AlignVCenter
92+ Behavior on height { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
95+ if(reviewField.focus){
96+ root.state = "editing";
97+ reviewField.selectAll();
102+ // FIXME: not active when in wide mode
105+ anchors.fill: parent
108+ reviewField.focus = false;
116+ objectName: "sendButton"
119+ anchors.bottom: reviewField.bottom
120+ color: Theme.palette.selected.foreground
121+ text: i18n.tr("Send")
125+ root.sendReview(reviewField.text);
126+ reviewField.text = ""
131+ ListItem.ThinDivider {}
139+ text: i18n.tr("Comments:")
143+ objectName: "commentsArea"
147+ anchors { left: parent.left; right: parent.right }
150+ anchors { left: parent.left; right: parent.right }
153+ anchors { left: parent.left; right: parent.right }
158+ wrapMode: Text.WordWrap
164+ spacing: units.gu(1)
168+ rating: modelData[1]
174+ color: Theme.palette.selected.backgroundText
183+ anchors { left: parent.left; right: parent.right }
186+ color: Theme.palette.selected.backgroundText
188+ wrapMode: Text.WordWrap
Dash/Apps/ApplicationsFilterGrid.qmlnew file+55
@@ -0,0 +1,55 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../../Components"
19+import "../../Applications"
25+ minimumHorizontalSpacing: units.gu(0.5)
26+ maximumNumberOfColumns: 6
27+ delegateWidth: units.gu(11)
28+ delegateHeight: units.gu(9.5)
29+ verticalSpacing: units.gu(2)
31+ signal clicked(int index, variant data)
34+ objectName: "delegate" + index
37+ desktopFile: model.dndUri ? stripProtocol(model.dndUri) : model.desktopFile // FIXME: this is temporary
39+ function stripProtocol(uri) {
40+ var chunks = uri.split('file://')
41+ return chunks[chunks.length-1]
45+ property string icon: model.icon ? model.icon : "../../graphics/applicationIcons/" + application.icon + ".png" // FIXME: this is temporary
47+ width: filterGrid.cellWidth
48+ height: filterGrid.cellHeight
49+ text: model.title ? model.title : application.name // FIXME: this is temporary
50+ imageWidth: units.gu(8)
51+ imageHeight: units.gu(7.5)
53+ onClicked: filterGrid.clicked(index, application.desktopFile);
Dash/Apps/AppsAvailableForDownloadModel.qmlnew file+81
@@ -0,0 +1,81 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../../Applications"
22+ uri: "application://evernote.desktop"
23+ icon: "../../graphics/applicationIcons/evernote.png"
25+ mimetype: "application/x-desktop"
28+ dndUri: "file:///usr/share/applications/evernote.desktop"
32+ uri: "application://map.desktop"
33+ icon: "../../graphics/applicationIcons/map.png"
35+ mimetype: "application/x-desktop"
38+ dndUri: "file:///usr/share/applications/map.desktop"
42+ uri: "application://pinterest.desktop"
43+ icon: "../../graphics/applicationIcons/pinterest.png"
45+ mimetype: "application/x-desktop"
48+ dndUri: "file:///usr/share/applications/pinterest.desktop"
52+ uri: "application://soundcloud.desktop"
53+ icon: "../../graphics/applicationIcons/soundcloud.png"
55+ mimetype: "application/x-desktop"
58+ dndUri: "file:///usr/share/applications/soundcloud.desktop"
62+ uri: "application://wikipedia.desktop"
63+ icon: "../../graphics/applicationIcons/wikipedia.png"
65+ mimetype: "application/x-desktop"
68+ dndUri: "file:///usr/share/applications/wikipedia.desktop"
72+ uri: "application://youtube.desktop"
73+ icon: "../../graphics/applicationIcons/youtube.png"
75+ mimetype: "application/x-desktop"
78+ dndUri: "file:///usr/share/applications/youtube.desktop"
Dash/Apps/CloseIcon.qmlnew file+62
@@ -0,0 +1,62 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24+ anchors.centerIn: parent
25+ source: "graphics/close_btn.png"
27+ state: (root.enabled) ? "shown" : "hidden"
52+ properties: "width, height"; duration: 300
53+ easing { type: Easing.OutBack; overshoot: 5 }
58+ NumberAnimation { properties: "width, height"; duration: 250; }
Dash/Apps/FrequentlyUsedAppsModel.qmlnew file+110
@@ -0,0 +1,110 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21+ uri: "application:///usr/share/applications/dialer-app.desktop"
22+ icon: "../../graphics/applicationIcons/phone-app.png"
24+ mimetype: "application/x-desktop"
27+ dndUri: "file:///usr/share/applications/dialer-app.desktop"
31+ uri: "application:///usr/share/applications/messaging-app.desktop"
32+ icon: "../../graphics/applicationIcons/messages-app.png"
34+ mimetype: "application/x-desktop"
37+ dndUri: "file:///usr/share/applications/messaging-app.desktop"
41+ uri: "application:///usr/share/applications/address-book-app.desktop"
42+ icon: "../../graphics/applicationIcons/contacts-app.png"
44+ mimetype: "application/x-desktop"
47+ dndUri: "file:///usr/share/applications/address-book-app.desktop"
51+ uri: "application:///usr/share/applications/camera-app.desktop"
52+ icon: "../../graphics/applicationIcons/camera.png"
54+ mimetype: "application/x-desktop"
57+ dndUri: "file:///usr/share/applications/camera-app.desktop"
61+ uri: "application:///usr/share/applications/gallery-app.desktop"
62+ icon: "../../graphics/applicationIcons/gallery.png"
64+ mimetype: "application/x-desktop"
67+ dndUri: "file:///usr/share/applications/gallery.desktop"
71+ uri: "application:///usr/share/applications/facebook-webapp.desktop"
72+ icon: "../../graphics/applicationIcons/facebook.png"
74+ mimetype: "application/x-desktop"
77+ dndUri: "file:///usr/share/applications/facebook-webapp.desktop"
81+ uri: "application:///usr/share/applications/webbrowser-app.desktop"
82+ icon: "../../graphics/applicationIcons/browser.png"
84+ mimetype: "application/x-desktop"
87+ dndUri: "file:///usr/share/applications/webbrowser-app.desktop"
91+ uri: "application:///usr/share/applications/gmail-webapp.desktop"
92+ icon: "../../graphics/applicationIcons/gmail.png"
94+ mimetype: "application/x-desktop"
97+ dndUri: "file:///usr/share/applications/gmail-webapp.desktop"
101+ uri: "application:///usr/share/applications/ubuntu-system-settings.desktop"
102+ icon: "../../graphics/applicationIcons/system-settings.png"
104+ mimetype: "application/x-desktop"
105+ title: "System Settings"
107+ dndUri: "file:///usr/share/applications/ubuntu-system-settings.desktop"
Dash/Apps/RunningApplicationTile.qmlnew file+137
@@ -0,0 +1,137 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Unity.Application 0.1
20+import "../../Components/"
21+import "../../Components/ListItems"
25+ property var application
26+ property bool __sideStageEnabled: shell.applicationManager.sideStageEnabled
28+ signal requestedApplicationActivation(var application)
29+ signal requestedApplicationTermination(var application)
30+ signal requestedActivationMode()
31+ signal requestedTerminationMode()
33+ // Was: childrenRect.height
34+ // To avoid "binding loop" warning
35+ height: shapedApplicationImage.height + labelContainer.height
37+ width: shapedApplicationImage.width
39+ property bool terminationModeEnabled: false
42+ if (terminationModeEnabled)
43+ requestedApplicationTermination(application)
45+ requestedApplicationActivation(application)
49+ if (terminationModeEnabled) {
50+ requestedActivationMode()
52+ requestedTerminationMode()
56+ function updateScreenshotFromCache() {
57+ applicationImage.updateFromCache();
60+ // FIXME: should use UbuntuShape from SDK
62+ id: shapedApplicationImage
65+ horizontalCenter: parent.horizontalCenter
68+ // FIXME: width and height should be defined according to the
69+ // application window's aspect ratio.
70+ width: (application.stage === ApplicationInfo.MainStage && __sideStageEnabled) ?
71+ units.gu(22) : units.gu(11)
72+ height: (__sideStageEnabled) ? units.gu(22) : units.gu(19)
74+ image: applicationImage
79+ source: ApplicationManager.findApplication((application) ? application.appId : "")
80+ width: shapedApplicationImage.width
81+ height: shapedApplicationImage.height
87+ anchors.fill: shapedApplicationImage
89+ borderSource: "radius_pressed.sci"
90+ opacity: root.pressed ? 1.0 : 0.0
91+ Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
94+ // FIXME: label code duplicated with Tile
100+ top: shapedApplicationImage.bottom
107+ baseline: parent.bottom
110+ leftMargin: units.gu(1)
111+ rightMargin: units.gu(1)
113+ text: (application) ? application.name : ""
115+ color: Theme.palette.selected.backgroundText
120+ elide: Text.ElideMiddle
121+ horizontalAlignment: Text.AlignHCenter
127+ right: shapedApplicationImage.right
128+ rightMargin: -units.gu(1)
130+ topMargin: -units.gu(1)
135+ enabled: root.terminationModeEnabled
Dash/Apps/RunningApplicationsGrid.qmlnew file+84
@@ -0,0 +1,84 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../../Components"
24+ signal updateScreenshots
28+ onDashShownChanged: if (shell.dashShown && shell.stageScreenshotsReady) updateScreenshots();
29+ onStageScreenshotsReadyChanged: if (shell.dashShown && shell.stageScreenshotsReady) updateScreenshots();
32+ Behavior on height { NumberAnimation { duration: 200; easing.type: Easing.InOutQuad } }
34+ property bool canEnableTerminationMode: true
36+ onCanEnableTerminationModeChanged: {
37+ if (!canEnableTerminationMode)
38+ terminationModeEnabled = false
41+ // when false, it means it's on activation mode
42+ property bool terminationModeEnabled: false
44+ maximumNumberOfColumns: 10
45+ minimumHorizontalSpacing: units.gu(2)
46+ referenceDelegateWidth: units.gu(11)
47+ verticalSpacing: units.gu(2)
50+ width: runningAppTile.width + root.horizontalSpacing
51+ height: runningAppTile.height + root.verticalSpacing
53+ RunningApplicationTile {
55+ objectName: "runningAppTile " + model.name
58+ horizontalCenter: parent.horizontalCenter
61+ onRequestedActivationMode: { root.terminationModeEnabled = false }
62+ onRequestedTerminationMode: {
63+ if (canEnableTerminationMode)
64+ root.terminationModeEnabled = true
66+ onRequestedApplicationTermination: {
67+ shell.applicationManager.stopApplication(model.appId)
69+ onRequestedApplicationActivation: {
70+ shell.activateApplication(model.appId)
73+ terminationModeEnabled: root.terminationModeEnabled
75+ Component.onCompleted: {
76+ root.updateScreenshots.connect(updateScreenshotFromCache);
82+ NumberAnimation { properties: "x,y"; duration: 400; easing.type: Easing.OutCubic }
Dash/Apps/graphics/close_btn@9.pngnew file
Binary file not shown.
@@ -0,0 +1,90 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
21+import "../Components"
26+ property alias contentProgress: dashContent.contentProgress
27+ property string showScopeOnLoaded: "home.scope"
28+ property real contentScale: 1.0
30+ function setCurrentScope(scopeId, animate, reset) {
31+ var scopeIndex = filteredScopes.findFirst(Scopes.RoleId, scopeId)
33+ if (scopeIndex == -1) {
34+ console.warn("No match for scope with id: %1".arg(scopeId))
38+ if (scopeIndex == dashContent.currentIndex && !reset) {
39+ // the scope is already the current one
43+ dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset)
46+ SortFilterProxyModel {
51+ dynamicSortFilter: true
53+ filterRole: Scopes.RoleVisible
54+ filterRegExp: RegExp("^true$")
59+ objectName: "dashContent"
61+ model: filteredScopes
63+ onMovementStarted: dashbar.startNavigation()
64+ onMovementEnded: dashbar.stopNavigation()
65+ onContentFlickStarted: dashbar.finishNavigation()
66+ onContentEndReached: dashbar.finishNavigation()
67+ onPreviewShown: dashbar.finishNavigation()
69+ if (scopeId == dash.showScopeOnLoaded) {
70+ dash.setCurrentScope(scopeId, false, false)
71+ dash.showScopeOnLoaded = ""
74+ scale: dash.contentScale
80+ objectName: "dashbar"
81+ anchors.bottom: parent.bottom
82+ anchors.left: parent.left
83+ anchors.right: parent.right
84+ model: filteredScopes
85+ currentIndex: dashContent.currentIndex
86+ onItemSelected: dashContent.setCurrentScopeAtIndex(index, true, false)
87+ opacity: dash.contentScale == 1.0 ? 1.0 : 0.0
88+ Behavior on opacity { NumberAnimation { easing.type: Easing.OutQuad; duration: 150 } }
Dash/DashApps.qmlnew file+55
@@ -0,0 +1,55 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
20+import "../Components"
21+import "../Components/ListItems"
22+import "../Applications"
28+ // FIXME: a way to aggregate these models would be ideal
29+ property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
30+ property var sideStageApplicationModel: shell.applicationManager.sideStageApplications
33+ id: dummyVisibilityModifier
35+ ListElement { name: "running-apps" }
38+ SortFilterProxyModel {
39+ id: runningApplicationsModel
41+ property var firstModel: mainStageApplicationsModel
42+ property var secondModel: sideStageApplicationModel
43+ property bool canEnableTerminationMode: scopeView.isCurrent
45+ model: dummyVisibilityModifier
47+ filterRegExp: invertMatch ? ((mainStageApplicationsModel.count === 0 &&
48+ sideStageApplicationModel.count === 0) ? RegExp("running-apps") : RegExp("")) : RegExp("disabled")
49+ invertMatch: scopeView.scope.searchQuery.length == 0
53+ scopeView.scope.categories.overrideResults("recent", runningApplicationsModel);
Dash/DashBar.qmlnew file+128
@@ -0,0 +1,128 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
25+ property alias currentIndex: row.currentIndex
27+ property int lineHeight: units.dp(2)
28+ property int itemSize: units.gu(7)
29+ property int iconSize: units.gu(3.5)
31+ signal itemSelected(int index)
36+ function startNavigation() {
41+ function stopNavigation() {
45+ function finishNavigation() {
54+ onTriggered: finishNavigation()
62+ locked: true // TODO: remove this when lp bug #1179569 will be fixed
72+ orientation: ListView.Horizontal
73+ width: Math.min(Math.max(dashBar.width/2, units.gu(40)), count * itemSize)
74+ height: parent.height
75+ anchors.horizontalCenter: parent.horizontalCenter
76+ onMovingChanged: if (moving) { timeout.stop() } else { timeout.restart() }
77+ interactive: visibleArea.widthRatio < 1 && panel.opened
78+ highlightFollowsCurrentItem: false
80+ onCurrentItemChanged: {
81+ highlightLine.width = currentItem.width
82+ highlightLine.x = x + currentItem.x
86+ // FIXME: Use Panel's integrated trigger() once that works again.
89+ height: dashBar.height
90+ anchors.top: parent.top
93+ dashBar.itemSelected(index)
98+ anchors.centerIn: parent
99+ source: scope.iconHint
100+ sourceSize { width: iconSize; height: iconSize }
101+ // opacity: index == currentIndex ? 1 : 1 // same opacity for now
112+ bottom: parent.bottom
114+ height: dashBar.lineHeight
119+ color: Theme.palette.selected.foreground
120+ height: parent.height
121+ anchors.bottom: parent.bottom
124+ Behavior on x {NumberAnimation { duration: 150; easing.type: Easing.OutCubic}}
125+ Behavior on width {NumberAnimation { duration: 150; easing.type: Easing.OutCubic}}
Dash/DashContent.qmlnew file+148
@@ -0,0 +1,148 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
24+ property var model: null
25+ property var scopes: null
26+ property real contentProgress: Math.max(0, Math.min(dashContentList.contentX / (dashContentList.contentWidth - dashContentList.width), units.dp(1)))
27+ property alias currentIndex: dashContentList.currentIndex
29+ property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
31+ signal movementStarted()
32+ signal movementEnded()
33+ signal contentFlickStarted()
34+ signal contentEndReached()
35+ signal previewShown()
36+ signal scopeLoaded(string scopeId)
37+ signal positionedAtBeginning()
39+ // If we set the current scope index before the scopes have been added,
40+ // then we need to wait until the loaded signals gets emitted from the scopes
41+ property var set_current_index: undefined
45+ if (scopes.loaded && set_current_index != undefined) {
46+ setCurrentScopeAtIndex(set_current_index[0], set_current_index[1], set_current_index[2]);
47+ set_current_index = undefined;
52+ function setCurrentScopeAtIndex(index, animate, reset) {
53+ var storedMoveDuration = dashContentList.highlightMoveDuration
54+ var storedMoveSpeed = dashContentList.highlightMoveVelocity
56+ dashContentList.highlightMoveVelocity = units.gu(4167)
57+ dashContentList.highlightMoveDuration = 0
60+ // if the scopes haven't loaded yet, then wait until they are.
61+ if (!scopes.loaded) {
62+ set_current_index = [ index, animate, reset ]
65+ set_current_index = undefined;
67+ if (dashContentList.count > index)
69+ dashContentList.currentIndex = index
72+ dashContent.positionedAtBeginning()
77+ dashContentList.highlightMoveDuration = storedMoveDuration
78+ dashContentList.highlightMoveVelocity = storedMoveSpeed
84+ objectName: "dashContentList"
86+ interactive: dashContent.scopes.loaded
89+ model: dashContent.model
90+ orientation: ListView.Horizontal
91+ boundsBehavior: Flickable.DragAndOvershootBounds
92+ flickDeceleration: units.gu(625)
93+ maximumFlickVelocity: width * 5
94+ snapMode: ListView.SnapOneItem
95+ highlightMoveDuration: 250
96+ highlightRangeMode: ListView.StrictlyEnforceRange
97+ /* FIXME: workaround rendering issue due to use of ShaderEffectSource in
98+ UbuntuShape. While switching from the home scope to the People scope the
99+ rendering would block midway.
101+ cacheBuffer: 2147483647
102+ onMovementStarted: dashContent.movementStarted()
103+ onMovementEnded: dashContent.movementEnded()
105+ // If the number of items is less than the current index, then need to reset to another item.
107+ if (currentIndex >= count)
108+ dashContent.setCurrentScopeAtIndex(count-1, true, true)
113+ width: ListView.view.width
114+ height: ListView.view.height
116+ source: scopeMapper.map(scope.id)
118+ // these are needed for autopilot tests
119+ readonly property string scopeId: scope.id
120+ readonly property bool isCurrent: ListView.isCurrentItem
121+ readonly property bool isLoaded: status == Loader.Ready
124+ item.scope = Qt.binding(function() { return scope })
125+ item.isCurrent = Qt.binding(function() { return ListView.isCurrentItem })
126+ item.searchHistory = Qt.binding(function() { return shell.searchHistory })
127+ dashContentList.movementStarted.connect(item.movementStarted)
128+ dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
129+ dashContent.scopeLoaded(item.scope.id)
133+ ignoreUnknownSignals: true
134+ onEndReached: contentEndReached()
135+ onPreviewShownChanged: {
136+ if (item.previewShown) {
138+ dashContentList.interactive = false
140+ dashContentList.interactive = true
145+ Component.onDestruction: active = false
Dash/DashHome.qmlnew file+39
@@ -0,0 +1,39 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
20+import "../Components"
21+import "../Components/ListItems"
26+ objectName: "DashHome"
28+ SearchableResultModel {
31+ model: FrequentlyUsedAppsModel {}
33+ searchQuery: root.scope.searchQuery
37+ root.scope.categories.overrideResults("applications.scope", appsModel);
Dash/DashMusic.qmlnew file+96
@@ -0,0 +1,96 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
20+import "../Components/ListItems" as ListItems
26+ property var categoryNames: [
29+ i18n.tr("New Releases"),
30+ i18n.tr("Top Charting")
33+ onIsCurrentChanged: {
34+ pageHeader.resetSearch();
37+ onMovementStarted: categoryView.showHeader()
40+ target: scopeView.scope
41+ property: "searchQuery"
42+ value: pageHeader.searchQuery
47+ onSearchClicked: if (isCurrent) {
48+ pageHeader.triggerSearch()
49+ categoryView.showHeader()
53+ function getRenderer(categoryId) {
54+ switch (categoryId) {
55+ case "featured": return "Music/MusicCarousel.qml"
56+ default: return "Music/MusicFilterGrid.qml"
63+ model: scopeView.categories
65+ onAtYEndChanged: if (atYEnd) endReached()
66+ onMovingChanged: if (moving && atYEnd) endReached()
68+ delegate: ListItems.Base {
70+ highlightWhenPressed: false
72+ property string categoryId: model.categoryId
75+ anchors { top: parent.top; left: parent.left; right: parent.right }
76+ source: scopeView.getRenderer(base.categoryId)
83+ sectionProperty: "name"
84+ sectionDelegate: ListItems.Header {
85+ width: categoryView.width
86+ text: i18n.tr(section)
88+ pageHeader: PageHeader {
90+ width: categoryView.width
91+ text: i18n.tr("Music")
92+ searchEntryEnabled: true
93+ searchHistory: scopeView.searchHistory
Dash/DashPreview.qmlnew file+201
@@ -0,0 +1,201 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
23+ property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
24+ property var previewData
26+ property string title: ""
27+ property real previewWidthRatio: 0.5
29+ property Component header
30+ property Component buttons
31+ property Component body
33+ readonly property bool narrowMode: width <= height
34+ readonly property int contentSpacing: units.gu(3)
37+ signal previewImageClicked()
39+ color: Qt.rgba(0, 0, 0, .3)
42+ function ensureVisible(item) {
43+ var o = leftFlickable.mapFromItem(item, 0, 0, item.width, item.height);
44+ var keyboardY = shell.height - root.keyboardSize;
45+ if ((o.y + o.height) > keyboardY) {
46+ leftFlickable.contentY += o.y + o.height - keyboardY;
51+ target: shell.applicationManager
52+ onMainStageFocusedApplicationChanged: {
55+ onSideStageFocusedApplicationChanged: {
71+ margins: root.contentSpacing
77+ leftMargin: -root.contentSpacing
78+ rightMargin: -root.contentSpacing
79+ topMargin: -root.contentSpacing
82+ onClicked: root.close();
89+ rightMargin: closePreviewImage.width + spacing
92+ property int spacing: units.gu(2)
96+ objectName: "titleLabel"
102+ elide: Text.ElideRight
104+ font.weight: Font.Light
105+ color: Theme.palette.selected.backgroundText
112+ id: closePreviewImage
113+ source: "graphics/tablet/icon_close_preview.png"
115+ height: units.gu(1.5)
117+ bottom: title.bottom
118+ bottomMargin: units.dp(7)
120+ leftMargin: title.paintedWidth + labelItem.spacing
131+ top: headerRow.bottom
132+ bottom: parent.bottom
133+ margins: root.contentSpacing
136+ spacing: units.gu(2)
140+ objectName: "leftFlickable"
141+ anchors.top: parent.top
142+ anchors.bottom: parent.bottom
143+ width: root.narrowMode ? contentRow.width : contentRow.width * root.previewWidthRatio
144+ contentHeight: leftColumn.height
145+ anchors.bottomMargin: root.keyboardSize
148+ Behavior on contentY { NumberAnimation { duration: 300 } }
152+ objectName: "leftColumn"
157+ height: childrenRect.height
158+ spacing: units.gu(1)
162+ anchors.left: parent.left
163+ anchors.right: parent.right
164+ sourceComponent: root.header
168+ anchors.left: parent.left
169+ anchors.right: parent.right
170+ sourceComponent: root.buttons
177+ anchors.top: parent.top
178+ anchors.bottom: parent.bottom
179+ width: narrowMode ? 0 : (contentRow.width - leftColumn.width - contentRow.spacing)
180+ contentHeight: rightColumn.height
185+ objectName: "rightColumn"
186+ height: childrenRect.height
196+ parent: root.narrowMode ? leftColumn : rightColumn
197+ anchors.left: parent.left
198+ anchors.right: parent.right
199+ sourceComponent: root.body
Dash/DashVideos.qmlnew file+201
@@ -0,0 +1,201 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
20+import "../Components/ListItems" as ListItems
25+ property alias previewShown: previewLoader.onScreen
27+ property var categoryNames: [
30+ i18n.tr("New Releases"),
31+ i18n.tr("Popular Online")
34+ onIsCurrentChanged: {
35+ pageHeader.resetSearch();
38+ onMovementStarted: categoryView.showHeader()
41+ target: scopeView.scope
42+ property: "searchQuery"
43+ value: pageHeader.searchQuery
48+ onSearchClicked: if (isCurrent) {
49+ pageHeader.triggerSearch()
50+ categoryView.showHeader()
54+ function getRenderer(categoryId) {
55+ switch (categoryId) {
56+ case "featured": return "Video/VideosCarousel.qml"
57+ default: return "Video/VideosFilterGrid.qml"
65+ bottomMargin: -bottomOverflow
67+ sourceItem: categoryView
71+ topGapPx: (1 - gap) * positionPx
72+ topOpacity: Math.max(0, (1 - gap * 1.2))
73+ bottomGapPx: positionPx + gap * (targetBottomGapPx - positionPx)
74+ bottomOverflow: units.gu(6)
75+ bottomOpacity: 1 - (gap * 0.8)
77+ property int targetBottomGapPx: height - units.gu(8) - bottomOverflow
78+ property real gap: previewLoader.open ? 1.0 : 0.0
83+ easing.type: Easing.InOutQuad
85+ if (!previewLoader.open && !running) {
86+ previewLoader.onScreen = false;
96+ model: scopeView.categories
97+ forceNoClip: previewLoader.onScreen
99+ onAtYEndChanged: if (atYEnd) endReached()
100+ onMovingChanged: if (moving && atYEnd) endReached()
102+ delegate: ListItems.Base {
104+ highlightWhenPressed: false
105+ property string categoryId: model.categoryId
109+ anchors { top: parent.top; left: parent.left; right: parent.right }
110+ source: scopeView.getRenderer(base.categoryId)
112+ item.model = results
119+ // VideosCarousel and VideosFilterGrid have different
120+ // clicked signals, accomodate for that
121+ if (categoryId == "featured") {
122+ var fileUri = delegateItem.model.uri.replace(/^[^:]+:/, "")
123+ dataItem = {fileUri: fileUri, nfoUri: delegateItem.model.comment}
127+ if (dataItem.nfoUri != "") {
128+ previewLoader.videoData = dataItem;
129+ previewLoader.open = true;
130+ effect.positionPx = mapToItem(categoryView, 0, itemY).y;
137+ sectionProperty: "name"
138+ sectionDelegate: ListItems.Header {
139+ width: categoryView.width
140+ text: i18n.tr(section)
143+ pageHeader: PageHeader {
145+ width: categoryView.width
146+ text: i18n.tr("Videos")
147+ searchEntryEnabled: true
148+ searchHistory: scopeView.searchHistory
154+ height: effect.bottomGapPx - effect.topGapPx
157+ topMargin: effect.topGapPx
161+ sourceComponent: onScreen ? previewComponent : undefined
163+ property bool open: false
164+ property bool onScreen: false
165+ property var videoData
175+ item.item = videoData;
180+ id: previewComponent
184+ anchors.fill: parent
185+ onClose: open = false;
189+ // TODO: Move as InverseMouseArea to DashPreview
191+ enabled: previewLoader.onScreen
194+ topMargin: effect.bottomGapPx
197+ previewLoader.open = false;
Dash/Generic/GenericCarousel.qmlnew file+57
@@ -0,0 +1,57 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../../Components"
24+ tileAspectRatio: 198 / 288
25+ minimumTileWidth: units.gu(13)
26+ itemComponent: carouselDelegateGeneric
27+ selectedItemScaleFactor: 1.14
28+ cacheBuffer: 1404 // 18px * 13gu * 6
29+ height: implicitHeight + units.gu(6)
32+ id: carouselDelegateGeneric
34+ BaseCarouselDelegate {
43+ sourceSize { width: item.width; height: item.height }
44+ source: model ? model.icon : ""
49+ anchors.centerIn: parent
51+ source: "../../Components/graphics/non-selected.sci"
52+ width: parent.width + units.gu(1.5)
53+ height: parent.height + units.gu(1.5)
Dash/Generic/GenericFilterGrid.qmlnew file+57
@@ -0,0 +1,57 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../../Components"
23+ minimumHorizontalSpacing: units.gu(0.5)
24+ delegateWidth: units.gu(11)
25+ delegateHeight: units.gu(9.5)
26+ verticalSpacing: units.gu(2)
28+ property int iconWidth: units.gu(8)
29+ property int iconHeight: units.gu(7.5)
31+ signal clicked(int index, var delegateItem, real itemY)
32+ signal pressAndHold(int index, var delegateItem, real itemY)
36+ objectName: "delegate" + index
37+ width: filtergrid.cellWidth
38+ height: filtergrid.cellHeight
40+ imageWidth: filtergrid.iconWidth
41+ imageHeight: filtergrid.iconHeight
45+ fillMode: Image.PreserveAspectCrop
48+ var data = { model: model }
49+ filtergrid.clicked(index, data, tile.y)
53+ var data = { model: model }
54+ filtergrid.pressAndHold(index, data, tile.y)
tests/mocks/Ubuntu/SystemSettings/Update/MockSystemImage.qml → Dash/Generic/GenericFilterGridPotrait.qmlrenamed+10−10
@@ -1,5 +1,5 @@
2− * Copyright (C) 2019 The UBports Foundation
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,17 +14,17 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import QtQuick 2.0
17import QtQuick 2.0
18+import "../../Components"
20−Item {
20+GenericFilterGrid {
21− id: root
21+ id: filtergrid
23− property int targetBuildNumber: 0
23+ minimumHorizontalSpacing: units.gu(0.5)
24− property bool checkingForUpdates: false
24+ delegateWidth: units.gu(11)
25− property bool updateAvailable: false
25+ delegateHeight: units.gu(18)
26+ verticalSpacing: units.gu(2)
27− signal updateDownloaded()
28+ iconWidth: (width / columns) * 0.8
28− signal applyUpdate()
29+ iconHeight: iconWidth * 16 / 11
29− signal checkForUpdate()
Dash/Generic/GenericPreview.qmlnew file+105
@@ -0,0 +1,105 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../../Components"
20+import "../../Components/ListItems" as ListItems
26+ title: previewData.title
27+ previewWidthRatio: 0.6
29+ property url url: previewData.image
31+ header: UbuntuShape {
33+ anchors.left: parent.left
34+ anchors.right: parent.right
35+ height: width * previewImage.sourceSize.height / previewImage.sourceSize.width
40+ source: genericPreview.url
41+ fillMode: Image.PreserveAspectCrop
47+ model: genericPreview.previewData.actions
49+ property int numOfRows: (count + 1) / 2
50+ property int spacing: units.gu(1)
51+ height: Math.max(units.gu(4), units.gu(4)*numOfRows + spacing*(numOfRows - 1))
53+ cellWidth: Math.max(units.gu(9), width / 2)
54+ cellHeight: buttonHeight + spacing
55+ property int buttonWidth: Math.max(0, width / 2 - spacing)
56+ property int buttonHeight: units.gu(4)
59+ width: Math.max(units.gu(4), buttons.buttonWidth)
60+ height: buttons.buttonHeight
62+ text: modelData.displayName
63+ iconSource: modelData.iconHint
64+ iconPosition: "right"
67+ genericPreview.previewData.execute(modelData.id, { })
76+ anchors { left: parent.left; right: parent.right }
81+ text: previewData.subtitle.replace(/[\r\n]+/g, "<br />")
84+ wrapMode: Text.WordWrap
85+ textFormat: Text.RichText
86+ // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
87+ onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
91+ anchors { left: parent.left; right: parent.right }
96+ text: previewData.description.replace(/[\r\n]+/g, "<br />")
99+ wrapMode: Text.WordWrap
100+ textFormat: Text.RichText
101+ // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
102+ onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
Dash/GenericScopeView.qmlnew file+302
@@ -0,0 +1,302 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
20+import "../Components/ListItems" as ListItems
24+ readonly property alias previewShown: previewLoader.onScreen
26+ onIsCurrentChanged: {
27+ pageHeader.resetSearch();
28+ previewLoader.open = false;
31+ onMovementStarted: categoryView.showHeader()
34+ target: scopeView.scope
35+ property: "searchQuery"
36+ value: pageHeader.searchQuery
41+ property: "searchQuery"
42+ value: scopeView.scope.searchQuery
47+ onSearchClicked: if (isCurrent) {
48+ pageHeader.triggerSearch()
49+ categoryView.showHeader()
54+ target: scopeView.scope
55+ onShowDash: previewLoader.open = false;
56+ onHideDash: previewLoader.open = false;
62+ model: scopeView.categories
63+ forceNoClip: previewLoader.onScreen
65+ onAtYEndChanged: if (atYEnd) endReached()
66+ onMovingChanged: if (moving && atYEnd) endReached()
68+ property string expandedCategoryId: ""
70+ delegate: ListItems.Base {
71+ highlightWhenPressed: false
73+ readonly property bool expandable: rendererLoader.item ? rendererLoader.item.expandable : false
74+ readonly property bool filtered: rendererLoader.item ? rendererLoader.item.filter : true
75+ readonly property string category: categoryId
85+ source: getRenderer(model.renderer, model.contentType)
88+ if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
89+ // TODO: the running apps grid doesn't support standard scope results model yet
90+ item.firstModel = Qt.binding(function() { return results.firstModel })
91+ item.secondModel = Qt.binding(function() { return results.secondModel })
93+ item.model = Qt.binding(function() { return results })
95+ item.objectName = Qt.binding(function() { return categoryId })
96+ if (item.expandable) {
97+ var shouldFilter = categoryId != categoryView.expandedCategoryId;
98+ if (shouldFilter != item.filter) {
99+ item.filter = shouldFilter;
105+ target: rendererLoader.item
107+ effect.positionPx = mapToItem(categoryView, 0, itemY).y
108+ scopeView.scope.activate(delegateItem.model.uri,
109+ delegateItem.model.icon,
110+ delegateItem.model.category,
112+ delegateItem.model.mimetype,
113+ delegateItem.model.title,
114+ delegateItem.model.comment,
115+ delegateItem.model.dndUri,
116+ delegateItem.model.metadata)
119+ effect.positionPx = mapToItem(categoryView, 0, itemY).y
120+ scopeView.scope.preview( delegateItem.model.uri,
121+ delegateItem.model.icon,
122+ delegateItem.model.category,
124+ delegateItem.model.mimetype,
125+ delegateItem.model.title,
126+ delegateItem.model.comment,
127+ delegateItem.model.dndUri,
128+ delegateItem.model.metadata)
132+ target: categoryView
133+ onExpandedCategoryIdChanged: {
134+ var item = rendererLoader.item;
135+ if (item.expandable) {
136+ var shouldFilter = categoryId != categoryView.expandedCategoryId;
137+ if (shouldFilter != item.filter) {
138+ // If the filter animation will be seen start it, otherwise, just flip the switch
139+ var shrinkingVisible = shouldFilter && y + item.collapsedHeight < categoryView.height;
140+ var growingVisible = !shouldFilter && y + height < categoryView.height;
141+ if (shrinkingVisible || growingVisible) {
142+ item.startFilterAnimation(shouldFilter)
144+ item.filter = shouldFilter;
146+ if (!shouldFilter) {
147+ categoryView.maximizeVisibleArea(index, item.uncollapsedHeight);
156+ sectionProperty: "name"
157+ sectionDelegate: ListItems.Header {
158+ property var delegate: categoryView.item(delegateIndex)
159+ width: categoryView.width
162+ if (delegate && delegate.expandable)
163+ return delegate.filtered ? "graphics/header_handlearrow.png" : "graphics/header_handlearrow2.png"
167+ if (categoryView.expandedCategoryId != delegate.category)
168+ categoryView.expandedCategoryId = delegate.category;
170+ categoryView.expandedCategoryId = "";
173+ pageHeader: PageHeader {
175+ objectName: "pageHeader"
176+ width: categoryView.width
177+ text: scopeView.scope.name
178+ searchEntryEnabled: true
182+ function getDefaultRendererId(contentType) {
183+ switch (contentType) {
184+ default: return "grid";
188+ function getRenderer(rendererId, contentType) {
189+ if (rendererId == "default") {
190+ rendererId = getDefaultRendererId(contentType);
192+ switch (rendererId) {
194+ switch (contentType) {
195+ case "video": return "Generic/GenericFilterGridPotrait.qml";
196+ case "music": return "Music/MusicFilterGrid.qml";
197+ default: return "Generic/GenericFilterGrid.qml";
200+ case "carousel": return "Generic/GenericCarousel.qml";
202+ switch (contentType) {
203+ case "apps": return "Apps/RunningApplicationsGrid.qml";
204+ default: return "Generic/GenericFilterGrid.qml";
207+ default: return "Generic/GenericFilterGrid.qml";
215+ bottomMargin: -bottomOverflow
217+ sourceItem: categoryView
221+ topGapPx: (1 - gap) * positionPx
222+ topOpacity: (1 - gap * 1.2)
223+ bottomGapPx: positionPx + gap * (targetBottomGapPx - positionPx)
224+ bottomOverflow: units.gu(20)
225+ bottomOpacity: 1 - (gap * 0.8)
227+ property int targetBottomGapPx: height - units.gu(8) - bottomOverflow
228+ property real gap: previewLoader.open ? 1.0 : 0.0
233+ easing.type: Easing.InOutQuad
235+ if (!previewLoader.open && !running) {
236+ previewLoader.onScreen = false
244+ target: scopeView.scope
246+ previewLoader.previewData = preview
247+ previewLoader.open = true
251+ PreviewDelegateMapper {
252+ id: previewDelegateMapper
256+ ignoreUnknownSignals: true
257+ target: previewLoader.valid ? previewLoader.item : null
259+ previewLoader.open = false
264+ objectName: "previewLoader"
266+ property var previewData
267+ height: effect.bottomGapPx - effect.topGapPx
270+ topMargin: effect.topGapPx
274+ source: onScreen ? previewDelegateMapper.map(previewLoader.previewData.rendererName) : ""
276+ property bool open: false
277+ property bool onScreen: false
278+ property bool valid: item !== null
287+ item.previewData = Qt.binding(function() { return previewLoader.previewData })
291+ // TODO: Move as InverseMouseArea to DashPreview
293+ enabled: previewLoader.onScreen
296+ topMargin: effect.bottomGapPx
299+ previewLoader.open = false;
Dash/Music/AlbumTile.qmlnew file+116
@@ -0,0 +1,116 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
23+ property alias album: albumLabel.text
24+ property alias artist: artistLabel.text
25+ property alias iconWidth: icon.width
26+ property alias iconHeight: icon.height
32+ horizontalCenter: parent.horizontalCenter
37+ sourceSize { width: icon.width; height: icon.height }
48+ borderSource: "radius_pressed.sci"
49+ opacity: root.pressed ? 1.0 : 0.0
50+ Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
65+ baseline: parent.bottom
68+ leftMargin: units.gu(1)
69+ rightMargin: units.gu(1)
72+ color: Theme.palette.selected.backgroundText
77+ elide: Text.ElideMiddle
78+ horizontalAlignment: Text.AlignHCenter
86+ top: artistContainer.bottom
88+ height: units.gu(1.5)
93+ baseline: parent.bottom
96+ leftMargin: units.gu(1)
97+ rightMargin: units.gu(1)
100+ color: Theme.palette.selected.backgroundText
105+ font.weight: Font.Light
106+ elide: Text.ElideMiddle
107+ horizontalAlignment: Text.AlignHCenter
111+ GridView.onRemove: SequentialAnimation {
112+ PropertyAction { target: root; property: "GridView.delayRemove"; value: true }
113+ NumberAnimation { target: root; property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.InOutQuad }
114+ PropertyAction { target: root; property: "GridView.delayRemove"; value: false }
qml/Greeter/LoginAreaContainer.qml → Dash/Music/CarouselDelegateMusic.qmlrenamed+21−17
@@ -1,5 +1,5 @@
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,25 +14,29 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
19+import "../../Components"
20−Item {
21+BaseCarouselDelegate {
21− BorderImage {
22+ id: item
24− topMargin: -units.gu(3)
25− leftMargin: -units.gu(1.5)
26− rightMargin: -units.gu(1.5)
27− bottomMargin: -units.gu(1.5)
29− source: "../graphics/dropshadow2gu.sci"
33 UbuntuShape {
24 UbuntuShape {
34 anchors.fill: parent
25 anchors.fill: parent
35− aspect: UbuntuShape.Flat
26+ radius: "medium"
36− backgroundColor: "transparent"
27+ borderSource: ""
30+ sourceSize { width: item.width; height: item.height }
31+ source: model ? model.icon : ""
36+ anchors.centerIn: parent
38+ source: "../../Components/graphics/non-selected.sci"
39+ width: parent.width + units.gu(1.5)
40+ height: parent.height + units.gu(1.5)
Dash/Music/MusicCarousel.qmlnew file+34
@@ -0,0 +1,34 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../../Components"
23+ minimumTileWidth: units.gu(13)
24+ itemComponent: carouselDelegateMusic
25+ selectedItemScaleFactor: 1.2
26+ cacheBuffer: 1404 // 18px * 13gu * 6
27+ height: implicitHeight + units.gu(6)
30+ id: carouselDelegateMusic
31+ CarouselDelegateMusic {
Dash/Music/MusicFilterGrid.qmlnew file+57
@@ -0,0 +1,57 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../../Components"
23+ minimumHorizontalSpacing: units.gu(2)
24+ maximumNumberOfColumns: 5
25+ delegateWidth: units.gu(17)
26+ delegateHeight: iconHeight + units.gu(3.5)
27+ verticalSpacing: units.gu(2)
29+ readonly property int iconWidth: (width / columns) * 0.8
30+ readonly property int iconHeight: iconWidth
32+ signal clicked(int index, var delegateItem, real itemY)
33+ signal pressAndHold(int index, var delegateItem, real itemY)
35+ delegate: AlbumTile {
37+ objectName: "delegate" + index
38+ width: filterGrid.cellWidth
39+ height: filterGrid.cellHeight
40+ iconWidth: filterGrid.iconWidth
41+ iconHeight: filterGrid.iconHeight
48+ var data = { model: model }
49+ filterGrid.clicked(index, data, tile.y)
53+ var data = { model: model }
54+ filterGrid.pressAndHold(index, data, tile.y)
Dash/PreviewDelegateMapper.qmlnew file+36
@@ -0,0 +1,36 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20+ property var d: QtObject {
21+ readonly property string genericPreview: "Generic/GenericPreview.qml"
22+ readonly property string appPreview: "Apps/AppPreview.qml"
23+ property var previewDelegateMapping: {"preview-generic": genericPreview,
24+ "preview-application": appPreview,
28+ function map(rendererName) {
29+ var customPreview = d.previewDelegateMapping[rendererName]
30+ if (customPreview != undefined) {
33+ console.debug("Renderer "+rendererName+" not found, using preview-generic")
34+ return d.genericPreview
Dash/ScopeDelegateMapper.qmlnew file+34
@@ -0,0 +1,34 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20+ property var scopeDelegateMapping: {"mockmusicmaster.scope": "DashMusic.qml",
21+ "applications.scope": "DashApps.qml",
22+ "home.scope": "DashHome.qml",
23+ "mockvideosmaster.scope": "DashVideos.qml"
25+ property string genericScope: "GenericScopeView.qml"
27+ function map(scopeId) {
28+ var customScope = scopeDelegateMapping[scopeId]
29+ if (customScope != undefined) {
Dash/ScopeListView.qmlnew file+23
@@ -0,0 +1,23 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import ListViewWithPageHeader 0.1
20+ListViewWithPageHeader {
21+ maximumFlickVelocity: height * 10
22+ flickDeceleration: height * 2
Dash/ScopeView.qmlnew file+56
@@ -0,0 +1,56 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23+ property SortFilterProxyModel categories: categoryFilter
24+ property bool isCurrent
25+ property ListModel searchHistory
28+ signal movementStarted
29+ signal positionedAtBeginning
31+ // FIXME delay the search so that daemons have time to settle, note that
32+ // removing this will break ScopeView::test_changeScope
35+ scope.activateApplication.connect(activateApp);
38+ function activateApp(desktopFilePath) {
39+ shell.activateApplication(desktopFilePath);
45+ onTriggered: scope.searchQuery = ""
48+ SortFilterProxyModel {
50+ model: scope.categories
51+ dynamicSortFilter: true
52+ filterRole: Categories.RoleCount
Dash/SearchableResultModel.qmlnew file+40
@@ -0,0 +1,40 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20+SortFilterProxyModel {
23+ property string searchQuery: ""
24+ property bool hideOnSearch: false
26+ filterRole: CategoryResults.RoleTitle
28+ onSearchQueryChanged: {
29+ if (searchQuery.length == 0) {
30+ filterRegExp = RegExp("");
31+ filterCaseSensitivity = Qt.CaseInsensitive;
32+ } else if (!hideOnSearch) {
33+ setFilterWildcard(searchQuery);
34+ filterCaseSensitivity = Qt.CaseInsensitive;
37+ filterCaseSensitivity = Qt.CaseInsensitive;
qml/Stage/ResizeGrip.qml → Dash/Video/CarouselDelegateVideo.qmlrenamed+21−25
@@ -1,5 +1,5 @@
2− * Copyright (C) 2016 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,33 +14,29 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
19+import "../../Components"
20−Rectangle {
21+BaseCarouselDelegate {
21− width: units.gu(4)
22+ id: item
24− color: theme.palette.normal.background
27− // to be set from outside
24+ UbuntuShape {
28− property Item resizeTarget
31− source: "graphics/arrows.png"
32− anchors.centerIn: parent
35− fillMode: Image.PreserveAspectFit
39 anchors.fill: parent
25 anchors.fill: parent
40− anchors.margins: -units.gu(1.5)
26+ radius: "medium"
41− hoverEnabled: true
27+ borderSource: ""
30+ sourceSize { width: item.width; height: item.height }
31+ source: model ? model.icon : ""
43− Mouse.enabled: resizeTarget
35+ BorderImage {
44− Mouse.forwardTo: resizeTarget
36+ anchors.centerIn: parent
38+ source: "../../Components/graphics/non-selected.sci"
39+ width: parent.width + units.gu(1.5)
40+ height: parent.height + units.gu(1.5)
Dash/Video/VideoInfo.qmlnew file+84
@@ -0,0 +1,84 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import QtQuick.XmlListModel 2.0
22+ property string source
24+ property bool ready: nfo.status == XmlListModel.Ready || nfoTV.status == XmlListModel.Ready
25+ property bool isMovie: true
26+ property variant video: null
27+ property variant tvShow: null
29+ function getActors() {
31+ if (video.actor1) c.push(video.actor1)
32+ if (video.actor2) c.push(video.actor2)
33+ if (video.actor3) c.push(video.actor3)
37+ onSourceChanged: isMovie = true
42+ query: (isMovie) ? "/movie" : "/episodedetails"
44+ XmlRole { name: "title"; query: "title/string()" }
45+ XmlRole { name: "year"; query: "year/number()" }
46+ XmlRole { name: "runtime"; query: "runtime/number()" }
47+ XmlRole { name: "rating"; query: "rating/number()" }
48+ XmlRole { name: "plot"; query: "plot/string()" }
49+ XmlRole { name: "director"; query: "director[1]/string()" }
50+ XmlRole { name: "actor1"; query: "actor[1]/name/string()" }
51+ XmlRole { name: "actor2"; query: "actor[2]/name/string()" }
52+ XmlRole { name: "actor3"; query: "actor[3]/name/string()" }
53+ XmlRole { name: "author"; query: "author[1]/string()" }
54+ XmlRole { name: "season"; query: "season/number()" }
55+ XmlRole { name: "episode"; query: "episode/number()" }
57+ XmlRole { name: "rentPrice"; query: "rent_price/string()" }
58+ XmlRole { name: "buyPrice"; query: "buy_price/string()" }
59+ XmlRole { name: "expires"; query: "expires/string()" }
61+ onStatusChanged: if (status == XmlListModel.Ready) {
62+ if (count > 0) info.video = nfo.get(0)
63+ else info.isMovie = false
64+ } else if (status == XmlListModel.Error) info.isMovie = false
69+ source: (nfo.isMovie) ? "" : info.source.substring(0, info.source.lastIndexOf("/") + 1) + "tvshow.nfo"
72+ XmlRole { name: "title"; query: "title/string()" }
74+ onStatusChanged: if (status == XmlListModel.Ready) {
75+ if (count > 0) info.tvShow = nfoTV.get(0)
76+ } else if (status == XmlListModel.Error) {
77+ // Search for tvshow.nfo in the directory above this one to cater
78+ // for directory layout Show/Season
79+ var path = info.source.split("/")
80+ path.splice(-2, 2, "tvshow.nfo")
81+ source = path.join("/")
Dash/Video/VideoPreview.qmlnew file+210
@@ -0,0 +1,210 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
20+import "../../Components"
26+ property alias ready: nfo.ready
27+ property bool playable: fileUri != ""
28+ readonly property url fileUri: item ? item.fileUri : ""
29+ property url url: item ? item.nfoUri.replace(/\.nfo$/, "-fanart.jpg") : ""
33+ source: item ? item.nfoUri : ""
36+ title: nfo.ready ? nfo.video.title : ""
37+ previewWidthRatio: 0.6
39+ onPreviewImageClicked: {
41+ shell.activateApplication('/usr/share/applications/mediaplayer-app.desktop', root.fileUri);
45+ // TODO: replace this UbuntuShape with the Video component once that lands
47+ header: UbuntuShape {
49+ anchors.left: parent.left
50+ anchors.right: parent.right
51+ height: width * previewImage.sourceSize.height / previewImage.sourceSize.width
57+ fillMode: Image.PreserveAspectCrop
61+ objectName: "playButton"
62+ anchors.centerIn: parent
63+ visible: root.playable
64+ readonly property bool bigButton: parent.width > units.gu(40)
65+ width: bigButton ? units.gu(8) : units.gu(4.5)
67+ source: "../graphics/play_button%1%2.png".arg(previewImageMouseArea.pressed ? "_active" : "").arg(bigButton ? "_big" : "")
71+ id: previewImageMouseArea
73+ onClicked: root.previewImageClicked()
80+ property int buttonWidth: Math.min(units.gu(22), (width - spacing) / 2)
82+ width: parent.buttonWidth
83+ color: Theme.palette.selected.foreground
84+ text: nfo.ready && nfo.video.buyPrice != "" ? "Buy for " + nfo.video.buyPrice : ""
86+ iconSource: "graphics/icon_button_amazon.png"
87+ iconPosition: "right"
90+ width: parent.buttonWidth
91+ color: Theme.palette.selected.foreground
92+ text: nfo.ready && nfo.video.buyPrice != "" ? "Rent for " + nfo.video.rentPrice : ""
94+ iconSource: "graphics/icon_button_u1.png"
95+ iconPosition: "right"
100+ spacing: units.gu(2)
102+ maximumRating: 10 // FIXME: this should happen on the backend side
103+ rating: nfo.ready ? nfo.video.rating: 0
107+ text: nfo.ready ? nfo.video.plot : ""
108+ color: Theme.palette.selected.backgroundText
112+ wrapMode: Text.WordWrap
119+ spacing: units.gu(1)
121+ property int firstColWidth: units.gu(9)
122+ property int secondColWidth: width - firstColWidth - spacing
124+ visible: directedLabel.visible
128+ horizontalAlignment: Text.AlignRight
129+ width: parent.firstColWidth
130+ text: i18n.tr("Directed by:")
140+ width: parent.secondColWidth
141+ text: nfo.ready ? nfo.video.director : ""
144+ wrapMode: Text.WordWrap
147+ visible: starringLabel.visible
150+ horizontalAlignment: Text.AlignRight
152+ width: parent.firstColWidth
153+ text: i18n.tr("Starring:")
163+ width: parent.secondColWidth
164+ text: nfo.ready ? nfo.getActors().join(", ") : ""
165+ wrapMode: Text.WordWrap
170+ visible: authorLabel.visible
173+ horizontalAlignment: Text.AlignRight
175+ width: parent.firstColWidth
176+ text: i18n.tr("Author:")
186+ width: parent.secondColWidth
187+ text: nfo.ready ? nfo.video.author : ""
188+ wrapMode: Text.WordWrap
201+ if (nfo.video.year) parts.push(nfo.video.year)
202+ if (nfo.video.runtime) parts.push("%1 minutes".arg(nfo.video.runtime))
204+ return parts.join(", ");
Dash/Video/VideosCarousel.qmlnew file+34
@@ -0,0 +1,34 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../../Components"
22+ tileAspectRatio: 198 / 288
23+ minimumTileWidth: units.gu(13)
24+ itemComponent: carouselDelegateVideo
25+ selectedItemScaleFactor: 1.14
26+ cacheBuffer: 1404 // 18px * 13gu * 6
27+ height: implicitHeight + units.gu(6)
30+ id: carouselDelegateVideo
31+ CarouselDelegateVideo {
Dash/Video/VideosFilterGrid.qmlnew file+50
@@ -0,0 +1,50 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../../Components"
23+ minimumHorizontalSpacing: units.gu(0.5)
24+ maximumNumberOfColumns: 5
25+ delegateWidth: units.gu(11)
26+ delegateHeight: iconHeight + units.gu(2.5)
27+ verticalSpacing: units.gu(2)
29+ readonly property int iconWidth: (width / columns) * 0.8
30+ readonly property int iconHeight: iconWidth * 16 / 11
32+ signal clicked(int index, var data, real itemY)
36+ objectName: "delegate" + index
37+ width: filtergrid.cellWidth
38+ height: filtergrid.cellHeight
40+ imageWidth: filtergrid.iconWidth
41+ imageHeight: filtergrid.iconHeight
43+ fillMode: Image.PreserveAspectCrop
45+ var fileUri = model.uri.replace(/^[^:]+:/, "")
46+ var data = {fileUri: fileUri, nfoUri: model.comment}
47+ filtergrid.clicked(index, data, tile.y);
Dash/Video/graphics/icon_button_amazon@20.pngnew file
Binary file not shown.
Dash/Video/graphics/icon_button_u1@20.pngnew file
Binary file not shown.
Dash/graphics/header_handlearrow2@20.pngnew file
Binary file not shown.
Dash/graphics/header_handlearrow@20.pngnew file
Binary file not shown.
Dash/graphics/icon_clear@20.pngnew file
Binary file not shown.
Dash/graphics/icon_listview_clear@20.pngnew file
Binary file not shown.
Dash/graphics/icon_search_active@20.pngnew file
Binary file not shown.
Dash/graphics/icon_search_inactive@20.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/angrybirds@12.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/browser@12.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/camera@12.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/facebook@12.pngnew file
Binary file not shown.
tests/graphics/screenshots/gallery@12.png → Dash/graphics/phone/screenshots/gallery@12.pngrenamed
Binary file not shown.
Dash/graphics/phone/screenshots/map@12.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/music@12.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/phone@12.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/settings@12.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/twitter@12.pngnew file
Binary file not shown.
Dash/graphics/play_button@18.pngnew file
Binary file not shown.
Dash/graphics/play_button_active@18.pngnew file
Binary file not shown.
Dash/graphics/play_button_active_big@20.pngnew file
Binary file not shown.
Dash/graphics/play_button_big@20.pngnew file
Binary file not shown.
Dash/graphics/tablet/icon_close_preview@20.pngnew file
Binary file not shown.
Greeter/Clock.qmlnew file+66
@@ -0,0 +1,66 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
23+ implicitWidth: childrenRect.width
24+ implicitHeight: childrenRect.height
27+ property alias __timerInterval: timer.interval
28+ readonly property bool __timerRunning: timer.running
33+ running: clock.enabled && clock.visible && clock.opacity != 0
35+ triggeredOnStart: true
36+ onTriggered: __date = new Date
40+ spacing: units.gu(0.5)
44+ objectName: "timeLabel"
46+ anchors.horizontalCenter: parent.horizontalCenter
47+ font.pixelSize: units.gu(7.5)
50+ text: Qt.formatTime(__date)
51+ font.weight: Font.Light
56+ objectName: "dateLabel"
58+ anchors.horizontalCenter: parent.horizontalCenter
62+ text: Qt.formatDate(__date, Qt.DefaultLocaleLongDate)
63+ font.weight: Font.Light
qml/Greeter/Dot.qml → Greeter/Dot.qmlrenamed+1−1
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
qml/Greeter/Gradient.js → Greeter/Gradient.jsrenamed+3−7
@@ -15,12 +15,8 @@
17function threeColorByIndex(index, total, colors) {
17function threeColorByIndex(index, total, colors) {
18− var red, green, blue;
18+ var red, green, blue
22− p = index / total;
19+ var p = index / total
25 if (p < 0.5) {
21 if (p < 0.5) {
26 red = (colors.main.r * p * 2.0) + colors.start.r * (0.5 - p) * 2.0;
22 red = (colors.main.r * p * 2.0) + colors.start.r * (0.5 - p) * 2.0;
@@ -32,5 +28,5 @@ function threeColorByIndex(index, total, colors) {
32 blue = colors.end.b * (p - 0.5) * 2.0 + colors.main.b * (1.0 - p) * 2.0;
28 blue = colors.end.b * (p - 0.5) * 2.0 + colors.main.b * (1.0 - p) * 2.0;
35− return Qt.rgba(red, green, blue, 1);
31+ return Qt.rgba(red, green, blue, 1)
Greeter/Greeter.qmlnew file+133
@@ -0,0 +1,133 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Ubuntu.Gestures 0.1
20+import LightDM 0.1 as LightDM
21+import "../Components"
22+import "../Components/Math.js" as MathLocal
27+ created: greeterContentLoader.status == Loader.Ready
29+ property url background
31+ // 1 when fully shown and 0 when fully hidden
32+ property real showProgress: MathLocal.clamp((width + x) / width, 0, 1)
34+ showAnimation: StandardAnimation { property: "x"; to: 0 }
35+ hideAnimation: StandardAnimation { property: "x"; to: -width }
37+ property alias dragHandleWidth: dragHandle.width
38+ property alias model: greeterContentLoader.model
39+ property bool locked: shown && !LightDM.Greeter.promptless
41+ readonly property bool narrowMode: !multiUser && width <= units.gu(60)
42+ readonly property bool multiUser: LightDM.Users.count > 1
44+ readonly property bool leftTeaserPressed: greeterContentLoader.status == Loader.Ready &&
45+ greeterContentLoader.item.leftTeaserPressed
46+ readonly property bool rightTeaserPressed: greeterContentLoader.status == Loader.Ready &&
47+ greeterContentLoader.item.rightTeaserPressed
49+ readonly property int currentIndex: greeterContentLoader.currentIndex
51+ signal selected(int uid)
52+ signal unlocked(int uid)
54+ onRightTeaserPressedChanged: {
55+ if (rightTeaserPressed && !locked) {
56+ teasingTimer.start();
62+ objectName: "backgroundImage"
64+ source: greeter.background
65+ fillMode: Image.PreserveAspectCrop
69+ id: greeterContentLoader
70+ objectName: "greeterContentLoader"
72+ property var model: LightDM.Users
73+ property int currentIndex: 0
74+ property var infographicModel: LightDM.Infographic
76+ source: required ? "GreeterContent.qml" : ""
79+ target: greeterContentLoader.item
82+ greeter.selected(uid);
83+ greeterContentLoader.currentIndex = uid;
85+ onUnlocked: greeter.unlocked(uid);
97+ when: teasingTimer.running
112+ easing.type: Easing.OutCubic
120+ anchors.top: parent.top
121+ anchors.bottom: parent.bottom
122+ anchors.right: parent.right
124+ // no need for requiring a directional drag since we are covering the screen
125+ // anyway (i.e., no change user could be trying to interact with some other
127+ distanceThreshold: 0
129+ enabled: greeter.narrowMode || !greeter.locked
131+ direction: Direction.Leftwards
Greeter/GreeterContent.qmlnew file+126
@@ -0,0 +1,126 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import AccountsService 0.1
19+import Ubuntu.Components 0.1
20+import LightDM 0.1 as LightDM
21+import "../Components"
27+ property bool leftTeaserPressed: teasingMouseArea.pressed &&
28+ teasingMouseArea.mouseX < teasingMouseArea.width / 2
29+ property bool rightTeaserPressed: teasingMouseArea.pressed &&
30+ teasingMouseArea.mouseX > teasingMouseArea.width / 2
32+ signal selected(int uid)
33+ signal unlocked(int uid)
47+ topMargin: units.gu(2)
48+ horizontalCenter: parent.horizontalCenter
59+ objectName: "loginLoader"
62+ leftMargin: Math.min(parent.width * 0.16, units.gu(20))
63+ verticalCenter: parent.verticalCenter
66+ height: parent.height
68+ // TODO: Once we have a system API for determining which mode we are
69+ // in, tablet/phone/desktop, that should be used instead of narrowMode.
70+ source: greeter.narrowMode ? "" : "LoginList.qml"
73+ item.currentIndex = greeterContentLoader.currentIndex;
74+ selected(item.currentIndex);
75+ item.resetAuthentication();
79+ target: loginLoader.item
81+ value: greeterContentLoader.model
85+ target: loginLoader.item
95+ onCurrentIndexChanged: {
96+ if (greeterContentLoader.currentIndex !== loginLoader.item.currentIndex) {
97+ greeterContentLoader.currentIndex = loginLoader.item.currentIndex;
105+ height: narrowMode ? parent.height : 0.75 * parent.height
106+ model: greeterContentLoader.infographicModel
108+ Component.onCompleted: infographics.updateUsername(greeterContentLoader.currentIndex)
112+ onSelected: infographics.updateUsername(uid)
115+ function updateUsername(uid) {
116+ greeterContentLoader.infographicModel.username = greeterContentLoader.model.data(uid, LightDM.UserRoles.NameRole)
117+ greeterContentLoader.infographicModel.readyForDataChangeSlot();
121+ verticalCenter: parent.verticalCenter
122+ left: narrowMode ? root.left : loginLoader.right
Greeter/GreeterEdgeDemo.qmlnew file+103
@@ -0,0 +1,103 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+import AccountsService 0.1
18+import LightDM 0.1 as LightDM
24+ property Item greeter
26+ property bool active: false
27+ property bool paused: false
30+ if (d.rightEdgeDemo) d.rightEdgeDemo.paused = paused
33+ function hideEdgeDemoInShell() {
34+ AccountsService.demoEdges = false;
37+ function hideEdgeDemoInGreeter() {
38+ AccountsService.demoEdgesForCurrentUser = false;
42+ function hideEdgeDemos() {
43+ hideEdgeDemoInGreeter();
44+ hideEdgeDemoInShell();
47+ function startDemo() {
49+ d.overlay = Qt.createComponent("EdgeDemoOverlay.qml")
54+ function stopDemo() {
56+ if (d.rightEdgeDemo) d.rightEdgeDemo.destroy()
61+ property Component overlay
62+ property QtObject rightEdgeDemo
63+ property bool showEdgeDemoInGreeter: AccountsService.demoEdgesForCurrentUser
65+ onShowEdgeDemoInGreeterChanged: {
67+ if (d.showEdgeDemoInGreeter) {
73+ function startRightEdgeDemo() {
76+ d.rightEdgeDemo = d.overlay.createObject(demo.greeter, {
78+ "title": i18n.tr("Right edge"),
79+ "text": i18n.tr("Try swiping from the right edge to unlock the phone"),
80+ "anchors.fill": demo.greeter,
83+ if (d.rightEdgeDemo) {
84+ d.rightEdgeDemo.onSkip.connect(demo.hideEdgeDemos)
94+ if (d.rightEdgeDemo && d.rightEdgeDemo.available) {
95+ d.rightEdgeDemo.hide()
96+ hideEdgeDemoInGreeter()
101+ onShownChanged: if (!greeter.shown) hide()
qml/Greeter/Infographics.qml → Greeter/Infographics.qmlrenamed+136−117
@@ -1,5 +1,5 @@
2− * Copyright (C) 2013-2016 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,10 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+import "../Components"
17import "Gradient.js" as Gradient
18import "Gradient.js" as Gradient
18−import QtQuick 2.4
19+import QtQuick 2.0
19−import Ubuntu.Components 1.3
20+import Ubuntu.Components 0.1
22 id: infographic
23 id: infographic
@@ -25,86 +26,31 @@ Item {
26 property int animDuration: 10
27 property int animDuration: 10
28− property int currentWeekDay
32− objectName: "infographicPrivate"
33− property bool useDotAnimation: true
34− property int circleModifier: useDotAnimation ? 1 : 2
35− property bool animating: dotHideAnimTimer.running
36− || dotShowAnimTimer.running
37− || circleChangeAnimTimer.running
42− property color main: "white"
43− property color start: "white"
44− property color end: "white"
47 Connections {
29 Connections {
48 target: model
30 target: model
49− ignoreUnknownSignals: model === undefined
51− onDataAboutToAppear: startHideAnimation() // hide "no data" label
52 onDataAppeared: startShowAnimation()
32 onDataAppeared: startShowAnimation()
54 onDataAboutToChange: startHideAnimation()
34 onDataAboutToChange: startHideAnimation()
55 onDataChanged: startShowAnimation()
36 onDataChanged: startShowAnimation()
57 onDataAboutToDisappear: startHideAnimation()
38 onDataAboutToDisappear: startHideAnimation()
58− onDataDisappeared: startShowAnimation() // show "no data" label
62− frequency: LiveTimer.Hour
63− onTrigger: handleTimerTrigger()
66− function handleTimerTrigger(){
67− var today = new Date().getDay()
68− if(infographic.currentWeekDay !== today){
69− infographic.currentWeekDay = today
74− function reloadUserData(){
75− d.useDotAnimation = false
76− infographic.model.nextDataSource()
79 function startShowAnimation() {
41 function startShowAnimation() {
80− dotHideAnimTimer.stop()
81− notification.hideAnim.stop()
83− if (d.useDotAnimation) {
84− dotShowAnimTimer.startFromBeginning()
42+ dotShowAnimTimer.startFromBeginning()
86 notification.showAnim.start()
43 notification.showAnim.start()
89 function startHideAnimation() {
46 function startHideAnimation() {
90− dotShowAnimTimer.stop()
91− circleChangeAnimTimer.stop()
92− notification.showAnim.stop()
94− if (d.useDotAnimation) {
95− dotHideAnimTimer.startFromBeginning()
47+ dotHideAnimTimer.startFromBeginning()
97− circleChangeAnimTimer.startFromBeginning()
99 notification.hideAnim.start()
48 notification.hideAnim.start()
102− visible: model.username !== ""
51+ visible: model.label !== ""
104− Component.onCompleted: {
53+ Component.onCompleted: startShowAnimation()
105− currentWeekDay = new Date().getDay()
106− startShowAnimation()
110 id: dataCircle
56 id: dataCircle
@@ -118,22 +64,22 @@ Item {
118 anchors.centerIn: parent
64 anchors.centerIn: parent
121− id: circleChangeAnimTimer
67+ id: circleGrowAnimTimer
123 property int pastCircleCounter
69 property int pastCircleCounter
124 property int presentCircleCounter
70 property int presentCircleCounter
126− interval: notification.duration
72+ interval: animDuration
127 running: false
73 running: false
128 repeat: true
74 repeat: true
129 onTriggered: {
75 onTriggered: {
130 if (pastCircleCounter < pastCircles.count) {
76 if (pastCircleCounter < pastCircles.count) {
131 var nextCircle = pastCircles.itemAt(pastCircleCounter++)
77 var nextCircle = pastCircles.itemAt(pastCircleCounter++)
132− if (nextCircle !== null) nextCircle.pastCircleChangeAnim.start()
78+ if (nextCircle !== null) nextCircle.pastCircleGrowAnim.start()
134 if (pastCircleCounter > pastCircles.count / 2) {
80 if (pastCircleCounter > pastCircles.count / 2) {
135 var nextCircle = presentCircles.itemAt(presentCircleCounter++)
81 var nextCircle = presentCircles.itemAt(presentCircleCounter++)
136− if (nextCircle !== null) nextCircle.presentCircleChangeAnim.start()
82+ if (nextCircle !== null) nextCircle.presentCircleGrowAnim.start()
138 if (presentCircleCounter > infographic.model.currentDay && pastCircleCounter >= pastCircles.count) {
84 if (presentCircleCounter > infographic.model.currentDay && pastCircleCounter >= pastCircles.count) {
@@ -141,8 +87,39 @@ Item {
143 function startFromBeginning() {
89 function startFromBeginning() {
144− circleChangeAnimTimer.pastCircleCounter = 0
90+ circleGrowAnimTimer.pastCircleCounter = 0
145− circleChangeAnimTimer.presentCircleCounter = 0
91+ circleGrowAnimTimer.presentCircleCounter = 0
97+ id: circleShrinkAnimTimer
99+ property int pastCircleCounter
100+ property int presentCircleCounter
102+ interval: animDuration
106+ if (pastCircleCounter >= 0) {
107+ var nextCircle = pastCircles.itemAt(pastCircleCounter--)
108+ if (nextCircle !== null) nextCircle.pastCircleShrinkAnim.start()
110+ if (pastCircleCounter < pastCircles.count / 2) {
111+ var nextCircle = presentCircles.itemAt(presentCircleCounter--)
112+ if (nextCircle !== null) nextCircle.presentCircleShrinkAnim.start()
114+ if (presentCircleCounter < 0) {
116+ infographic.model.readyForDataChange()
120+ function startFromBeginning() {
121+ pastCircleCounter = pastCircles.count - 1
122+ presentCircleCounter = model.currentDay
@@ -153,11 +130,12 @@ Item {
153 model: infographic.model.secondMonth
130 model: infographic.model.secondMonth
155 delegate: ObjectPositioner {
132 delegate: ObjectPositioner {
156− property alias pastCircleChangeAnim: pastCircleChangeAnim
133+ property alias pastCircleGrowAnim: pastCircleGrowAnim
134+ property alias pastCircleShrinkAnim: pastCircleShrinkAnim
158 index: model.index
136 index: model.index
159 count: pastCircles.count
137 count: pastCircles.count
160− radius: dataCircle.width / 2
138+ radius: parent.width / 2
161 halfSize: pastCircle.width / 2
139 halfSize: pastCircle.width / 2
162 posOffset: 0.0
140 posOffset: 0.0
@@ -171,36 +149,54 @@ Item {
171 width: dataCircle.width / divisor
149 width: dataCircle.width / divisor
172 height: dataCircle.height / divisor
150 height: dataCircle.height / divisor
173 opacity: 0.0
151 opacity: 0.0
174− circleScale: 0.0
152+ scale: 0.0
175 visible: modelData !== undefined
153 visible: modelData !== undefined
176− color: "transparent"
154+ color: Gradient.threeColorByIndex(index, count, infographic.model.secondColor)
177− centerCircle: dataCircle
179 SequentialAnimation {
156 SequentialAnimation {
180− id: pastCircleChangeAnim
157+ id: pastCircleGrowAnim
183 ParallelAnimation {
160 ParallelAnimation {
184 PropertyAnimation {
161 PropertyAnimation {
185 target: pastCircle
162 target: pastCircle
186 property: "opacity"
163 property: "opacity"
187 to: pastCircle.circleOpacity
165 to: pastCircle.circleOpacity
188 easing.type: Easing.OutCurve
166 easing.type: Easing.OutCurve
189− duration: circleChangeAnimTimer.interval * d.circleModifier
167+ duration: circleGrowAnimTimer.interval * 4
191 PropertyAnimation {
169 PropertyAnimation {
192 target: pastCircle
170 target: pastCircle
193− property: "circleScale"
171+ property: "scale"
194 to: modelData
173 to: modelData
195 easing.type: Easing.OutCurve
174 easing.type: Easing.OutCurve
196− duration: circleChangeAnimTimer.interval * d.circleModifier
175+ duration: circleGrowAnimTimer.interval * 4
180+ SequentialAnimation {
181+ id: pastCircleShrinkAnim
188+ from: pastCircle.circleOpacity
190+ easing.type: Easing.OutCurve
191+ duration: circleShrinkAnimTimer.interval * 4
198− ColorAnimation {
193+ PropertyAnimation {
199 target: pastCircle
194 target: pastCircle
200− property: "color"
195+ property: "scale"
201− to: Gradient.threeColorByIndex(index, count, whiteTheme)
196+ from: modelData
202 easing.type: Easing.OutCurve
198 easing.type: Easing.OutCurve
203− duration: circleChangeAnimTimer.interval * d.circleModifier
199+ duration: circleShrinkAnimTimer.interval * 4
@@ -214,11 +210,12 @@ Item {
214 model: infographic.model.firstMonth
210 model: infographic.model.firstMonth
216 delegate: ObjectPositioner {
212 delegate: ObjectPositioner {
217− property alias presentCircleChangeAnim: presentCircleChangeAnim
213+ property alias presentCircleGrowAnim: presentCircleGrowAnim
214+ property alias presentCircleShrinkAnim: presentCircleShrinkAnim
219 index: model.index
216 index: model.index
220 count: presentCircles.count
217 count: presentCircles.count
221− radius: dataCircle.width / 2
218+ radius: parent.width / 2
222 halfSize: presentCircle.width / 2
219 halfSize: presentCircle.width / 2
223 posOffset: 0.0
220 posOffset: 0.0
@@ -232,13 +229,12 @@ Item {
232 width: dataCircle.width / divisor
229 width: dataCircle.width / divisor
233 height: dataCircle.height / divisor
230 height: dataCircle.height / divisor
234 opacity: 0.0
231 opacity: 0.0
235− circleScale: 0.0
232+ scale: 0.0
236 visible: modelData !== undefined
233 visible: modelData !== undefined
237− color: "transparent"
234+ color: Gradient.threeColorByIndex(index, infographic.model.currentDay, infographic.model.firstColor)
238− centerCircle: dataCircle
240 SequentialAnimation {
236 SequentialAnimation {
241− id: presentCircleChangeAnim
237+ id: presentCircleGrowAnim
@@ -248,21 +244,36 @@ Item {
248 property: "opacity"
244 property: "opacity"
249 to: presentCircle.circleOpacity
245 to: presentCircle.circleOpacity
250 easing.type: Easing.OutCurve
246 easing.type: Easing.OutCurve
251− duration: circleChangeAnimTimer.interval * d.circleModifier
247+ duration: circleGrowAnimTimer.interval * 4
253 PropertyAnimation {
249 PropertyAnimation {
254 target: presentCircle
250 target: presentCircle
255− property: "circleScale"
251+ property: "scale"
256 to: modelData
252 to: modelData
257 easing.type: Easing.OutCurve
253 easing.type: Easing.OutCurve
258− duration: circleChangeAnimTimer.interval * d.circleModifier
254+ duration: circleGrowAnimTimer.interval * 4
259+ SequentialAnimation {
260+ id: presentCircleShrinkAnim
265+ target: presentCircle
268+ easing.type: Easing.OutCurve
269+ duration: circleShrinkAnimTimer.interval * 4
260− ColorAnimation {
271+ PropertyAnimation {
261 target: presentCircle
272 target: presentCircle
262− property: "color"
273+ property: "scale"
263− to: Gradient.threeColorByIndex(index, infographic.model.currentDay, whiteTheme)
274+ to: 0.0
264 easing.type: Easing.OutCurve
275 easing.type: Easing.OutCurve
265− duration: circleChangeAnimTimer.interval * d.circleModifier
276+ duration: circleShrinkAnimTimer.interval * 4
@@ -270,6 +281,15 @@ Item {
285+ id: backgroundCircle
286+ objectName: "backgroundCircle"
288+ anchors.fill: parent
290+ source: "graphics/infographic_circle_back.png"
274 id: dotShowAnimTimer
294 id: dotShowAnimTimer
@@ -278,16 +298,14 @@ Item {
278 interval: animDuration * 0.5; running: false; repeat: true
298 interval: animDuration * 0.5; running: false; repeat: true
279 onTriggered: {
299 onTriggered: {
280 if (dotCounter < dots.count) {
300 if (dotCounter < dots.count) {
281− var nextDot = dots.itemAt(dotCounter);
301+ var nextDot = dots.itemAt(dotCounter++)
283− nextDot.unlockAnimation.start();
302+ nextDot.unlockAnimation.start()
284− if (++dotCounter == Math.round(dots.count / 2)) {
285− circleChangeAnimTimer.startFromBeginning();
306+ if (dotCounter == Math.round(dots.count / 2)) {
307+ circleGrowAnimTimer.startFromBeginning()
293 function startFromBeginning() {
311 function startFromBeginning() {
@@ -313,8 +331,8 @@ Item {
316− if (dotCounter == 0) {
334+ if (dotCounter == Math.round(dots.count / 2)) {
317− infographic.model.readyForDataChange()
335+ circleShrinkAnimTimer.startFromBeginning()
@@ -340,7 +358,7 @@ Item {
341 index: model.index
359 index: model.index
342 count: dots.count
360 count: dots.count
343− radius: dataCircle.width / 2
361+ radius: backgroundCircle.width / 2
344 halfSize: dot.width / 2
362 halfSize: dot.width / 2
345 posOffset: radius / dot.width / 3
363 posOffset: radius / dot.width / 3
346 state: dot.state
364 state: dot.state
@@ -349,7 +367,7 @@ Item {
350 objectName: "dot" + index
368 objectName: "dot" + index
352− property real baseOpacity: 1
370+ property real baseOpacity: 0.4
354 width: units.dp(5) * parent.radius / 200
372 width: units.dp(5) * parent.radius / 200
355 height: units.dp(5) * parent.radius / 200
373 height: units.dp(5) * parent.radius / 200
@@ -378,26 +396,27 @@ Item {
382 id: notification
400 id: notification
383 objectName: "label"
401 objectName: "label"
385 property alias hideAnim: decreaseOpacity
403 property alias hideAnim: decreaseOpacity
386 property alias showAnim: increaseOpacity
404 property alias showAnim: increaseOpacity
388− property real baseOpacity: 1
406+ property real baseOpacity: 0.6
389− property real duration: dotShowAnimTimer.interval * 5
391− height: 0.7 * dataCircle.width
408+ height: 0.7 * backgroundCircle.width
392 width: notification.height
409 width: notification.height
393 anchors.centerIn: parent
410 anchors.centerIn: parent
395 text: infographic.model.label
412 text: infographic.model.label
413+ font.pixelSize: notification.height / 12
397 wrapMode: Text.WordWrap
415 wrapMode: Text.WordWrap
398 horizontalAlignment: Text.AlignHCenter
416 horizontalAlignment: Text.AlignHCenter
399 verticalAlignment: Text.AlignVCenter
417 verticalAlignment: Text.AlignVCenter
400 color: "white"
418 color: "white"
419+ font.weight: Font.Light
402 PropertyAnimation {
421 PropertyAnimation {
403 id: increaseOpacity
422 id: increaseOpacity
@@ -406,7 +425,7 @@ Item {
406 property: "opacity"
425 property: "opacity"
407 from: 0.0
426 from: 0.0
408 to: notification.baseOpacity
427 to: notification.baseOpacity
409− duration: notification.duration * dots.count
428+ duration: dotShowAnimTimer.interval * dots.count * 5
412 PropertyAnimation {
431 PropertyAnimation {
@@ -416,20 +435,20 @@ Item {
416 property: "opacity"
435 property: "opacity"
417 from: notification.baseOpacity
436 from: notification.baseOpacity
419− duration: notification.duration * dots.count
438+ duration: dotShowAnimTimer.interval * dots.count * 5
420− onStopped: if (!d.useDotAnimation) infographic.model.readyForDataChange()
425 MouseArea {
443 MouseArea {
426 anchors.fill: dataCircle
444 anchors.fill: dataCircle
427− enabled: notification.text != ""
429 onDoubleClicked: {
446 onDoubleClicked: {
430− if (!d.animating) {
447+ if (!dotHideAnimTimer.running &&
431− reloadUserData()
448+ !dotShowAnimTimer.running &&
432− }
449+ !circleShrinkAnimTimer.running &&
450+ !circleGrowAnimTimer.running)
451+ infographic.model.nextDataSource()
Greeter/Lockscreen.qmlnew file+157
@@ -0,0 +1,157 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
20+import LightDM 0.1 as LightDM
25+ // Determine if a numeric or alphanumeric pad is used.
26+ property bool alphaNumeric: false
29+ property string placeholderText: ""
31+ // In case the Lockscreen can show a greeter message, this is the username
32+ property string username: ""
34+ // As the numeric PIN pad doesn't have a OK button by design, we need to auto-confirm on a certain length.
35+ // This is ignored by the alphaNumeric lockscreen as that one is confirmed with pressing enter on the OSK.
36+ property int pinLength: 4
38+ property url background: ""
42+ signal emergencyCall()
45+ if (required && pinPadLoader.item) {
46+ pinPadLoader.item.clear(false);
51+ // This causes the loader below to destry and recreate the source
52+ pinPadLoader.resetting = true;
53+ pinPadLoader.resetting = false;
59+ source: root.required ? root.background : ""
60+ fillMode: Image.PreserveAspectCrop
69+ objectName: "pinPadLoader"
73+ verticalCenter: parent.verticalCenter
74+ verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
76+ property bool resetting: false
78+ source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
81+ target: pinPadLoader.item
84+ LightDM.Greeter.respond(passphrase);
93+ target: pinPadLoader.item
94+ property: "pinLength"
95+ value: root.pinLength
98+ target: pinPadLoader.item
99+ property: "placeholderText"
100+ value: root.placeholderText
103+ target: pinPadLoader.item
104+ property: "username"
105+ value: root.username
112+ bottom: parent.bottom
113+ bottomMargin: units.gu(4)
116+ height: childrenRect.height
117+ spacing: units.gu(1)
120+ objectName: "emergencyCallIcon"
123+ anchors.horizontalCenter: parent.horizontalCenter
124+ name: "phone-app-call-symbolic"
129+ anchors.fill: parent
130+ onClicked: root.emergencyCall()
135+ text: i18n.tr("Emergency Call")
139+ anchors.horizontalCenter: parent.horizontalCenter
144+ target: LightDM.Greeter
146+ onAuthenticationComplete: {
147+ if (LightDM.Greeter.promptless) {
150+ if (LightDM.Greeter.authenticated) {
153+ pinPadLoader.item.clear(true);
Greeter/LoginList.qmlnew file+293
@@ -0,0 +1,293 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import LightDM 0.1 as LightDM
20+import "../Components"
25+ property alias userList: userList
26+ property alias model: userList.model
27+ property alias currentIndex: userList.currentIndex
29+ readonly property int numAboveBelow: 4
30+ readonly property int cellHeight: units.gu(5)
31+ readonly property int highlightedHeight: units.gu(10)
32+ readonly property int moveDuration: 200
33+ property bool wasPrompted: false
35+ signal selected(int uid)
36+ signal unlocked(int uid)
38+ Keys.onEscapePressed: root.resetAuthentication()
45+ verticalCenter: parent.verticalCenter
47+ height: root.highlightedHeight
48+ color: Qt.rgba(0.1, 0.1, 0.1, 0.4)
49+ border.color: Qt.rgba(0.4, 0.4, 0.4, 0.4)
50+ border.width: units.dp(1)
51+ radius: units.gu(1.5)
57+ objectName: "userList"
61+ preferredHighlightBegin: userList.height / 2 - root.highlightedHeight / 2
62+ preferredHighlightEnd: userList.height / 2 - root.highlightedHeight / 2
63+ highlightRangeMode: ListView.StrictlyEnforceRange
64+ highlightMoveDuration: root.moveDuration
65+ flickDeceleration: 10000
67+ readonly property bool movingInternally: moveTimer.running || userList.moving
69+ onCurrentIndexChanged: {
70+ if (LightDM.Greeter.authenticationUser != userList.model.data(currentIndex, LightDM.UserRoles.NameRole)) {
71+ root.resetAuthentication();
75+ onMovingInternallyChanged: {
76+ // Only emit the selected signal once we stop moving to avoid frequent background changes
77+ if (!movingInternally) {
78+ root.selected(userList.currentIndex);
84+ height: root.cellHeight
86+ readonly property bool belowHighlight: (userList.currentIndex < 0 && index > 0) || (userList.currentIndex >= 0 && index > userList.currentIndex)
87+ readonly property int belowOffset: root.highlightedHeight - root.cellHeight
90+ // The goal here is to make names less and less opaque as they
91+ // leave the highlight area. Can't simply use index, because
92+ // that can change quickly if the user clicks at edges of
93+ // list. So we use actual pixel distance.
94+ var highlightDist = 0;
95+ var realY = y - userList.contentY;
97+ realY += belowOffset;
98+ if (realY + height <= highlightItem.y)
99+ highlightDist = realY + height - highlightItem.y;
100+ else if (realY >= highlightItem.y + root.highlightedHeight)
101+ highlightDist = realY - highlightItem.y - root.highlightedHeight;
104+ return 1 - Math.min(1, (Math.abs(highlightDist) + root.cellHeight) / ((root.numAboveBelow + 1) * root.cellHeight))
108+ objectName: "username" + index
112+ leftMargin: units.gu(2)
114+ rightMargin: units.gu(2)
116+ // Add an offset to topMargin for any items below the highlight
117+ topMargin: units.gu(1) + (parent.belowHighlight ? parent.belowOffset : 0)
121+ elide: Text.ElideRight
123+ Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
131+ // Add an offset to topMargin for any items below the highlight
132+ topMargin: parent.belowHighlight ? parent.belowOffset : 0
134+ height: parent.height
135+ enabled: userList.currentIndex !== index
138+ userList.currentIndex = index;
141+ Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
145+ // This is needed because ListView.moving is not true if the ListView
146+ // moves because of an internal event (e.g. currentIndex has changed)
151+ interval: root.moveDuration
157+ objectName: "infoLabel"
159+ bottom: passwordInput.top
161+ topMargin: units.gu(1)
162+ bottomMargin: units.gu(1)
163+ leftMargin: units.gu(2)
164+ rightMargin: units.gu(1)
168+ width: root.width - anchors.leftMargin - anchors.rightMargin
170+ textFormat: Text.StyledText
173+ opacity: (userList.movingInternally || text == "") ? 0 : 1
174+ Behavior on opacity {
175+ NumberAnimation { duration: 100 }
181+ objectName: "passwordInput"
183+ bottom: highlightItem.bottom
184+ horizontalCenter: parent.horizontalCenter
185+ margins: units.gu(1)
187+ height: units.gu(4.5)
188+ width: parent.width - anchors.margins * 2
189+ opacity: userList.movingInternally ? 0 : 1
191+ Behavior on opacity {
192+ NumberAnimation { duration: 100 }
198+ root.focus = true; // so that it can handle Escape presses for us
200+ LightDM.Greeter.respond(text);
202+ Keys.onEscapePressed: root.resetAuthentication()
207+ rightMargin: units.gu(2)
208+ verticalCenter: parent.verticalCenter
210+ visible: LightDM.Greeter.promptless
211+ source: "graphics/icon_arrow.png"
214+ WrongPasswordAnimation {
215+ id: wrongPasswordAnimation
216+ target: passwordInput
220+ target: Qt.inputMethod
222+ if (!Qt.inputMethod.visible) {
223+ passwordInput.focus = false;
231+ anchors.fill: passwordInput
232+ enabled: LightDM.Greeter.promptless
234+ if (LightDM.Greeter.authenticated)
235+ root.unlocked(userList.currentIndex);
237+ root.resetAuthentication();
241+ function resetAuthentication() {
242+ if (!userList.currentItem) {
245+ infoLabel.text = "";
246+ passwordInput.placeholderText = "";
247+ passwordInput.text = "";
248+ passwordInput.focus = false;
249+ passwordInput.enabled = true;
250+ root.wasPrompted = false;
251+ LightDM.Greeter.authenticate(userList.model.data(currentIndex, LightDM.UserRoles.NameRole));
255+ target: LightDM.Greeter
258+ // inefficient, but we only rarely deal with messages
259+ text = text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<br>");
261+ text = "<font color=\"#df382c\">" + text + "</font>"
262+ if (infoLabel.text == "")
263+ infoLabel.text = text;
265+ infoLabel.text = infoLabel.text + "<br>" + text;
269+ passwordInput.text = "";
270+ passwordInput.placeholderText = text;
271+ passwordInput.enabled = true;
272+ passwordInput.echoMode = isSecret ? TextInput.Password : TextInput.Normal;
273+ if (root.wasPrompted) // stay in text field if second prompt
274+ passwordInput.focus = true;
275+ root.wasPrompted = true;
278+ onAuthenticationComplete: {
279+ if (LightDM.Greeter.promptless) {
280+ passwordInput.placeholderText = LightDM.Greeter.authenticated ? "Tap to unlock" : "Retry";
283+ if (LightDM.Greeter.authenticated) {
284+ root.unlocked(userList.currentIndex);
286+ wrongPasswordAnimation.start();
287+ root.resetAuthentication();
288+ passwordInput.focus = true;
290+ passwordInput.text = "";
qml/Greeter/ObjectPositioner.qml → Greeter/ObjectPositioner.qmlrenamed+2−2
@@ -14,8 +14,8 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
21 property int count
21 property int count
Greeter/PassphraseLockscreen.qmlnew file+87
@@ -0,0 +1,87 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
23+ height: highlightItem.height
25+ property alias placeholderText: pinentryField.placeholderText
26+ property string username: ""
28+ signal entered(string passphrase)
31+ function clear(playAnimation) {
32+ pinentryField.text = "";
34+ wrongPasswordAnimation.start();
36+ pinentryField.focus = false
44+ anchors.centerIn: parent
45+ color: Qt.rgba(0.1, 0.1, 0.1, 0.4)
46+ border.color: Qt.rgba(0.4, 0.4, 0.4, 0.4)
47+ border.width: units.dp(1)
48+ radius: units.gu(1.5)
52+ objectName: "greeterLabel"
57+ margins: units.gu(1.5)
59+ text: root.username.length > 0 ? i18n.tr("Hello %1").arg(root.username) : i18n.tr("Hello")
65+ objectName: "pinentryField"
67+ horizontalCenter: parent.horizontalCenter
68+ bottom: parent.bottom
71+ height: units.gu(4.5)
72+ width: parent.width - units.gu(2)
73+ echoMode: TextInput.Password
75+ hasClearButton: false
78+ root.entered(pinentryField.text);
83+ WrongPasswordAnimation {
84+ id: wrongPasswordAnimation
85+ target: pinentryField
Greeter/PinLockscreen.qmlnew file+180
@@ -0,0 +1,180 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Ubuntu.Components.ListItems 0.1
20+import "../Components"
24+ anchors.centerIn: parent
25+ spacing: units.gu(3.5)
27+ property alias placeholderText: pinentryField.placeholderText
28+ property int padWidth: units.gu(34)
29+ property int padHeight: units.gu(28)
30+ property int pinLength: 4
32+ signal entered(string passphrase)
35+ function clear(playAnimation) {
36+ pinentryField.text = "";
38+ wrongPasswordAnimation.start();
45+ objectName: "pinentryField"
46+ anchors.horizontalCenter: parent.horizontalCenter
51+ property string text: ""
52+ property string placeholderText: ""
54+ pinentryFieldLabel.text = "";
55+ for (var i = 0; i < text.length; ++i) {
56+ pinentryFieldLabel.text += "•";
58+ if (text.length === root.pinLength) {
64+ id: pinentryFieldLabel
65+ anchors.centerIn: parent
66+ font.pixelSize: units.dp(44)
71+ id: pinentryFieldPlaceHolder
72+ anchors.centerIn: parent
74+ text: parent.placeholderText
75+ visible: pinentryFieldLabel.text.length == 0
83+ margins: (parent.width - root.padWidth) / 2
85+ height: root.padHeight
94+ topMargin: root.padHeight / 4
101+ verticalCenter: parent.verticalCenter
108+ bottom: parent.bottom
109+ bottomMargin: root.padHeight / 4
114+ anchors.centerIn: parent
115+ anchors.horizontalCenterOffset: -root.padWidth / 6
116+ width: root.padHeight
120+ anchors.centerIn: parent
121+ anchors.horizontalCenterOffset: root.padWidth / 6
122+ width: root.padHeight
130+ margins: (parent.width - root.padWidth) / 2
139+ objectName: "pinPadButton" + (index + 1)
140+ width: root.padWidth / 3
141+ height: root.padHeight / 4
145+ pinentryField.text = pinentryField.text + text;
151+ objectName: "pinPadButtonBack"
152+ width: root.padWidth / 3
153+ height: root.padHeight / 4
155+ onClicked: root.cancel();
159+ objectName: "pinPadButton0"
160+ width: root.padWidth / 3
161+ height: root.padHeight / 4
163+ onClicked: pinentryField.text = pinentryField.text + text
167+ objectName: "pinPadButtonErase"
168+ width: root.padWidth / 3
169+ height: root.padHeight / 4
171+ onClicked: pinentryField.text = pinentryField.text.substring(0, pinentryField.text.length-1)
176+ WrongPasswordAnimation {
177+ id: wrongPasswordAnimation
178+ target: pinentryField
tests/qmltests/Components/tst_DragHandle/SimpleButton.qml → Greeter/PinPadButton.qmlrenamed+23−11
@@ -1,5 +1,5 @@
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,21 +14,33 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
23− property alias text: textItem.text
23+ property alias text: label.text
24+ property alias iconName: icon.name
24 signal clicked()
26 signal clicked()
25− width: textItem.width + units.gu(1.5)
27+
26− height: textItem.height + units.gu(1.5)
28+ Label {
29 anchors.centerIn: parent
30 anchors.centerIn: parent
30− font.pixelSize: units.gu(1.5)
31+ color: "#f3f3e7"
33+ font.weight: Font.DemiBold
40+ anchors.centerIn: parent
32 MouseArea {
44 MouseArea {
33 anchors.fill: parent
45 anchors.fill: parent
34 onClicked: root.clicked()
46 onClicked: root.clicked()
Greeter/graphics/dot_empty.pngnew file
Binary file not shown.
Greeter/graphics/dot_filled.pngnew file
Binary file not shown.
Greeter/graphics/dot_pointer.pngnew file
Binary file not shown.
Greeter/graphics/icon_arrow.pngnew file
Binary file not shown.
Greeter/graphics/infographic_circle_back.pngnew file
Binary file not shown.
GreeterShell.qmlnew file+209
@@ -0,0 +1,209 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+import AccountsService 0.1
19+import LightDM 0.1 as LightDM
22+import SessionBroadcast 0.1
23+import Unity.Application 0.1
24+import Unity.Launcher 0.1
26+import "Components/Math.js" as MathLocal
34+ function activateApplication(appId) {
35+ SessionBroadcast.requestApplicationStart(LightDM.Greeter.authenticationUser, appId)
40+ id: backgroundSettings
41+ schema.id: "org.gnome.desktop.background"
43+ backgroundFallbackSource: backgroundSettings.pictureUri // for ease of customization by system builders
44+ backgroundSource: AccountsService.backgroundFile
48+ hides: [launcher, panel.indicators]
51+ showAnimation: StandardAnimation { property: "opacity"; to: 1 }
52+ hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
54+ x: required ? 0 : - width
56+ height: parent.height - panel.panelHeight
58+ onUnlocked: lockscreen.hide()
59+ onCancel: greeter.show()
61+ Component.onCompleted: {
62+ if (LightDM.Users.count == 1) {
63+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
70+ target: LightDM.Greeter
73+ if (LightDM.Users.count == 1) {
74+ // TODO: There's no better way for now to determine if its a PIN or a passphrase.
76+ lockscreen.alphaNumeric = false
78+ lockscreen.alphaNumeric = true
80+ lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
88+ objectName: "greeter"
91+ hides: [launcher, panel.indicators]
93+ background: shell.background
97+ height: parent.height - panel.panelHeight
99+ dragHandleWidth: shell.edgeSize
103+ LightDM.Greeter.startSessionSync();
109+ // If there is only one user, we start authenticating with that one here.
110+ // If there are more users, the Greeter will handle that
111+ if (LightDM.Users.count == 1) {
112+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
113+ greeter.selected(0);
115+ greeter.forceActiveFocus();
117+ else if (LightDM.Greeter.promptless)
123+ // Update launcher items for new user
124+ var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
125+ AccountsService.user = user;
126+ LauncherModel.setUser(user);
129+ onLeftTeaserPressedChanged: {
130+ if (leftTeaserPressed) {
137+ anchors.fill: parent
143+ objectName: "greeterRevealer"
145+ property real animatedProgress: MathLocal.clamp(-dragPosition / closedValue, 0, 1)
147+ width: greeter.width
148+ height: greeter.height
149+ handleSize: shell.edgeSize
150+ orientation: Qt.Horizontal
151+ enabled: !greeter.locked
157+ anchors.fill: parent
161+ anchors.fill: parent //because this draws indicator menus
162+ indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
165+ available: !edgeDemo.active
167+ fullscreenMode: false
168+ searchVisible: false
174+ anchors.top: parent.top
175+ anchors.bottom: parent.bottom
177+ dragAreaWidth: shell.edgeSize
178+ available: greeter.narrowMode && !edgeDemo.active
179+ onLauncherApplicationSelected: {
180+ shell.activateApplication(appId)
184+ panel.indicators.hide()
187+ onDashItemSelected: greeter.show()
195+ onDisplayPowerStateChange: {
196+ if (status == Powerd.Off) {
198+ edgeDemo.paused = true;
199+ } else if (status == Powerd.On) {
200+ edgeDemo.paused = false;
@@ -0,0 +1,493 @@
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
21+import "../Components"
26+ readonly property real elementsPadding: units.gu(1)
27+ readonly property real elementsYSliding: units.gu(2)
29+ property alias revealerTarget: hudShowable
30+ property alias showAnimation: hudShowable.showAnimation
31+ property alias hideAnimation: hudShowable.hideAnimation
32+ property alias available: hudShowable.available
33+ property alias shown: hudShowable.shown
34+ property alias handleHeight: handle.height
36+ readonly property variant outEasing: Easing.OutQuad
37+ readonly property variant inEasing: Easing.InQuad
38+ readonly property int animationDuration: 200
39+ readonly property int showableAnimationDuration: 100
40+ property bool showingOpenIndicator: false
42+ // FIXME At the moment since we have no appstack
43+ // it's not possible to get results of the sidestage app
44+ // design has to come up with a solution
51+ function resetToInitialState() {
52+ hud.state = "initial"
55+ parametrizedActionsPage.shown = false
61+ PropertyChanges { target: searchBar; placeholderText: i18n.tr("Type or say a command") }
62+ PropertyChanges { target: searchBar; searchEnabled: true }
63+ PropertyChanges { target: toolBarAnimator; visible: true}
64+ AnchorChanges { target: searchBarAnimator; anchors.top: undefined; anchors.bottom: parent.bottom; }
65+ AnchorChanges { target: resultsCardAnimator; anchors.top: undefined; anchors.bottom: toolBarAnimator.top; }
68+ name: "input" //only inherited by other states.
69+ AnchorChanges { target: searchBarAnimator; anchors.top: parent.top; anchors.bottom: undefined; }
70+ AnchorChanges { target: resultsCardAnimator; anchors.top: searchBarAnimator.bottom; anchors.bottom: undefined; }
71+ PropertyChanges { target: toolBarAnimator; visible: false }
74+ name: "voice_input" //only inherited by other states.
76+ PropertyChanges { target: soundAmplitudeVisualAnimator; visible: true }
77+ PropertyChanges { target: resultsCardAnimator; visible: false }
78+ PropertyChanges { target: soundAmplitudeVisualAnimator; progress: 1 }
79+ PropertyChanges { target: searchBar; searchEnabled: false }
82+ name: "voice_recognition_loading"
83+ extend: "voice_input"
84+ PropertyChanges { target: searchBar; placeholderText: i18n.tr("Loading. Please Wait...") }
87+ name: "voice_recognition_listening"
88+ extend: "voice_input"
89+ PropertyChanges { target: searchBar; placeholderText: i18n.tr("Speak Now...") }
92+ name: "voice_recognition_processing"
93+ extend: "voice_input"
94+ PropertyChanges { target: searchBar; placeholderText: i18n.tr("Speaking...") }
97+ name: "showing_results"
99+ PropertyChanges { target: searchBar; placeholderText: i18n.tr("Type or say a command") }
100+ PropertyChanges { target: searchBar; searchEnabled: true }
107+ to: "voice_recognition_loading"
108+ SequentialAnimation {
109+ NumberAnimation { // hide these components
110+ targets: [toolBarAnimator, searchBarAnimator, resultsCardAnimator]
111+ property: "progress"; duration: animationDuration; to: 0
114+ PropertyAction { targets: [toolBarAnimator, resultsCardAnimator]; property: "visible"; value: false}
115+ PropertyAction { target: soundAmplitudeVisualAnimator; property: "visible"; value: true}
117+ AnchorAnimation { duration: 0 } // so anchor change happens at this point
119+ NumberAnimation { // show these components
120+ targets: [searchBarAnimator, soundAmplitudeVisualAnimator]
121+ property: "progress"; duration: animationDuration; from: 0; to: 1
126+ from: "showing_results"
127+ to: "voice_recognition_loading"
128+ SequentialAnimation {
129+ PropertyAction { target: soundAmplitudeVisualAnimator; property: "progress"; value: 0}
131+ PropertyAction { // hide these components
132+ target: resultsCardAnimator; property: "progress"; value: 0
135+ NumberAnimation { // show these components
136+ target: soundAmplitudeVisualAnimator; property: "progress"; duration: animationDuration; from: 0; to: 1
141+ from: "voice_recognition_processing"
142+ to: "showing_results"
143+ SequentialAnimation {
144+ NumberAnimation { // hide these components
145+ target: soundAmplitudeVisualAnimator; property: "progress"; duration: animationDuration; to: 0
147+ PropertyAction { target: resultsCardAnimator; property: "visible"; value: true}
149+ NumberAnimation { // show these components
150+ target: resultsCardAnimator; property: "progress"; duration: animationDuration; from: 0; to: 1
156+ to: "showing_results"
157+ SequentialAnimation {
159+ targets: [toolBarAnimator, searchBarAnimator, resultsCardAnimator]
160+ property: "progress"; duration: animationDuration; to: 0
163+ PropertyAction { target: toolBarAnimator; property: "visible"; value: false}
165+ AnchorAnimation { duration: 0 } // so anchor change happens at this point
168+ targets: [searchBarAnimator, resultsCardAnimator]
169+ property: "progress"; duration: animationDuration; from: 0; to: 1
180+ onCommandExecuted: {
184+ onShowParametrizedAction: {
185+ parametrizedActionsPage.header = action
186+ parametrizedActionsPage.setItems(items)
187+ parametrizedActionsPage.shown = true
190+ onVoiceQueryLoading: {
191+ hud.state = "voice_recognition_loading"
192+ searchBar.ignoreNextTextChange = true
195+ soundAmplitudeVisual.startIdle()
197+ onVoiceQueryListening: {
198+ if (hud.state == "voice_recognition_loading" || hud.state == "showing_results") {
199+ searchBar.ignoreNextTextChange = true
202+ hud.state = "voice_recognition_listening"
205+ onVoiceQueryHeardSomething: {
206+ if (hud.state == "voice_recognition_listening") {
207+ hud.state = "voice_recognition_processing"
208+ soundAmplitudeVisual.setDetectorEnabled(true)
211+ onVoiceQueryFinished: {
212+ hud.state = "showing_results"
213+ searchBar.text = query
214+ soundAmplitudeVisual.setDetectorEnabled(false)
216+ onVoiceQueryFailed: {
217+ hud.state = "showing_results"
219+ soundAmplitudeVisual.setDetectorEnabled(false)
225+ objectName: "hudShowable"
226+ height: parent.height
230+ if (!showAnimation.running && !hideAnimation.running) {
231+ if (parent.height > 0) {
232+ showAnimation.duration = Math.min(showableAnimationDuration * (1 - (parent.height - y) / parent.height), showableAnimationDuration)
233+ hideAnimation.duration = showableAnimationDuration - showAnimation.duration
239+ // Eat everything that doesn't go to other places
240+ anchors.fill: parent
244+ anchors.fill: parent
245+ fillMode: Image.Tile
246+ source: "graphics/hud_bg.png"
250+ target: hideAnimation
252+ if (!hideAnimation.running) {
253+ showAnimation.duration = showableAnimationDuration
254+ hud.resetToInitialState()
260+ target: showAnimation
262+ if (!showAnimation.running) {
263+ hideAnimation.duration = showableAnimationDuration
271+ objectName: "handle"
278+ height: handleImage.height
286+ source: "graphics/hud_handlebar.png"
292+ anchors.horizontalCenter: parent.horizontalCenter
293+ source: "graphics/hud_handlearrow.png"
299+ id: hudContentClipper
304+ bottom: parent.bottom
307+ clip: visible && hudContent.height !== height
308+ visible: hudContent.height >= 0
315+ bottom: parent.bottom
321+ x: parametrizedActionsPage.x - width
327+ objectName: "toolBarAnimator"
331+ bottom: searchBarAnimator.top
332+ margins: 2*elementsPadding //ensures positioning correct
334+ progress: MathUtils.clamp((y - hudShowable.y - anchors.margins)/elementsYSliding, 0, 1)
338+ objectName: "toolBar"
339+ model: hudClient.toolBarModel
340+ anchors.horizontalCenter: parent.horizontalCenter
341+ onActionTriggered: {
342+ hudClient.executeToolBarAction(action)
348+ id: searchBarAnimator
349+ objectName: "searchBarAnimator"
353+ bottom: parent.bottom
354+ margins: elementsPadding
355+ topMargin: handle.height + units.dp(1) + elementsPadding
357+ progress: MathUtils.clamp((y - hudShowable.y - anchors.margins)/elementsYSliding, 0, 1)
361+ objectName: "searchBar"
363+ property bool ignoreNextTextChange: false
365+ anchors.left: parent.left
366+ anchors.right: parent.right
369+ placeholderText: i18n.tr("Type or say a command")
370+ activityIndicatorVisible: hud.state == "voice_recognition_processing"
372+ onMicrophoneClicked: hudClient.startVoiceQuery()
375+ if (ignoreNextTextChange) {
376+ ignoreNextTextChange = false
378+ hudClient.setQuery(searchBar.text)
383+ hud.state = "showing_results"
389+ id: resultsCardAnimator
390+ objectName: "resultsCardAnimator"
395+ top: searchBarAnimator.bottom
396+ margins: elementsPadding
398+ progress: MathUtils.clamp((y - hudShowable.y + height - units.gu(8))/elementsYSliding, 0, 1)
401+ anchors.left: parent.left
402+ anchors.right: parent.right
403+ contentHeight: resultList.height
405+ clip: height < contentHeight
406+ interactive: height < contentHeight
409+ if (hud.state == "showing_results") {
410+ return shell.applicationManager.keyboardVisible ? Math.min(hud.height - searchBarAnimator.y - searchBarAnimator.height - units.gu(2) - shell.applicationManager.keyboardHeight, contentHeight) : contentHeight
412+ return contentHeight
420+ anchors.left: parent.left
421+ anchors.right: parent.right
422+ height: childrenRect.height
425+ hudClient.executeCommand(index)
428+ model: hudClient.results
434+ id: soundAmplitudeVisualAnimator
437+ horizontalCenter: parent.horizontalCenter
438+ verticalCenter: parent.verticalCenter
439+ verticalCenterOffset: (searchBar.height + 2*elementsPadding)/2
443+ progress: MathUtils.clamp((y - hudShowable.y - anchors.verticalCenterOffset)/elementsYSliding, 0, 1)
445+ SoundAmplitudeVisual {
446+ id: soundAmplitudeVisual
453+ HudParametrizedActionsPage {
454+ id: parametrizedActionsPage
455+ objectName: "parametrizedActionsPage"
456+ property bool shown: false
458+ anchors.bottom: parent.bottom
459+ height: hud.height - handle.height - units.dp(1)
461+ x: shown ? 0 : width
463+ hudClient.executeParametrizedAction(values())
466+ hudClient.updateParametrizedAction(values())
473+ hudClient.cancelParametrizedAction()
478+ easing.type: outEasing
479+ duration: animationDuration
487+ anchors.left: hudContentClipper.right
488+ anchors.top: hudContentClipper.top
489+ anchors.bottom: hudContentClipper.bottom
490+ fillMode: Image.Tile
491+ source: "graphics/dropshadow_right.png"
Hud/HudParametrizedActionsPage.qmlnew file+172
@@ -0,0 +1,172 @@
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
22+ property alias header: header.text
24+ signal confirmPressed
32+ function setItems(items) {
33+ while (actionItems.count > 0) {
34+ var item = actionItems.get(0).item
35+ actionItems.remove(0)
40+ var sliderCreator = Qt.createComponent("SliderLabel.qml");
42+ var topAnchor = header.bottom
43+ for (var i = 0; i < items.length; i++) {
45+ if (item["parameter-type"] == "slider")
47+ var slider = sliderCreator.createObject(flickableColumn);
48+ slider.anchors.left = flickableColumn.left
49+ slider.anchors.right = flickableColumn.right
50+ slider.anchors.topMargin = first ? units.gu(1) : units.gu(2)
51+ slider.anchors.top = topAnchor
52+ slider.tooltip = tooltip
53+ slider.sliderData = item
54+ topAnchor = slider.bottom
55+ actionItems.append({"item": slider})
56+ slider.onValueChanged.connect(valueChanged)
62+ function valueChanged()
69+ for (var i = 0; i < actionItems.count; ++i) {
70+ var item = actionItems.get(i).item
71+ values[item.action] = item.value
77+ anchors.top: parent.top
78+ anchors.bottom: buttons.top
79+ anchors.left: parent.left
80+ anchors.right: parent.right
83+ flickableDirection: Flickable.VerticalFlick
84+ interactive: !tooltip.visible
88+ anchors.top: parent.top
89+ anchors.left: parent.left
90+ anchors.right: parent.right
94+ anchors.top: parent.top
95+ anchors.left: parent.left
96+ anchors.right: parent.right
97+ anchors.topMargin: units.gu(1)
103+ anchors.bottom: parent.bottom
104+ anchors.left: parent.left
105+ anchors.right: parent.right
106+ anchors.margins: units.gu(1)
107+ height: confirmButton.height
111+ anchors.left: parent.left
112+ anchors.top: parent.top
113+ anchors.bottom: parent.bottom
118+ anchors.fill: parent
119+ onClicked: backPressed()
123+ anchors.centerIn: backButton
124+ source: "graphics/icon_arrow.png"
129+ anchors.right: parent.right
132+ text: i18n.tr("Confirm")
134+ onClicked: confirmPressed()
140+ property variant target: undefined
141+ visible: target != undefined
142+ y: visible ? root.mapFromItem(target.parent, 0, target.y).y - height : 0
143+ x: visible ? target.anchors.leftMargin + target.__internals.thumb.x + target.__internals.thumb.width / 2 - width / 2 : 0
145+ width: childrenRect.width
146+ height: childrenRect.height
149+ id: tooltipRectangle
153+ radius: units.gu(0.5)
156+ anchors.fill: parent
157+ text: tooltip.target ? tooltip.target.realFormatValue(tooltip.target.value) : ""
158+ horizontalAlignment: Text.AlignHCenter
159+ verticalAlignment: Text.AlignVCenter
165+ source: "graphics/popup_triangle.png"
167+ anchors.top: tooltipRectangle.bottom
168+ anchors.horizontalCenter: parent.horizontalCenter
Hud/Result.qmlnew file+84
@@ -0,0 +1,84 @@
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
21+ property string contextSnippetText
22+ property variant contextSnippetHighlights
23+ property string nameText
24+ property variant nameHighlights
26+ function highlightedText(text, highlights) {
28+ var nextIndexToProcess = 0;
29+ if (highlights && highlights.length % 2 == 0) {
30+ for (var i = 0; i < highlights.length - 1; i += 2) {
31+ var highlightStart = highlights[i];
32+ var highlightEnd = highlights[i + 1];
33+ if (highlightEnd < highlightStart)
35+ if (highlightStart < nextIndexToProcess)
37+ if (highlightStart != nextIndexToProcess) {
38+ // Prev non marked text
39+ hText += text.substr(nextIndexToProcess, highlightStart - nextIndexToProcess);
43+ hText += "<font color=\"#ffffff\">" + text.substr(highlightStart, highlightEnd - highlightStart + 1) + "</font>";
44+ nextIndexToProcess = highlightEnd + 1;
47+ if (nextIndexToProcess != text.length) {
48+ // End non marked text
49+ hText += text.substr(nextIndexToProcess);
56+ objectName: "actionLabel"
57+ anchors.left: parent.left
58+ anchors.leftMargin: units.gu(1)
59+ anchors.verticalCenter: parent.verticalCenter
60+ width: parent.width / 2
62+ elide: Text.ElideRight
64+ text: highlightedText(nameText, nameHighlights)
69+ horizontalAlignment: Text.AlignRight
70+ id: contextSnippetLabel
71+ objectName: "contextSnippetLabel"
72+ width: parent.width / 2 - units.gu(1)
74+ anchors.right: parent.right
75+ anchors.rightMargin: units.gu(1)
76+ anchors.verticalCenter: parent.verticalCenter
79+ elide: Text.ElideRight
81+ text: highlightedText(contextSnippetText, contextSnippetHighlights)
Hud/ResultList.qmlnew file+106
@@ -0,0 +1,106 @@
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
21+ property var model: undefined
23+ // Hud gives lots of results, make sure we have 5 at most
24+ // FIXME This should use SortFilterProxyModel
25+ // but there is a problem with the hud-service refreshing the
26+ // data for no reason so we use the internal model + timer
27+ // to fix those issues
34+ // Accumulate count changes since hud clears
35+ // and then readds items to the models which means
36+ // even if the result is the same we get lots of count changes
37+ onCountChanged: updateModelTimer.restart()
40+ onModelChanged: updateModelTimer.restart()
45+ onTriggered: updateModel()
48+ function updateModel() {
49+ internalModel.clear()
50+ for (var i = 0; i < 5 && i < model.count; ++i) {
51+ var itemData = model.get(i)
52+ internalModel.append({"name": itemData.column_1, "highlights": itemData.column_2, "context": itemData.column_3, "contextHighlights": itemData.column_4})
56+ signal activated(int index)
58+ height: repeater.height
62+ objectName: "resultListRepeater"
65+ delegate: MouseArea {
67+ height: result.height + separatorLine.height * 2
68+ anchors.left: parent.left
69+ anchors.right: parent.right
71+ onClicked: activated(index)
75+ anchors.top: parent.top
76+ anchors.left: parent.left
77+ anchors.right: parent.right
78+ source: "graphics/divider.sci"
85+ anchors.top: separatorLine.bottom
86+ anchors.left: parent.left
87+ anchors.right: parent.right
90+ nameHighlights: highlights
91+ contextSnippetText: context
92+ contextSnippetHighlights: contextHighlights
96+ anchors.top: result.bottom
97+ anchors.left: parent.left
98+ anchors.right: parent.right
99+ source: "graphics/divider.sci"
102+ Component.onCompleted: fadeIn.start()
103+ NumberAnimation { id: fadeIn; target: resultList; alwaysRunToEnd: true; property: "opacity"; duration: 200; from: 0; to: 1 }
Hud/SearchBar.qmlnew file+100
@@ -0,0 +1,100 @@
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
22+ property alias activityIndicatorVisible: activityIndicator.visible
23+ property alias text: searchBar.text
24+ property alias placeholderText: searchBar.placeholderText
25+ property alias searchEnabled: searchBar.enabled
26+ signal microphoneClicked
29+ readonly property real imageSize: units.gu(3)
33+ searchBar.focus = false
37+ id: activityIndicator
49+ hasClearButton: false
50+ font.pixelSize: FontUtils.sizeToPixels("large")
52+ onActiveFocusChanged: {
60+ height: searchBar.height
67+ anchors.centerIn: parent
68+ source: "graphics/icon_search.png"
69+ visible: !activityIndicator.visible && !clearImage.visible
76+ anchors.centerIn: parent
77+ source: "graphics/icon_clear.png"
78+ visible: !activityIndicator.visible && searchBar.text != ""
81+ onClicked: searchBar.text = ""
87+ secondaryItem: MouseArea {
88+ height: searchBar.height
90+ onClicked: microphoneClicked()
95+ anchors.centerIn: parent
96+ source: "graphics/microphone.png"
Hud/ShowingAnimation.qmlnew file+54
@@ -0,0 +1,54 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
23+ property real yOffsetAtAnimationStart: units.gu(2)
24+ property real progress: 0
25+ property int animationDuration: 200
26+ default property alias __itemsToAnimate: container.children
28+ property bool showing: progress > 0
30+ height: childrenRect.height
38+ height: childrenRect.height
41+ NumberAnimation {id: opacityAnimation; target: container; property: "opacity"; from: 0; to: 1; duration: animationDuration}
42+ NumberAnimation {id: yAnimation; target: container; property: "y"; from: yOffsetAtAnimationStart; to: 0; duration: animationDuration}
44+ // FIXME This would much more sense in a ParallelAnimation and just
45+ // one AnimationController but that goes something crazy and rendering never stops
46+ AnimationController {
47+ animation: opacityAnimation
48+ progress: root.progress
50+ AnimationController {
51+ animation: yAnimation
52+ progress: root.progress
Hud/SliderLabel.qmlnew file+74
@@ -0,0 +1,74 @@
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
21+ height: childrenRect.height
22+ width: childrenRect.width
23+ property variant tooltip
25+ property variant sliderData
26+ property string action
27+ property alias value: slider.value
29+ // TODO We should not need this but without it
30+ // slider.onValueChanged.connect(valueChanged) in
31+ // HudParametrizedActionsPage.qml doesn't work
32+ // Michael thinks it's related to https://bugreports.qt-project.org/browse/QTBUG-29141
35+ onSliderDataChanged: {
36+ label.text = sliderData["label"]
37+ slider.minimumValue = sliderData["min"]
38+ slider.maximumValue = sliderData["max"]
39+ slider.live = sliderData["live"]
40+ // SDK Slider does not support step yet
41+// slider.step = sliderData["step"]
42+ slider.value = sliderData["value"]
43+ action = sliderData["action"]
48+ anchors.top: parent.top
49+ anchors.left: parent.left
50+ anchors.right: parent.right
51+ anchors.margins: units.gu(1)
52+ anchors.leftMargin: units.gu(2)
57+ anchors.top: label.bottom
58+ anchors.left: parent.left
59+ anchors.right: parent.right
60+ anchors.margins: units.gu(1)
63+ function realFormatValue(v) { return Math.round(v) + " %" }
64+ function formatValue(v) { return tooltip.target == slider ? "" : realFormatValue(v) }
65+ onPressedChanged: tooltip.target = pressed ? slider : undefined
68+ source: "graphics/divider.sci"
69+ anchors.top: slider.bottom
70+ anchors.left: parent.left
71+ anchors.right: parent.right
72+ anchors.topMargin: units.gu(2)
Hud/SoundAmplitudeDelegate.qmlnew file+52
@@ -0,0 +1,52 @@
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21+ property real amplitude: 0
22+ property int totalCount
23+ property int ballIndex
25+ var t = amplitude / 0.6
27+ return units.gu(0.25) + units.gu(5) * t
29+ visible: amplitude != 0
35+ // TODO This formula has hardocded values everywhere :D
37+ var dampenAfterThisIndex = 7
38+ if (ballIndex < dampenAfterThisIndex) {
39+ t = (totalCount - ballIndex) / totalCount
40+ return Math.pow(t, 4);
42+ t = (totalCount - dampenAfterThisIndex) / totalCount
45+ return 0.09 + t * (totalCount - ballIndex) / (totalCount - dampenAfterThisIndex)
49+ property double orbitRadius: ((parent.width - units.gu(6)) / 2)
50+ x: -(width / 2) + (parent.width / 2) + orbitRadius * Math.sin((ballIndex / totalCount) * (2 * Math.PI))
51+ y: -(height / 2) + (parent.height / 2) - orbitRadius * Math.cos((ballIndex / totalCount) * (2 * Math.PI))
Hud/SoundAmplitudeVisual.qmlnew file+146
@@ -0,0 +1,146 @@
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23+ readonly property int totalSpots: 30
24+ readonly property int totalIdles: 7
26+ property real __newPeak: 0
30+ desiredInterval: peakMover.interval
42+ voiceAmplitudes.itemAt(0).amplitude = __newPeak
47+ id: fixedPositionSoundAmplitudes
49+ delegate: SoundAmplitudeDelegate {
50+ totalCount: fixedPositionSoundAmplitudes.count
60+ delegate: SoundAmplitudeDelegate {
61+ totalCount: voiceAmplitudes.count
69+ delegate: SoundAmplitudeDelegate {
70+ totalCount: idleAmplitudes.count
73+ visible: idleAmplitudes.enabled
77+ function setDetectorEnabled(enabled) {
78+ idleAmplitudes.enabled = false
82+ peakDetector.enabled = false
87+ function moveBalls() {
89+ var amplitude = voiceAmplitudes.itemAt(0).amplitude
90+ for (var i = 1; i < totalSpots; ++i) {
91+ var item = voiceAmplitudes.itemAt(i)
92+ var tempAmplitude = item.amplitude
93+ item.amplitude = amplitude
94+ amplitude = tempAmplitude
98+ property int __firstIdle
99+ property int __idleCount
104+ onTriggered: moveAndAddIdleBalls()
107+ function moveAndAddIdleBalls() {
108+ // Check if we are doing the real thing
109+ if (!idleAmplitudes.enabled) {
113+ for (var i = 0; i < __idleCount; ++i) {
114+ var index = __firstIdle - i
115+ var item = idleAmplitudes.itemAt(index % totalSpots)
116+ var nextItem = idleAmplitudes.itemAt((index + 1) % totalSpots)
117+ nextItem.opacity = item.opacity
120+ idleAmplitudes.itemAt((__firstIdle - __idleCount) % totalSpots).opacity = 0
122+ if (__idleCount < totalIdles) {
123+ idleAmplitudes.itemAt(0).opacity = 1 - (__idleCount / totalIdles)
126+ idleBallsTimer.start()
129+ function startIdle() {
130+ // On the device the peak detector takes quite a lot to start up
131+ // so enable it as soon as we know we are going to do voice capture
132+ peakDetector.enabled = true
133+ for (var i = 0; i < totalSpots; ++i) {
134+ idleAmplitudes.itemAt(i).opacity = 0
136+ for (var i = 0; i < totalSpots; ++i) {
137+ voiceAmplitudes.itemAt(i).amplitude = 0
140+ idleAmplitudes.enabled = true
141+ idleAmplitudes.itemAt(0).opacity = 1
144+ idleBallsTimer.start()
tests/mocks/Utils/URLDispatcher.cpp → Hud/ToolBar.qmlrenamed+14−19
@@ -1,5 +1,5 @@
2− * Copyright (C) 2016 Canonical, Ltd.
2+ * Copyright (C) 2012, 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,25 +14,20 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−#include "URLDispatcher.h"
17+import QtQuick 2.0
19−#include <QDBusConnection>
20+Row {
21+ signal actionTriggered(int action)
22+ property alias model: repeater.model
21−URLDispatcher::URLDispatcher(QObject *parent)
24+ spacing: units.gu(3)
22− : QObject(parent)
25+ Repeater {
23− , m_active(false)
26+ id: repeater
25−}
28+ source: model.iconPath
26−
29+ onClicked: actionTriggered(model.action)
27−bool URLDispatcher::active() const
30+ enabled: model.enabled
32−void URLDispatcher::setActive(bool value)
34− if (m_active != value) {
36− Q_EMIT activeChanged();
Hud/ToolBarIcon.qmlnew file+32
@@ -0,0 +1,32 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
21+ property alias source: image.source
25+ opacity: enabled ? 1 : 0.5
26+ Behavior on opacity { NumberAnimation { duration: 150 } }
Hud/graphics/divider@20.pngnew file
Binary file not shown.
Hud/graphics/divider@20.scinew file+5
Hud/graphics/dropshadow_right@20.pngnew file
Binary file not shown.
Hud/graphics/help@20.pngnew file
Binary file not shown.
Hud/graphics/hud_bg@20.pngnew file
Binary file not shown.
Hud/graphics/hud_handlearrow@20.pngnew file
Binary file not shown.
Hud/graphics/hud_handlebar@20.pngnew file
Binary file not shown.
Hud/graphics/icon_arrow@20.pngnew file
Binary file not shown.
Hud/graphics/icon_clear@20.pngnew file
Binary file not shown.
Hud/graphics/icon_search@20.pngnew file
Binary file not shown.
Hud/graphics/microphone@20.pngnew file
Binary file not shown.
Hud/graphics/popup_triangle@20.pngnew file
Binary file not shown.
Hud/graphics/settings@20.pngnew file
Binary file not shown.
Hud/graphics/undo@20.pngnew file
Binary file not shown.
Hud/graphics/view-fullscreen@20.pngnew file
Binary file not shown.
@@ -1,2 +0,0 @@
1−@Library('ubports-build-tools') _
2−buildAndProvideDebianPackage()
qml/Launcher/FoldingLauncherDelegate.qml → Launcher/FoldingLauncherDelegate.qmlrenamed+2−2
@@ -14,8 +14,8 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
20LauncherDelegate {
20LauncherDelegate {
Launcher/Launcher.qmlnew file+253
@@ -0,0 +1,253 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import "../Components"
19+import Ubuntu.Components 0.1
20+import Ubuntu.Gestures 0.1
22+import Unity.Launcher 0.1
27+ property bool available: true // can be used to disable all interactions
29+ property int panelWidth: units.gu(8)
30+ property int dragAreaWidth: units.gu(1)
31+ property int minimizeDistance: panelWidth * 2.5
32+ property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
33+ (width * (dragArea.touchX-panelWidth) / (width - panelWidth)) : 0
35+ readonly property bool shown: panel.x > -panel.width
37+ // emitted when an application is selected
38+ signal launcherApplicationSelected(string appId)
40+ // emitted when the apps dash should be shown because of a swipe gesture
43+ // emitted when the dash icon in the launcher has been tapped
44+ signal dashItemSelected()
50+ dismissTimer.restart()
55+ switchToNextState("")
58+ function switchToNextState(state) {
59+ animateTimer.nextState = state
60+ animateTimer.start();
78+ if (!panel.preventHiding) {
81+ dismissTimer.restart()
86+ // Because the animation on x is disabled while dragging
87+ // switching state directly in the drag handlers would not animate
88+ // the completion of the hide/reveal gesture. Lets update the state
89+ // machine and switch to the final state in the next event loop run
93+ property string nextState: ""
95+ // switching to an intermediate state here to make sure all the
96+ // values are restored, even if we were already in the target state
98+ root.state = nextState
103+ id: launcherDragArea
104+ enabled: root.state == "visible"
106+ anchors.rightMargin: -units.gu(2)
114+ if (panel.x < -panel.width/3) {
115+ root.switchToNextState("")
117+ root.switchToNextState("visible")
125+ left: launcherDragArea.right
128+ bottom: parent.bottom
130+ enabled: root.state == "visible"
138+ anchors.fill: parent
140+ opacity: root.state == "visible" ? 0.6 : 0
142+ Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.BriskDuration } }
147+ objectName: "launcherPanel"
148+ enabled: root.available
149+ width: root.panelWidth
152+ bottom: parent.bottom
155+ opacity: (x == -width && dragArea.status === DirectionalDragArea.WaitingForTouch) ? 0 : 1
156+ model: LauncherModel
158+ property bool animate: true
160+ onApplicationSelected: {
162+ launcherApplicationSelected(appId)
164+ onDashItemSelected: {
166+ root.dashItemSelected(index)
169+ onPreventHidingChanged: {
170+ if (dismissTimer.running) {
171+ dismissTimer.restart();
177+ // Disabling animation when dragging
178+ duration: dragArea.dragging || launcherDragArea.drag.active ? 0 : 300;
179+ easing.type: Easing.OutCubic
183+ Behavior on opacity {
185+ duration: UbuntuAnimation.FastDuration; easing.type: Easing.OutCubic
193+ direction: Direction.Rightwards
195+ enabled: root.available
196+ width: root.dragAreaWidth
200+ if (status !== DirectionalDragArea.Recognized || launcher.state == "visible")
203+ // When the gesture finally gets recognized, the finger will likely be
204+ // reasonably far from the edge. If we made the panel immediately
205+ // follow the finger position it would be visually unpleasant as it
206+ // would appear right next to the user's finger out of nowhere.
207+ // Instead, we make the panel go towards the user's finger in several
208+ // steps. ie., in an animated way.
209+ var targetPanelX = Math.min(0, touchX - panel.width)
210+ var delta = targetPanelX - panel.x
211+ // the trick is not to go all the way (1.0) as it would cause a sudden jump
212+ panel.x += 0.4 * delta
215+ onDraggingChanged: {
217+ if (distance > panel.width / 2) {
218+ root.switchToNextState("visible")
219+ if (distance > minimizeDistance) {
223+ root.switchToNextState("")
231+ name: "" // hidden state. Must be the default state ("") because "when:" falls back to this.
246+ when: teaseTimer.running
249+ x: -root.panelWidth + units.gu(2)
qml/Launcher/LauncherDelegate.qml → Launcher/LauncherDelegate.qmlrenamed+54−167
@@ -14,26 +14,19 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Components 1.3
18+import Ubuntu.Components 0.1
23− property int itemIndex: 0
24 property string iconName
23 property string iconName
26− property int count: 0
24+ property int count: -1
27− property bool countVisible: false
28 property int progress: -1
25 property int progress: -1
29− property bool itemRunning: false
26+ property bool highlighted: false
30 property bool itemFocused: false
27 property bool itemFocused: false
31 property real maxAngle: 0
28 property real maxAngle: 0
32 property bool inverted: false
29 property bool inverted: false
33− property bool alerting: false
34− property bool highlighted: false
35− property bool shortcutHintShown: false
36− property int surfaceCount: 1
38 readonly property int effectiveHeight: Math.cos(angle * Math.PI / 180) * itemHeight
31 readonly property int effectiveHeight: Math.cos(angle * Math.PI / 180) * itemHeight
39 readonly property real foldedHeight: Math.cos(maxAngle * Math.PI / 180) * itemHeight
32 readonly property real foldedHeight: Math.cos(maxAngle * Math.PI / 180) * itemHeight
@@ -46,144 +39,84 @@ Item {
46 property real offset: 0
39 property real offset: 0
47 property real itemOpacity: 1
40 property real itemOpacity: 1
48 property real brightness: 0
41 property real brightness: 0
49− property double maxWiggleAngle: 5.0
51− QtObject {
43+ onIconNameChanged: shaderEffectSource.scheduleUpdate();
52− id: priv
44+ onCountChanged: shaderEffectSource.scheduleUpdate();
53−
45+ onProgressChanged: shaderEffectSource.scheduleUpdate();
54− readonly property int wiggleDuration: UbuntuAnimation.SnapDuration
46+ onHighlightedChanged: shaderEffectSource.scheduleUpdate();
55− property real wiggleAngle: 0
47+ onItemFocusedChanged: shaderEffectSource.scheduleUpdate();
58− readonly property var wiggleAnim: SequentialAnimation {
66− property: "wiggleAngle"
69− duration: priv.wiggleDuration
70− easing.type: Easing.InQuad
75− property: "wiggleAngle"
78− duration: priv.wiggleDuration
79− easing.type: Easing.InOutQuad
84− property: "wiggleAngle"
85− from: -maxWiggleAngle
87− duration: priv.wiggleDuration
88− easing.type: Easing.InOutQuad
93− property: "wiggleAngle"
96− duration: priv.wiggleDuration
97− easing.type: Easing.InOutQuad
102− property: "wiggleAngle"
103− from: -maxWiggleAngle
105− duration: priv.wiggleDuration
106− easing.type: Easing.InOutQuad
111− property: "wiggleAngle"
112− from: maxWiggleAngle
114− duration: priv.wiggleDuration
115− easing.type: Easing.OutQuad
120 id: iconItem
50 id: iconItem
121− width: root.width
51+ width: parent.itemWidth + units.gu(1)
122 height: parent.itemHeight + units.gu(1)
52 height: parent.itemHeight + units.gu(1)
123 anchors.centerIn: parent
53 anchors.centerIn: parent
125− StyledItem {
55+ UbuntuShape {
126− styleName: "FocusShape"
127− anchors.fill: iconShape
128− activeFocusOnTab: true
130− visible: root.highlighted
131− radius: units.gu(2.55)
136 id: iconShape
56 id: iconShape
137− anchors.centerIn: parent
57+ anchors.fill: parent
138− width: root.itemWidth
58+ anchors.margins: units.gu(1)
139− aspect: UbuntuShape.DropShadow
59+ radius: "medium"
140− source: Image {
61+ image: Image {
141 id: iconImage
62 id: iconImage
142 sourceSize.width: iconShape.width
63 sourceSize.width: iconShape.width
143 sourceSize.height: iconShape.height
64 sourceSize.height: iconShape.height
144 source: root.iconName
65 source: root.iconName
145− cache: false // see lpbug#1543290 why no cache
149− UbuntuShape {
69+ BorderImage {
150− id: countEmblem
70+ id: overlayHighlight
71+ anchors.centerIn: iconItem
72+ rotation: inverted ? 180 : 0
73+ source: root.highlighted ? "graphics/selected.sci" : "graphics/non-selected.sci"
74+ width: root.itemWidth + units.gu(0.5)
75+ height: root.itemHeight + units.gu(0.5)
151 objectName: "countEmblem"
79 objectName: "countEmblem"
152 anchors {
80 anchors {
153 right: parent.right
81 right: parent.right
154− bottom: parent.bottom
82+ top: parent.top
155− rightMargin: (iconItem.width - root.itemWidth) / 2 - units.dp(2)
156− margins: units.dp(5)
83+ margins: units.dp(3)
158− width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
85+ width: Math.min(root.itemWidth, Math.max(units.gu(3), countLabel.implicitWidth + units.gu(2.5)))
159− height: units.gu(2)
86+ height: units.gu(3)
160− backgroundColor: theme.palette.normal.positive
87+ source: "graphics/notification.sci"
161− visible: root.countVisible
88+ visible: root.count > 0
162− aspect: UbuntuShape.Flat
165 id: countLabel
91 id: countLabel
166− objectName: "countLabel"
167 text: root.count
92 text: root.count
168 anchors.centerIn: parent
93 anchors.centerIn: parent
169 width: root.itemWidth - units.gu(1)
94 width: root.itemWidth - units.gu(1)
170 horizontalAlignment: Text.AlignHCenter
95 horizontalAlignment: Text.AlignHCenter
171 elide: Text.ElideRight
96 elide: Text.ElideRight
172 color: "white"
97 color: "white"
173− fontSize: "x-small"
98+ fontSize: "small"
177− UbuntuShape {
103+ BorderImage {
178 id: progressOverlay
104 id: progressOverlay
179 objectName: "progressOverlay"
105 objectName: "progressOverlay"
181− anchors.centerIn: parent
106+ anchors {
182− width: root.itemWidth * .8
107+ left: iconItem.left
108+ right: iconItem.right
109+ bottom: iconItem.bottom
110+ leftMargin: units.gu(1)
111+ rightMargin: units.gu(1)
112+ bottomMargin: units.gu(1)
183− height: units.dp(3)
114+ height: units.gu(1.5)
184 visible: root.progress > -1
115 visible: root.progress > -1
185− backgroundColor: "white"
116+ source: "graphics/progressbar-trough.sci"
186− borderSource: "none"
117+
118+ // For fill calculation we need to remove the 2 units of border defined in .sci file
119+ property int adjustedWidth: width - units.gu(2)
189 anchors {
122 anchors {
@@ -191,67 +124,28 @@ Item {
191 top: parent.top
124 top: parent.top
192 bottom: parent.bottom
125 bottom: parent.bottom
194− width: Math.min(100, root.progress) / 100 * parent.width
127+ width: Math.min(100, root.progress) / 100 * parent.adjustedWidth + units.gu(1)
195 clip: true
128 clip: true
197− UbuntuShape {
130+ BorderImage {
198 anchors {
131 anchors {
199 left: parent.left
132 left: parent.left
200 top: parent.top
133 top: parent.top
201 bottom: parent.bottom
134 bottom: parent.bottom
203− backgroundColor: theme.palette.normal.activity
204− borderSource: "none"
205 width: progressOverlay.width
136 width: progressOverlay.width
137+ source: "graphics/progressbar-fill.sci"
213− verticalCenter: parent.verticalCenter
215− spacing: units.gu(.5)
217− objectName: "surfacePipRepeater"
218− model: Math.min(3, root.surfaceCount)
220− objectName: "runningHighlight" + index
221− width: units.gu(0.25)
222− height: units.gu(.5)
223− color: root.alerting ? theme.palette.normal.activity : "white"
224− visible: root.itemRunning
230 objectName: "focusedHighlight"
142 objectName: "focusedHighlight"
231 anchors {
143 anchors {
232 right: parent.right
144 right: parent.right
233 verticalCenter: parent.verticalCenter
145 verticalCenter: parent.verticalCenter
235− width: units.gu(0.25)
236− height: units.gu(.5)
238 visible: root.itemFocused
147 visible: root.itemFocused
239− }
148+ source: "graphics/focused_app_arrow.png"
242− objectName: "shortcutHint"
243− anchors.centerIn: parent
244− width: units.gu(2.5)
246− backgroundColor: "#F2111111"
247− visible: root.shortcutHintShown
248− aspect: UbuntuShape.Flat
250− anchors.centerIn: parent
251− text: (itemIndex + 1) % 10
253− font.weight: Font.Light
@@ -270,17 +164,10 @@ Item {
270 id: shaderEffectSource
164 id: shaderEffectSource
271 sourceItem: iconItem
165 sourceItem: iconItem
272 hideSource: true
166 hideSource: true
275 transform: [
170 transform: [
276− // The rotation about the icon's center/z-axis for the wiggle
277− // needs to happen here too, because there's no other way to
278− // align the wiggle with the icon-folding otherwise
280− axis { x: 0; y: 0; z: 1 }
281− origin { x: iconItem.width / 2; y: iconItem.height / 2; z: 0 }
282− angle: priv.wiggleAngle
284 // Rotating 3 times at top/bottom because that increases the perspective.
171 // Rotating 3 times at top/bottom because that increases the perspective.
285 // This is a hack, but as QML does not support real 3D coordinates
172 // This is a hack, but as QML does not support real 3D coordinates
286 // getting a higher perspective can only be done by a hack. This is the most
173 // getting a higher perspective can only be done by a hack. This is the most
Launcher/LauncherPanel.qmlnew file+537
@@ -0,0 +1,537 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Ubuntu.Components.ListItems 0.1 as ListItems
21+import Unity.Launcher 0.1
22+import Ubuntu.Components.Popups 0.1
23+import "../Components/ListItems"
28+ rotation: inverted ? 180 : 0
31+ property bool inverted: true
32+ property bool dragging: false
33+ property bool moving: launcherListView.moving || launcherListView.flicking
34+ property bool preventHiding: moving || dndArea.draggedIndex >= 0 || dndArea.quickListPopover !== null || dndArea.pressed
35+ property int highlightIndex: -1
37+ signal applicationSelected(string appId)
38+ signal dashItemSelected(int index)
42+ source: "graphics/launcher_bg.sci"
44+ anchors.rightMargin: root.inverted ? 0 : -units.gu(1)
45+ anchors.leftMargin: root.inverted ? -units.gu(1) : 0
46+ rotation: root.rotation
59+ onClicked: root.dashItemSelected(0)
62+ objectName: "dashItem"
65+ anchors.centerIn: parent
66+ source: "graphics/home.png"
67+ rotation: root.rotation
74+ margins: -mainColumn.anchors.leftMargin
76+ rotation: root.rotation
80+ anchors.left: parent.left
81+ anchors.right: parent.right
82+ height: parent.height - dashItem.height - parent.spacing*2
90+ objectName: "launcherListView"
93+ topMargin: -extensionSize + units.gu(0.5)
94+ bottomMargin: -extensionSize + units.gu(1)
95+ leftMargin: units.gu(0.5)
96+ rightMargin: units.gu(0.5)
98+ topMargin: extensionSize
99+ bottomMargin: extensionSize
100+ height: parent.height - dashItem.height - parent.spacing*2
102+ cacheBuffer: itemHeight * 3
103+ snapMode: interactive ? ListView.SnapToItem : ListView.NoSnap
104+ highlightRangeMode: ListView.ApplyRange
105+ preferredHighlightBegin: (height - itemHeight) / 2
106+ preferredHighlightEnd: (height + itemHeight) / 2
107+ spacing: units.gu(0.5)
109+ // The size of the area the ListView is extended to make sure items are not
110+ // destroyed when dragging them outside the list. This needs to be at least
111+ // itemHeight to prevent folded items from disappearing and DragArea limits
112+ // need to be smaller than this size to avoid breakage.
113+ property int extensionSize: 0
115+ // Setting extensionSize after the list has been populated because it has
116+ // the potential to mess up with the intial positioning in combination
117+ // with snapping to the center of the list. This catches all the cases
118+ // where the item would be outside the list for more than itemHeight / 2.
119+ // For the rest, give it a flick to scroll to the beginning. Note that
120+ // the flicking alone isn't enough because in some cases it's not strong
121+ // enough to overcome the snapping.
122+ // https://bugreports.qt-project.org/browse/QTBUG-32251
123+ Component.onCompleted: {
124+ extensionSize = itemHeight * 3
125+ flick(0, clickFlickSpeed)
128+ // The height of the area where icons start getting folded
129+ property int foldingStartHeight: units.gu(6.5)
130+ // The height of the area where the items reach the final folding angle
131+ property int foldingStopHeight: foldingStartHeight - itemHeight - spacing
132+ property int itemWidth: units.gu(7)
133+ property int itemHeight: units.gu(6.5)
134+ property int clickFlickSpeed: units.gu(60)
135+ property int draggedIndex: dndArea.draggedIndex
136+ property real realContentY: contentY - originY + topMargin
137+ property int realItemHeight: itemHeight + spacing
139+ // In case the start dragging transition is running, we need to delay the
140+ // move because the displaced transition would clash with it and cause items
141+ // to be moved to wrong places
142+ property bool draggingTransitionRunning: false
143+ property int scheduledMoveTo: -1
145+ displaced: Transition {
146+ NumberAnimation { properties: "x,y"; duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
149+ delegate: FoldingLauncherDelegate {
150+ id: launcherDelegate
151+ objectName: "launcherDelegate" + index
152+ itemHeight: launcherListView.itemHeight
153+ itemWidth: launcherListView.itemWidth
156+ iconName: model.icon
158+ progress: model.progress
159+ itemFocused: model.focused
160+ inverted: root.inverted
161+ z: -Math.abs(offset)
163+ property bool dragging: false
167+ objectName: "dropIndicator"
168+ anchors.centerIn: parent
169+ width: parent.width + mainColumn.anchors.leftMargin + mainColumn.anchors.rightMargin
176+ when: dndArea.selectedItem === launcherDelegate && fakeDragItem.visible && !dragging
178+ target: launcherDelegate
186+ target: launcherDelegate
191+ target: dropIndicator
197+ when: dndArea.draggedIndex >= 0 && (dndArea.preDragging || dndArea.dragging || dndArea.postDragging) && dndArea.draggedIndex != index
199+ target: launcherDelegate
211+ NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.FastDuration }
216+ NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.FastDuration }
217+ UbuntuNumberAnimation { properties: "angle,offset" }
222+ NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.BriskDuration }
223+ UbuntuNumberAnimation { properties: "angle,offset" }
226+ id: draggingTransition
229+ SequentialAnimation {
230+ PropertyAction { target: launcherListView; property: "draggingTransitionRunning"; value: true }
232+ UbuntuNumberAnimation { properties: "height" }
233+ NumberAnimation { target: dropIndicator; properties: "opacity"; duration: UbuntuAnimation.FastDuration }
237+ if (launcherListView.scheduledMoveTo > -1) {
238+ launcherListView.model.move(dndArea.draggedIndex, launcherListView.scheduledMoveTo)
239+ dndArea.draggedIndex = launcherListView.scheduledMoveTo
240+ launcherListView.scheduledMoveTo = -1
244+ PropertyAction { target: launcherListView; property: "draggingTransitionRunning"; value: false }
250+ NumberAnimation { target: dropIndicator; properties: "opacity"; duration: UbuntuAnimation.FastDuration }
251+ NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.BriskDuration }
252+ SequentialAnimation {
253+ ScriptAction { script: if (index == launcherListView.count-1) launcherListView.flick(0, -launcherListView.clickFlickSpeed); }
254+ UbuntuNumberAnimation { properties: "height" }
255+ ScriptAction { script: if (index == launcherListView.count-1) launcherListView.flick(0, -launcherListView.clickFlickSpeed); }
256+ PropertyAction { target: dndArea; property: "postDragging"; value: false }
257+ PropertyAction { target: dndArea; property: "draggedIndex"; value: -1 }
265+ objectName: "dndArea"
268+ topMargin: launcherListView.topMargin
269+ bottomMargin: launcherListView.bottomMargin
271+ drag.minimumY: -launcherListView.topMargin
272+ drag.maximumY: height + launcherListView.bottomMargin
274+ property int draggedIndex: -1
275+ property var selectedItem
276+ property bool preDragging: false
277+ property bool dragging: selectedItem !== undefined && selectedItem !== null && selectedItem.dragging
278+ property bool postDragging: false
281+ property var quickListPopover: null
284+ selectedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
288+ var index = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
289+ var clickedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
291+ // Check if we actually clicked an item or only at the spacing in between
292+ if (clickedItem === null) {
296+ // First/last item do the scrolling at more than 12 degrees
297+ if (index == 0 || index == launcherListView.count - 1) {
298+ if (clickedItem.angle > 12) {
299+ launcherListView.flick(0, -launcherListView.clickFlickSpeed);
300+ } else if (clickedItem.angle < -12) {
301+ launcherListView.flick(0, launcherListView.clickFlickSpeed);
303+ root.applicationSelected(LauncherModel.get(index).appId);
308+ // the rest launches apps up to an angle of 30 degrees
309+ if (clickedItem.angle > 30) {
310+ launcherListView.flick(0, -launcherListView.clickFlickSpeed);
311+ } else if (clickedItem.angle < -30) {
312+ launcherListView.flick(0, launcherListView.clickFlickSpeed);
314+ root.applicationSelected(LauncherModel.get(index).appId);
319+ selectedItem = undefined;
320+ preDragging = false;
321+ postDragging = false;
325+ var droppedIndex = draggedIndex;
327+ postDragging = true;
332+ if (!selectedItem) {
336+ selectedItem.dragging = false;
337+ selectedItem = undefined;
338+ preDragging = false;
340+ drag.target = undefined
342+ progressiveScrollingTimer.stop();
343+ launcherListView.interactive = true;
344+ if (droppedIndex >= launcherListView.count - 2 && postDragging) {
345+ launcherListView.flick(0, -launcherListView.clickFlickSpeed);
347+ if (droppedIndex == 0 && postDragging) {
348+ launcherListView.flick(0, launcherListView.clickFlickSpeed);
353+ if (Math.abs(selectedItem.angle) > 30) {
357+ draggedIndex = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
359+ // Opening QuickList
360+ var quickListModel = launcherListView.model.get(draggedIndex).quickList
361+ var quickListAppId = launcherListView.model.get(draggedIndex).appId
363+ quickListPopover = PopupUtils.open(popoverComponent, selectedItem,
364+ {model: quickListModel, appId: quickListAppId})
366+ launcherListView.interactive = false
368+ var yOffset = draggedIndex > 0 ? (mouseY + launcherListView.realContentY) % (draggedIndex * launcherListView.realItemHeight) : mouseY + launcherListView.realContentY
370+ fakeDragItem.iconName = launcherListView.model.get(draggedIndex).icon
372+ fakeDragItem.y = mouseY - yOffset + launcherListView.anchors.topMargin + launcherListView.topMargin
373+ fakeDragItem.angle = selectedItem.angle * (root.inverted ? -1 : 1)
374+ fakeDragItem.offset = selectedItem.offset * (root.inverted ? -1 : 1)
375+ fakeDragItem.count = LauncherModel.get(draggedIndex).count
376+ fakeDragItem.progress = LauncherModel.get(draggedIndex).progress
377+ fakeDragItem.flatten()
378+ drag.target = fakeDragItem
384+ onPositionChanged: {
385+ if (draggedIndex >= 0) {
386+ if (!selectedItem.dragging) {
387+ var distance = Math.max(Math.abs(mouseX - startX), Math.abs(mouseY - startY))
388+ if (!preDragging && distance > units.gu(1.5)) {
390+ PopupUtils.close(quickListPopover)
392+ if (distance > launcherListView.itemHeight) {
393+ selectedItem.dragging = true
394+ preDragging = false;
397+ if (!selectedItem.dragging) {
401+ var itemCenterY = fakeDragItem.y + fakeDragItem.height / 2
403+ // Move it down by the the missing size to compensate index calculation with only expanded items
404+ itemCenterY += (launcherListView.itemHeight - selectedItem.height) / 2
406+ if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - launcherListView.realItemHeight) {
407+ progressiveScrollingTimer.downwards = false
408+ progressiveScrollingTimer.start()
409+ } else if (mouseY < launcherListView.realItemHeight) {
410+ progressiveScrollingTimer.downwards = true
411+ progressiveScrollingTimer.start()
413+ progressiveScrollingTimer.stop()
416+ var newIndex = (itemCenterY + launcherListView.realContentY) / launcherListView.realItemHeight
418+ if (newIndex > draggedIndex + 1) {
419+ newIndex = draggedIndex + 1
420+ } else if (newIndex < draggedIndex) {
421+ newIndex = draggedIndex -1
426+ if (newIndex >= 0 && newIndex < launcherListView.count) {
427+ if (launcherListView.draggingTransitionRunning) {
428+ launcherListView.scheduledMoveTo = newIndex
430+ launcherListView.model.move(draggedIndex, newIndex)
431+ draggedIndex = newIndex
438+ id: progressiveScrollingTimer
442+ property bool downwards: true
445+ var minY = -launcherListView.topMargin
446+ if (launcherListView.contentY > minY) {
447+ launcherListView.contentY = Math.max(launcherListView.contentY - units.dp(2), minY)
450+ var maxY = launcherListView.contentHeight - launcherListView.height + launcherListView.topMargin + launcherListView.originY
451+ if (launcherListView.contentY < maxY) {
452+ launcherListView.contentY = Math.min(launcherListView.contentY + units.dp(2), maxY)
462+ objectName: "fakeDragItem"
463+ visible: dndArea.draggedIndex >= 0 && !dndArea.postDragging
464+ itemWidth: launcherListView.itemWidth
465+ itemHeight: launcherListView.itemHeight
468+ rotation: root.rotation
471+ function flatten() {
472+ fakeDragItemAnimation.start();
475+ UbuntuNumberAnimation {
476+ id: fakeDragItemAnimation
477+ target: fakeDragItem;
478+ properties: "angle,offset";
486+ id: popoverComponent
491+ property string appId
492+ contentWidth: quickListColumn.width
493+ foregroundStyle: QuicklistForegroundStyle {}
495+ // FIXME: There's a bug in the Popover positioning that it covers the item in case it is rotated.
496+ // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1204470
497+ // For now, let's move the Popover around with callerMargin.
498+ // Remove popupMargin once the bug is fixed.
499+ property int popupMargin: root.inverted ? launcherListView.itemHeight : 0;
501+ callerMargin: units.gu(1) + popupMargin
506+ height: childrenRect.height
510+ model: popover.model
512+ ListItems.Standard {
513+ objectName: "quickListEntry" + index
514+ text: (model.clickable ? "" : "<b>") + model.label + (model.clickable ? "" : "</b>")
515+ highlightWhenPressed: model.clickable
517+ // FIXME: This is a workaround for the theme not being context sensitive. I.e. the
518+ // ListItems don't know that they are sitting in a themed Popover where the color
519+ // needs to be inverted.
520+ __foregroundColor: Theme.palette.selected.backgroundText
523+ if (!model.clickable) {
526+ PopupUtils.close(popover);
527+ // Unsetting model to prevent showing changing entries during fading out
528+ // that may happen because of triggering an action.
529+ LauncherModel.quickListActionInvoked(appId, index);
530+ popoverRepeater.model = undefined;
qml/Wizard/WizardTextField.qml → Launcher/QuicklistForegroundStyle.qmlrenamed+6−8
@@ -1,5 +1,5 @@
2− * Copyright (C) 2015-2016 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,12 +14,10 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18−import Ubuntu.Components 1.3
19−import Ubuntu.Components.Themes.Ambiance 1.3
17+import Ubuntu.Components.Themes.Ambiance 0.1
21−TextField {
19+PopoverForegroundStyle {
22− id: styledItem
20+ bubbleColor: "#221e1c"
23− style: TextFieldStyle {
21+ bubbleOpacity: 0.9
24− }
22+ arrowSource: "graphics/quicklist_tooltip.png"
Launcher/graphics/focused_app_arrow@30.pngnew file
Binary file not shown.
Launcher/graphics/highlight@18.pngnew file
Binary file not shown.
Launcher/graphics/home@18.pngnew file
Binary file not shown.
Launcher/graphics/launcher_bg@30.pngnew file
Binary file not shown.
Launcher/graphics/launcher_bg@30.scinew file+5
@@ -0,0 +1,5 @@
5+source: launcher_bg@30.png
Launcher/graphics/non-selected@18.pngnew file
Binary file not shown.
Launcher/graphics/non-selected@18.scinew file+5
@@ -0,0 +1,5 @@
5+source: non-selected@18.png
Launcher/graphics/notification@30.pngnew file
Binary file not shown.
Launcher/graphics/notification@30.scinew file+5
@@ -0,0 +1,5 @@
5+source: notification@30.png
Launcher/graphics/progressbar-fill@30.pngnew file
Binary file not shown.
Launcher/graphics/progressbar-fill@30.scinew file+5
@@ -0,0 +1,5 @@
5+source: progressbar-fill@30.png
Launcher/graphics/progressbar-trough@30.pngnew file
Binary file not shown.
Launcher/graphics/progressbar-trough@30.scinew file+5
@@ -0,0 +1,5 @@
5+source: progressbar-trough@30.png
Launcher/graphics/quicklist_tooltip@30.pngnew file
Binary file not shown.
Launcher/graphics/selected@18.pngnew file
Binary file not shown.
Launcher/graphics/selected@18.scinew file+5
@@ -0,0 +1,5 @@
5+source: selected@18.png
Launcher/graphics/triangle@18.pngnew file
Binary file not shown.
MouseTouchAdaptor.cppnew file+153
@@ -0,0 +1,153 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
16+ * Authored by: Daniel d'Andrada <daniel.dandrada@canonical.com>
19+#include "MouseTouchAdaptor.h"
21+#include <qpa/qwindowsysteminterface.h>
23+#include <QtGui/QMouseEvent>
24+#include <QtTest/QTest>
26+using QTest::QTouchEventSequence;
29+Qt::MouseButton translateMouseButton(xcb_button_t detail)
32+ case 1: return Qt::LeftButton;
33+ case 2: return Qt::MidButton;
34+ case 3: return Qt::RightButton;
35+ // Button values 4-7 are Wheel events
36+ default: return Qt::NoButton;
39+} // end of anonymous namespace
41+MouseTouchAdaptor::MouseTouchAdaptor()
42+ : m_leftButtonIsPressed(false)
44+ m_touchDevice = new QTouchDevice;
45+ m_touchDevice->setType(QTouchDevice::TouchScreen);
46+ QWindowSystemInterface::registerTouchDevice(m_touchDevice);
49+bool MouseTouchAdaptor::nativeEventFilter(const QByteArray & eventType,
50+ void * message, long * /*result*/)
52+ if (eventType != "xcb_generic_event_t") {
54+ qWarning("MouseTouchAdaptor: XCB backend not in use. Adaptor inoperative!");
58+ xcb_generic_event_t *xcbEvent = static_cast<xcb_generic_event_t *>(message);
60+ switch (xcbEvent->response_type & ~0x80) {
61+ case XCB_BUTTON_PRESS:
62+ return handleButtonPress(reinterpret_cast<xcb_button_press_event_t *>(xcbEvent));
64+ case XCB_BUTTON_RELEASE:
65+ return handleButtonRelease(reinterpret_cast<xcb_button_release_event_t *>(xcbEvent));
67+ case XCB_MOTION_NOTIFY:
68+ return handleMotionNotify(reinterpret_cast<xcb_motion_notify_event_t *>(xcbEvent));
76+bool MouseTouchAdaptor::handleButtonPress(xcb_button_press_event_t *pressEvent)
78+ Qt::MouseButton button = translateMouseButton(pressEvent->detail);
80+ // Just eat the event if it wasn't a left mouse press
81+ if (button != Qt::LeftButton)
84+ QPoint windowPos(pressEvent->event_x, pressEvent->event_y);
86+ QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(pressEvent->event));
88+ QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
89+ false /* autoCommit */);
90+ touchEvent.press(0 /* touchId */, windowPos);
91+ touchEvent.commit(false /* processEvents */);
93+ m_leftButtonIsPressed = true;
97+bool MouseTouchAdaptor::handleButtonRelease(xcb_button_release_event_t *releaseEvent)
99+ Qt::MouseButton button = translateMouseButton(releaseEvent->detail);
101+ // Just eat the event if it wasn't a left mouse release
102+ if (button != Qt::LeftButton)
105+ QPoint windowPos(releaseEvent->event_x, releaseEvent->event_y);
107+ QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(releaseEvent->event));
109+ QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
110+ false /* autoCommit */);
111+ touchEvent.release(0 /* touchId */, windowPos);
112+ touchEvent.commit(false /* processEvents */);
114+ m_leftButtonIsPressed = false;
118+bool MouseTouchAdaptor::handleMotionNotify(xcb_motion_notify_event_t *event)
120+ if (!m_leftButtonIsPressed) {
124+ QPoint windowPos(event->event_x, event->event_y);
126+ QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(event->event));
128+ QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
129+ false /* autoCommit */);
130+ touchEvent.move(0 /* touchId */, windowPos);
131+ touchEvent.commit(false /* processEvents */);
136+QWindow *MouseTouchAdaptor::findQWindowWithXWindowID(WId windowId)
138+ QWindowList windowList = QGuiApplication::topLevelWindows();
139+ QWindow *foundWindow = nullptr;
142+ while (!foundWindow && i < windowList.count()) {
143+ QWindow *window = windowList[i];
144+ if (window->winId() == windowId) {
145+ foundWindow = window;
151+ Q_ASSERT(foundWindow);
src/MouseTouchAdaptor.h → MouseTouchAdaptor.hrenamed+8−31
@@ -1,5 +1,5 @@
2− * Copyright (C) 2013,2015 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -21,52 +21,29 @@
22#include <QtCore/QAbstractNativeEventFilter>
22#include <QtCore/QAbstractNativeEventFilter>
23#include <QWindow>
23#include <QWindow>
25#include <xcb/xcb.h>
24#include <xcb/xcb.h>
27class QMouseEvent;
26class QMouseEvent;
28class QTouchDevice;
27class QTouchDevice;
30// Transforms QMouseEvents into single-finger QTouchEvents.
29// Transforms QMouseEvents into single-finger QTouchEvents.
31−class MouseTouchAdaptor : public QObject, public QAbstractNativeEventFilter {
30+class MouseTouchAdaptor : public QAbstractNativeEventFilter {
34− virtual ~MouseTouchAdaptor();
36− static MouseTouchAdaptor* instance();
33+ MouseTouchAdaptor();
38 // Filters mouse events and posts the equivalent QTouchEvents.
35 // Filters mouse events and posts the equivalent QTouchEvents.
39− bool nativeEventFilter(const QByteArray & eventType, void *message, long *result) override;
36+ virtual bool nativeEventFilter(const QByteArray & eventType, void *message, long *result);
41− Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
43− bool enabled() const;
44− void setEnabled(bool value);
47− void enabledChanged(bool value);
51− void fetchXInput2Info();
52− bool xi2HandleEvent(xcb_ge_event_t *event);
54− bool handleButtonPress(WId windowId, uint32_t detail, uint32_t modifiers, int x, int y);
40+ bool handleButtonPress(xcb_button_press_event_t *pressEvent);
55− bool handleButtonRelease(WId windowId, uint32_t detail, uint32_t modifiers, int x, int y);
41+ bool handleButtonRelease(xcb_button_release_event_t *releaseEvent);
56− bool handleMotionNotify(WId windowId, uint32_t modifiers, int x, int y);
42+ bool handleMotionNotify(xcb_motion_notify_event_t *event);
57 QWindow *findQWindowWithXWindowID(WId windowId);
43 QWindow *findQWindowWithXWindowID(WId windowId);
59 QTouchDevice *m_touchDevice;
45 QTouchDevice *m_touchDevice;
60 bool m_leftButtonIsPressed;
46 bool m_leftButtonIsPressed;
61− bool m_triPressModifier;
62− bool m_quadPressModifier;
67− bool m_xi2Enabled{false};
69− int m_xiOpCode, m_xiEventBase, m_xiErrorBase;
72#endif // MOUSE_TOUCH_ADAPTOR_H
49#endif // MOUSE_TOUCH_ADAPTOR_H
Notifications/Notification.qmlnew file+254
@@ -0,0 +1,254 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Unity.Notifications 1.0
24+ property alias iconSource: avatarIcon.source
25+ property alias secondaryIconSource: secondaryIcon.source
26+ property alias summary: summaryLabel.text
27+ property alias body: bodyLabel.text
29+ property var notificationId
32+ property var notification
34+ objectName: "background"
35+ implicitHeight: contentColumn.height + contentColumn.spacing * 2
36+ color: Qt.rgba(0, 0, 0, 0.85)
41+ Behavior on implicitHeight {
45+ UbuntuNumberAnimation {
46+ duration: UbuntuAnimation.SnapDuration
50+ // delay enabling height behavior until the add transition is complete
51+ onOpacityChanged: if (opacity == 1) heightBehavior.enabled = true
56+ anchors.fill: contentColumn
57+ objectName: "interactiveArea"
58+ enabled: notification.type == Notification.Interactive
59+ onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
77+ spacing: contentColumn.spacing
89+ visible: iconSource !== undefined && iconSource != ""
93+ fillMode: Image.PreserveAspectCrop
100+ objectName: "secondaryIcon"
103+ visible: source !== undefined && source != ""
104+ fillMode: Image.PreserveAspectCrop
109+ width: parent.width - x
114+ objectName: "summaryLabel"
121+ color: Theme.palette.selected.backgroundText
122+ elide: Text.ElideRight
128+ objectName: "bodyLabel"
135+ color: Theme.palette.selected.backgroundText
137+ wrapMode: Text.WordWrap
138+ maximumLineCount: 10
139+ elide: Text.ElideRight
147+ objectName: "buttonRow"
152+ visible: notification.type == Notification.SnapDecision
155+ property real buttonWidth: (width - contentColumn.spacing) / 2
156+ property bool expanded
161+ objectName: "button1"
162+ width: parent.expanded ? parent.width : parent.buttonWidth
165+ bottom: parent.bottom
167+ text: notification.type == Notification.SnapDecision && actionRepeater.count >= 2 ? actionRepeater.itemAt(1).actionLabel : ""
168+ gradient: UbuntuColors.greyGradient
170+ if (actionRepeater.count > 2) {
171+ buttonRow.expanded = !buttonRow.expanded
173+ notification.notification.invokeAction(actionRepeater.itemAt(1).actionId)
178+ UbuntuNumberAnimation {
179+ duration: UbuntuAnimation.SnapDuration
187+ objectName: "button0"
189+ left: leftButton.right
190+ leftMargin: contentColumn.spacing
193+ text: notification.type == Notification.SnapDecision && actionRepeater.count >= 1 ? actionRepeater.itemAt(0).actionLabel : ""
196+ bottom: parent.bottom
198+ gradient: notification.hints == Notification.ButtonTint ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient
200+ onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
205+ objectName: "buttonColumn"
206+ spacing: contentColumn.spacing
212+ // calculate initial position before Column takes over
213+ y: buttonRow.y + buttonRow.height + contentColumn.spacing
215+ visible: notification.type == Notification.SnapDecision
216+ height: buttonRow.expanded ? implicitHeight : 0
221+ model: notification.actions
225+ property string actionId: id
226+ property string actionLabel: label
237+ objectName: "button" + index
243+ text: loader.actionLabel
245+ gradient: UbuntuColors.greyGradient
246+ onClicked: notification.notification.invokeAction(loader.actionId)
249+ sourceComponent: (index == 0 || index == 1) ? undefined : actionButton
Notifications/Notifications.qmlnew file+77
@@ -0,0 +1,77 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
24+ objectName: "notificationList"
27+ spacing: units.gu(.5)
28+ delegate: Notification {
29+ objectName: "notification" + index
36+ iconSource: model.icon
37+ secondaryIconSource: model.secondaryIcon
38+ summary: model.summary
40+ actions: model.actions
41+ notificationId: model.id
42+ notification: notificationList.model.getRaw(notificationId)
44+ // make sure there's no opacity-difference between the several
45+ // elements in a notification
46+ layer.enabled: add.running || remove.running || populate.running
49+ populate: Transition {
50+ UbuntuNumberAnimation {
53+ duration: UbuntuAnimation.SnapDuration
58+ UbuntuNumberAnimation {
61+ duration: UbuntuAnimation.SnapDuration
66+ UbuntuNumberAnimation {
72+ displaced: Transition {
73+ UbuntuNumberAnimation {
Panel/IndicatorItem.qmlnew file+61
@@ -0,0 +1,61 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Unity.Indicators 0.1 as Indicators
20+import "../Components"
25+ property alias widgetSource: loader.source
26+ property bool highlighted: false
27+ property bool dimmed: false
28+ property var indicatorProperties: undefined
29+ property bool indicatorVisible: loader.item ? loader.item.enabled : false
31+ opacity: dimmed ? 0.4 : 1
32+ Behavior on opacity { StandardAnimation {} }
34+ width: loader.item ? loader.item.width : 0
40+ item.height = Qt.binding(function() { return indicatorItem.height; });
42+ for(var pName in indicatorProperties) {
43+ if (item.hasOwnProperty(pName)) {
44+ item[pName] = indicatorProperties[pName];
51+ color: Theme.palette.selected.foreground
52+ objectName: "highlight"
55+ anchors.top: parent.bottom
58+ opacity: highlighted ? 1 : 0
59+ Behavior on opacity { StandardAnimation {} }
Panel/IndicatorRow.qmlnew file+109
@@ -0,0 +1,109 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Unity.Indicators 0.1 as Indicators
20+import "../Components"
25+ property QtObject currentItem : null
26+ readonly property int currentItemIndex: currentItem ? currentItem.ownIndex : -1
27+ property alias row: row
28+ property QtObject indicatorsModel: null
29+ property var visibleIndicators: defined
34+ function setDefaultItem() {
35+ // The leftmost indicator
39+ function setCurrentItem(index) {
40+ if (currentItemIndex !== index) {
41+ currentItem = rowRepeater.itemAt(index);
48+ width: children.width
49+ height: parent.height
50+ anchors.right: parent.right
54+ objectName: "rowRepeater"
55+ model: indicatorsModel ? indicatorsModel : undefined
59+ height: indicatorRow.height
60+ width: indicatorItem.width
61+ visible: indicatorItem.indicatorVisible
63+ property int ownIndex: index
64+ property alias highlighted: indicatorItem.highlighted
65+ property alias dimmed: indicatorItem.dimmed
69+ height: parent.height
71+ highlighted: indicatorRow.state != "initial" ? itemWrapper.ownIndex == indicatorRow.currentItemIndex : false
72+ dimmed: indicatorRow.state != "initial" ? itemWrapper.ownIndex != indicatorRow.currentItemIndex : false
74+ widgetSource: model.widgetSource
75+ indicatorProperties : model.indicatorProperties
77+ Component.onCompleted: {
78+ if (visibleIndicators == undefined) {
79+ visibleIndicators = {}
81+ indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
82+ indicatorRow.visibleIndicatorsChanged();
84+ onIndicatorVisibleChanged: {
85+ if (visibleIndicators == undefined) {
86+ visibleIndicators = {}
88+ indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
89+ indicatorRow.visibleIndicatorsChanged();
94+ if (!indicatorItem.highlighted && (indicatorRow.state == "locked" || indicatorRow.state == "commit")) {
100+ Behavior on opacity {
102+ // flow away from current index
103+ duration: (rowRepeater.count - Math.abs(indicatorRow.currentItemIndex - index)) * (500/rowRepeater.count)
Panel/Indicators.qmlnew file+389
@@ -0,0 +1,389 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Ubuntu.Gestures 0.1
21+import "../Components"
22+import "../Components/ListItems"
23+import "../Components/Math.js" as MathLocal
28+ property real openedHeight: units.gu(71)
29+ property int panelHeight: units.gu(3)
30+ property bool pinnedMode: true //should be set true if indicators menu can cover whole screen
32+ property int hintValue
33+ readonly property int lockThreshold: openedHeight / 2
34+ property bool fullyOpened: height == openedHeight
35+ property bool partiallyOpened: height > panelHeight && !fullyOpened
36+ property real visualBottom: Math.max(y+height, y+indicatorRow.y+indicatorRow.height)
37+ property bool contentEnabled: true
38+ readonly property alias content: menuContent
40+ // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
41+ // use its own values. Need to ask design about this.
42+ showAnimation: StandardAnimation {
46+ easing.type: Easing.OutCubic
48+ // Re-size if we've changed the openHeight while shown.
50+ if (indicators.shown) {
56+ hideAnimation: StandardAnimation {
60+ easing.type: Easing.OutCubic
66+ // need to use handle.get_height(). As the handle height depends on indicators.height changes (but this is called first!)
67+ var revealProgress = indicators.height - panelHeight
68+ if (!showAnimation.running && !hideAnimation.running) {
69+ if (revealProgress == 0) {
70+ indicators.state = "initial";
71+ } else if (revealProgress <= hintValue) {
72+ indicators.state = "hint";
73+ } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
74+ indicators.state = "reveal";
75+ } else if (revealProgress >= lockThreshold && lockThreshold > 0) {
76+ indicators.state = "locked";
80+ if (revealProgress == 0) {
81+ menuContent.releaseContent();
85+ function calculateCurrentItem(xValue, useBuffer) {
89+ var distanceFromRightEdge;
90+ var bufferExceeded = false;
92+ if (indicators.state == "commit" || indicators.state == "locked" || showAnimation.running || hideAnimation.running) return;
95+ If user drags the indicator handle bar down a distance hintValue or less, this is 0.
96+ If bar is dragged down a distance greater than or equal to lockThreshold, this is 1.
97+ Otherwise it contains the bar's location as a fraction of the distance between hintValue (is 0) and lockThreshold (is 1).
99+ var verticalProgress =
100+ MathLocal.clamp((indicators.height - handle.height - hintValue) /
101+ (lockThreshold - hintValue), 0, 1);
104+ Vertical velocity check. Don't change the indicator if we're moving too quickly.
106+ var verticalSpeed = Math.abs(yVelocityCalculator.calculate());
107+ if (verticalSpeed >= 0.05 && indicatorRow.currentItem!=null) {
112+ Percentage of an indicator icon's width the user's press can stray horizontally from the
113+ focused icon before we change focus to another icon. E.g. a value of 0.5 means you must
114+ go right a distance of half an icon's width before focus moves to the icon on the right
116+ var maxBufferThreshold = 0.5;
119+ To help users find the indicator of their choice while opening the indicators, we add logic to add a
120+ left/right buffer to each icon so it is harder for the focus to be moved accidentally to another icon,
121+ as the user moves their finger down, but yet allows them to switch indicator if they want.
122+ This buffer is wider the further the user's finger is from the top of the screen.
124+ var effectiveBufferThreshold = maxBufferThreshold * verticalProgress;
126+ rowCoordinates = indicatorRow.mapToItem(indicatorRow.row, xValue, 0);
127+ // get the current delegate
128+ currentItem = indicatorRow.row.childAt(rowCoordinates.x, 0);
129+ if (currentItem && currentItem != indicatorRow.currentItem ) {
130+ itemCoordinates = indicatorRow.row.mapToItem(currentItem, rowCoordinates.x, 0);
131+ distanceFromRightEdge = (currentItem.width - itemCoordinates.x) / (currentItem.width);
132+ if (Math.abs(currentItem.ownIndex - indicatorRow.currentItemIndex) > 1) {
133+ bufferExceeded = true;
135+ if (indicatorRow.currentItemIndex < currentItem.ownIndex && distanceFromRightEdge < (1 - effectiveBufferThreshold)) {
136+ bufferExceeded = true;
137+ } else if (indicatorRow.currentItemIndex > currentItem.ownIndex && distanceFromRightEdge > effectiveBufferThreshold) {
138+ bufferExceeded = true;
141+ if ((!useBuffer || (useBuffer && bufferExceeded)) || indicatorRow.currentItem < 0 || indicatorRow.currentItem == null) {
142+ indicatorRow.currentItem = currentItem;
144+ } else if (!currentItem) {
145+ indicatorRow.setDefaultItem();
153+ bottom: handle.bottom
159+ VerticalThinDivider {
162+ topMargin: panelHeight
163+ bottom: handle.bottom
164+ right: indicators.left
167+ source: "graphics/VerticalDivider.png"
172+ objectName: "menuContent"
177+ top: indicatorRow.bottom
180+ indicatorsModel: indicatorsModel
181+ clip: !indicators.fullyOpened
182+ activeHeader: indicators.state == "hint" || indicators.state == "reveal"
183+ enabled: contentEnabled
184+ visibleIndicators: indicatorRow.visibleIndicators
187+ property bool enableIndexChangeSignal: true
189+ target: enableIndexChangeSignal ? indicatorRow : null
190+ onCurrentItemIndexChanged: {
191+ var oldActive = enableIndexChangeSignal;
192+ enableIndexChangeSignal = false;
194+ menuContent.setCurrentMenuIndex(indicatorRow.currentItemIndex);
196+ enableIndexChangeSignal = oldActive;
200+ //small shadow gradient at bottom of menu
205+ bottom: parent.bottom
207+ height: units.gu(0.5)
208+ gradient: Gradient {
209+ GradientStop { position: 0.0; color: "transparent" }
210+ GradientStop { position: 1.0; color: "black" }
219+ color: menuContent.backgroundColor
224+ bottom: parent.bottom
226+ height: get_height()
227+ clip: height < handleImage.height
229+ function get_height() {
230+ return Math.max(Math.min(handleImage.height, indicators.height - handleImage.height), 0);
235+ source: "graphics/handle.sci"
240+ bottom: parent.bottom
243+ MouseArea { //prevent clicks passing through
244+ anchors.fill: parent
249+ anchors.fill: indicatorRow
252+ IndicatorsDataModel {
258+ objectName: "indicatorRow"
263+ height: indicators.panelHeight
264+ indicatorsModel: indicatorsModel
265+ state: indicators.state
268+ property bool enableIndexChangeSignal: true
270+ target: enableIndexChangeSignal ? menuContent : null
271+ onCurrentMenuIndexChanged: {
272+ var oldActive = enableIndexChangeSignal;
273+ enableIndexChangeSignal = false;
275+ indicatorRow.setCurrentItem(menuContent.currentMenuIndex);
277+ enableIndexChangeSignal = oldActive;
283+ target: showAnimation
285+ if (showAnimation.running) {
286+ indicators.state = "commit";
292+ target: hideAnimation
294+ if (hideAnimation.running) {
295+ indicators.state = "initial";
296+ indicatorRow.currentItem = null;
301+ property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null
302+ // connections to the active drag handle
304+ target: activeDragHandle
306+ indicators.calculateCurrentItem(activeDragHandle.touchX, true);
308+ onTouchSceneYChanged: {
309+ yVelocityCalculator.trackedPosition = activeDragHandle.touchSceneY;
315+ anchors.bottom: parent.bottom
316+ // go beyond parent so that it stays reachable, at the top of the screen.
317+ anchors.bottomMargin: pinnedMode ? 0 : -panelHeight
318+ anchors.left: parent.left
319+ anchors.right: parent.right
321+ direction: Direction.Downwards
322+ enabled: !indicators.shown && indicators.available
323+ hintDisplacement: pinnedMode ? indicators.hintValue : 0
324+ autoCompleteDragThreshold: maxTotalDragDistance / 2
326+ maxTotalDragDistance: openedHeight - panelHeight
327+ distanceThreshold: pinnedMode ? 0 : units.gu(3)
330+ if (status === DirectionalDragArea.Recognized) {
331+ menuContent.activateContent();
337+ anchors.fill: handle
338+ direction: Direction.Upwards
339+ enabled: indicators.shown && indicators.available
340+ hintDisplacement: indicators.hintValue
341+ autoCompleteDragThreshold: maxTotalDragDistance / 6
343+ maxTotalDragDistance: openedHeight - panelHeight
344+ distanceThreshold: 0
347+ AxisVelocityCalculator {
348+ id: yVelocityCalculator
358+ target: indicatorRow;
359+ y: pinnedMode ? 0 : panelHeight
363+ if (activeDragHandle) {
364+ calculateCurrentItem(activeDragHandle.touchX, false);
386+ NumberAnimation {targets: [indicatorRow, menuContent]; property: "y"; duration: 300; easing.type: Easing.OutCubic}
Panel/Indicators/DatetimeIndicatorPage.qmlnew file+97
@@ -0,0 +1,97 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Renato Araujo Oliveira Filho <renato@canonical.com>
18+ * Ubo Riboni <ugo.riboni@canonical.com>
22+import Ubuntu.Components 0.1
27+ contentHeight: image.height
35+ source: "../graphics/time_and_date@18.png"
36+ fillMode: Image.PreserveAspectFit
42+ topMargin: units.gu(5)
52+ horizontalCenter: parent.horizontalCenter
53+ verticalCenter: parent.verticalCenter
57+ color: Theme.palette.selected.backgroundText
58+ font.weight: Font.Light
59+ font.pixelSize: units.gu(6)
67+ leftMargin: units.gu(2)
68+ bottom: parent.bottom
69+ bottomMargin: units.gu(1.5)
72+ color: Theme.palette.selected.backgroundText
78+ interval: 1000 * 10 // 10 seconds
81+ triggeredOnStart: true
82+ onTriggered: updateTime();
85+ function updateTime() {
87+ var time = Qt.formatTime(dt);
88+ var space = time.indexOf(" ");
89+ timeLabel.text = time.substr(0, space > 0 ? space : 5);
90+ dateLabel.text = Qt.formatDateTime(dt, "dddd,\ndd MMMM");
93+ // Make it compatible with the PluginItem interface
Panel/Indicators/DatetimeIndicatorWidget.qmlnew file+67
@@ -0,0 +1,67 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Nick Dedekind <nick.dedekind@canonical.com>
21+import Ubuntu.Components 0.1
22+import Unity.IndicatorsLegacy 0.1 as Indicators
24+Indicators.IndicatorWidget {
27+ width: timeLabel.width + units.gu(1)
28+ rootMenuType: "com.canonical.indicator.root.time"
30+ property alias label: timeLabel.text
34+ objectName: "timeLabel"
35+ color: Theme.palette.selected.backgroundText
37+ font.family: "Ubuntu"
39+ anchors.centerIn: parent
40+ text: Qt.formatTime(timer.dateNow)
46+ running: indicatorWidget.visible
48+ triggeredOnStart: true
49+ property date dateNow
51+ onTriggered: dateNow = new Date
54+ onActionStateChanged: {
55+ if (action == undefined || !action.valid) {
60+ if (action.state == undefined) {
65+ enabled = action.state[3];
qml/Panel/Indicators/IndicatorDelegate.qml → Panel/Indicators/DefaultIndicatorPage.qmlrenamed+4−4
@@ -17,9 +17,9 @@
17 * Nick Dedekind <nick.dedekind@canonical.com>
17 * Nick Dedekind <nick.dedekind@canonical.com>
20−import QtQuick 2.4
20+import QtQuick 2.0
21+import Unity.IndicatorsLegacy 0.1 as Indicators
22−IndicatorBase {
23+Indicators.IndicatorPage {
23− readonly property bool indicatorVisible: rootActionState.indicatorVisible
24+ anchors.fill: parent
24− readonly property string title: rootActionState.title || rootActionState.accessibleName
tests/qmltests/Notifications/Notification.qml → Panel/Indicators/DefaultIndicatorPage2.qmlrenamed+6−13
@@ -1,5 +1,5 @@
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -14,19 +14,12 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 * Authors:
16 * Authors:
17− * Mirco Mueller <mirco.mueller@canonical.com>
17+ * Nick Dedekind <nick.dedekind@canonical.com>
20−import Unity.Notifications 1.0
20+import QtQuick 2.0
21+import Unity.Indicators 0.1 as Indicators
22−Notification {
23+Indicators.IndicatorPage {
23− nid: 0
24+ anchors.fill: parent
24− type: Notification.PlaceHolder
Panel/Indicators/DefaultIndicatorWidget.qmlnew file+77
@@ -0,0 +1,77 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Nick Dedekind <nick.dedekind@canonical.com>
21+import Ubuntu.Components 0.1
22+import Unity.IndicatorsLegacy 0.1 as Indicators
24+Indicators.IndicatorWidget {
28+ width: itemRow.width + units.gu(0.5)
30+ property alias label: itemLabel.text
31+ property alias iconSource: itemImage.source
35+ objectName: "itemRow"
38+ bottom: parent.bottom
39+ horizontalCenter: parent.horizontalCenter
41+ spacing: units.gu(0.5)
43+ // FIXME : Should us Ubuntu.Icon . results in low res images
46+ objectName: "itemImage"
47+ visible: source != ""
48+ height: indicatorWidget.iconSize
49+ width: indicatorWidget.iconSize
50+ anchors.verticalCenter: parent.verticalCenter
55+ objectName: "itemLabel"
56+ color: Theme.palette.selected.backgroundText
58+ font.family: "Ubuntu"
60+ anchors.verticalCenter: parent.verticalCenter
65+ onActionStateChanged: {
66+ if (action == undefined || !action.valid) {
70+ if (action.state == undefined) {
74+ label = action.state[Indicators.ActionState.Label];
75+ iconSource = "image://theme/" + action.state[Indicators.ActionState.IconSource];
Panel/Indicators/DefaultIndicatorWidget2.qmlnew file+103
@@ -0,0 +1,103 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Nick Dedekind <nick.dedekind@canonical.com>
21+import Ubuntu.Components 0.1
22+import Unity.Indicators 0.1 as Indicators
24+Indicators.IndicatorWidget {
27+ width: itemRow.width + units.gu(0.5)
29+ property alias leftLabel: itemLeftLabel.text
30+ property alias rightLabel: itemRightLabel.text
31+ property var icons: undefined
35+ objectName: "itemRow"
38+ bottom: parent.bottom
39+ horizontalCenter: parent.horizontalCenter
41+ spacing: units.gu(0.5)
45+ objectName: "leftLabel"
46+ color: Theme.palette.selected.backgroundText
48+ font.family: "Ubuntu"
50+ anchors.verticalCenter: parent.verticalCenter
55+ width: childrenRect.width
58+ bottom: parent.bottom
60+ spacing: units.gu(0.5)
63+ model: indicatorWidget.icons
67+ objectName: "itemImage"
68+ visible: source != ""
70+ height: indicatorWidget.iconSize
71+ width: indicatorWidget.iconSize
72+ anchors.verticalCenter: parent.verticalCenter
79+ objectName: "rightLabel"
80+ color: Theme.palette.selected.backgroundText
82+ font.family: "Ubuntu"
84+ anchors.verticalCenter: parent.verticalCenter
89+ onActionStateChanged: {
90+ if (actionState == undefined) {
98+ leftLabel = actionState.leftLabel ? actionState.leftLabel : "";
99+ rightLabel = actionState.rightLabel ? actionState.rightLabel : "";
100+ icons = actionState.icons;
101+ enabled = actionState.visible;
Panel/Indicators/MessagingIndicatorPage.qmlnew file+35
@@ -0,0 +1,35 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Nick Dedekind <nick.dedekind@canonical.com>
21+import Ubuntu.Components 0.1
22+import Unity.IndicatorsLegacy 0.1 as Indicators
24+Indicators.IndicatorPage {
27+ highlightFollowsCurrentItem: false
28+ emptyText: "You have no more outstanding messages."
31+ // never stops the service
32+ // this will keep all objects in memory, consume more memory
33+ // but will optimize the menu contruction on the screen
tests/mocks/Unity/InputInfo/plugin.h → Panel/Indicators/MessagingIndicatorWidget.qmlrenamed+9−14
@@ -1,5 +1,5 @@
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -12,19 +12,14 @@
13 * You should have received a copy of the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Nick Dedekind <nick.dedekind@canonical.com>
17−#ifndef INPUTINFO_PLUGIN_H
20+import QtQuick 2.0
18−#define INPUTINFO_PLUGIN_H
20−#include <QtQml/QQmlExtensionPlugin>
22−class InputInfoPlugin : public QQmlExtensionPlugin
25− Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27− void registerTypes(const char *uri) override;
30−#endif // INPUTINFO_PLUGIN_H
22+DefaultIndicatorWidget {
23+ // default the icon so we have something to show when we don't have the bus.
24+ iconSource: "image://theme/indicator-messages"
Panel/Indicators/NetworkIndicatorPage.qmlnew file+83
@@ -0,0 +1,83 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Renato Araujo Oliveira Filho <renato@canonical.com>
21+import Unity.IndicatorsLegacy 0.1 as Indicators
22+import Unity.IndicatorsLegacy.Network 0.1 as ICNetwork
23+import Ubuntu.Components 0.1
27+ // Stops the search for a parent tree node.
28+ // We don't want it going up to the indicator tabs.
29+ // FIXME: need a better way of doing this.
30+ // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1211704
33+ property alias title: _mainPage.title
34+ property alias emptyText: pluginItem.emptyText
35+ property alias busType: pluginItem.busType
36+ property alias busName: pluginItem.busName
37+ property alias actionsObjectPath : pluginItem.actionsObjectPath
38+ property alias menuObjectPaths : pluginItem.menuObjectPaths
45+ Indicators.IndicatorPage {
52+ id: passwordPageComponent
54+ ICNetwork.PasswordPage {
59+ ICNetwork.NetworkAgent {
63+ networkPage.push(passwordPageComponent, {"token": token});
Panel/Indicators/NetworkIndicatorPage2.qmlnew file+82
@@ -0,0 +1,82 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Renato Araujo Oliveira Filho <renato@canonical.com>
21+import Unity.Indicators 0.1 as Indicators
22+import Unity.Indicators.Network 0.1 as ICNetwork
23+import Ubuntu.Components 0.1
27+ // Stops the search for a parent tree node.
28+ // We don't want it going up to the indicator tabs.
29+ // FIXME: need a better way of doing this.
30+ // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1211704
33+ property alias title: _mainPage.title
34+ property alias emptyText: pluginItem.emptyText
35+ property alias busName: pluginItem.busName
36+ property alias actionsObjectPath : pluginItem.actionsObjectPath
37+ property alias menuObjectPaths : pluginItem.menuObjectPaths
44+ Indicators.IndicatorPage {
51+ id: passwordPageComponent
53+ ICNetwork.PasswordPage {
58+ ICNetwork.NetworkAgent {
62+ networkPage.push(passwordPageComponent, {"token": token});
Panel/Indicators/NetworkIndicatorWidget.qmlnew file+112
@@ -0,0 +1,112 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Nick Dedekind <nick.dedekind@canonical.com>
21+import Ubuntu.Components 0.1
22+import Unity.IndicatorsLegacy 0.1 as Indicators
24+Indicators.IndicatorWidget {
27+ width: networkIcon.width + units.gu(0.5)
29+ property int signalStrength: 0
30+ property int connectionState: Indicators.NetworkConnection.Initial
31+ rootMenuType: "com.canonical.indicator.root.network"
33+ // FIXME : Should us Ubuntu.Icon . results in low res images
36+ objectName: "itemImage"
37+ source: get_icon_for_signal(connectionState, signalStrength)
38+ visible: source != ""
39+ height: indicatorWidget.iconSize
40+ width: indicatorWidget.iconSize
41+ anchors.centerIn: parent
44+ onActionStateChanged: {
45+ if (action == undefined || !action.valid) {
50+ if (action.state == undefined) {
57+ connectionState = action.state[Indicators.NetworkActionState.Connection];
58+ if (connectionState == Indicators.NetworkConnection.Activated) {
59+ signalStrength = action.state[Indicators.NetworkActionState.SignalStrength];
64+ id: activation_animation
65+ target: indicatorWidget
66+ property: "signalStrength"
69+ duration: 2500 // 5 states in 2.5 seconds
70+ loops: Animation.Infinite
76+ when: connectionState < Indicators.NetworkConnection.Activating || connectionState > Indicators.NetworkConnection.Deactivating
77+ PropertyChanges { target: activation_animation; running: false }
81+ when: connectionState == Indicators.NetworkConnection.Activating
82+ PropertyChanges { target: activation_animation; running: true }
86+ when: connectionState == Indicators.NetworkConnection.Activated
87+ PropertyChanges { target: activation_animation; running: false }
91+ when: connectionState == Indicators.NetworkConnection.Deactivating
92+ PropertyChanges { target: activation_animation; running: true }
97+ function get_icon_for_signal(con_state, value) {
98+ if (con_state >= Indicators.NetworkConnection.Activating && con_state <= Indicators.NetworkConnection.Deactivating) {
100+ return "image://theme/nm-signal-00";
101+ } else if (value <= 25) {
102+ return "image://theme/nm-signal-25";
103+ } else if (value <= 50) {
104+ return "image://theme/nm-signal-50";
105+ } else if (value <= 75) {
106+ return "image://theme/nm-signal-75";
108+ return "image://theme/nm-signal-100";
110+ return "image://theme/wifi-none";
plugins/Unity/InputInfo/plugin.h → Panel/Indicators/SoundIndicatorWidget.qmlrenamed+10−14
@@ -1,5 +1,5 @@
2− * Copyright 2015 Canonical Ltd.
2+ * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -12,19 +12,15 @@
13 * You should have received a copy of the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Nick Dedekind <nick.dedekind@canonical.com>
17−#ifndef INPUTINFO_PLUGIN_H
20+import QtQuick 2.0
18−#define INPUTINFO_PLUGIN_H
20−#include <QtQml/QQmlExtensionPlugin>
22−class InputInfoPlugin : public QQmlExtensionPlugin
25− Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27− void registerTypes(const char *uri) override;
30−#endif // INPUTINFO_PLUGIN_H
22+DefaultIndicatorWidget {
23+ // default the icon so we have something to show when we don't have the bus.
24+ iconSource: "image://theme/audio-volume-high"
qml/Panel/Indicators/client/IndicatorsClient.qml → Panel/Indicators/client/IndicatorsClient.qmlrenamed+6−15
@@ -17,16 +17,13 @@
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
20−import QtQuick 2.4
20+import QtQuick 2.0
21−import Ubuntu.Components 1.3
21+import Ubuntu.Components 0.1
22+import Ubuntu.Components.ListItems 0.1 as ListItem
23Rectangle {
24Rectangle {
25− color: theme.palette.normal.background
27− Component.onCompleted: {
28− theme.name = "Ubuntu.Components.Themes.SuruDark"
31 PageStack {
28 PageStack {
@@ -36,14 +33,8 @@ Rectangle {
36 function reset() {
33 function reset() {
38 var component = Qt.createComponent("IndicatorsList.qml");
35 var component = Qt.createComponent("IndicatorsList.qml");
39− if (component.status !== Component.Ready) {
40− if (component.status === Component.Error)
41− console.error("Error: " + component.errorString());
46− var page = component.createObject(pages, {"profile": indicatorProfile});
36+ var page = component.createObject(pages);
37+ console.log(component.errorString());
47 push(page);
38 push(page);
qml/Panel/Indicators/client/IndicatorsList.qml → Panel/Indicators/client/IndicatorsList.qmlrenamed+19−25
@@ -1,5 +1,5 @@
2− * Copyright 2013-2016 Canonical Ltd.
2+ * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -15,27 +15,21 @@
16 * Authors:
16 * Authors:
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18− * Marco Trevisan <marco.trevisan@canonical.com>
21−import QtQuick 2.4
20+import QtQuick 2.0
22−import Ubuntu.Components 1.3
21+import Ubuntu.Components 0.1
22+import Ubuntu.Components.ListItems 0.1 as ListItem
23−import Unity.Indicators 0.1 as Indicators
23+import Unity.IndicatorsLegacy 0.1 as Indicators
24import "../.."
24import "../.."
25−import "../../../Components"
29 anchors.fill: parent
28 anchors.fill: parent
30− property string profile: ""
29+ title: "Plugin list"
32− title: "Indicators List"
35− Indicators.IndicatorsModel {
31+ IndicatorsDataModel {
36 id: indicatorsModel
32 id: indicatorsModel
37− profile: page.profile
38− Component.onCompleted: load()
41 ListView {
35 ListView {
@@ -44,24 +38,24 @@ Page {
44 anchors.fill: parent
38 anchors.fill: parent
45 model: indicatorsModel
39 model: indicatorsModel
47− delegate: ListItem {
41+ delegate: Indicators.MenuItem {
42+ anchors.left: parent.left
43+ anchors.right: parent.right
48 objectName: identifier
45 objectName: identifier
49− height: menuItem.height + (divider.visible ? divider.height : 0)
51− ListItemLayout {
47+ Label {
52− id: menuItem
48+ anchors.left: parent.left
53− title.text: identifier
49+ anchors.leftMargin: units.gu(0.5)
50+ anchors.verticalCenter: parent.verticalCenter
56 onClicked: {
54 onClicked: {
57− var new_page = Qt.createComponent("IndicatorRepresentation.qml");
56+ var new_page = Qt.createComponent("IndicatorsPage.qml");
58− if (new_page.status !== Component.Ready) {
57+ page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties, "pageSource" : model.pageSource});
59− if (new_page.status === Component.Error)
60− console.error("Error: " + new_page.errorString());
64− page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties });
Panel/Indicators/client/IndicatorsPage.qmlnew file+91
@@ -0,0 +1,91 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Renato Araujo Oliveira Filho <renato@canonical.com>
18+ * Nick Dedekind <nick.dedekind@canonical.com>
22+import Ubuntu.Components 0.1
23+import Ubuntu.Components.ListItems 0.1 as ListItem
28+ title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title : ""
29+ property variant indicatorProperties
30+ property string pageSource : pageLoader.source
36+ text: "Enable Visual Representation"
45+ objectName: "pageLoader"
49+ anchors.fill: pageLoader
50+ color: "#221e1c" // FIXME not in palette yet
54+ top: visualCheckItem.bottom
58+ topMargin: units.gu(2)
59+ bottomMargin: units.gu(2)
61+ source : visualCheck.checked ? page.pageSource : "IndicatorsTree.qml"
64+ for(var pName in indicatorProperties) {
65+ if (item.hasOwnProperty(pName)) {
66+ item[pName] = indicatorProperties[pName];
78+ bottom: parent.bottom
81+ height: childrenRect.height
88+ onClicked: page.pageStack.reset()
Panel/Indicators/client/IndicatorsTree.qmlnew file+62
@@ -0,0 +1,62 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Nick Dedekind <nick.dededkind@canonical.com>
21+import Ubuntu.Components 0.1
22+import Unity.Indicators 0.1 as Indicators
24+import Ubuntu.Components.ListItems 0.1 as ListItem
30+ property string busName: unityModel.busName
31+ property string actionsObjectPath
32+ property var menuObjectPaths: undefined
33+ readonly property string device: "phone"
35+ property string deviceMenuObjectPath: menuObjectPaths.hasOwnProperty(device) ? menuObjectPaths[device] : ""
42+ busName: page.busName
43+ actions: { "indicator": page.actionsObjectPath }
44+ menuObjectPath: page.deviceMenuObjectPath
47+ Indicators.ModelPrinter {
54+ contentHeight: all_data.height
Panel/IndicatorsDataModel.qmlnew file+79
@@ -0,0 +1,79 @@
2+ * Copyright 2013 Canonical Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17+ * Renato Araujo Oliveira Filho <renato@canonical.com>
21+import Unity.Indicators 0.1 as Indicators
24+Indicators.IndicatorsModel {
27+ Component.onCompleted: load()
30+ 'indicator-location' : {
33+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget2.qml',
34+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage2.qml'
36+ 'indicator-bluetooth' : {
37+ 'title': 'Bluetooth',
39+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget2.qml',
40+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage2.qml'
42+ 'indicator-messages' : {
43+ 'title': 'Messaging',
45+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorWidget.qml',
46+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorPage.qml'
48+ 'indicator-sound' : {
51+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget2.qml',
52+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage2.qml'
54+ 'indicator-network' : {
57+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget2.qml',
58+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage2.qml'
60+ 'indicator-power' : {
63+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget2.qml',
64+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage2.qml'
66+ 'indicator-session' : {
69+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget2.qml',
70+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage2.qml'
72+ 'indicator-datetime' : {
73+ 'title': 'Date and Time',
75+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget2.qml',
76+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage2.qml'
Panel/MenuContent.qmlnew file+161
@@ -0,0 +1,161 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import Unity.Indicators 0.1 as Indicators
21+import "../Components"
23+// FIXME : We dont want to use MainView.
24+// Need a regular Item which can have tabs with local header.
25+// https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1211704
29+ property QtObject indicatorsModel: null
30+ property bool __contentActive: false
31+ readonly property int currentMenuIndex : filteredIndicators.mapToSource(tabs.selectedTabIndex)
32+ backgroundColor: "#221e1c" // FIXME not in palette yet
33+ property int contentReleaseInterval: 20000
34+ property bool activeHeader: false
35+ property alias visibleIndicators: visibleIndicatorsModel.visible
40+ function setCurrentMenuIndex(index) {
41+ var filteredIndex = filteredIndicators.mapFromSource(index)
43+ if (tabs.selectedTabIndex !== filteredIndex) {
44+ if (tabs.selectedTabIndex == -1) {
45+ tabs.tabBar.animate = false;
47+ tabs.selectedTabIndex = filteredIndex;
48+ tabs.tabBar.animate = true;
52+ function activateContent() {
53+ contentReleaseTimer.stop();
54+ __contentActive = true;
57+ function releaseContent() {
58+ if (__contentActive) {
59+ contentReleaseTimer.restart();
63+ onActiveHeaderChanged: {
64+ tabs.tabBar.selectionMode = activeHeader;
65+ tabs.tabBar.alwaysSelectionMode = activeHeader;
68+ SortFilterProxyModel {
69+ id: filteredIndicators
70+ model: visibleIndicatorsModel
71+ dynamicSortFilter: true
73+ filterRole: Indicators.IndicatorsModelRole.IsVisible
74+ filterRegExp: RegExp("^true$")
77+ Indicators.VisibleIndicatorsModel {
78+ id: visibleIndicatorsModel
79+ model: indicatorsModel
90+ model: filteredIndicators
91+ objectName: "tabsRepeater"
93+ // FIXME: This is needed because tabs dont handle repeaters well.
94+ // Due to the child ordering happening after child insertion.
97+ parent.childrenChanged();
102+ objectName: model.identifier
108+ anchors.fill: parent
112+ property bool contentActive: content.__contentActive && menuActivator.content[index].active
114+ onContentActiveChanged: {
115+ if (contentActive && item) {
117+ } else if (!contentActive && item) {
123+ // Reset the indicator states
124+ if (!visible && item && item["reset"]) {
130+ for(var pName in indicatorProperties) {
131+ if (item.hasOwnProperty(pName)) {
132+ item[pName] = indicatorProperties[pName]
135+ if (contentActive && tabs.visible) {
146+ id: contentReleaseTimer
148+ interval: contentReleaseInterval
150+ content.__contentActive = false;
151+ menuActivator.clear();
155+ Indicators.MenuContentActivator {
157+ running: content.__contentActive
158+ baseIndex: content.currentMenuIndex
159+ count: indicatorsModel.count
Panel/Panel.qmlnew file+152
@@ -0,0 +1,152 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
23+ readonly property real panelHeight: units.gu(3) + units.dp(2)
24+ property real indicatorsMenuWidth: (shell.width > units.gu(60)) ? units.gu(40) : shell.width
25+ property alias indicators: indicatorsMenu
26+ property bool fullscreenMode: false
27+ property bool searchVisible: true
29+ readonly property real separatorLineHeight: leftSeparatorLine.height
30+ readonly property real __panelMinusSeparatorLineHeight: panelHeight - separatorLineHeight
40+ height: __panelMinusSeparatorLineHeight
43+ Behavior on y { StandardAnimation {} }
47+ id: leftSeparatorLine
49+ top: panelBackground.bottom
51+ right: indicatorsMenu.left
53+ saturation: 1 - indicatorsMenu.unitProgress
58+ property real darkenedOpacity: 0.6
62+ top: panelBackground.bottom
63+ bottom: parent.bottom
66+ opacity: indicatorsMenu.unitProgress * darkenedOpacity
69+ enabled: indicatorsMenu.shown
70+ onClicked: if (indicatorsMenu.fullyOpened) indicatorsMenu.hide();
77+ anchors.right: parent.right
79+ width: root.indicatorsMenuWidth
81+ hintValue: __panelMinusSeparatorLineHeight * 3
82+ panelHeight: __panelMinusSeparatorLineHeight
83+ openedHeight: parent.height + (pinnedMode ? 0 : root.panelHeight)
84+ pinnedMode: !fullscreenMode
86+ property real unitProgress: (height - panelHeight) / (openedHeight - panelHeight)
90+ id: indicatorsSeparatorLine
93+ left: indicatorsMenu.left
94+ right: indicatorsMenu.right
96+ y: indicatorsMenu.visualBottom
103+ bottom: indicatorsSeparatorLine.bottom
104+ left: indicators.left
105+ right: indicators.right
106+ margins: -units.gu(1)
108+ visible: indicatorsMenu.height > indicatorsMenu.panelHeight
109+ source: "graphics/rectangular_dropshadow.sci"
114+ objectName: "search"
115+ enabled: root.searchVisible
118+ if (parent.width < indicatorsMenu.width + width) {
119+ if (indicatorsMenu.state != "initial") {
123+ if (root.searchVisible) {
131+ height: __panelMinusSeparatorLineHeight
133+ top: panelBackground.top
134+ left: panelBackground.left
137+ onClicked: root.searchClicked()
142+ name: "in" //fully opaque and visible at top edge of screen
143+ when: !fullscreenMode
144+ PropertyChanges { target: panelBackground; y: 0 }
147+ name: "out" //pushed off screen
148+ when: fullscreenMode
149+ PropertyChanges { target: panelBackground; y: -panelHeight }
plugins/LightDM/IntegratedLightDM/QLightDM/SessionsModel → Panel/PanelBackground.qmlrenamed+6−2
@@ -1,5 +1,5 @@
2− * Copyright (C) 2016 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,4 +14,8 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−#include "../liblightdm/SessionsModel.h"
17+import QtQuick 2.0
tests/plugins/Ubuntu/Gestures/touchGateExample.qml → Panel/PanelSeparatorLine.qmlrenamed+6−8
@@ -1,5 +1,5 @@
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,14 +14,12 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import QtQuick 2.4
17+import QtQuick 2.0
18−import Ubuntu.Gestures 0.1
20Rectangle {
19Rectangle {
21− width: 720; height: 720
20+ property real saturation: 1.0
23− TouchGate {
22+ // orange in HSL
24− anchors.fill: parent
23+ color: Qt.hsla(16.0/360.0, saturation * 0.83, 0.47, 1.0)
25− objectName: "touchGate"
24+ height: units.dp(2)
Panel/SearchIndicator.qmlnew file+81
@@ -0,0 +1,81 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Ubuntu.Components 0.1
19+import "../Components"
27+ property string headerText: i18n.tr("Search")
34+ onClicked: search.clicked()
39+ objectName: "container"
42+ height: parent.height
44+ Behavior on opacity { StandardAnimation {} }
48+ source: "graphics/search.png"
49+ anchors.verticalCenter: parent.verticalCenter
50+ anchors.left: parent.left
51+ anchors.leftMargin: units.gu(1)
55+ text: search.headerText
56+ color: Qt.rgba(0.8, 0.8, 0.8, 1.0)
58+ font.capitalization: Font.AllUppercase
59+ anchors.left: icon.right
60+ anchors.leftMargin: units.gu(1)
61+ anchors.verticalCenter: parent.verticalCenter
Panel/graphics/Battery@18.pngnew file
Binary file not shown.
Panel/graphics/Bluetooth@18.pngnew file
Binary file not shown.
Panel/graphics/Clock@18.pngnew file
Binary file not shown.
Panel/graphics/Location@18.pngnew file
Binary file not shown.
Panel/graphics/Messages@18.pngnew file
Binary file not shown.
Panel/graphics/Network@18.pngnew file
Binary file not shown.
Panel/graphics/Sound@18.pngnew file
Binary file not shown.
Panel/graphics/Sync@18.pngnew file
Binary file not shown.
Panel/graphics/System@18.pngnew file
Binary file not shown.
Panel/graphics/Time@18.pngnew file
Binary file not shown.
Panel/graphics/VerticalDivider@18.pngnew file
Binary file not shown.
Panel/graphics/handle@12.pngnew file
Binary file not shown.
Panel/graphics/handle@12.scinew file+5
Panel/graphics/rectangular_dropshadow@30.pngnew file
Binary file not shown.
qml/Panel/graphics/rectangular_dropshadow@30.sci → Panel/graphics/rectangular_dropshadow@30.scirenamed
The content is the same.
Panel/graphics/search@12.pngnew file
Binary file not shown.
Panel/graphics/time_and_date@18.pngnew file
Binary file not shown.
@@ -1,31 +0,0 @@
3−Lomiri is the operating environment for everywhere. It is able to span the gaps between touch, mouse, and keyboard; between phones, tablets, and workstations; and look good doing it.
5−If you want to contribute to Lomiri on Ubuntu Touch, you've come to the right place. If you want to package Lomiri for other operating systems, you'll be better served by the main branch on the repository that we're migrating to: https://gitlab.com/ubports/core/lomiri
7−Lomiri has been renamed from Unity8. Most of the software on-device in Ubuntu Touch based on Ubuntu 16.04 is still called `unity8`.
9−## Where to report issues
11−Issues related to the version of Lomiri that currently runs on Ubuntu Touch devices may still be reported on this repository. We will move these reports to the GitLab repository as part of our final migration.
13−## Developing Lomiri on Ubuntu Touch
15−This repository contains the code for Lomiri currently running on Ubuntu Touch. If you would like to modify this version of Lomiri, follow the steps below. If you would like to modify Lomiri in another operating system, check out our new repository: https://gitlab.com/ubports/core/lomiri
17−Lomiri can be built and its test suite run using [`clickable`](https://clickable-ut.dev). This is a convenient method to try out most graphical changes to Lomiri without an annoying redeployment process. If you wish to test your changes on your device or make changes that are more difficult to test without real hardware, check out [Making changes and testing locally on the UBports documentation](https://docs.ubports.com/en/latest/systemdev/testing-locally.html). If not, read on.
19−Before you start, [install Clickable](https://clickable-ut.dev/en/latest/install.html).
21−Now, clone this repository to your computer: `git clone https://github.com/ubports/unity8.git`
23−Move into this directory: `cd unity8`
25−Now you can use the full suite of tools provided by this repository's [clickable.yaml](clickable.yaml). For example:
27−* `clickable ide qtcreator` will open QtCreator with this repository open as a project. You can edit and build the project this way, but running the tests will be a bit difficult.
28−* `clickable build --libs --verbose` will build Lomiri in the same environment as it would receive in Ubuntu Touch.
29−* `clickable test --libs` will run the entire Lomiri test suite. This test suite includes graphical tests (which are run on a virtual, invisible desktop) and non-graphical unit tests. These tests make sure Lomiri functions as prescribed and prevents new bugs from being added. You should run them before you create a PR on this repository. This command takes about 7 minutes on an Intel i7-8550U, so plan your time accordingly and use the next two options to reduce the number of times you need to run the whole test suite...
30−* `clickable ide 'cd build/x86_64-linux-gnu/unity8/ && make tryShell'` and similar commands that replace the `Shell` with another test target defined in [tests/qmltests/CMakeLists.txt](tests/qmltests/CMakeLists.txt) allow trying out some Lomiri components in a mock environment. You can use this to try out your changes to Lomiri as you develop.
31−* `clickable ide 'cd build/x86_64-linux-gnu/unity8/ && make xvfbtestShell'` and similar commands that replace the `Shell` with another test target defined in [tests/qmltests/CMakeLists.txt](tests/qmltests/CMakeLists.txt) allow running a single TestCase. You can remove the `xvfb` part of the make target to run the test case graphically, which might help you see what is causing the test to fail.
@@ -0,0 +1,601 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import AccountsService 0.1
20+import Unity.Application 0.1
21+import Ubuntu.Components 0.1
22+import Ubuntu.Gestures 0.1
23+import Unity.Launcher 0.1
25+import SessionBroadcast 0.1
26+import SessionManager 0.1
32+import "Components/Math.js" as MathLocal
35+import "Notifications"
36+import Unity.Notifications 1.0 as NotificationBackend
41+ readonly property real panelHeight: panel.panelHeight
43+ property bool dashShown: dash.shown
44+ property bool stageScreenshotsReady: {
45+ if (sideStage.shown) {
46+ if (mainStage.applications.count > 0) {
47+ return mainStage.usingScreenshots && sideStage.usingScreenshots;
49+ return sideStage.usingScreenshots;
52+ return mainStage.usingScreenshots;
56+ property ListModel searchHistory: SearchHistoryModel {}
58+ property var applicationManager: ApplicationManagerWrapper {}
61+ target: LauncherModel
62+ property: "applicationManager"
63+ value: ApplicationManager
66+ Component.onCompleted: {
67+ Theme.name = "Ubuntu.Components.Themes.SuruGradient"
69+ applicationManager.sideStageEnabled = Qt.binding(function() { return sideStage.enabled })
71+ // FIXME: if application focused before shell starts, shell draws on top of it only.
72+ // We should detect already running applications on shell start and bring them to the front.
73+ applicationManager.unfocusCurrentApplication();
76+ readonly property bool applicationFocused: !!applicationManager.mainStageFocusedApplication
77+ || !!applicationManager.sideStageFocusedApplication
78+ // Used for autopilot testing.
79+ readonly property string currentFocusedAppId: ApplicationManager.focusedApplicationId
81+ readonly property bool fullscreenMode: {
82+ if (mainStage.usingScreenshots) { // Window Manager animating so want to re-evaluate fullscreen mode
83+ return mainStage.switchingFromFullscreenToFullscreen;
84+ } else if (applicationManager.mainStageFocusedApplication) {
85+ return applicationManager.mainStageFocusedApplication.fullscreen;
92+ target: applicationManager
93+ ignoreUnknownSignals: true
95+ shell.activateApplication(desktopFile);
99+ function activateApplication(desktopFile, argument) {
100+ if (applicationManager) {
101+ // For newly started applications, as it takes them time to draw their first frame
102+ // we add a delay before we hide the animation screenshots to compensate.
103+ var addDelay = !applicationManager.getApplicationFromDesktopFile(desktopFile);
106+ application = applicationManager.activateApplication(desktopFile, argument);
107+ if (application == null) {
110+ if (application.stage == ApplicationInfo.MainStage || !sideStage.enabled) {
111+ mainStage.activateApplication(desktopFile, addDelay);
113+ sideStage.activateApplication(desktopFile, addDelay);
120+ id: backgroundSettings
121+ schema.id: "org.gnome.desktop.background"
123+ backgroundSource: backgroundSettings.pictureUri
127+ objectName: "underlay"
128+ anchors.fill: parent
130+ // Whether the underlay is fully covered by opaque UI elements.
131+ property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
133+ readonly property bool applicationRunning: ((mainStage.applications && mainStage.applications.count > 0)
134+ || (sideStage.applications && sideStage.applications.count > 0))
136+ // Whether the user should see the topmost application surface (if there's one at all).
137+ readonly property bool applicationSurfaceShouldBeSeen: applicationRunning && !stages.fullyHidden
138+ && !mainStage.usingScreenshots // but want sideStage animating over app surface
142+ // NB! Application surfaces are stacked behing the shell one. So they can only be seen by the user
143+ // through the translucent parts of the shell surface.
144+ visible: !fullyCovered && !applicationSurfaceShouldBeSeen
148+ objectName: "backgroundImage"
150+ anchors.fill: parent
151+ source: shell.background
152+ fillMode: Image.PreserveAspectCrop
156+ anchors.fill: parent
158+ opacity: dash.disappearingAnimationProgress
165+ hides: [stages, launcher, panel.indicators]
166+ shown: disappearingAnimationProgress !== 1.0
167+ enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
168+ // FIXME: unfocus all applications when going back to the dash
171+ shell.applicationManager.unfocusCurrentApplication()
177+ topMargin: panel.panelHeight
180+ contentScale: 1.0 - 0.2 * disappearingAnimationProgress
181+ opacity: 1.0 - disappearingAnimationProgress
182+ property real disappearingAnimationProgress: stagesOuterContainer.showProgress
184+ // FIXME: only necessary because stagesOuterContainer.showProgress
186+ Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
191+ id: stagesOuterContainer
194+ height: parent.height
195+ x: launcher.progress
196+ Behavior on x {SmoothedAnimation{velocity: 600}}
198+ property real showProgress:
199+ MathLocal.clamp(1 - (x + stages.x) / shell.width, 0, 1)
203+ objectName: "stages"
207+ property bool fullyShown: shown && x == 0 && parent.x == 0
208+ property bool fullyHidden: !shown && x == width
209+ hides: [panel.indicators]
212+ showAnimation: StandardAnimation { property: "x"; duration: 350; to: 0; easing.type: Easing.OutCubic }
213+ hideAnimation: StandardAnimation { property: "x"; duration: 350; to: width; easing.type: Easing.OutCubic }
216+ height: parent.height
218+ // close the stages when no focused application remains
220+ target: shell.applicationManager
221+ onMainStageFocusedApplicationChanged: stages.closeIfNoApplications()
222+ onSideStageFocusedApplicationChanged: stages.closeIfNoApplications()
223+ ignoreUnknownSignals: true
226+ function closeIfNoApplications() {
227+ if (!shell.applicationManager.mainStageFocusedApplication
228+ && !shell.applicationManager.sideStageFocusedApplication
229+ && shell.applicationManager.mainStageApplications.count == 0
230+ && shell.applicationManager.sideStageApplications.count == 0) {
235+ // show the stages when an application gets the focus
237+ target: shell.applicationManager
238+ onMainStageFocusedApplicationChanged: {
239+ if (shell.applicationManager.mainStageFocusedApplication) {
244+ onSideStageFocusedApplicationChanged: {
245+ if (shell.applicationManager.sideStageFocusedApplication) {
250+ ignoreUnknownSignals: true
256+ anchors.fill: parent
257+ fullyShown: stages.fullyShown
258+ fullyHidden: stages.fullyHidden
259+ shouldUseScreenshots: !fullyShown
260+ rightEdgeEnabled: !sideStage.enabled
262+ applicationManager: shell.applicationManager
263+ rightEdgeDraggingAreaWidth: shell.edgeSize
264+ normalApplicationY: shell.panelHeight
273+ // FIXME: workaround the fact that focusing a main stage application
274+ // raises its surface on top of all other surfaces including the ones
275+ // that belong to side stage applications.
276+ onFocusedApplicationChanged: {
277+ if (focusedApplication && sideStage.focusedApplication && sideStage.fullyShown) {
278+ shell.applicationManager.focusApplication(sideStage.focusedApplication);
286+ applicationManager: shell.applicationManager
287+ rightEdgeDraggingAreaWidth: shell.edgeSize
288+ normalApplicationY: shell.panelHeight
291+ if (!shown && mainStage.applications.count == 0) {
295+ // FIXME: when hiding the side stage, refocus the main stage
296+ // application so that it goes in front of the side stage
297+ // application and hides it
298+ onFullyShownChanged: {
299+ if (!fullyShown && stages.fullyShown && sideStage.focusedApplication != null) {
300+ shell.applicationManager.focusApplication(mainStage.focusedApplication);
304+ enabled: shell.width >= units.gu(60)
306+ fullyShown: stages.fullyShown && shown
307+ && sideStage[sideStageRevealer.boundProperty] == sideStageRevealer.openedValue
308+ shouldUseScreenshots: !fullyShown || mainStage.usingScreenshots || sideStageRevealer.pressed
311+ hides: [launcher, panel.indicators]
313+ showAnimation: StandardAnimation { property: "x"; duration: 350; to: sideStageRevealer.openedValue; easing.type: Easing.OutQuint }
314+ hideAnimation: StandardAnimation { property: "x"; duration: 350; to: sideStageRevealer.closedValue; easing.type: Easing.OutQuint }
317+ height: stages.height
318+ handleExpanded: sideStageRevealer.pressed
322+ id: sideStageRevealer
324+ enabled: mainStage.applications.count > 0 && sideStage.applications.count > 0
325+ && sideStage.available
326+ direction: Qt.RightToLeft
327+ openedValue: parent.width - sideStage.width
328+ hintDisplacement: units.gu(3)
329+ /* The size of the sidestage handle needs to be bigger than the
330+ typical size used for edge detection otherwise it is really
333+ handleSize: sideStage.shown ? units.gu(4) : shell.edgeSize
334+ closedValue: parent.width + sideStage.handleSizeCollapsed
336+ x: parent.width - width
337+ width: sideStage.width + handleSize * 0.7
338+ height: sideStage.height
339+ orientation: Qt.Horizontal
343+ id: stagesDragHandle
345+ anchors.top: parent.top
346+ anchors.bottom: parent.bottom
347+ anchors.right: parent.left
349+ width: shell.edgeSize
350+ direction: Direction.Leftwards
351+ enabled: edgeDemo.dashEnabled
352+ property bool haveApps: mainStage.applications.count > 0 || sideStage.applications.count > 0
354+ maxTotalDragDistance: haveApps ? parent.width : parent.width * 0.7
355+ // Make autocompletion impossible when !haveApps
356+ edgeDragEvaluator.minDragDistance: haveApps ? maxTotalDragDistance * 0.1 : Number.MAX_VALUE
365+ property var previousMainApp: null
366+ property var previousSideApp: null
368+ function setFocused(focused) {
370+ powerConnection.previousMainApp = applicationManager.mainStageFocusedApplication;
371+ powerConnection.previousSideApp = applicationManager.sideStageFocusedApplication;
372+ applicationManager.unfocusCurrentApplication();
374+ if (powerConnection.previousMainApp) {
375+ applicationManager.focusApplication(powerConnection.previousMainApp);
376+ powerConnection.previousMainApp = null;
378+ if (powerConnection.previousSideApp) {
379+ applicationManager.focusApplication(powerConnection.previousSideApp);
380+ powerConnection.previousSideApp = null;
385+ onDisplayPowerStateChange: {
386+ // We ignore any display-off signals when the proximity sensor
387+ // is active. This usually indicates something like a phone call.
388+ if (status == Powerd.Off && (flags & Powerd.UseProximity) == 0) {
389+ powerConnection.setFocused(false);
390+ SessionManager.lock();
391+ } else if (status == Powerd.On) {
392+ powerConnection.setFocused(true);
395+ // No reason to chew demo CPU when user isn't watching
396+ if (status == Powerd.Off) {
397+ edgeDemo.paused = true;
398+ } else if (status == Powerd.On) {
399+ edgeDemo.paused = false;
404+ function showHome() {
405+ // Animate if moving between application and dash
406+ if (!stages.shown) {
407+ dash.setCurrentScope("home.scope", true, false)
409+ dash.setCurrentScope("home.scope", false, false)
417+ anchors.fill: parent
421+ anchors.fill: parent //because this draws indicator menus
422+ indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
425+ available: edgeDemo.panelEnabled
426+ contentEnabled: edgeDemo.panelContentEnabled
428+ fullscreenMode: shell.fullscreenMode
436+ height: (panel.fullscreenMode) ? shell.edgeSize : panel.panelHeight
444+ width: parent.width > units.gu(60) ? units.gu(40) : parent.width
445+ height: parent.height
447+ available: !panel.indicators.shown && edgeDemo.dashEnabled
449+ showAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: 0; easing.type: Easing.Linear }
450+ hideAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: hudRevealer.closedValue; easing.type: Easing.Linear }
453+ target: shell.applicationManager
454+ onMainStageFocusedApplicationChanged: hud.hide()
455+ onSideStageFocusedApplicationChanged: hud.hide()
464+ anchors.left: hud.left
465+ height: parent.height
466+ target: hud.revealerTarget
469+ direction: Qt.RightToLeft
470+ orientation: Qt.Vertical
471+ handleSize: hud.handleHeight
472+ onCloseClicked: target.hide()
477+ anchors.fill: parent
478+ enabled: hud.available
479+ applicationIsOnForeground: applicationFocused
483+ blockInput: launcher.shown
486+ bottom: parent.bottom
489+ width: launcher.width
495+ anchors.top: parent.top
496+ anchors.bottom: parent.bottom
498+ dragAreaWidth: shell.edgeSize
499+ available: edgeDemo.launcherEnabled
500+ onDashItemSelected: showHome()
503+ dash.setCurrentScope("applications.scope", true, false)
508+ onLauncherApplicationSelected:{
509+ shell.activateApplication(appId)
513+ panel.indicators.hide()
522+ model: NotificationBackend.Model
526+ bottom: parent.bottom
527+ leftMargin: units.gu(1)
528+ rightMargin: units.gu(1)
529+ topMargin: panel.panelHeight + units.gu(1)
534+ when: overlay.width <= units.gu(60)
535+ AnchorChanges { target: notifications; anchors.left: parent.left }
539+ when: overlay.width > units.gu(60)
540+ AnchorChanges { target: notifications; anchors.left: undefined }
541+ PropertyChanges { target: notifications; width: units.gu(38) }
552+ bottom: parent.bottom
555+ width: shell.edgeSize
565+ //FIXME: This should be handled in the input stack, keyboard shouldnt propagate
567+ anchors.bottom: parent.bottom
568+ anchors.left: parent.left
569+ anchors.right: parent.right
570+ height: shell.applicationManager ? shell.applicationManager.keyboardHeight : 0
572+ enabled: shell.applicationManager && shell.applicationManager.keyboardVisible
576+ anchors.centerIn: parent
577+ visible: applicationManager.fake
578+ text: "EARLY ALPHA\nNOT READY FOR USE"
581+ font.weight: Font.Black
582+ horizontalAlignment: Text.AlignHCenter
583+ verticalAlignment: Text.AlignVCenter
584+ fontSizeMode: Text.Fit
586+ scale: Math.min(parent.width, parent.height) / width
593+ indicators: panel.indicators
598+ target: SessionBroadcast
599+ onShowHome: showHome()
SideStage/SideStage.qmlnew file+68
@@ -0,0 +1,68 @@
2+ * Copyright (C) 2013 Canonical, Ltd.
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+import Unity.Application 0.1
19+import Ubuntu.Components 0.1
20+import "../Components"
25+ type: ApplicationInfo.SideStage
26+ property real handleSizeCollapsed: units.gu(2.5)
27+ property real handleSizeExpanded: units.gu(4)
28+ property bool handleExpanded
30+ /* FIXME: workaround so that when a main stage app goes fullscreen
31+ the sidestage's top is not transparent. Proper fix would be to
32+ resize the side stage app.
35+ id: backgroundBeneathPanel
41+ height: shell.panelHeight
42+ color: background.color
51+ visible: stage.usingScreenshots
56+ objectName: "sideStageHandle"
60+ bottom: parent.bottom
64+ width: handleExpanded ? handleSizeExpanded : handleSizeCollapsed
65+ Behavior on width { NumberAnimation { easing.type: Easing.OutQuart} }
tests/mocks/Utils/EdgeBarrierSettings.qml → SideStage/SidestageHandle.qmlrenamed+5−5
@@ -1,5 +1,5 @@
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -14,9 +14,9 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18−import QtQuick 2.4
17+import QtQuick 2.0
18+import Ubuntu.Components 0.1
20−QtObject {
20+BorderImage {
21− readonly property real pushThreshold: units.gu(8)
21+ source: "graphics/sidestage_handle.sci"
SideStage/graphics/sidestage_handle@20.pngnew file
Binary file not shown.
qml/Stage/graphics/sidestage_handle@20.sci → SideStage/graphics/sidestage_handle@20.scirenamed
The content is the same.
@@ -0,0 +1,87 @@
5+NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
6+CODE_DIR=$( dirname `readlink -f $0` )
9+ echo "usage: build [OPTIONS] [BUILD_TYPE]\n" >&2
10+ echo "Script to build the shell. If BUILD_TYPE is not specified, it defaults to \"debug\".\n" >&2
12+ echo " -s, --setup Setup the build environment and branch Unity" >&2
13+ echo " -c, --clean Clean the build tree before building" >&2
18+ARGS=`getopt -n$0 -u -a --longoptions="setup,clean,help" -o "sch" -- "$@"`
25+ -s|--setup) SETUP=true;;
26+ -c|--clean) CLEAN=true;;
36+[ $# -eq 1 ] && BUILD_TYPE="$1"
38+install_dependencies() {
39+ sudo apt-get update || exit 4
40+ echo "Installing Unity 8 dependencies.."
41+ sudo apt-get install devscripts \
43+ gsettings-desktop-schemas \
45+ qtdeclarative5-dee-plugin \
46+ qtdeclarative5-gsettings1.0 \
47+ qtdeclarative5-ubuntu-ui-toolkit-plugin \
48+ unity-notifications-impl \
49+ qtdeclarative5-xmllistmodel-plugin \
50+ ubuntu-mobile-icons \
52+ unity-lens-applications \
57+ [ ! -f unity8-build-deps*deb -o $CODE_DIR/debian/control -nt unity8-build-deps*deb ] && mk-build-deps --install --root-cmd sudo $CODE_DIR/debian/control
60+if [ -f "/usr/bin/ccache" ] ; then
61+ if [ "x$CC" = "x" ]; then
62+ export CC='ccache gcc'
64+ if [ "x$CXX" = "x" ] ; then
65+ export CXX='ccache g++'
69+if [ -f "/usr/bin/ninja" ] ; then
71+ # Ninja does not need -j, it parallelizes automatically.
72+ BUILD_COMMAND="ninja"
75+ BUILD_COMMAND="make -j$NUM_JOBS"
81+ if $CLEAN; then rm -rf builddir; fi
85+ cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
86+ ${BUILD_COMMAND} || exit 7
@@ -1,82 +0,0 @@
4−# Copyright (C) 2017 Canonical Ltd
6−# This program is free software: you can redistribute it and/or modify
7−# it under the terms of the GNU General Public License version 3 as
8−# published by the Free Software Foundation.
10−# This program is distributed in the hope that it will be useful,
11−# but WITHOUT ANY WARRANTY; without even the implied warranty of
12−# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13−# GNU General Public License for more details.
15−# You should have received a copy of the GNU General Public License
16−# along with this program. If not, see <http://www.gnu.org/licenses/>.
21−NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
22−CODE_DIR=$( dirname `readlink -f $0` )
25− echo "usage: build [OPTIONS] [BUILD_TYPE]\n" >&2
26− echo "Script to build the shell. If BUILD_TYPE is not specified, it defaults to \"debug\".\n" >&2
28− echo " -c, --clean Clean the build tree before building" >&2
33−ARGS=`getopt -n$0 -u -a --longoptions="setup,clean,help" -o "sch" -- "$@"`
40− -c|--clean) CLEAN=true;;
50−[ $# -eq 1 ] && BUILD_TYPE="$1"
53− if [ ! -f control -o $CODE_DIR/debian/control -nt control ]; then
54− sed 's/\:native//g' $CODE_DIR/debian/control > control
55− mk-build-deps --install --root-cmd sudo control
59−if [ -f "/usr/bin/ccache" ] ; then
60− if [ "x$CC" = "x" ]; then
61− export CC='ccache gcc'
63− if [ "x$CXX" = "x" ] ; then
64− export CXX='ccache g++'
68−if [ -f "/usr/bin/ninja" ] ; then
70− # Ninja does not need -j, it parallelizes automatically.
71− BUILD_COMMAND="ninja"
74− BUILD_COMMAND="make -j$NUM_JOBS"
77−if $CLEAN; then rm -rf builddir; fi
81−cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
82−${BUILD_COMMAND} || exit 7
clickable.yamldeleted−153
@@ -1,153 +0,0 @@
1−clickable_minimum_required: '7'
3−build: echo Run \'clickable build --libs --verbose\' to build && false
9− test: make xvfballtests -j${NUM_PROCS}
21− - gsettings-ubuntu-schemas
22− - libandroid-properties-dev
23− - libconnectivity-qt1-dev
30− - libgnome-desktop-3-12
31− - libgnome-desktop-3-dev
32− - libgsettings-qt-dev
34− - liblightdm-qt5-3-dev
40− - libqt5xmlpatterns5-dev
43− - libsystemsettings-dev
44− - libubuntu-app-launch2-dev
45− - libubuntu-download-manager-common-dev
46− - libubuntugestures5-dev
47− - libubuntugestures5-private-dev
51− - libusermetricsoutput1-dev
57− - python3-setuptools:native
58− - qml-module-qt-labs-folderlistmodel
59− - qml-module-qt-labs-settings
60− - qml-module-qtmultimedia
61− - qml-module-qtqml-statemachine
62− - qml-module-qtquick-layouts
63− - qml-module-qtquick-xmllistmodel
64− - qml-module-qtquick2
65− - qml-module-qtsysteminfo
67− - qml-module-ubuntu-components
68− - qml-module-ubuntu-layouts
69− - qml-module-ubuntu-settings-components
70− - qml-module-ubuntu-test
73− - qtbase5-private-dev
76− - qtdeclarative5-dev-tools
77− - qtdeclarative5-private-dev
78− - qtdeclarative5-ubuntu-content1
79− - ttf-ubuntu-font-family
93− - gsettings-ubuntu-schemas
94− - libandroid-properties-dev
95− - libconnectivity-qt1-dev
102− - libgnome-desktop-3-12
103− - libgnome-desktop-3-dev
104− - libgsettings-qt-dev
106− - liblightdm-qt5-3-dev
112− - libqt5xmlpatterns5-dev
113− - libqtdbusmock1-dev
114− - libqtdbustest1-dev
115− - libsystemsettings-dev
116− - libubuntu-app-launch2-dev
117− - libubuntu-download-manager-common-dev
118− - libubuntugestures5-dev
119− - libubuntugestures5-private-dev
123− - libusermetricsoutput1-dev
129− - python3-setuptools:native
130− - qml-module-qt-labs-folderlistmodel
131− - qml-module-qt-labs-settings
132− - qml-module-qtmultimedia
133− - qml-module-qtqml-statemachine
134− - qml-module-qtquick-layouts
135− - qml-module-qtquick-xmllistmodel
136− - qml-module-qtquick2
137− - qml-module-qtsysteminfo
139− - qml-module-ubuntu-components
140− - qml-module-ubuntu-layouts
141− - qml-module-ubuntu-settings-components
142− - qml-module-ubuntu-test
145− - qtbase5-private-dev
147− - qtdeclarative5-dev
148− - qtdeclarative5-dev-tools
149− - qtdeclarative5-private-dev
150− - qtdeclarative5-ubuntu-content1
151− - ttf-ubuntu-font-family
152− - ubports-wallpapers
cmake/modules/Plugins.cmakenew file+67
@@ -0,0 +1,67 @@
1+find_program(qmlplugindump_exe qmlplugindump)
3+if(NOT qmlplugindump_exe)
4+ msg(FATAL_ERROR "Could not locate qmlplugindump.")
7+# Creates target for copying and installing qmlfiles
9+# export_qmlfiles(plugin sub_path)
12+# Target to be created:
13+# - plugin-qmlfiles - Copies the qml files (*.qml, *.js, qmldir) into the shadow build folder.
15+macro(export_qmlfiles PLUGIN PLUGIN_SUBPATH)
23+ # copy the qmldir file
24+ add_custom_target(${PLUGIN}-qmlfiles ALL
25+ COMMAND cp ${QMLFILES} ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}
29+ # install the qmlfiles file.
30+ install(FILES ${QMLFILES}
31+ DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
33+endmacro(export_qmlfiles)
36+# Creates target for generating the qmltypes file for a plugin and installs plugin files
38+# export_qmlplugin(plugin version sub_path [TARGETS target1 [target2 ...]])
40+# TARGETS additional install targets (eg the plugin shared object)
42+# Target to be created:
43+# - plugin-qmltypes - Generates the qmltypes file in the shadow build folder.
45+macro(export_qmlplugin PLUGIN VERSION PLUGIN_SUBPATH)
46+ set(multi_value_keywords TARGETS)
47+ cmake_parse_arguments(qmlplugin "" "" "${multi_value_keywords}" ${ARGN})
49+ # Only try to generate .qmltypes if not cross compiling
50+ if(NOT CMAKE_CROSSCOMPILING)
51+ # create the plugin.qmltypes file
52+ add_custom_target(${PLUGIN}-qmltypes ALL
53+ COMMAND ${qmlplugindump_exe} -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
55+ add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
57+ # install the qmltypes file.
58+ install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
59+ DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
63+ # install the additional targets
64+ install(TARGETS ${qmlplugin_TARGETS}
65+ DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
67+endmacro(export_qmlplugin)
cmake/modules/QmlTest.cmake+101−469
@@ -1,489 +1,121 @@
1−# If you need to override the qmlscene or qmltestrunner executables,
1+# add_qml_test(path component_name [NO_ADD_TEST] [NO_TARGETS]
2−# create the corresponding executable target.
2+# [TARGETS target1 [target2 [...]]]
3−
3+# [IMPORT_PATHS import_path1 [import_path2 [...]]
4−# These functions respect the global STDOUT_LOGGER and ARTIFACTS_DIR variables.
4+# [PROPERTIES prop1 value1 [prop2 value2 [...]]])
6−# You can use those with cmake_parse_arguments
7−# if you need to wrap and mangle arguments.
8−set(QMLTEST_OPTIONS ADD_TEST CACHE INTERNAL "")
9−set(QMLTEST_SINGLE ITERATIONS ARG_PREFIX CACHE INTERNAL "")
10−set(QMLTEST_MULTI ARGS ENVIRONMENT DEPENDS IMPORT_PATHS TARGETS CACHE INTERNAL "")
12−# import_executables(name1 [name2 [...]]
13−# [OPTIONAL] # continue when not found
16−# This will find the named executables and import them
17−# to an imported target of the same name.
19−function(import_executables)
20− cmake_parse_arguments(QMLTEST "OPTIONAL" "" "" ${ARGN})
22− foreach(NAME ${QMLTEST_UNPARSED_ARGUMENTS})
23− if(NOT TARGET ${NAME})
24− add_executable(${NAME} IMPORTED GLOBAL)
25− find_program(${NAME}_exe ${NAME})
27− if(NOT QMLTEST_OPTIONAL AND NOT ${NAME}_exe)
28− message(FATAL_ERROR "Could not locate ${NAME}.")
29− elseif(NOT ${NAME}_exe)
30− message(STATUS "Could not locate ${NAME}, skipping.")
32− set_target_properties(${NAME} PROPERTIES IMPORTED_LOCATION ${${NAME}_exe})
39−# add_qml_test(path component_name
43−# Add test targets for ${component_name} under ${path}. It's assumed
44−# that the test file is named ${path}/tst_${component_name}.qml.
46−# This function wraps add_manual_qml_test and add_qml_unittest,
47−# see below for available arguments.
49−function(add_qml_test PATH COMPONENT_NAME)
50− cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
53− add_qml_unittest(${ARGV})
54− add_manual_qml_test(${ARGV})
58−# add_qml_test_data(path component_name
62−# Install file called ${component_name} (or ${component_name}.qml) under
6+# NO_ADD_TEST will prevent adding the test to the "test" target
63−# ${path}.
7+# NO_TARGETS will prevent adding the test to any targets
64−
8+# TARGETS lists the targets the test should be added to
65−function(add_qml_test_data PATH COMPONENT_NAME)
9+# IMPORT_PATHS will pass those paths to qmltestrunner as "-import" arguments
66− cmake_parse_arguments(TEST "" "DESTINATION" "" ${ARGN})
10+# PROPERTIES will be set on the target and test target. See CMake's set_target_properties()
68− set(filename "${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/${COMPONENT_NAME}")
70− if (IS_DIRECTORY "${filename}")
71− # As a convenience, allow specifying a directory and we will install
72− # all files in the dir. We do it this way rather than passing
73− # DIRECTORY to install() because we want to process any qml files.
74− file(GLOB subfiles RELATIVE "${filename}" "${filename}/*")
75− foreach(subfile ${subfiles})
76− add_qml_test_data("${PATH}/${COMPONENT_NAME}" "${subfile}")
81− if (NOT EXISTS "${filename}")
82− set(filename "${filename}.qml")
83− set(COMPONENT_NAME "${COMPONENT_NAME}.qml")
86− if ("${filename}" MATCHES "\\.qml$")
87− file(READ "${filename}" contents)
88− string(REGEX REPLACE "(\"[./]*)/qml(/|\")" "\\1\\2" contents "${contents}")
89− # this is for (at least) cardcreatortest which pulls in an architecture-specific
90− # import into the plugins directory (which is a 'qml' once installed).
91− string(REGEX REPLACE "(import \"[./]*)/plugins(/|\")" "\\1/qml\\2" contents "${contents}")
92− set(filename "${CMAKE_CURRENT_BINARY_DIR}/${PATH}/${COMPONENT_NAME}")
93− file(WRITE "${filename}" "${contents}")
96− if (TEST_DESTINATION)
97− set(DESTINATION "${TEST_DESTINATION}")
99− file(RELATIVE_PATH relcurpath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
100− set(DESTINATION "${SHELL_APP_DIR}/${relcurpath}/${PATH}")
103− install(FILES "${filename}" DESTINATION "${DESTINATION}")
107−# add_qml_unittest(path component_name
111−# Add test targets for ${component_name} under ${path}. It's assumed
12+# Two targets will be created:
112−# that the test file is named ${path}/tst_${component_name}.qml.
13+# - testComponentName - Runs the test with qmltestrunner
14+# - tryComponentName - Runs the test with uqmlscene, for manual interaction
114−# This function wraps add_executable_test, see below for available arguments.
16+# To change/set a default value for the whole test suite, prior to calling add_qml_test, set:
115−
17+# qmltest_DEFAULT_NO_ADD_TEST (default: FALSE)
116−function(add_qml_unittest PATH COMPONENT_NAME)
18+# qmltest_DEFAULT_TARGETS
117− import_executables(qmltestrunner)
19+# qmltest_DEFAULT_IMPORT_PATHS
118−
20+# qmltest_DEFAULT_PROPERTIES
119− add_executable_test(${COMPONENT_NAME} qmltestrunner
21+
120− ${ARGN}
22+find_program(qmltestrunner_exe qmltestrunner)
24+if(NOT qmltestrunner_exe)
25+ msg(FATAL_ERROR "Could not locate qmltestrunner.")
28+set(qmlscene_exe ${CMAKE_BINARY_DIR}/tests/uqmlscene/uqmlscene)
30+macro(add_manual_qml_test SUBPATH COMPONENT_NAME)
31+ set(options NO_ADD_TEST NO_TARGETS)
32+ set(multi_value_keywords IMPORT_PATHS TARGETS PROPERTIES ENVIRONMENT)
34+ cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN})
36+ set(qmlscene_TARGET try${COMPONENT_NAME})
37+ set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME})
39+ set(qmlscene_imports "")
40+ if(NOT "${qmltest_IMPORT_PATHS}" STREQUAL "")
41+ foreach(IMPORT_PATH ${qmltest_IMPORT_PATHS})
42+ list(APPEND qmlscene_imports "-I")
43+ list(APPEND qmlscene_imports ${IMPORT_PATH})
44+ endforeach(IMPORT_PATH)
45+ elseif(NOT "${qmltest_DEFAULT_IMPORT_PATHS}" STREQUAL "")
46+ foreach(IMPORT_PATH ${qmltest_DEFAULT_IMPORT_PATHS})
47+ list(APPEND qmlscene_imports "-I")
48+ list(APPEND qmlscene_imports ${IMPORT_PATH})
49+ endforeach(IMPORT_PATH)
53+ env ${qmltest_ENVIRONMENT}
121− ARGS -input ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
54+ ${qmlscene_exe} ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
57+ add_custom_target(${qmlscene_TARGET} ${qmlscene_command})
124− if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml")
59+endmacro(add_manual_qml_test)
125− add_qml_test_data("${PATH}" "tst_${COMPONENT_NAME}.qml")
130−# add_manual_qml_test(path component_name
61+macro(add_qml_test SUBPATH COMPONENT_NAME)
131−# [...]
62+ set(options NO_ADD_TEST NO_TARGETS)
132−# )
63+ set(multi_value_keywords IMPORT_PATHS TARGETS PROPERTIES ENVIRONMENT)
134−# Add manual test targets for ${component_name} under ${path}. It's assumed
135−# that the test file is named ${path}/tst_${component_name}.qml.
137−# This function wraps add_manual_test, see below for available arguments.
139−function(add_manual_qml_test PATH COMPONENT_NAME)
65+ cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN})
140− import_executables(qmlscene)
141− cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
143− add_manual_test(${COMPONENT_NAME} qmlscene
67+ set(qmltest_TARGET test${COMPONENT_NAME})
144− ${ARGN}
68+ set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME})
145− ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
148− if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml")
70+ set(qmltestrunner_imports "")
149− add_qml_test_data("${PATH}" "tst_${COMPONENT_NAME}.qml")
71+ if(NOT "${qmltest_IMPORT_PATHS}" STREQUAL "")
72+ foreach(IMPORT_PATH ${qmltest_IMPORT_PATHS})
73+ list(APPEND qmltestrunner_imports "-import")
74+ list(APPEND qmltestrunner_imports ${IMPORT_PATH})
75+ endforeach(IMPORT_PATH)
76+ elseif(NOT "${qmltest_DEFAULT_IMPORT_PATHS}" STREQUAL "")
77+ foreach(IMPORT_PATH ${qmltest_DEFAULT_IMPORT_PATHS})
78+ list(APPEND qmltestrunner_imports "-import")
79+ list(APPEND qmltestrunner_imports ${IMPORT_PATH})
80+ endforeach(IMPORT_PATH)
154−# add_executable_test(target component_name
155−# [...] # see doc for add_manual_qml_test for common arguments
156−# [ADD_TEST] # whether to add to the "test" target
157−# [ARG_PREFIX arg_prefix] # prefix logging arguments with this string
158−# [ARGS] arg1 [arg2 [...]] # pass these arguments to the test executable
159−# [TARGETS target1 [target2 [...]]] # make the listed targets depend on this test
160−# # if a corresponding xvfbtarget1, xvfbtarget2 etc. exists,
161−# # this test running under xvfb will be added as a dependency
163−# [ITERATIONS count] # run this test as a benchmark for ${count} iterations
166−# Logging options in the standard form of "-o filename,format"
167−# will be appended to the arguments list, prefixed with ARG_PREFIX.
168−# XUnitXML files will be stored in current binary dir.
170−# Three targets will be created:
171−# - test${component_name} - Runs the test
172−# - xvfbtest${component_name} - Runs the test under xvfb
173−# - gdbtest${component_name} - Runs the test under gdb
175−function(add_executable_test COMPONENT_NAME TARGET)
176− import_executables(gdb xvfb-run OPTIONAL)
178− cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
181− file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
182− set(file_logger -o ${CMAKE_CURRENT_BINARY_DIR}/test${COMPONENT_NAME}.xml,xunitxml)
184− bake_arguments("${QMLTEST_ARG_PREFIX}" args ${iterations} ${file_logger} ${STDOUT_LOGGER})
186 set(qmltest_command
83 set(qmltest_command
187− $<TARGET_FILE:${TARGET}>
84+ env ${qmltest_ENVIRONMENT}
188− ${QMLTEST_ARGS}
85+ ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
189− ${args}
86+ ${qmltestrunner_imports}
87+ -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml
90+ add_custom_target(${qmltest_TARGET} ${qmltest_command})
192− add_qmltest_target(test${COMPONENT_NAME} ${TARGET}
92+ if(NOT "${qmltest_PROPERTIES}" STREQUAL "")
193− COMMAND ${qmltest_command}
93+ set_target_properties(${qmltest_TARGET} PROPERTIES ${qmltest_PROPERTIES})
194− ${depends}
94+ elseif(NOT "${qmltest_DEFAULT_PROPERTIES}" STREQUAL "")
195− ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT}
95+ set_target_properties(${qmltest_TARGET} PROPERTIES ${qmltest_DEFAULT_PROPERTIES})
201− add_qmltest_target(xvfbtest${COMPONENT_NAME} ${TARGET}
202− COMMAND $<TARGET_FILE:xvfb-run> --server-args "-screen 0 1024x768x24" --auto-servernum ${qmltest_command}
204− ENVIRONMENT QT_QPA_PLATFORM=xcb QML2_IMPORT_PATH=${imports} LD_PRELOAD=/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/mesa/libGL.so.1 ${QMLTEST_ENVIRONMENT}
205− TARGETS ${xvfb_targets}
210− add_qmltest_target(gdbtest${COMPONENT_NAME} ${TARGET}
211− COMMAND $<TARGET_FILE:gdb> -ex run -args ${qmltest_command}
213− ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT}
219−# add_manual_test(target component_name
220−# [DEPENDS target1 [target2 [...]]] # make this test depend on the specified targets
221−# [IMPORT_PATHS import_path1 [import_path2 [...]] # use these QML import paths
222−# # (they're searched first to last)
223−# [ENVIRONMENT var1=value1 [var2=value2 [...]]] # set these environment variables
226−# Two targets will be created:
227−# - try${component_name} - Runs the test for manual interaction
228−# - gdbtry${component_name} - Runs the test under gdb
230−function(add_manual_test COMPONENT_NAME TARGET)
98+ if("${qmltest_NO_ADD_TEST}" STREQUAL FALSE AND NOT "${qmltest_DEFAULT_NO_ADD_TEST}" STREQUAL "TRUE")
231− import_executables(gdb OPTIONAL)
99+ add_test(${qmltest_TARGET} ${qmltest_command})
233− cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
101+ if(NOT "${qmltest_UNPARSED_ARGUMENTS}" STREQUAL "")
234− mangle_arguments()
102+ set_tests_properties(${qmltest_TARGET} PROPERTIES ${qmltest_PROPERTIES})
235−
103+ elseif(NOT "${qmltest_DEFAULT_PROPERTIES}" STREQUAL "")
236− bake_arguments("${QMLTEST_ARG_PREFIX}" args -qmljsdebugger=port:3768,3800)
104+ set_tests_properties(${qmltest_TARGET} PROPERTIES ${qmltest_DEFAULT_PROPERTIES})
239− $<TARGET_FILE:${TARGET}>
244− add_qmltest_target(try${COMPONENT_NAME} ${TARGET}
245− COMMAND ${qmltry_command}
247− ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT}
251− add_qmltest_target(gdbtry${COMPONENT_NAME} ${TARGET}
252− COMMAND $<TARGET_FILE:gdb> -ex run -args ${qmltry_command}
254− ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT}
260−# add_meta_test(target)
262−# Adds a test target that will run one of our "meta" test targets, like
263−# xvfbuitests. This script will run the specified suite of tests on an
266−function(add_meta_test TARGET_NAME)
267− cmake_parse_arguments(TEST "SERIAL" "" "DEPENDS" ${ARGN})
269− add_custom_target(${TARGET_NAME})
271− set(filename "${CMAKE_BINARY_DIR}/tests/scripts/${TARGET_NAME}.sh")
273− file(WRITE "${filename}" "#!/bin/sh\n\n")
275− file(WRITE "${filename}" "#!/usr/bin/parallel --shebang --no-notice\n\n")
278− add_meta_dependencies(${TARGET_NAME} DEPENDS ${TEST_DEPENDS})
279− # else we will write the rest of the script as we add cmake targets
281− install(FILES "${filename}"
282− PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
283− GROUP_EXECUTE GROUP_READ
284− WORLD_EXECUTE WORLD_READ
285− DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/scripts"
290−################### INTERNAL ####################
292−function(install_test_script TARGET_NAME)
293− cmake_parse_arguments(TEST "" "" "COMMAND;ENVIRONMENT" ${ARGN})
295− # Now write the above test into a shell script that we can run on an
297− set(script "#!/bin/sh\n\nset -x\n\n")
298− foreach(ONE_ENV ${TEST_ENVIRONMENT})
299− set(script "${script}export ${ONE_ENV}\n")
301− set(script "${script}export UNITY_TESTING_DATADIR=\"${CMAKE_INSTALL_PREFIX}/${SHELL_APP_DIR}\"\n")
302− set(script "${script}export UNITY_TESTING_LIBDIR=\"${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}\"\n")
303− set(script "${script}\n")
304− set(script "${script}XML_ARGS=\n")
305− set(script "${script}if [ -n \"\$ARTIFACTS_DIR\" ]; then\n")
306− set(script "${script} XML_ARGS=\"@XML_ARGS@\"\n")
307− set(script "${script} mkdir -p \"@XML_DIR@\"\n")
308− set(script "${script} touch \"@XML_FILE@\"\n")
309− set(script "${script}fi\n")
310− set(script "${script}\n")
311− foreach(ONE_CMD ${TEST_COMMAND})
312− set(script "${script}'${ONE_CMD}' ")
314− set(script "${script}\"\$@\"") # Allow passing arguments if desired
316− set(filename "${CMAKE_BINARY_DIR}/tests/scripts/${TARGET_NAME}.sh")
318− # Generate script to file then read it back to resolve any generator
319− # expressions before we try to replace paths.
321− OUTPUT "${filename}"
325− # Do replacement at install time to save needless work and to make sure
326− # we are modifying file after generate step above (which doesn't happen
327− # immediately). We can't use a custom-defined function or macro here...
328− # So instead we use a giant ugly code block.
330− # START OF CODE BLOCK --------------------------------------------------
332− file(READ \"${filename}\" replacestr)
334− # Now some replacements...
335− # tests like to write xml output to our builddir; we don't need that, but we do want them in ARTIFACTS_DIR
336− string(REGEX MATCH \"( '--parameter')? '-o'( '--parameter')? '[^']*,xunitxml' \" xmlargs \"\${replacestr}\")
337− string(REGEX REPLACE \"( '--parameter')? '-o'( '--parameter')? '[^']*,xunitxml' \" \" \\\$XML_ARGS \" replacestr \"\${replacestr}\")
338− string(REGEX REPLACE \"'[^']*/tests/\" \"'\\\$ARTIFACTS_DIR/tests/\" xmlargs \"\${xmlargs}\")
339− string(REGEX REPLACE \".*'([^']*),xunitxml'.*\" \"\\\\1\" xmlfile \"\${xmlargs}\")
340− string(REGEX REPLACE \"(.*)/[^/]*\" \"\\\\1\" xmldir \"\${xmlfile}\")
341− string(REGEX REPLACE \"'\" \"\" xmlargs \"\${xmlargs}\") # strip single quotes
342− string(REGEX REPLACE \"@XML_ARGS@\" \"\${xmlargs}\" replacestr \"\${replacestr}\")
343− string(REGEX REPLACE \"@XML_DIR@\" \"\${xmldir}\" replacestr \"\${replacestr}\")
344− string(REGEX REPLACE \"@XML_FILE@\" \"\${xmlfile}\" replacestr \"\${replacestr}\")
345− # replace build/source roots with their install paths
346− string(REPLACE \"${CMAKE_BINARY_DIR}/libs\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}\" replacestr \"\${replacestr}\")
347− string(REPLACE \"${CMAKE_BINARY_DIR}/plugins\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_INSTALL_QML}\" replacestr \"\${replacestr}\")
348− string(REPLACE \"${CMAKE_BINARY_DIR}/tests/libs\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}/tests/libs\" replacestr \"\${replacestr}\")
349− string(REPLACE \"${CMAKE_BINARY_DIR}/tests/mocks\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_INSTALL_QML}/mocks\" replacestr \"\${replacestr}\")
350− string(REPLACE \"${CMAKE_BINARY_DIR}/tests/plugins\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}/tests/plugins\" replacestr \"\${replacestr}\")
351− string(REPLACE \"${CMAKE_BINARY_DIR}/tests/qmltests\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}/tests/qmltests\" replacestr \"\${replacestr}\")
352− string(REPLACE \"${CMAKE_BINARY_DIR}/tests/uqmlscene\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}\" replacestr \"\${replacestr}\")
353− string(REPLACE \"${CMAKE_BINARY_DIR}/tests/utils/modules\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_INSTALL_QML}/utils\" replacestr \"\${replacestr}\")
354− string(REPLACE \"${CMAKE_SOURCE_DIR}/tests/plugins\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_APP_DIR}/tests/plugins\" replacestr \"\${replacestr}\")
355− string(REPLACE \"${CMAKE_SOURCE_DIR}/tests/qmltests\" \"${CMAKE_INSTALL_PREFIX}/${SHELL_APP_DIR}/tests/qmltests\" replacestr \"\${replacestr}\")
357− file(WRITE \"${filename}\" \"\${replacestr}\")
359− # END OF CODE BLOCK --------------------------------------------------
361− install(FILES "${filename}"
362− PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
363− GROUP_EXECUTE GROUP_READ
364− WORLD_EXECUTE WORLD_READ
365− DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/scripts"
369−function(add_meta_dependencies UPSTREAM_TARGET)
370− cmake_parse_arguments(TEST "" "" "DEPENDS" ${ARGN})
372− foreach(depend ${TEST_DEPENDS})
373− add_dependencies(${UPSTREAM_TARGET} ${depend})
375− # add depend to the meta test script that we will install on system
376− set(filename "${CMAKE_BINARY_DIR}/tests/scripts/${UPSTREAM_TARGET}.sh")
377− if (EXISTS "${filename}")
378− file(APPEND "${filename}" "${CMAKE_INSTALL_PREFIX}/${SHELL_PRIVATE_LIBDIR}/tests/scripts/${depend}.sh \"\$@\" 2>&1\n")
380− endforeach()
106+ endif("${qmltest_NO_ADD_TEST}" STREQUAL FALSE AND NOT "${qmltest_DEFAULT_NO_ADD_TEST}" STREQUAL "TRUE")
382−
108+ if("${qmltest_NO_TARGETS}" STREQUAL "FALSE")
383−# add_qmltest_target(target_name target
109+ if(NOT "${qmltest_TARGETS}" STREQUAL "")
384−# COMMAND test_exe [arg1 [...]] # execute this test with arguments
110+ foreach(TARGET ${qmltest_TARGETS})
385−# [...] # see above for available arguments:
111+ add_dependencies(${TARGET} ${qmltest_TARGET})
386−# # ADD_TEST, ENVIRONMENT, DEPENDS and TARGETS
112+ endforeach(TARGET)
387−# )
113+ elseif(NOT "${qmltest_DEFAULT_TARGETS}" STREQUAL "")
388−
114+ foreach(TARGET ${qmltest_DEFAULT_TARGETS})
389−function(add_qmltest_target TARGET_NAME TARGET)
115+ add_dependencies(${TARGET} ${qmltest_TARGET})
390− cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "COMMAND;${QMLTEST_MULTI}" ${ARGN})
116+ endforeach(TARGET)
393− # Additional arguments
394− string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_lower)
395− if(cmake_generator_lower STREQUAL "unix makefiles")
396− set(function "$(FUNCTION)")
399− add_custom_target(${TARGET_NAME}
400− env ${QMLTEST_ENVIRONMENT}
401− ${QMLTEST_COMMAND} ${function}
402− DEPENDS ${TARGET} ${QMLTEST_DEPENDS}
405− install_test_script(${TARGET_NAME}
406− ENVIRONMENT ${QMLTEST_ENVIRONMENT}
407− COMMAND ${QMLTEST_COMMAND}
410− if(QMLTEST_ADD_TEST)
413− COMMAND ${QMLTEST_COMMAND}
416− foreach(ENV ${QMLTEST_ENVIRONMENT})
417− set_property(TEST ${TARGET_NAME} APPEND PROPERTY ENVIRONMENT ${ENV})
420− set_property(TEST ${TARGET_NAME} APPEND PROPERTY DEPENDS ${TARGET})
421− foreach(DEPEND ${DEPENDS})
422− set_property(TEST ${TARGET_NAME} APPEND PROPERTY DEPENDS ${DEPEND})
426− foreach(UPSTREAM_TARGET ${QMLTEST_TARGETS})
427− add_meta_dependencies(${UPSTREAM_TARGET} DEPENDS ${TARGET_NAME})
432−# mangle_arguments(${ARGN})
434−# Verify there were no unparsed arguments and
435−# mangle the known ones for further processing.
437−macro(mangle_arguments)
438− if(QMLTEST_UNPARSED_ARGUMENTS)
439− message(FATAL_ERROR "Unexpected arguments: ${QMLTEST_UNPARSED_ARGUMENTS}")
442− if(QMLTEST_ADD_TEST)
443− set(add_test ADD_TEST)
446− if(QMLTEST_IMPORT_PATHS)
447− string(REPLACE ";" ":" imports "${QMLTEST_IMPORT_PATHS}")
450− if(QMLTEST_ITERATIONS)
451− set(iterations -iterations ${QMLTEST_ITERATIONS})
455− set(depends DEPENDS ${QMLTEST_DEPENDS})
459− set(targets TARGETS ${QMLTEST_TARGETS})
462− set(xvfb_targets "")
463− foreach(target ${QMLTEST_TARGETS})
464− if(TARGET xvfb${target})
465− list(APPEND xvfb_targets xvfb${target})
467− endforeach()
118+ endif("${qmltest_NO_TARGETS}" STREQUAL "FALSE")
468− set(xvfb_targets "${xvfb_targets}" PARENT_SCOPE)
472−# bake_arguments(prefix output
120+ add_manual_qml_test(${SUBPATH} ${COMPONENT_NAME} ${ARGN})
473−# arg1 [arg2 [...]]
121+endmacro(add_qml_test)
476−# If set, add the argument prefix before every passed
477−# argument and store the result in ${OUTPUT} variable.
479−function(bake_arguments PREFIX OUTPUT)
483− foreach(arg ${ARGN})
484− list(APPEND args ${PREFIX})
485− list(APPEND args ${arg})
488− set(${OUTPUT} "${args}" PARENT_SCOPE)
cmake/modules/autopilot.cmake+2−7
@@ -2,15 +2,10 @@ add_custom_target(autopilot)
3function(declare_autopilot_test TEST_NAME TEST_SUITE WORKING_DIR)
3function(declare_autopilot_test TEST_NAME TEST_SUITE WORKING_DIR)
4 add_custom_target(autopilot-${TEST_NAME}
4 add_custom_target(autopilot-${TEST_NAME}
5− COMMAND UNITY_TESTING=1 LANG=C QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks python3 -m autopilot.run run ${TEST_SUITE}
5+ COMMAND LANG=C UBUNTU_ICON_THEME=ubuntu-mobile QML2_IMPORT_PATH=${SHELL_PRIVATE_LIBDIR}/qml/mocks autopilot run ${TEST_SUITE}
6 WORKING_DIRECTORY ${WORKING_DIR}
6 WORKING_DIRECTORY ${WORKING_DIR}
7− DEPENDS fake_install
7+ DEPENDS install
10− add_custom_target(fake_install
11− COMMAND cmake --build ${CMAKE_BINARY_DIR} --target install
14 add_dependencies(autopilot autopilot-${TEST_NAME})
10 add_dependencies(autopilot autopilot-${TEST_NAME})
16endfunction()
11endfunction()
data/CMakeLists.txtdeleted−27
@@ -1,27 +0,0 @@
1−# generate desktop files
2−configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
3−configure_file(${INDICATORS_CLIENT_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${INDICATORS_CLIENT_APP}.desktop @ONLY)
4−configure_file(${GREETER_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop @ONLY)
6−# install desktop files
8− ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
9− ${CMAKE_CURRENT_BINARY_DIR}/${INDICATORS_CLIENT_APP}.desktop
10− DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
14− ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop
15− DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/greeters
19− 51-unity8-greeter.conf
20− DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/lightdm.conf.d
23−add_custom_target(pkgversion ALL COMMAND dpkg-parsechangelog -l${CMAKE_SOURCE_DIR}/debian/changelog --show-field version > ${CMAKE_CURRENT_BINARY_DIR}/version)
25−install(FILES com.canonical.Unity8.gschema.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas)
26−install(FILES com.canonical.Unity.gschema.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas)
27−install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/unity8)
data/com.canonical.Unity.gschema.xmldeleted−255
@@ -1,255 +0,0 @@
2− <enum id="form-factor-enum">
3− <value nick="Automatic" value="0" />
4− <value nick="Desktop" value="1" />
5− <value nick="Netbook" value="2" />
6− <value nick="TV" value="3" />
8− <enum id="home-expanded-enum">
9− <value nick="Not Expanded" value="0" />
10− <value nick="Expanded" value="1" />
12− <enum id="launcher-position-enum">
13− <value nick="Left" value="0" />
14− <value nick="Bottom" value="1" />
16− <enum id="desktop-type-enum">
17− <value nick="Ubuntu" value="0" />
18− <value nick="UbuntuKylin" value="1" />
21− <schema path="/com/canonical/unity/" id="com.canonical.Unity" gettext-domain="unity">
22− <key enum="form-factor-enum" name="form-factor">
23− <default>"Automatic"</default>
24− <summary>The form factor Unity should target.</summary>
25− <description>The form factor chosen will affect the size and appearance of the Dash, Launcher and also the Window Management behaviour.</description>
27− <key enum="home-expanded-enum" name="home-expanded">
28− <default>"Expanded"</default>
29− <summary>Whether the home screen should be expanded.</summary>
30− <description>Whether the home screen should be expanded.</description>
32− <key enum="desktop-type-enum" name="desktop-type">
33− <default>"Ubuntu"</default>
34− <summary>The current desktop name.</summary>
35− <description>The current desktop name.</description>
37− <key type="i" name="minimize-count">
39− <summary>Number of times a normal window has been minimized.</summary>
40− <description>This is used to adjust the animation speed by making it progressively faster the more it is used.</description>
42− <key type="i" name="minimize-fast-duration">
43− <default>300</default>
44− <summary>The duration for the minimize animation when it is at its fastest setting.</summary>
45− <description>This is the duration that the minimize animation will have when it has been used more than an number of times equal minimize-speed-threshold.</description>
47− <key type="i" name="minimize-slow-duration">
48− <default>800</default>
49− <summary>The duration for the minimize animation when it is at its slowest setting.</summary>
50− <description>This is the duration that the minimize animation will have when it has never been used.</description>
52− <key type="i" name="minimize-speed-threshold">
53− <default>100</default>
54− <summary>The number of minimizations required to reach maximum speed.</summary>
55− <description>The speed of the minimize animation will progressively get faster as minimize-count approaches this value.</description>
57− <key type="b" name="double-click-activate">
58− <default>true</default>
59− <summary>Enable/Disable dash result double-click activation.</summary>
60− <description>This is used to enable/disable double-click result activation in the dash. Double-click to activate, single click preview</description>
62− <key type="b" name="integrated-menus">
63− <default>false</default>
64− <summary>Enable/Disable the integrated menus in Unity.</summary>
65− <description>When this is enabled, the application menus will be shown
66− on the window decoration, otherwise they will be always shown on the
67− unity top panel</description>
69− <key type="u" name="show-menus-now-delay">
70− <default>180</default>
71− <range min="0" max="5000"/>
72− <summary>Delay (in ms) before showing the menus when pressing Alt</summary>
73− <description>This allows tune the delay before presenting unity menus
74− (in non always-show-menus mode).</description>
76− <key type="b" name="always-show-menus">
77− <default>false</default>
78− <summary>Toggle the menu visibility based on mouse hovering.</summary>
79− <description>When this is enabled, the application menus will be always
80− shown (on the window decoration or in the unity panel, depending whether
81− integrated menus are enabled), otherwise they will be shown only when
82− the mouse cursor is over the relative mouse area.</description>
84− <key type="as" name="whitelist-repeated-keys">
86− 'XF86KbdBrightnessUp',
87− 'XF86KbdBrightnessDown',
88− 'XF86MonBrightnessUp',
89− 'XF86MonBrightnessDown',
90− 'XF86AudioRaiseVolume',
91− 'XF86AudioLowerVolume'
93− <summary>List of keycodes that should be processed even if auto-repated.</summary>
94− <description>These keycodes are processed even if they are auto-repeated.</description>
96− <key type="b" name="pam-check-account-type">
97− <default>false</default>
98− <summary>Enable/Disable PAM account checking</summary>
99− <description>Whether PAM should check the result of account modules
100− when authenticating. Only do this if you have account
101− configured properly on your system.</description>
103− <key type="b" name="lowgfx">
104− <default>false</default>
105− <summary>Enable/Disable Low Graphics Mode</summary>
106− <description>Whether Unity runs in Low Graphics Mode.</description>
109− <schema path="/com/canonical/unity/interface/" id="com.canonical.Unity.Interface" gettext-domain="unity">
110− <key type="d" name="text-scale-factor">
111− <default>1.0</default>
112− <range min="0.5" max="3.0"/>
113− <summary>Font scaling for unity and applications.</summary>
114− <description>This value defines the global font scaling used by both
115− unity and applications. It will match the current system font scaling.</description>
117− <key type="d" name="cursor-scale-factor">
118− <default>1.0</default>
119− <range min="0.5" max="3.0"/>
120− <summary>Mouse cursor scaling.</summary>
121− <description>This value defines the global mouse cursor scaling used by both
122− unity and applications. Changing this value allows to use a custom scaling
123− for the mouse cursor.</description>
125− <key type="s" name="app-scale-factor-monitor">
126− <default>''</default>
127− <summary>The name of the monitor that controls the global app scaling factor.</summary>
128− <description>This value defines the monitor that unity will use (if found) as reference
129− for scaling all the applications.</description>
131− <key type="b" name="app-fallback-to-maximum-scale-factor">
132− <default>true</default>
133− <summary>Use the maximum per-monitor scale-factor as application scale factor if no target monitor is found.</summary>
134− <description>When this is enabled, the applications scale factor will match
135− the scale factor of the monitor with the greater value, in case the monitor
136− defined in 'app-scale-factor-monitor' is not provided or available.</description>
139− <schema path="/com/canonical/unity/launcher/" id="com.canonical.Unity.Launcher" gettext-domain="unity">
140− <key type="as" name="favorites">
142− 'application://ubiquity.desktop',
143− 'application://org.gnome.Nautilus.desktop',
144− 'application://firefox.desktop',
145− 'application://libreoffice-writer.desktop',
146− 'application://libreoffice-calc.desktop',
147− 'application://libreoffice-impress.desktop',
148− 'application://org.gnome.Software.desktop',
149− 'application://ubuntu-amazon-default.desktop',
150− 'application://unity-control-center.desktop',
151− 'unity://running-apps',
152− 'unity://expo-icon',
155− <summary>List of items that should be shown by default in the launcher</summary>
156− <description>These items can be: application://desktop-id.desktop, device://uiid and unity://special-id (including: unity://running-apps (icons of running applications) unity://devices (icons of attached devices), unity://expo-icon (icon of the workspace switcher) and unity://desktop-icon (the show-desktop icon)); the order of this list determines the launcher item's position.</description>
158− <key type="as" name="items">
160− 'application:///dialer-app.desktop',
161− 'application:///messaging-app.desktop',
162− 'application:///address-book-app.desktop',
163− 'application:///ubuntu-system-settings.desktop',
164− 'appid://openstore.openstore-team/openstore/current-user-version',
165− 'appid://com.ubuntu.camera/camera/current-user-version',
166− 'appid://com.ubuntu.gallery/gallery/current-user-version',
167− 'application:///morph-browser.desktop'
169− <summary>List of items that should be shown by default in the launcher</summary>
170− <description>These items can be: application:///desktop-id.desktop or appid://package/app/current-user-version.</description>
172− <key type="s" name="favorite-migration">
173− <default>''</default>
174− <summary>Version of last migration done</summary>
175− <description>This is a detection key for the favorite migration script to know whether the needed migration is done or not.</description>
177− <key enum="launcher-position-enum" name="launcher-position">
178− <default>"Left"</default>
179− <summary>The position of launcher.</summary>
180− <description>The position of launcher.</description>
183− <schema path="/com/canonical/unity/devices/" id="com.canonical.Unity.Devices" gettext-domain="unity">
184− <key type="as" name="blacklist">
185− <default>[]</default>
186− <summary>List of device uuid blacklist from the launcher.</summary>
187− <description>These devices are not shown in the launcher by default.</description>
190− <schema path="/com/canonical/unity/dash/" id="com.canonical.Unity.Dash" gettext-domain="unity">
191− <key type="as" name="scopes">
192− <default>[ 'home.scope', 'applications.scope', 'files.scope', 'video.scope', 'music.scope', 'photos.scope', 'social.scope' ]</default>
193− <summary>List of scope ids specifying which scopes should be created and the order to display them in.</summary>
194− <description>The scopes listed in the scope bar will be ordered according to this list.</description>
196− <key type="as" name="favorite-scopes">
197− <default>[ 'scope://clickscope', 'scope://musicaggregator', 'scope://videoaggregator' ]</default>
198− <summary>List of scope queries specifying what should be displayed in the dash.</summary>
199− <description>List of favorite scopes displayed in the dash.</description>
202− <schema path="/com/canonical/unity/decorations/" id="com.canonical.Unity.Decorations" gettext-domain="unity">
203− <key type="u" name="grab-wait">
204− <default>175</default>
205− <range min="0" max="1000"/>
206− <summary>Milliseconds to wait before considering a mouse pressure a grab</summary>
207− <description>The number of ms to wait before starting the window movement (and then
208− showing the proper mouse cursor, and grabbing the window)</description>
211− <schema path="/com/canonical/unity/integrated-menus/" id="com.canonical.Unity.IntegratedMenus" gettext-domain="unity">
212− <key type="u" name="click-movement-threshold">
213− <default>15</default>
214− <range min="0" max="30"/>
215− <summary>Number of pixels to ignore on mouse pressure</summary>
216− <description>This value define how many pixels the user can move the mouse
217− when holding the mouse button, before we consider his action a movement
218− (to grab the window).</description>
220− <key type="u" name="double-click-wait">
221− <default>0</default>
222− <range min="0" max="300"/>
223− <summary>Milliseconds to wait before activating a menu after mouse release</summary>
224− <description>The number of ms to wait after a mouse button release event before considering
225− it a click. When this value is greater than 0, then it's possible to maximize
226− a window by double-clicking on its menus if the second click happens before the
227− specified value of ms is elapsed</description>
229− <key type="b" name="unfocused-windows-popup">
230− <default>true</default>
231− <summary>Whether to pop-up a menu when clicking over unfocused windows entries</summary>
232− <description>By disabling this setting you can make unity to only focus a window
233− when clicking over unfocused menu entries</description>
236− <schema path="/com/canonical/unity/gestures/" id="com.canonical.Unity.Gestures" gettext-domain="unity">
237− <key type="b" name="launcher-drag">
238− <default>true</default>
239− <summary>Multi-touch gesture to reveal the launcher.</summary>
240− <description>When this is enabled, a 4 finger swipe from left to right will reveal launcher,
241− provided that the launcher is set to auto-hide.</description>
243− <key type="b" name="dash-tap">
244− <default>true</default>
245− <summary>Multi-touch gesture to open the dash.</summary>
246− <description>When this is enabled, a 4 finger tap will open the dash.</description>
248− <key type="b" name="windows-drag-pinch">
249− <default>true</default>
250− <summary>Multi-touch gestures to manage the windows.</summary>
251− <description>When this is enabled, 3 finger gestures such as drag, and pinch, will
252− help manage the windows.</description>
data/com.canonical.Unity8.gschema.xmldeleted−75
@@ -1,75 +0,0 @@
2− <enum id="usage-mode-enum">
3− <value nick="Staged" value="0" />
4− <value nick="Windowed" value="1" />
5− <value nick="Automatic" value="2" />
8− <schema path="/com/canonical/unity8/" id="com.canonical.Unity8" gettext-domain="unity8">
9− <key enum="usage-mode-enum" name="usage-mode">
10− <default>"Automatic"</default>
11− <summary>The usage mode.</summary>
12− <description>The usage mode chosen will affect the Window Management behaviour.</description>
14− <key type="u" name="edge-barrier-sensitivity">
15− <default>50</default>
16− <range min="1" max="100"/>
17− <summary>Sensitivity of screen edge barriers for the mouse pointer.</summary>
18− <description>Some UI actions like revealing the launcher or the applications spread are triggered by pushing the mouse pointer against a screen edge. This key defines how much you have to push in order to trigger the associated action.</description>
20− <key type="u" name="edge-barrier-min-push">
22− <summary>Minimum push needed to overcome edge barrier</summary>
23− <description>How much you have to push (in grid units)the mouse against an edge barrier when sensibility is 100.</description>
25− <key type="u" name="edge-barrier-max-push">
26− <default>120</default>
27− <summary>Maximum push needed to overcome edge barrier</summary>
28− <description>How much you have to push (in grid units) the mouse against an edge barrier when sensibility is 1.</description>
30− <key type="u" name="edge-drag-width">
32− <summary>The width of the edge drag areas</summary>
33− <description>How big (in grid units) the edge-drag sensitive area should be.</description>
35− <key type="b" name="autohide-launcher">
36− <default>false</default>
37− <summary>Autohide the launcher</summary>
38− <description>This will only be applied in windowed mode. In staged mode, the launcher will always hide.</description>
40− <key type="u" name="launcher-width">
42− <range min="6" max="12"/>
43− <summary>Width of the launcher in grid units.</summary>
44− <description>Changes the width of the launcher in all usage modes.</description>
46− <key type="b" name="enable-indicator-menu">
47− <default>true</default>
48− <summary>Enable or disable the indicator pull down menus</summary>
49− <description>Toggle the availability of the indicator pull down menus</description>
51− <key type="s" name="appstore-uri">
52− <default>'appid://openstore.openstore-team/openstore/current-user-version'</default>
53− <summary>The uri to the app store</summary>
54− <description>This will be used whenever the user triggers an action to open the app store.</description>
56− <key type="b" name="always-show-osk">
57− <default>false</default>
58− <summary>Force showing/hiding the OSK</summary>
59− <description>Toggle the visibility of the On Screen Keyboard unconditionally</description>
61− <key type="b" name="osk-switch-visible">
62− <default>false</default>
63− <summary>Whether the OSK switch should be visible</summary>
64− <description>Toggle the visibility of the OSK switch</description>
68− <schema path="/com/canonical/unity8/greeter/" id="com.canonical.Unity8.Greeter" gettext-domain="unity8">
69− <key type="x" name="locked-out-time">
71− <summary>When the greeter was last locked.</summary>
72− <description>If too many unsuccessful login attempts have been made in a row, the greeter locks you out for a while. This unix timestamp indicates when you were locked out, so unity8 knows when to let you back in.</description>
data/devices.confdeleted−30
@@ -1,30 +0,0 @@
1−# This file can hold multiple device configs. Devices are separated by sections.
3−# SupportedOrientations holds a list of all enabled orientations. A standard
4−# phone will usually have Portrait,Landcape,InvertedLandscape in order to
5−# disable upside down usage.
7−# PrimaryOrientation gives the orientation the device will start up with
8−# when there is no orientations sensor input available (yet) or lock to
9−# when an application specifies to be locked to PrimaryOrientation.
11−# The other Orientation settings can be used to re-map the orientations.
12−# A device might be used with different orientations than how the screen
13−# is physically mounted on the hardware.
15−# Category can be phone, tablet, or desktop. This option determines
16−# whether the side stage is shown (tablet) or not (phone). Using
17−# desktop will load the shell in windowed mode. Note that the user
18−# can override/change this by connecting input hardware or change
21−# Any options not listed will default to the values of the example below.
24−# SupportedOrientations=Portrait,InvertedPortrait,Landscape,InvertedLandscape
25−# PrimaryOrientation=PrimaryOrienation
26−# PortraitOrientation=Portrait
27−# InvertedPortraitOrientation=InvertedPortrait
28−# LandscapeOrientation=Landscape
29−# InvertedLandscapeOrientation=InvertedLandscape
data/indicators-client.desktop.indeleted−9
@@ -1,9 +0,0 @@
4−Comment=Application for testing the Indicators system
5−Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/indicators-client
data/test.sensorsdeleted−12
@@ -1,12 +0,0 @@
2−create accel 0 1000 0.1
7−# simulate crash on the ground
data/unity-mock-indicator-service.confdeleted−7
@@ -1,7 +0,0 @@
1−description "Unity Shell v8 Mock Indicator"
2−author "Nick Dedekind <nick.dedekind@canonical.com>"
7−exec ${BINARY:-unity-mock-indicator-service} $ARGS
data/unity8-filewatcher.confdeleted−13
@@ -1,13 +0,0 @@
1−description "File system watcher for unity8"
2−author "Michael Zanetti <michael.zanetti@canonical.com>"
4−# This method of updating the launcher will not work in our new snappy world,
5−# neither for snaps installed in the system nor if we are running inside a snap.
6−# Plus it hardcodes the phablet user... To be replaced once bug 1630997 is
7−# fixed in ubuntu-app-launch.
9−# Workaround for bug 1360208. ~ and * in one expression doesn't work currently
10−start on (file FILE=/home/phablet/.local/share/applications/*.desktop) or (file FILE=/usr/share/applications/*.desktop)
12−exec dbus-send --type=method_call --dest=com.canonical.Unity.Launcher /com/canonical/Unity/Launcher com.canonical.Unity.Launcher.Refresh
data/unity8-greeter-init.confdeleted−12
@@ -1,12 +0,0 @@
1−description "Unity 8 Greeter initialization"
2−author "Michael Terry <mterry@ubuntu.com>"
4−start on unity8-greeter-started
6−emits indicator-services-start
9− start --no-wait ofono-setup || true
10− initctl emit --no-wait indicator-services-start || true
11− start --no-wait maliit-server || true
data/unity8-greeter-logrotate.confdeleted−14
@@ -1,14 +0,0 @@
1−description "Unity 8 Greeter logrotate support"
2−author "Michael Terry <mterry@ubuntu.com>"
4−start on unity8-greeter-started
8− # logrotate normally starts on startup and then sleeps for 60 seconds.
9− # Otherwise, it skips that sleep. Since we can't emit the startup signal
10− # for a unity8-greeter session, we have to trigger logrotate manually.
11− # So we do the sleep ourselves in its stead.
13− initctl emit :sys:rotate-logs
data/unity8-greeter-wrapperdeleted−109
@@ -1,109 +0,0 @@
2−# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
4−# Copyright (C) 2011,2013,2016 Canonical Ltd
6−# This program is free software: you can redistribute it and/or modify it under
7−# the terms of the GNU General Public License as published by the Free Software
8−# Foundation, version 3 of the License.
10−# See http://www.gnu.org/copyleft/gpl.html the full text of the license.
12−# This wrapper merely ensures that init and friends live only as long as this
13−# script does. Otherwise, it's very easy for some processes to not notice that
14−# the session died. We could try to do this in-process, but we want to do this
15−# cleanup even if the greeter aborts.
17−trap cleanup TERM EXIT
22− # Kill upstart and indicators
23− if [ -n "$INIT_PID" ]; then
26− if [ -n "$CMD_PID" ]; then
35− gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "{'$1': '$2'}"
36− if [ -n "$INIT_PID" ]; then
37− initctl set-env --global "$1=$2"
41−SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
42−rm -f $SUB_SOCKET # clear socket in case we were hard shut down
44−echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >"$XDG_RUNTIME_DIR/dbus-session"
46−# If touch session script (which sets up grid units and mir variables) is available, use it
48−if which ubuntu-touch-session >/dev/null; then
49− TOUCH_WRAPPER=ubuntu-touch-session
52−# Advertise as a unity8 session, so that indicator-network will start.
53−export XDG_SESSION_DESKTOP=unity8
54−export DESKTOP_SESSION=$XDG_SESSION_DESKTOP
56−set_greeter_var QT_IM_MODULE maliitphablet
57−set_greeter_var QT_QPA_PLATFORM ubuntumirclient
59−# We disable ofono using pulse. It causes problems with racing with the user's
60−# pulse. We need to come up with a better long-term fix for this, because we
61−# eventually need the greeter to play ringtones for users that aren't logged in.
62−set_greeter_var PA_DISABLED 1
64−# Normal unity8 sessions are entirely driven by Upstart. But greeters
65−# are special. They need access to the file descriptors that lightdm
66−# creates for them and don't want to start all the services that a normal
67−# session would. So it's inconvenient to live within an upstart session.
68−# But... we still want to use Upstart for some services. So launch here.
69−MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER upstart --user --no-startup-event &
71−while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
72−. "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session"
73−export UPSTART_SESSION
75−# Connect upstart to system, but do first command in a loop to avoid any
76−# race condition between the session file above being written and upstart being
77−# ready to handle requests.
78−while ! initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"; do sleep 0.1; done
79−initctl start notify-cgmanager
81−# Start any pre-greeter tasks if needed (like wizard)
82−initctl emit unity8-greeter-starting
84−# Define language here for phone if available. When phone user switches their
85−# language, they expect that to affect the greeter too. But the user doesn't
86−# have permission to switch system language, only their own. So we notice if
87−# the phablet user exists and use their language if so. TODO: talk to design
88−# about whether we should switch language on fly as users are selected (this
89−# is very hard to do technically).
91−# Do this after unity8-greeter-starting, in case a customization upstart job
93−if [ "$(id -u phablet 2>/dev/null)" = "32011" ]; then
94− USER_LANG=$(gdbus call --system --dest org.freedesktop.Accounts --object-path /org/freedesktop/Accounts/User32011 --method org.freedesktop.DBus.Properties.Get org.freedesktop.Accounts.User Language | cut -d\' -f2)
95− if [ -n "$USER_LANG" ]; then
96− set_greeter_var LANGUAGE "$USER_LANG"
98− USER_LOCALE=$(gdbus call --system --dest org.freedesktop.Accounts --object-path /org/freedesktop/Accounts/User32011 --method org.freedesktop.DBus.Properties.Get org.freedesktop.Accounts.User FormatsLocale | cut -d\' -f2)
99− if [ -n "$USER_LOCALE" ]; then
100− set_greeter_var LANG "$USER_LOCALE"
101− set_greeter_var LC_ALL "$USER_LOCALE"
105−# And finally actually start the greeter
106−exec env MIR_SERVER_FILE=$SUB_SOCKET $TOUCH_WRAPPER $@ &
data/unity8-greeter.desktop.indeleted−7
@@ -1,7 +0,0 @@
4−Comment=The converged Unity shell's Greeter
5−Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-greeter-wrapper @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8 --mode=greeter
6−X-LightDM-Session-Type=mir
data/unity8-greeter.pkladeleted−44
@@ -1,44 +0,0 @@
1−# DO NOT EDIT THIS FILE, it will be overwritten on update
2−# Place your local configurations under /etc/polkit-1/localauthority/
4−[Disable Controlling of Network Devices]
5−Identity=unix-user:lightdm
6−Action=org.freedesktop.NetworkManager.enable-disable-network;org.freedesktop.NetworkManager.enable-disable-wifi;org.freedesktop.NetworkManager.enable-disable-wwan;org.freedesktop.NetworkManager.enable-disable-wimax;
11−[Disable Sleep and Wake]
12−Identity=unix-user:lightdm
13−Action=org.freedesktop.NetworkManager.sleep-wake
18−[Disable WiFi Sharing]
19−Identity=unix-user:lightdm
20−Action=org.freedesktop.NetworkManager.wifi.share.protected;org.freedesktop.NetworkManager.wifi.share.open
25−[Disable Settings Modifications]
26−Identity=unix-user:lightdm
27−Action=org.freedesktop.NetworkManager.settings.modify.own;org.freedesktop.NetworkManager.settings.modify.system;org.freedesktop.NetworkManager.settings.modify.hostname
32−[Disable User Connections]
33−Identity=unix-user:lightdm
34−Action=org.freedesktop.NetworkManager.use-user-connections
39−[Enable Controlling of Network Connections]
40−Identity=unix-user:lightdm
41−Action=org.freedesktop.NetworkManager.network-control
data/unity8.confdeleted−99
@@ -1,99 +0,0 @@
1−description "Unity Shell v8"
2−author "Ricardo Mendoza <ricmm@ubuntu.com>"
4−emits indicator-services-start
5−emits indicator-services-end
7−start on ((xsession SESSION=ubuntu-touch) or (xsession SESSION=unity8-mir) or (xsession SESSION=unity8)) and started dbus
13−# Ensure the shell always gets unthrottled touch events, so that applications
14−# who want full speed low-latency input can get it (LP: #1497105) and so that
15−# apps can use QML touch compression safely (the QML touch compression
16−# algorithm does not support nesting well - LP: #1486341, LP: #1556763 - so
17−# must be fed by the raw input event stream from Unity8).
19−env QML_NO_TOUCH_COMPRESSION=1
24−# FIXME Create an autopilot test that makes sure start+stop and restart
25−# work fine at least 2 times
28− # Tell unity-mir to raise SIGSTOP after we start
29− initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
31− # Save original value of MIR_SOCKET so that we can restore it when stopped,
32− # as we modify the variable for future jobs, including ourself.
33− initctl set-env UNITY_MIR_SOCKET=$MIR_SOCKET
35− # Decide where we are going to put our own socket file
36− if [ -n "$SNAP" ]; then
37− # In snappy, we want to hard code our path because our apparmor profile
38− # only lets us put the socket in one place. And consumers expect it
40− MIR_SERVER_FILE=/run/user/$(id -u)/mir_socket
42− MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
44− initctl set-env MIR_SERVER_FILE=$MIR_SERVER_FILE
46− # Point all future jobs in this session to our Mir socket instead of
47− # unity-system-compositor's socket.
48− initctl set-env --global MIR_SOCKET=$MIR_SERVER_FILE
49− gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "@a{ss} {'MIR_SOCKET': '$MIR_SERVER_FILE'}"
51− # Remove the normal and trusted sockets if still there
52− if [ -S "$MIR_SERVER_FILE" ]; then
53− rm "$MIR_SERVER_FILE"
56− if [ -S "${MIR_SERVER_FILE}_trusted" ]; then
57− rm "${MIR_SERVER_FILE}_trusted"
60− initctl set-env --global MIR_SERVER_PROMPT_FILE=1
62− # Disable Qt's stuttering 'touch compression' to fix scrolling smoothness
63− # issues (LP: #1486341, LP: #1556763). As a bonus, this eliminates most of
64− # the lag seen in the indicator panel pull-down (LP: #1488327) and also
65− # reduces lag seen in apps:
66− initctl set-env --global QML_NO_TOUCH_COMPRESSION=1
68− # Workaround for text not rendering correctly
69− initctl set-env --global QT_ENABLE_GLYPH_CACHE_WORKAROUND=1
71− if [ "$XDG_SESSION_DESKTOP" = "ubuntu-touch" ]; then
72− # On Ubuntu Touch, we currently use a trick where we auto-login the
73− # user without a LightDM greeter at all. In this case, we want to
74− # start with the lockscreen visible. Once we switch to using a
75− # proper greeter for the first login, we can remove this code path.
76− initctl set-env MODE=full-greeter
78− initctl set-env MODE=full-shell
81− # HACK! WORKAROUND FOR HALIUM MISSING UBUNTU_PLATFORM_API
82− if [ ! -f /system/lib/libubuntu_application_api.so ]; then
83− initctl set-env --global UBUNTU_PLATFORM_API_BACKEND=test.so.3
84− initctl set-env --global UBUNTU_PLATFORM_API_SENSOR_TEST=/etc/ubuntusensors/test.sensors
88−exec ${BINARY:-unity8} --mode=$MODE $ARGS
91− initctl emit --no-wait indicator-services-start
95− initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
96− initctl unset-env --global MIR_SERVER_PROMPT_FILE
97− initctl emit application-end
98− initctl emit indicator-services-end
debian/bileto_pre_release_hookdeleted−5
@@ -1,5 +0,0 @@
5−sh ./po/update-unity-pot
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
debian/indicators-client.install−1
This diff is too big to show here.
This diff is too big to show here.
debian/scopes-recommends-generatornew file+27
This diff is too big to show here.
debian/shlibs.localdeleted−1
This diff is too big to show here.
debian/source/formatnew file+1
This diff is too big to show here.
debian/tests/autopilot.shdeleted−13
This diff is too big to show here.
debian/tests/controldeleted−11
This diff is too big to show here.
debian/tests/qmluitests.shdeleted−11
This diff is too big to show here.
debian/unity8-autopilot.install−1
This diff is too big to show here.
debian/unity8-common.installdeleted−5
This diff is too big to show here.
debian/unity8-common.udevdeleted−2
This diff is too big to show here.
debian/unity8-doc.installdeleted−2
This diff is too big to show here.
debian/unity8-fake-env.installnew file+1
This diff is too big to show here.
debian/unity8-greeter.install+4−4
This diff is too big to show here.
debian/unity8-private.install+5−9
This diff is too big to show here.
debian/unity8-schemas.installdeleted−1
This diff is too big to show here.
debian/unity8-tests.installdeleted−9
This diff is too big to show here.
debian/unity8-tests.lintian-overridesdeleted−1
This diff is too big to show here.
debian/unity8.install+10−14
This diff is too big to show here.
debian/unity8.maintscriptdeleted−1
This diff is too big to show here.
doc/CMakeLists.txtdeleted−40
This diff is too big to show here.
doc/Doxyfile.indeleted−2317
This diff is too big to show here.
doc/devices.confdeleted−45
This diff is too big to show here.
graphics/12_10_background_wide@12.pngnew file
Binary file not shown.
graphics/applicationIcons/angrybirds@18.pngnew file
Binary file not shown.
graphics/applicationIcons/browser@18.pngnew file
Binary file not shown.
graphics/applicationIcons/calendar@18.pngnew file
Binary file not shown.
graphics/applicationIcons/camera@18.pngnew file
Binary file not shown.
graphics/applicationIcons/contacts-app@18.pngnew file
Binary file not shown.
graphics/applicationIcons/dash@18.pngnew file
Binary file not shown.
graphics/applicationIcons/evernote@18.pngnew file
Binary file not shown.
graphics/applicationIcons/facebook@18.pngnew file
Binary file not shown.
graphics/applicationIcons/gallery@18.pngnew file
Binary file not shown.
graphics/applicationIcons/gmail@18.pngnew file
Binary file not shown.
graphics/applicationIcons/map@18.pngnew file
Binary file not shown.
graphics/applicationIcons/media-player@18.pngnew file
Binary file not shown.
graphics/applicationIcons/messages-app@18.pngnew file
Binary file not shown.
graphics/applicationIcons/music@18.pngnew file
Binary file not shown.
graphics/applicationIcons/notepad@18.pngnew file
Binary file not shown.
graphics/applicationIcons/phone-app@18.pngnew file
Binary file not shown.
graphics/applicationIcons/pinterest@18.pngnew file
Binary file not shown.
graphics/applicationIcons/ski_safari@18.pngnew file
Binary file not shown.
graphics/applicationIcons/skype@18.pngnew file
Binary file not shown.
graphics/applicationIcons/soundcloud@18.pngnew file
Binary file not shown.
graphics/applicationIcons/system-settings@18.pngnew file
Binary file not shown.
graphics/applicationIcons/twitter@18.pngnew file
Binary file not shown.
graphics/applicationIcons/weather@18.pngnew file
Binary file not shown.
graphics/applicationIcons/wikipedia@18.pngnew file
Binary file not shown.
graphics/applicationIcons/youtube@18.pngnew file
Binary file not shown.
graphics/avatars/amanda@12.pngnew file
Binary file not shown.
graphics/avatars/anna_olsson@12.pngnew file
Binary file not shown.
graphics/avatars/funky@12.pngnew file
Binary file not shown.
graphics/clock@18.pngnew file
Binary file not shown.
graphics/phone_background.jpgnew file
Binary file not shown.
graphics/tablet_background.jpgnew file
Binary file not shown.
include/CMakeLists.txtdeleted−1
This diff is too big to show here.
include/paths.h.indeleted−175
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
plugins/AccountsService/50-com.canonical.unity.AccountsService.pklanew file+6
This diff is too big to show here.
plugins/AccountsService/AccountsService.cpp+51−369
This diff is too big to show here.
plugins/AccountsService/AccountsService.h+19−96
This diff is too big to show here.
plugins/AccountsService/AccountsServiceDBusAdaptor.cpp+30−56
This diff is too big to show here.
plugins/AccountsService/AccountsServiceDBusAdaptor.h+6−10
This diff is too big to show here.
plugins/AccountsService/CMakeLists.txt+15−6
This diff is too big to show here.
plugins/AccountsService/com.canonical.unity.AccountsService.policynew file+24
This diff is too big to show here.
plugins/AccountsService/com.canonical.unity.AccountsService.xml+6−43
This diff is too big to show here.
plugins/AccountsService/plugin.cpp+1−2
This diff is too big to show here.
plugins/AccountsService/plugin.h+1−1
This diff is too big to show here.
plugins/AccountsService/qmldir+1−1
This diff is too big to show here.
plugins/CMakeLists.txt+3−21
This diff is too big to show here.
plugins/Cursor/3rd_party/CMakeLists.txtdeleted−1
This diff is too big to show here.
plugins/Cursor/3rd_party/xcursor/CMakeLists.txtdeleted−15
This diff is too big to show here.
plugins/Cursor/3rd_party/xcursor/xcursor.cdeleted−968
This diff is too big to show here.
plugins/Cursor/3rd_party/xcursor/xcursor.hdeleted−65
This diff is too big to show here.
plugins/Cursor/CMakeLists.txtdeleted−32
This diff is too big to show here.
plugins/Cursor/Cursor.qmldeleted−62
This diff is too big to show here.
plugins/Cursor/CursorImageInfo.cppdeleted−115
This diff is too big to show here.
plugins/Cursor/CursorImageInfo.hdeleted−82
This diff is too big to show here.
plugins/Cursor/CursorImageProvider.cppdeleted−337
This diff is too big to show here.
plugins/Cursor/CursorImageProvider.hdeleted−103
This diff is too big to show here.
plugins/Cursor/MousePointer.cppdeleted−235
This diff is too big to show here.
plugins/Cursor/MousePointer.hdeleted−92
This diff is too big to show here.
plugins/Cursor/plugin.cppdeleted−41
This diff is too big to show here.
plugins/Cursor/plugin.hdeleted−33
This diff is too big to show here.
plugins/Cursor/qmldirdeleted−3
This diff is too big to show here.
plugins/GlobalShortcut/CMakeLists.txtdeleted−10
This diff is too big to show here.
plugins/GlobalShortcut/globalshortcut.cppdeleted−91
This diff is too big to show here.
plugins/GlobalShortcut/globalshortcut.hdeleted−81
This diff is too big to show here.
plugins/GlobalShortcut/globalshortcutregistry.cppdeleted−125
This diff is too big to show here.
plugins/GlobalShortcut/globalshortcutregistry.hdeleted−70
This diff is too big to show here.
plugins/GlobalShortcut/plugin.hdeleted−32
This diff is too big to show here.
plugins/GlobalShortcut/qmldirdeleted−2
This diff is too big to show here.
plugins/Greeter/CMakeLists.txtdeleted−6
This diff is too big to show here.
plugins/Greeter/Unity/CMakeLists.txtdeleted−1
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/CMakeLists.txtdeleted−35
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/launcheritem.cppdeleted−218
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/launcheritem.hdeleted−84
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/launchermodelas.cppdeleted−303
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/launchermodelas.hdeleted−77
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/plugin.cppdeleted−46
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/qmldirdeleted−3
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/quicklistmodel.cppdeleted−72
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/quicklistmodel.hdeleted−55
This diff is too big to show here.
plugins/HudClient/CMakeLists.txtnew file+43
This diff is too big to show here.
plugins/HudClient/hudclient.cppnew file+309
This diff is too big to show here.
plugins/HudClient/hudclient.hnew file+71
This diff is too big to show here.
plugins/HudClient/hudtoolbarmodel.cppnew file+98
This diff is too big to show here.
tests/mocks/Biometryd/MockObserver.h → plugins/HudClient/hudtoolbarmodel.hrenamed+20−13
This diff is too big to show here.
tests/mocks/Lights/plugin.cpp → plugins/HudClient/plugin.cpprenamed+15−12
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/plugin.h → plugins/HudClient/plugin.hrenamed+7−7
This diff is too big to show here.
plugins/HudClient/qmldirnew file+3
This diff is too big to show here.
plugins/HudClient/volumepeakdetector.cppnew file+223
This diff is too big to show here.
plugins/HudClient/volumepeakdetector.hnew file+78
This diff is too big to show here.
plugins/LightDM/CMakeLists.txt+22−12
This diff is too big to show here.
plugins/LightDM/DBusGreeter.cppdeleted−50
This diff is too big to show here.
plugins/LightDM/DBusGreeter.hdeleted−52
This diff is too big to show here.
plugins/LightDM/DBusGreeterList.cppdeleted−56
This diff is too big to show here.
plugins/LightDM/DBusGreeterList.hdeleted−57
This diff is too big to show here.
plugins/LightDM/FullLightDM/CMakeLists.txtdeleted−32
This diff is too big to show here.
plugins/LightDM/FullLightDM/qmldirdeleted−3
This diff is too big to show here.
plugins/LightDM/Greeter.cpp+36−182
This diff is too big to show here.
plugins/LightDM/Greeter.h+13−35
This diff is too big to show here.
plugins/LightDM/GreeterPrivate.hdeleted−45
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/CMakeLists.txtdeleted−33
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/CMakeLists.txtdeleted−54
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/GreeterPrivate.cppdeleted−309
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cppdeleted−87
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.hdeleted−72
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModelPrivate.cppdeleted−36
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModelPrivate.hdeleted−54
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.cppdeleted−94
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.hdeleted−72
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/qmldirdeleted−3
This diff is too big to show here.
plugins/LightDM/PromptsModel.cppdeleted−97
This diff is too big to show here.
plugins/LightDM/PromptsModel.hdeleted−70
This diff is too big to show here.
plugins/LightDM/SessionsModel.cppdeleted−135
This diff is too big to show here.
plugins/LightDM/SessionsModel.hdeleted−66
This diff is too big to show here.
plugins/LightDM/UsersModel.cpp+15−183
This diff is too big to show here.
plugins/LightDM/UsersModel.h+10−8
This diff is too big to show here.
plugins/LightDM/plugin.cpp+8−46
This diff is too big to show here.
plugins/LightDM/plugin.h+6−4
This diff is too big to show here.
plugins/LightDM/qmldir+3−3
This diff is too big to show here.
plugins/Lights/CMakeLists.txtdeleted−23
This diff is too big to show here.
plugins/Lights/HfdLights.cppdeleted−62
This diff is too big to show here.
plugins/Lights/HfdLights.hdeleted−42
This diff is too big to show here.
plugins/Lights/LegacyLights.cppdeleted−91
This diff is too big to show here.
plugins/Lights/Lights.cppdeleted−101
This diff is too big to show here.
plugins/Lights/Lights.hdeleted−71
This diff is too big to show here.
plugins/Lights/plugin.cppdeleted−54
This diff is too big to show here.
plugins/Lights/qmldirdeleted−3
This diff is too big to show here.
plugins/ListViewWithPageHeader/CMakeLists.txtnew file+42
This diff is too big to show here.
plugins/ListViewWithPageHeader/listviewwithpageheader.cppnew file+1267
This diff is too big to show here.
plugins/ListViewWithPageHeader/listviewwithpageheader.hnew file+212
This diff is too big to show here.
plugins/Unity/Platform/plugin.cpp → plugins/ListViewWithPageHeader/plugin.cpprenamed+9−7
This diff is too big to show here.
plugins/Wizard/Utils/plugin.h → plugins/ListViewWithPageHeader/plugin.hrenamed+4−4
This diff is too big to show here.
plugins/ListViewWithPageHeader/qmldirnew file+3
This diff is too big to show here.
plugins/Powerd/CMakeLists.txt+4−8
This diff is too big to show here.
plugins/Powerd/Powerd.cpp+13−67
This diff is too big to show here.
plugins/Powerd/Powerd.h+9−25
This diff is too big to show here.
plugins/Powerd/plugin.h+1−1
This diff is too big to show here.
plugins/Powerd/qmldir+1−1
This diff is too big to show here.
plugins/ScreenshotDirectory/CMakeLists.txtdeleted−9
This diff is too big to show here.
plugins/ScreenshotDirectory/ScreenGrabber.qmltypesdeleted−17
This diff is too big to show here.
plugins/ScreenshotDirectory/ScreenshotDirectory.cppdeleted−64
This diff is too big to show here.
plugins/ScreenshotDirectory/ScreenshotDirectory.hdeleted−39
This diff is too big to show here.
plugins/ScreenshotDirectory/plugin.hdeleted−31
This diff is too big to show here.
plugins/ScreenshotDirectory/qmldirdeleted−2
This diff is too big to show here.
plugins/SessionBroadcast/CMakeLists.txt+5−6
This diff is too big to show here.
plugins/SessionBroadcast/SessionBroadcast.cpp+27−26
This diff is too big to show here.
plugins/SessionBroadcast/SessionBroadcast.h+6−6
This diff is too big to show here.
plugins/SessionBroadcast/plugin.cpp+1−1
This diff is too big to show here.
plugins/SessionBroadcast/plugin.h+1−1
This diff is too big to show here.
plugins/SessionBroadcast/qmldir+1−1
This diff is too big to show here.
plugins/SessionManager/CMakeLists.txtnew file+27
This diff is too big to show here.
plugins/SessionManager/SessionManager.cppnew file+107
This diff is too big to show here.
plugins/SessionManager/SessionManager.hnew file+58
This diff is too big to show here.
tests/mocks/Unity/Connectivity/plugin.cpp → plugins/SessionManager/plugin.cpprenamed+10−9
This diff is too big to show here.
tests/mocks/QtMultimedia/plugin.h → plugins/SessionManager/plugin.hrenamed+6−5
This diff is too big to show here.
plugins/SessionManager/qmldirnew file+2
This diff is too big to show here.
plugins/UInput/CMakeLists.txtdeleted−7
This diff is too big to show here.
plugins/UInput/plugin.cppdeleted−26
This diff is too big to show here.
plugins/UInput/qmldirdeleted−3
This diff is too big to show here.
plugins/UInput/uinput.cppdeleted−182
This diff is too big to show here.
plugins/UInput/uinput.hdeleted−61
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt+9−7
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp+8−9
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h+2−3
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.cpp+2−2
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.h+15−82
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/interface/metatypes.h+6−3
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/plugin.h+2−2
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/qmldir+1−1
This diff is too big to show here.
plugins/Ubuntu/Gestures/AxisVelocityCalculator.cpp+18−9
This diff is too big to show here.
plugins/Ubuntu/Gestures/AxisVelocityCalculator.h+18−11
This diff is too big to show here.
plugins/Ubuntu/Gestures/CMakeLists.txt+10−32
This diff is too big to show here.
plugins/Ubuntu/Gestures/Damper.hnew file+87
This diff is too big to show here.
plugins/Ubuntu/Gestures/Direction.cpp+4−11
This diff is too big to show here.
plugins/Ubuntu/Gestures/Direction.h+5−8
This diff is too big to show here.
plugins/Ubuntu/Gestures/DirectionalDragArea.cppnew file+461
This diff is too big to show here.
plugins/Ubuntu/Gestures/DirectionalDragArea.hnew file+251
This diff is too big to show here.
plugins/Ubuntu/Gestures/MouseEventGenerator.cppdeleted−64
This diff is too big to show here.
plugins/Ubuntu/Gestures/MouseEventGenerator.hdeleted−48
This diff is too big to show here.
plugins/Ubuntu/Gestures/PressedOutsideNotifier.cppdeleted−119
This diff is too big to show here.
plugins/Ubuntu/Gestures/PressedOutsideNotifier.hdeleted−62
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchDispatcher.cppdeleted−398
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchDispatcher.hdeleted−96
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchGate.cppdeleted−290
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchGate.hdeleted−125
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchGestureArea.cppdeleted−879
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchGestureArea.hdeleted−229
This diff is too big to show here.
plugins/Ubuntu/Gestures/UbuntuGesturesQmlGlobal.h → plugins/Ubuntu/Gestures/UbuntuGesturesGlobal.hrenamed+3−3
This diff is too big to show here.
plugins/Ubuntu/Gestures/plugin.cpp+4−11
This diff is too big to show here.
plugins/Ubuntu/Gestures/plugin.h+2−2
This diff is too big to show here.
plugins/Ubuntu/Gestures/qmldir+2−2
This diff is too big to show here.
plugins/Unity/ApplicationMenu/CMakeLists.txtdeleted−19
This diff is too big to show here.
plugins/Unity/ApplicationMenu/applicationmenuregistry.cppdeleted−141
This diff is too big to show here.
plugins/Unity/ApplicationMenu/applicationmenuregistry.hdeleted−83
This diff is too big to show here.
plugins/Unity/ApplicationMenu/com.ubuntu.MenuRegistrar.xmldeleted−83
This diff is too big to show here.
plugins/Unity/ApplicationMenu/dbusapplicationmenuregistry.cppdeleted−44
This diff is too big to show here.
plugins/Unity/ApplicationMenu/dbusapplicationmenuregistry.hdeleted−34
This diff is too big to show here.
plugins/Unity/ApplicationMenu/plugin.cppdeleted−42
This diff is too big to show here.
plugins/Unity/ApplicationMenu/plugin.hdeleted−32
This diff is too big to show here.
plugins/Unity/ApplicationMenu/qmldirdeleted−3
This diff is too big to show here.
plugins/Unity/CMakeLists.txt+69−5
This diff is too big to show here.
plugins/Unity/Connectivity/CMakeLists.txtdeleted−10
This diff is too big to show here.
plugins/Unity/Connectivity/Connectivity.cppdeleted−33
This diff is too big to show here.
plugins/Unity/Connectivity/plugin.hdeleted−31
This diff is too big to show here.
plugins/Unity/Connectivity/qmldirdeleted−3
This diff is too big to show here.
plugins/Unity/Indicators/CMakeLists.txt+28−14
This diff is too big to show here.
plugins/Unity/Indicators/Network/CMakeLists.txtnew file+45
This diff is too big to show here.
plugins/Unity/Indicators/Network/networkagent.cppnew file+146
This diff is too big to show here.
plugins/Unity/Indicators/Network/networkagent.hnew file+65
This diff is too big to show here.
plugins/ScreenshotDirectory/plugin.cpp → plugins/Unity/Indicators/Network/plugin.cpprenamed+11−6
This diff is too big to show here.
plugins/Lights/plugin.h → plugins/Unity/Indicators/Network/plugin.hrenamed+7−9
This diff is too big to show here.
plugins/Unity/Indicators/Network/qml/AccessPoint.qmlnew file+117
This diff is too big to show here.
plugins/Unity/Indicators/Network/qml/CMakeLists.txtnew file+5
This diff is too big to show here.
plugins/Unity/Indicators/Network/qml/PasswordPage.qmlnew file+88
This diff is too big to show here.
plugins/Unity/Indicators/Network/qml/PasswordTextField.qmlnew file+68
This diff is too big to show here.
plugins/Unity/Indicators/Network/qml/qmldirnew file+8
This diff is too big to show here.
plugins/Unity/Indicators/Network/secret-agent.cnew file+382
This diff is too big to show here.
plugins/Unity/Indicators/Network/secret-agent.hnew file+102
This diff is too big to show here.
plugins/Unity/Indicators/actionrootstate.cppdeleted−97
This diff is too big to show here.
plugins/Unity/Indicators/actionrootstate.hdeleted−55
This diff is too big to show here.
plugins/Unity/Indicators/indicator.cpp+20−26
This diff is too big to show here.
plugins/Unity/Indicators/indicator.h+1−5
This diff is too big to show here.
plugins/Unity/Indicators/indicators.h+11−6
This diff is too big to show here.
plugins/Unity/Indicators/indicatorsmanager.cpp+56−45
This diff is too big to show here.
plugins/Unity/Indicators/indicatorsmanager.h+5−9
This diff is too big to show here.
plugins/Unity/Indicators/indicatorsmodel.cpp+72−50
This diff is too big to show here.
plugins/Unity/Indicators/indicatorsmodel.h+15−20
This diff is too big to show here.
plugins/Unity/Indicators/menucontentactivator.cpp+7−6
This diff is too big to show here.
plugins/Unity/Indicators/menucontentactivator.h+2−2
This diff is too big to show here.
plugins/Unity/Indicators/modelactionrootstate.cppdeleted−204
This diff is too big to show here.
plugins/Unity/Indicators/modelactionrootstate.hdeleted−72
This diff is too big to show here.
plugins/Unity/Indicators/modelprinter.cpp+15−30
This diff is too big to show here.
plugins/Unity/Indicators/modelprinter.h+3−4
This diff is too big to show here.
plugins/Unity/Indicators/plugin.cpp+12−18
This diff is too big to show here.
plugins/Unity/Indicators/plugin.h+2−2
This diff is too big to show here.
plugins/Unity/Indicators/qml/BaseMenuItem.qmlnew file+38
This diff is too big to show here.
plugins/Unity/Indicators/qml/ButtonMenuItem.qmlnew file+44
This diff is too big to show here.
plugins/Unity/Indicators/qml/CMakeLists.txtnew file+5
This diff is too big to show here.
plugins/Unity/Indicators/qml/CachedUnityMenuModel.qmlnew file+60
This diff is too big to show here.
plugins/Unity/Indicators/qml/DivMenuItem.qmlnew file+26
This diff is too big to show here.
plugins/Unity/Indicators/qml/FramedMenuItem.qmlnew file+39
This diff is too big to show here.
plugins/Unity/Indicators/qml/HLine.qmlnew file+29
This diff is too big to show here.
qml/Panel/Indicators/IndicatorBase.qml → plugins/Unity/Indicators/qml/IndicatorBase.qmlrenamed+15−14
This diff is too big to show here.
plugins/Unity/Indicators/qml/IndicatorPage.qmlnew file+155
This diff is too big to show here.
qml/Panel/Indicators/client/IndicatorsTree.qml → plugins/Unity/Indicators/qml/IndicatorWidget.qmlrenamed+9−16
This diff is too big to show here.
plugins/Unity/Indicators/qml/MenuItemFactory.qmlnew file+197
This diff is too big to show here.
plugins/Unity/Indicators/qml/ProgressMenuItem.qmlnew file+38
This diff is too big to show here.
plugins/Unity/Indicators/qml/RemoveBackground.qmlnew file+55
This diff is too big to show here.
plugins/Unity/Indicators/qml/SectionMenuItem.qmlnew file+54
This diff is too big to show here.
plugins/Unity/Indicators/qml/SliderMenuItem.qmlnew file+105
This diff is too big to show here.
plugins/Unity/Indicators/qml/StandardMenuItem.qmlnew file+71
This diff is too big to show here.
plugins/Unity/Indicators/qml/SwitchMenuItem.qmlnew file+53
This diff is too big to show here.
plugins/Unity/Indicators/qml/qmldirnew file+23
This diff is too big to show here.
plugins/Unity/Indicators/qmldirdeleted−3
This diff is too big to show here.
plugins/Unity/Indicators/resources/artwork/network/secure.svgnew file+71
This diff is too big to show here.
plugins/Unity/Indicators/resources/indicators.qrcnew file+5
This diff is too big to show here.
plugins/Unity/Indicators/rootactionstate.cppnew file+279
This diff is too big to show here.
plugins/Unity/Indicators/rootstateparser.h → plugins/Unity/Indicators/rootactionstate.hrenamed+36−25
This diff is too big to show here.
plugins/Unity/Indicators/rootstateparser.cppdeleted−231
This diff is too big to show here.
plugins/Unity/Indicators/sharedunitymenumodel.cppdeleted−96
This diff is too big to show here.
plugins/Unity/Indicators/sharedunitymenumodel.hdeleted−66
This diff is too big to show here.
plugins/Unity/Indicators/unitymenumodelcache.cpp+9−32
This diff is too big to show here.
plugins/Unity/Indicators/unitymenumodelcache.h+6−12
This diff is too big to show here.
plugins/Unity/Indicators/unitymenumodelstack.cpp+9−100
This diff is too big to show here.
plugins/Unity/Indicators/unitymenumodelstack.h+3−11
This diff is too big to show here.
plugins/Unity/Indicators/visibleindicatorsmodel.cppnew file+94
This diff is too big to show here.
plugins/Unity/Indicators/visibleindicatorsmodel.hnew file+56
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/CMakeLists.txtnew file+49
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/CMakeLists.txtnew file+1
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/ActionButton.qml → plugins/Unity/IndicatorsLegacy/Messaging/qml/ActionButton.qmlrenamed
The content is the same.
plugins/Unity/IndicatorsLegacy/Messaging/qml/ActionTextField.qmlnew file+66
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/CMakeLists.txtnew file+5
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/GroupedMessage.qmlnew file+96
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/HeroMessage.qmlnew file+120
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/HeroMessageHeader.qmlnew file+161
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/MessageMenuItem.qmlnew file+96
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/QuickReply.qmlnew file+160
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/SimpleTextMessage.qmlnew file+97
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/SnapDecision.qmlnew file+142
This diff is too big to show here.
tests/mocks/Unity/Notifications/plugin.cpp → plugins/Unity/IndicatorsLegacy/Messaging/qml/TextMessage.qmlrenamed+15−13
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/qmldirnew file+12
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Messaging/qml/utils.jsnew file+27
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/CMakeLists.txtnew file+45
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/networkagent.cppnew file+146
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/networkagent.hnew file+65
This diff is too big to show here.
plugins/GlobalShortcut/plugin.cpp → plugins/Unity/IndicatorsLegacy/Network/plugin.cpprenamed+11−7
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/plugin.hnew file+32
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/qml/AccessPoint.qmlnew file+68
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/qml/CMakeLists.txtnew file+5
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/qml/PasswordPage.qmlnew file+88
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/qml/PasswordTextField.qmlnew file+68
This diff is too big to show here.
tests/mocks/Unity/Notifications/plugin.h → plugins/Unity/IndicatorsLegacy/Network/qml/WifiSection.qmlrenamed+14−14
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/qml/qmldirnew file+9
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/secret-agent.cnew file+382
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/Network/secret-agent.hnew file+102
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/flatmenuproxymodel.cppnew file+288
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/flatmenuproxymodel.hnew file+93
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/modelprinter.cppnew file+114
This diff is too big to show here.
tests/mocks/QMenuModel/dbus-enums.h → plugins/Unity/IndicatorsLegacy/modelprinter.hrenamed+21−22
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/plugin.cppnew file+42
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/plugin.h → plugins/Unity/IndicatorsLegacy/plugin.hrenamed+8−8
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/BasicMenuItem.qmlnew file+48
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/ButtonMenuItem.qmlnew file+47
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/CMakeLists.txtnew file+5
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/DivMenuItem.qmlnew file+26
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/HLine.qmlnew file+29
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/IndicatorBase.qmlnew file+59
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/IndicatorPage.qmlnew file+191
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/IndicatorWidget.qmlnew file+68
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/MenuAction.qmlnew file+86
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/MenuActionBinding.qmlnew file+106
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/MenuItem.qmlnew file+40
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/MenuItemFactory.qmlnew file+110
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/ProgressMenuItem.qmlnew file+65
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/RemoveBackground.qmlnew file+55
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/SectionMenuItem.qmlnew file+57
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/SliderMenuItem.qmlnew file+64
This diff is too big to show here.
plugins/Unity/Launcher/gsettings.h → plugins/Unity/IndicatorsLegacy/qml/SwitchMenuItem.qmlrenamed+21−25
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/qml/qmldirnew file+21
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/resources/artwork/messaging/default_app.svgnew file+42
This diff is too big to show here.
plugins/Unity/IndicatorsLegacy/resources/artwork/messaging/default_contact.pngnew file
Binary file not shown.
plugins/Unity/IndicatorsLegacy/resources/artwork/messaging/message_sms01_54px.pngnew file
Binary file not shown.
plugins/Unity/IndicatorsLegacy/resources/indicators.qrcnew file+7
This diff is too big to show here.
plugins/Unity/InputInfo/CMakeLists.txtdeleted−38
This diff is too big to show here.
plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux.cppdeleted−296
This diff is too big to show here.
plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux_p.hdeleted−96
This diff is too big to show here.
plugins/Unity/InputInfo/plugin.cppdeleted−32
This diff is too big to show here.
plugins/Unity/InputInfo/qdeclarativeinputdevicemodel.cppdeleted−196
This diff is too big to show here.
plugins/Unity/InputInfo/qdeclarativeinputdevicemodel_p.hdeleted−102
This diff is too big to show here.
plugins/Unity/InputInfo/qinputinfo.cppdeleted−270
This diff is too big to show here.
plugins/Unity/InputInfo/qinputinfo.hdeleted−142
This diff is too big to show here.
plugins/Unity/InputInfo/qmldirdeleted−3
This diff is too big to show here.
plugins/Unity/Launcher/CMakeLists.txt+12−29
This diff is too big to show here.
plugins/Unity/Launcher/appdrawermodel.cppdeleted−192
This diff is too big to show here.
plugins/Unity/Launcher/appdrawermodel.hdeleted−64
This diff is too big to show here.
plugins/Unity/Launcher/asadapter.cppdeleted−67
This diff is too big to show here.
plugins/Unity/Launcher/asadapter.hdeleted−46
This diff is too big to show here.
plugins/Unity/Launcher/backend/launcherbackend.cppnew file+353
This diff is too big to show here.
plugins/Unity/Launcher/backend/launcherbackend.hnew file+163
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/quicklistentry.cpp → plugins/Unity/Launcher/common/quicklistentry.cpprenamed+4−1
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/quicklistentry.h → plugins/Unity/Launcher/common/quicklistentry.hrenamed+4−1
This diff is too big to show here.
plugins/Unity/Launcher/dbusinterface.cppdeleted−226
This diff is too big to show here.
plugins/Unity/Launcher/dbusinterface.hdeleted−49
This diff is too big to show here.
plugins/Unity/Launcher/gsettings.cppdeleted−80
This diff is too big to show here.
plugins/Unity/Launcher/launcheritem.cpp+6−135
This diff is too big to show here.
plugins/Unity/Launcher/launcheritem.h+22−36
This diff is too big to show here.
plugins/Unity/Launcher/launchermodel.cpp+73−367
This diff is too big to show here.
plugins/Unity/Launcher/launchermodel.h+25−41
This diff is too big to show here.
plugins/Unity/Launcher/plugin.cpp+6−7
This diff is too big to show here.
plugins/Unity/Launcher/plugin.h+1−1
This diff is too big to show here.
plugins/Unity/Launcher/qmldir+1−1
This diff is too big to show here.
plugins/Unity/Launcher/quicklistentry.cppdeleted−85
This diff is too big to show here.
plugins/Unity/Launcher/quicklistentry.hdeleted−56
This diff is too big to show here.
plugins/Unity/Launcher/quicklistmodel.cpp+2−24
This diff is too big to show here.
plugins/Unity/Launcher/quicklistmodel.h+4−7
This diff is too big to show here.
plugins/Unity/Launcher/ualwrapper.cppdeleted−74
This diff is too big to show here.
plugins/Unity/Launcher/ualwrapper.hdeleted−36
This diff is too big to show here.
plugins/Unity/Launcher/xdgwatcher.cppdeleted−129
This diff is too big to show here.
plugins/Unity/Launcher/xdgwatcher.hdeleted−46
This diff is too big to show here.
plugins/Unity/Platform/CMakeLists.txtdeleted−11
This diff is too big to show here.
plugins/Unity/Platform/platform.cppdeleted−66
This diff is too big to show here.
plugins/Unity/Platform/platform.hdeleted−64
This diff is too big to show here.
plugins/Unity/Platform/qmldirdeleted−2
This diff is too big to show here.
plugins/Unity/Session/CMakeLists.txtdeleted−29
This diff is too big to show here.
plugins/Unity/Session/dbusunitysessionservice.cppdeleted−647
This diff is too big to show here.
plugins/Unity/Session/dbusunitysessionservice.hdeleted−377
This diff is too big to show here.
plugins/Unity/Session/orientationlock.cppdeleted−74
This diff is too big to show here.
plugins/Unity/Session/orientationlock.hdeleted−60
This diff is too big to show here.
plugins/Unity/Session/plugin.cppdeleted−48
This diff is too big to show here.
plugins/Unity/Session/qmldirdeleted−3
This diff is too big to show here.
plugins/Unity/abstractfilteroption.cppnew file+25
This diff is too big to show here.
plugins/Unity/abstractfilteroption.hnew file+58
This diff is too big to show here.
plugins/Unity/applicationpreview.cppnew file+100
This diff is too big to show here.
plugins/Unity/applicationpreview.hnew file+66
This diff is too big to show here.
tests/mocks/SessionBroadcast/SessionBroadcast.cpp → plugins/Unity/bottombarvisibilitycommunicatorshell.cpprenamed+11−10
This diff is too big to show here.
plugins/Unity/bottombarvisibilitycommunicatorshell.hnew file+53
This diff is too big to show here.
plugins/Unity/categories.cppnew file+238
This diff is too big to show here.
plugins/Unity/categories.hnew file+85
This diff is too big to show here.
plugins/Unity/categoryresults.cppnew file+99
This diff is too big to show here.
plugins/Unity/categoryresults.hnew file+67
This diff is too big to show here.
plugins/Unity/checkoptionfilter.cppnew file+65
This diff is too big to show here.
plugins/Unity/checkoptionfilter.hnew file+57
This diff is too big to show here.
plugins/Unity/filter.cppnew file+129
This diff is too big to show here.
plugins/Unity/filter.hnew file+75
This diff is too big to show here.
plugins/Unity/filteroption.cppnew file+91
This diff is too big to show here.
plugins/Unity/filteroption.hnew file+61
This diff is too big to show here.
plugins/Unity/filters.cppnew file+165
This diff is too big to show here.
plugins/Unity/filters.hnew file+77
This diff is too big to show here.
plugins/Unity/genericoptionsmodel.cppnew file+187
This diff is too big to show here.
plugins/Unity/genericoptionsmodel.hnew file+79
This diff is too big to show here.
tests/mocks/QMenuModel/UnityMenuAction.qml → plugins/Unity/genericpreview.cpprenamed+12−11
This diff is too big to show here.
tests/mocks/QMenuModel/actionstateparser.h → plugins/Unity/genericpreview.hrenamed+22−11
This diff is too big to show here.
plugins/Unity/iconutils.cppnew file+91
This diff is too big to show here.
plugins/WindowManager/WindowManagerGlobal.h → plugins/Unity/iconutils.hrenamed+10−6
This diff is too big to show here.
plugins/Unity/moviepreview.cppnew file+67
This diff is too big to show here.
plugins/Unity/moviepreview.hnew file+60
This diff is too big to show here.
plugins/Unity/multirangefilter.cppnew file+65
This diff is too big to show here.
plugins/Unity/multirangefilter.hnew file+60
This diff is too big to show here.
plugins/Unity/musicpreview.cppnew file+54
This diff is too big to show here.
plugins/Unity/musicpreview.hnew file+62
This diff is too big to show here.
plugins/Unity/plugin.cppnew file+72
This diff is too big to show here.
plugins/Unity/Session/plugin.h → plugins/Unity/plugin.hrenamed+7−6
This diff is too big to show here.
plugins/Unity/preview.cppnew file+188
This diff is too big to show here.
plugins/Unity/preview.hnew file+84
This diff is too big to show here.
plugins/Unity/previewaction.cppnew file+75
This diff is too big to show here.
plugins/Unity/previewaction.hnew file+71
This diff is too big to show here.
plugins/Unity/previewinfohint.cppnew file+67
This diff is too big to show here.
plugins/Unity/previewinfohint.hnew file+58
This diff is too big to show here.
plugins/Unity/qmldirnew file+3
This diff is too big to show here.
plugins/Unity/radiooptionfilter.cppnew file+61
This diff is too big to show here.
plugins/Unity/radiooptionfilter.hnew file+59
This diff is too big to show here.
plugins/Unity/ratingfilteroption.cppnew file+62
This diff is too big to show here.
plugins/Unity/ratingfilteroption.hnew file+53
This diff is too big to show here.
plugins/Unity/ratingoptionsmodel.cppnew file+33
This diff is too big to show here.
plugins/Unity/ratingoptionsmodel.hnew file+33
This diff is too big to show here.
plugins/Unity/ratingsfilter.cppnew file+73
This diff is too big to show here.
plugins/Unity/ratingsfilter.hnew file+66
This diff is too big to show here.
plugins/Unity/scope.cppnew file+334
This diff is too big to show here.
plugins/Unity/scope.hnew file+138
This diff is too big to show here.
plugins/Unity/scopes.cppnew file+176
This diff is too big to show here.
plugins/Unity/scopes.hnew file+94
This diff is too big to show here.
plugins/Unity/showallfilteroption.cppnew file+60
This diff is too big to show here.
tests/mocks/QMenuModel/actiondata.h → plugins/Unity/showallfilteroption.hrenamed+26−29
This diff is too big to show here.
plugins/Unity/signalslist.cppnew file+39
This diff is too big to show here.
plugins/Unity/signalslist.hnew file+38
This diff is too big to show here.
plugins/Unity/socialpreview.cppnew file+87
This diff is too big to show here.
plugins/Unity/socialpreview.hnew file+63
This diff is too big to show here.
plugins/Unity/socialpreviewcomment.cppnew file+63
This diff is too big to show here.
plugins/Unity/socialpreviewcomment.hnew file+57
This diff is too big to show here.
plugins/Unity/unityoptionsmodel.cppnew file+68
This diff is too big to show here.
plugins/Unity/unityoptionsmodel.hnew file+50
This diff is too big to show here.
plugins/Unity/variantutils.cppnew file+42
This diff is too big to show here.
plugins/Unity/variantutils.hnew file+32
This diff is too big to show here.
plugins/Utils/CMakeLists.txt+8−36
This diff is too big to show here.
plugins/Utils/EdgeBarrierSettings.qmldeleted−66
This diff is too big to show here.
plugins/Utils/ElapsedTimer.hdeleted−51
This diff is too big to show here.
plugins/Utils/Style.jsdeleted−37
This diff is too big to show here.
plugins/Utils/Timer.cppdeleted−62
This diff is too big to show here.
plugins/Utils/Timer.hdeleted−78
This diff is too big to show here.
plugins/Utils/URLDispatcher.cppdeleted−80
This diff is too big to show here.
plugins/Utils/URLDispatcher.hdeleted−47
This diff is too big to show here.
plugins/Utils/WindowInputMonitor.cppdeleted−126
This diff is too big to show here.
plugins/Utils/WindowInputMonitor.hdeleted−97
This diff is too big to show here.
plugins/Utils/activefocuslogger.cppdeleted−61
This diff is too big to show here.
plugins/Utils/activefocuslogger.hdeleted−37
This diff is too big to show here.
plugins/Utils/appdrawerproxymodel.cppdeleted−189
This diff is too big to show here.
plugins/Utils/appdrawerproxymodel.hdeleted−87
This diff is too big to show here.
plugins/Utils/applicationpaths.hnew file+38
This diff is too big to show here.
plugins/Utils/applicationsfiltermodel.cppdeleted−101
This diff is too big to show here.
plugins/Utils/applicationsfiltermodel.hdeleted−69
This diff is too big to show here.
plugins/Utils/constants.cppdeleted−32
This diff is too big to show here.
plugins/Utils/constants.hdeleted−43
This diff is too big to show here.
plugins/Utils/deviceconfigparser.cppdeleted−176
This diff is too big to show here.
plugins/Utils/deviceconfigparser.hdeleted−66
This diff is too big to show here.
plugins/Utils/easingcurve.cppdeleted−73
This diff is too big to show here.
plugins/Utils/easingcurve.hdeleted−69
This diff is too big to show here.
plugins/Utils/expressionfiltermodel.cppdeleted−49
This diff is too big to show here.
plugins/Utils/expressionfiltermodel.hdeleted−42
This diff is too big to show here.
plugins/Utils/globalfunctions.cppdeleted−58
This diff is too big to show here.
plugins/Utils/globalfunctions.hdeleted−44
This diff is too big to show here.
plugins/Utils/inputeventgenerator.cppdeleted−34
This diff is too big to show here.
plugins/Utils/inputeventgenerator.hdeleted−40
This diff is too big to show here.
plugins/Utils/inputwatcher.cppdeleted−118
This diff is too big to show here.
plugins/Utils/inputwatcher.hdeleted−58
This diff is too big to show here.
plugins/Utils/plugin.cpp+14−61
This diff is too big to show here.
plugins/Utils/plugin.h+1−1
This diff is too big to show here.
plugins/Utils/qlimitproxymodelqml.cpp+17−17
This diff is too big to show here.
plugins/Utils/qlimitproxymodelqml.h+2−2
This diff is too big to show here.
This diff is too big to show here.
plugins/Wizard/Utils/qsortfilterproxymodelqml.cpp → plugins/Utils/qsortfilterproxymodelqml.cpprenamed−12
This diff is too big to show here.
plugins/Wizard/Utils/qsortfilterproxymodelqml.h → plugins/Utils/qsortfilterproxymodelqml.hrenamed−1
This diff is too big to show here.
plugins/Utils/quicklistproxymodel.cppdeleted−72
This diff is too big to show here.
plugins/Utils/quicklistproxymodel.hdeleted−52
This diff is too big to show here.
plugins/Utils/qvariantlistmodel.h+6−6
This diff is too big to show here.
plugins/Utils/tabfocusfence.cppdeleted−72
This diff is too big to show here.
plugins/Utils/tabfocusfence.hdeleted−38
This diff is too big to show here.
plugins/Utils/timezoneFormatter.cppdeleted−45
This diff is too big to show here.
plugins/Utils/timezoneFormatter.hdeleted−33
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.cpp → plugins/Utils/ubuntuwindow.cpprenamed+11−10
This diff is too big to show here.
plugins/Lights/LegacyLights.h → plugins/Utils/ubuntuwindow.hrenamed+15−18
This diff is too big to show here.
plugins/Utils/unitymenumodelpaths.cppdeleted−182
This diff is too big to show here.
plugins/Utils/unitymenumodelpaths.hdeleted−82
This diff is too big to show here.
plugins/Utils/unitysortfilterproxymodelqml.cppdeleted−167
This diff is too big to show here.
plugins/Utils/unitysortfilterproxymodelqml.hdeleted−68
This diff is too big to show here.
plugins/Utils/windowinputfilter.cppdeleted−70
This diff is too big to show here.
plugins/Utils/windowinputfilter.hdeleted−58
This diff is too big to show here.
plugins/Utils/windowstatestorage.cppdeleted−383
This diff is too big to show here.
plugins/Utils/windowstatestorage.hdeleted−74
This diff is too big to show here.
plugins/WindowManager/AvailableDesktopArea.cppdeleted−50
This diff is too big to show here.
plugins/WindowManager/AvailableDesktopArea.hdeleted−38
This diff is too big to show here.
plugins/WindowManager/CMakeLists.txtdeleted−26
This diff is too big to show here.
plugins/WindowManager/InputMethodManager.cppdeleted−56
This diff is too big to show here.
plugins/WindowManager/InputMethodManager.hdeleted−55
This diff is too big to show here.
plugins/WindowManager/TopLevelWindowModel.cppdeleted−782
This diff is too big to show here.
plugins/WindowManager/TopLevelWindowModel.hdeleted−308
This diff is too big to show here.
plugins/WindowManager/Window.cppdeleted−277
This diff is too big to show here.
plugins/WindowManager/Window.hdeleted−176
This diff is too big to show here.
plugins/WindowManager/WindowManagerPlugin.cppdeleted−44
This diff is too big to show here.
plugins/WindowManager/WindowManagerPlugin.hdeleted−32
This diff is too big to show here.
plugins/WindowManager/WindowMargins.cppdeleted−74
This diff is too big to show here.
plugins/WindowManager/WindowMargins.hdeleted−59
This diff is too big to show here.
plugins/WindowManager/qmldirdeleted−2
This diff is too big to show here.
plugins/Wizard/50-com.canonical.unity.wizard.pkladeleted−6
This diff is too big to show here.
plugins/Wizard/CMakeLists.txtdeleted−23
This diff is too big to show here.
plugins/Wizard/Changelog.cppdeleted−58
This diff is too big to show here.
plugins/Wizard/Changelog.hdeleted−52
This diff is too big to show here.
plugins/Wizard/LocalePlugin.cppdeleted−291
This diff is too big to show here.
plugins/Wizard/LocalePlugin.hdeleted−58
This diff is too big to show here.
plugins/Wizard/PageList.cppdeleted−127
This diff is too big to show here.
plugins/Wizard/PageList.hdeleted−53
This diff is too big to show here.
plugins/Wizard/Status.cppdeleted−143
This diff is too big to show here.
plugins/Wizard/Status.hdeleted−60
This diff is too big to show here.
plugins/Wizard/System.cppdeleted−182
This diff is too big to show here.
plugins/Wizard/System.hdeleted−75
This diff is too big to show here.
plugins/Wizard/Unity/Application/CMakeLists.txtdeleted−3
This diff is too big to show here.
plugins/Wizard/Unity/Application/qmldirdeleted−2
This diff is too big to show here.
plugins/Wizard/Unity/CMakeLists.txtdeleted−1
This diff is too big to show here.
plugins/Wizard/Utils/CMakeLists.txtdeleted−27
This diff is too big to show here.
plugins/Wizard/Utils/plugin.cppdeleted−41
This diff is too big to show here.
plugins/Wizard/Utils/qmldirdeleted−2
This diff is too big to show here.
plugins/Wizard/keyboardLayoutsModel.cppdeleted−163
This diff is too big to show here.
plugins/Wizard/keyboardLayoutsModel.hdeleted−66
This diff is too big to show here.
plugins/Wizard/main.cppdeleted−93
This diff is too big to show here.
plugins/Wizard/plugin.cppdeleted−38
This diff is too big to show here.
plugins/Wizard/plugin.hdeleted−31
This diff is too big to show here.
plugins/Wizard/qmldirdeleted−2
This diff is too big to show here.
plugins/Wizard/timezonemodel.cppdeleted−244
This diff is too big to show here.
plugins/Wizard/timezonemodel.hdeleted−80
This diff is too big to show here.
plugins/Wizard/ubuntu-system-settings-wizard-cleanup.confdeleted−20
This diff is too big to show here.
plugins/Wizard/ubuntu-system-settings-wizard-set-lang.confdeleted−30
This diff is too big to show here.
plugins/Wizard/ubuntu-system-settings-wizard.confdeleted−75
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
po/ca@valencia.podeleted−1125
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.
qml/ApplicationMenus/ApplicationMenuItemFactory.qmldeleted−135
This diff is too big to show here.
qml/ApplicationMenus/ApplicationMenusLimits.qmldeleted−24
This diff is too big to show here.
qml/ApplicationMenus/MenuBar.qmldeleted−513
This diff is too big to show here.
qml/ApplicationMenus/MenuItem.qmldeleted−146
This diff is too big to show here.
qml/ApplicationMenus/MenuNavigator.qmldeleted−101
This diff is too big to show here.
qml/ApplicationMenus/MenuPopup.qmldeleted−510
This diff is too big to show here.
qml/ApplicationMenus/RegisteredApplicationMenuModel.qmldeleted−56
This diff is too big to show here.
qml/ApplicationMenus/qmldirdeleted−1
This diff is too big to show here.
qml/CMakeLists.txtdeleted−23
This diff is too big to show here.
qml/Components/Background.qmldeleted−87
This diff is too big to show here.
qml/Components/BrightnessControl.qmldeleted−54
This diff is too big to show here.
qml/Components/Dialogs.qmldeleted−328
This diff is too big to show here.
qml/Components/EdgeBarrier.qmldeleted−114
This diff is too big to show here.
qml/Components/EdgeBarrierController.qmldeleted−74
This diff is too big to show here.
qml/Components/FadingLabel.qmldeleted−42
This diff is too big to show here.
qml/Components/Flickable.qmldeleted−24
This diff is too big to show here.
qml/Components/FloatingFlickable.qmldeleted−63
This diff is too big to show here.
qml/Components/GridView.qmldeleted−24
This diff is too big to show here.
qml/Components/Handle.qmldeleted−44
This diff is too big to show here.
qml/Components/InputMethod.qmldeleted−58
This diff is too big to show here.
qml/Components/ItemGrabber.qmldeleted−86
This diff is too big to show here.
qml/Components/KeyboardShortcutsOverlay.qmldeleted−336
This diff is too big to show here.
qml/Components/KeymapSwitcher.qmldeleted−102
This diff is too big to show here.
qml/Components/LazyImage.qmldeleted−202
This diff is too big to show here.
qml/Components/ListView.qmldeleted−24
This diff is too big to show here.
qml/Components/ListViewOSKScroller.qmldeleted−53
This diff is too big to show here.
qml/Components/Lockscreen.qmldeleted−256
This diff is too big to show here.
qml/Components/MediaServices/MediaServices.qmldeleted−386
This diff is too big to show here.
qml/Components/MediaServices/MediaServicesControls.qmldeleted−192
This diff is too big to show here.
qml/Components/MediaServices/MediaServicesHeader.qmldeleted−71
This diff is too big to show here.
qml/Components/MediaServices/VideoPlayer.qmldeleted−155
This diff is too big to show here.
qml/Components/MediaServices/VideoPlayerControls.qmldeleted−158
This diff is too big to show here.
qml/Components/ModeSwitchWarningDialog.qmldeleted−101
This diff is too big to show here.
qml/Components/NotificationAudio.qmldeleted−60
This diff is too big to show here.
qml/Components/Orientations.qmldeleted−57
This diff is too big to show here.
qml/Components/PanelState/PanelState.qmldeleted−36
This diff is too big to show here.
qml/Components/PanelState/qmldirdeleted−1
This diff is too big to show here.
qml/Components/PassphraseLockscreen.qmldeleted−150
This diff is too big to show here.
qml/Components/PhysicalKeysMapper.qmldeleted−163
This diff is too big to show here.
qml/Components/PinLockscreen.qmldeleted−258
This diff is too big to show here.
qml/Components/PinPadButton.qmldeleted−78
This diff is too big to show here.
qml/Components/Rating.qmldeleted−49
This diff is too big to show here.
qml/Components/RatingStyle.qmldeleted−50
This diff is too big to show here.
qml/Components/ScrollCalculator.qmldeleted−100
This diff is too big to show here.
qml/Components/SearchHistoryModel/qmldirdeleted−1
This diff is too big to show here.
qml/Components/SharingPicker.qmldeleted−102
This diff is too big to show here.
qml/Components/ShellDialog.qmldeleted−68
This diff is too big to show here.
qml/Components/VirtualTouchPad.qmldeleted−406
This diff is too big to show here.
qml/Components/VolumeControl.qmldeleted−63
This diff is too big to show here.
qml/Components/Wallpaper.qmldeleted−96
This diff is too big to show here.
qml/Components/WallpaperResolver.qmldeleted−60
This diff is too big to show here.
qml/Components/WindowControlButtons.qmldeleted−121
This diff is too big to show here.
qml/Components/ZoomableImage.qmldeleted−157
This diff is too big to show here.
qml/Components/flickableUtils.jsdeleted−28
This diff is too big to show here.
qml/Components/graphics/close@20.pngdeleted
Binary file not shown.
qml/Components/graphics/icon_star_empty@20.pngdeleted
Binary file not shown.
qml/Components/graphics/icon_star_full@20.pngdeleted
Binary file not shown.
qml/Components/graphics/icon_star_half@20.pngdeleted
Binary file not shown.
qml/Components/graphics/icon_star_off@20.pngdeleted
Binary file not shown.
qml/Components/graphics/icon_star_on@20.pngdeleted
Binary file not shown.
qml/Components/graphics/non-selected@18.pngdeleted
Binary file not shown.
qml/Components/graphics/window-close.svgdeleted−164
This diff is too big to show here.
qml/Components/graphics/window-maximize.svgdeleted−164
This diff is too big to show here.
qml/Components/graphics/window-minimize.svgdeleted−164
This diff is too big to show here.
qml/Components/graphics/window-window.svgdeleted−41
This diff is too big to show here.
qml/DeviceConfiguration.qmldeleted−161
This diff is too big to show here.
qml/DisabledScreenNotice.qmldeleted−81
This diff is too big to show here.
qml/Greeter/ButtonPrompt.qmldeleted−51
This diff is too big to show here.
qml/Greeter/Circle.qmldeleted−57
This diff is too big to show here.
qml/Greeter/Clock.qmldeleted−91
This diff is too big to show here.
qml/Greeter/CoverPage.qmldeleted−271
This diff is too big to show here.
qml/Greeter/DelayedLockscreen.qmldeleted−86
This diff is too big to show here.
qml/Greeter/FullLightDMImpl.qmldeleted−31
This diff is too big to show here.
qml/Greeter/Greeter.qmldeleted−632
This diff is too big to show here.
qml/Greeter/GreeterPrompt.qmldeleted−127
This diff is too big to show here.
qml/Greeter/GreeterView.qmldeleted−534
This diff is too big to show here.
qml/Greeter/IntegratedLightDMImpl.qmldeleted−30
This diff is too big to show here.
qml/Greeter/LightDMService.qmldeleted−54
This diff is too big to show here.
qml/Greeter/LoginList.qmldeleted−292
This diff is too big to show here.
qml/Greeter/PinPrompt.qmldeleted−184
This diff is too big to show here.
qml/Greeter/PromptList.qmldeleted−151
This diff is too big to show here.
qml/Greeter/SessionIcon.qmldeleted−47
This diff is too big to show here.
qml/Greeter/SessionsList.qmldeleted−205
This diff is too big to show here.
qml/Greeter/ShimGreeter.qmldeleted−47
This diff is too big to show here.
qml/Greeter/TextPrompt.qmldeleted−198
This diff is too big to show here.
qml/Greeter/graphics/dot_empty.pngdeleted
Binary file not shown.
qml/Greeter/graphics/dot_filled.pngdeleted
Binary file not shown.
qml/Greeter/graphics/dot_pointer.pngdeleted
Binary file not shown.
qml/Greeter/graphics/icon_arrow.pngdeleted
Binary file not shown.
qml/Greeter/graphics/session_icons/gnome_badge.pngdeleted
Binary file not shown.
qml/Greeter/graphics/session_icons/kde_badge.pngdeleted
Binary file not shown.
qml/Greeter/graphics/session_icons/recovery_console_badge.pngdeleted
Binary file not shown.
qml/Greeter/graphics/session_icons/ubuntu_badge.pngdeleted
Binary file not shown.
qml/Greeter/graphics/session_icons/unknown_badge.pngdeleted
Binary file not shown.
qml/Greeter/qmldirdeleted−1
This diff is too big to show here.
qml/Launcher/BackgroundBlur.qmldeleted−81
This diff is too big to show here.
qml/Launcher/Drawer.qmldeleted−413
This diff is too big to show here.
qml/Launcher/DrawerGridView.qmldeleted−85
This diff is too big to show here.
qml/Launcher/Launcher.qmldeleted−661
This diff is too big to show here.
qml/Launcher/LauncherPanel.qmldeleted−961
This diff is too big to show here.
qml/Launcher/PullToRefreshScopeStyle.qmldeleted−83
This diff is too big to show here.
qml/Launcher/Tooltip.qmldeleted−72
This diff is too big to show here.
qml/Launcher/graphics/divider-line.pngdeleted
Binary file not shown.
qml/Launcher/graphics/focused_app_arrow@30.pngdeleted
Binary file not shown.
qml/Launcher/graphics/home.svgdeleted−243
This diff is too big to show here.
qml/Launcher/graphics/quicklist_tooltip@30.pngdeleted
Binary file not shown.
qml/Notifications/Notification.qmldeleted−600
This diff is too big to show here.
qml/Notifications/NotificationButton.qmldeleted−73
This diff is too big to show here.
qml/Notifications/NotificationMenuItemFactory.qmldeleted−230
This diff is too big to show here.
qml/Notifications/Notifications.qmldeleted−115
This diff is too big to show here.
qml/Notifications/OptionToggle.qmldeleted−125
This diff is too big to show here.
qml/Notifications/ShapedIcon.qmldeleted−43
This diff is too big to show here.
qml/Notifications/SwipeToAct.qmldeleted−275
This diff is too big to show here.
qml/OrientedShell.qmldeleted−336
This diff is too big to show here.
qml/Panel/ActiveCallHint.qmldeleted−211
This diff is too big to show here.
qml/Panel/FakePanelMenu.qmldeleted−26
This diff is too big to show here.
qml/Panel/Indicators/IndicatorItem.qmldeleted−310
This diff is too big to show here.
qml/Panel/Indicators/IndicatorMenuItemFactory.qmldeleted−1113
This diff is too big to show here.
qml/Panel/Indicators/IndicatorsLight.qmldeleted−234
This diff is too big to show here.
qml/Panel/Indicators/MessageMenuItemFactory.qmldeleted−244
This diff is too big to show here.
qml/Panel/Indicators/client/IndicatorRepresentation.qmldeleted−121
This diff is too big to show here.
qml/Panel/MenuContent.qmldeleted−83
This diff is too big to show here.
qml/Panel/Panel.qmldeleted−522
This diff is too big to show here.
qml/Panel/PanelBar.qmldeleted−330
This diff is too big to show here.
qml/Panel/PanelItemRow.qmldeleted−270
This diff is too big to show here.
qml/Panel/PanelMenu.qmldeleted−414
This diff is too big to show here.
qml/Panel/PanelMenuPage.qmldeleted−226
This diff is too big to show here.
qml/Panel/PanelVelocityCalculator.qmldeleted−54
This diff is too big to show here.
qml/Panel/graphics/rectangular_dropshadow@30.pngdeleted
Binary file not shown.
qml/Rotation/HalfLoopRotationAnimation.qmldeleted−47
This diff is too big to show here.
qml/Rotation/ImmediateRotationAction.qmldeleted−34
This diff is too big to show here.
qml/Rotation/NinetyRotationAnimation.qmldeleted−88
This diff is too big to show here.
qml/Rotation/RotationStates.qmldeleted−289
This diff is too big to show here.
qml/Rotation/UpdateShellTransformations.qmldeleted−42
This diff is too big to show here.
This diff is too big to show here.
qml/Stage/ApplicationWindow.qmldeleted−416
This diff is too big to show here.
qml/Stage/ChildWindow.qmldeleted−203
This diff is too big to show here.
qml/Stage/ChildWindowRepeater.qmldeleted−39
This diff is too big to show here.
qml/Stage/ChildWindowTree.qmldeleted−138
This diff is too big to show here.
qml/Stage/DecoratedWindow.qmldeleted−319
This diff is too big to show here.
qml/Stage/FakeMaximizeDelegate.qmldeleted−233
This diff is too big to show here.
qml/Stage/MainViewStyle.qmldeleted−87
This diff is too big to show here.
qml/Stage/MoveHandler.qmldeleted−201
This diff is too big to show here.
qml/Stage/OrientationChangeAnimation.qmldeleted−265
This diff is too big to show here.
qml/Stage/PromptSurfaceAnimations.qmldeleted−80
This diff is too big to show here.
qml/Stage/SideStage.qmldeleted−121
This diff is too big to show here.
qml/Stage/Splash.qmldeleted−150
This diff is too big to show here.
qml/Stage/Spread/BezierCurve.qmldeleted−45
This diff is too big to show here.
qml/Stage/Spread/KeySpline.jsdeleted−66
This diff is too big to show here.
qml/Stage/Spread/MathUtils.jsdeleted−95
This diff is too big to show here.
qml/Stage/Spread/OpacityMask.qmldeleted−82
This diff is too big to show here.
qml/Stage/Spread/Spread.qmldeleted−173
This diff is too big to show here.
qml/Stage/Spread/SpreadDelegateInputArea.qmldeleted−189
This diff is too big to show here.
qml/Stage/Spread/SpreadMaths.qmldeleted−78
This diff is too big to show here.
qml/Stage/Spread/StagedRightEdgeMaths.qmldeleted−174
This diff is too big to show here.
qml/Stage/Spread/WindowedRightEdgeMaths.qmldeleted−96
This diff is too big to show here.
qml/Stage/Spread/cubic-bezier.jsdeleted−39
This diff is too big to show here.
qml/Stage/Stage.qmldeleted−2241
This diff is too big to show here.
qml/Stage/StageMaths.qmldeleted−93
This diff is too big to show here.
qml/Stage/StagedFullscreenPolicy.qmldeleted−50
This diff is too big to show here.
qml/Stage/SurfaceContainer.qmldeleted−108
This diff is too big to show here.
qml/Stage/TabletSideStageTouchGesture.qmldeleted−157
This diff is too big to show here.
qml/Stage/WindowControlsOverlay.qmldeleted−254
This diff is too big to show here.
qml/Stage/WindowDecoration.qmldeleted−163
This diff is too big to show here.
qml/Stage/WindowInfoItem.qmldeleted−69
This diff is too big to show here.
qml/Stage/WindowResizeArea.qmldeleted−300
This diff is too big to show here.
qml/Stage/WindowStateSaver.qmldeleted−64
This diff is too big to show here.
qml/Stage/WindowedFullscreenPolicy.qmldeleted−31
This diff is too big to show here.
qml/Stage/graphics/PageHeaderBaseDividerBottom@18.pngdeleted
Binary file not shown.
qml/Stage/graphics/PageHeaderBaseDividerLight@18.pngdeleted
Binary file not shown.
qml/Stage/graphics/PageHeaderBaseDividerLight@18.scideleted−5
This diff is too big to show here.
qml/Stage/graphics/arrows-centre.pngdeleted
Binary file not shown.
qml/Stage/graphics/arrows.pngdeleted
Binary file not shown.
qml/Stage/graphics/sidestage_drag.svgdeleted−207
This diff is too big to show here.
qml/Stage/graphics/sidestage_handle@20.pngdeleted
Binary file not shown.
qml/Stage/graphics/sidestage_open.svgdeleted−181
This diff is too big to show here.
qml/Stage/graphics/window-close.svgdeleted−64
This diff is too big to show here.
qml/Tutorial/InactivityTimer.qmldeleted−78
This diff is too big to show here.
qml/Tutorial/Tutorial.qmldeleted−105
This diff is too big to show here.
qml/Tutorial/TutorialContent.qmldeleted−225
This diff is too big to show here.
qml/Tutorial/TutorialLeft.qmldeleted−54
This diff is too big to show here.
qml/Tutorial/TutorialLeftLong.qmldeleted−56
This diff is too big to show here.
qml/Tutorial/TutorialPage.qmldeleted−121
This diff is too big to show here.
qml/Tutorial/TutorialRight.qmldeleted−61
This diff is too big to show here.
qml/Tutorial/TutorialTop.qmldeleted−60
This diff is too big to show here.
qml/Tutorial/graphics/arrow.svgdeleted−19
This diff is too big to show here.
qml/Tutorial/graphics/background1.pngdeleted
Binary file not shown.
qml/Tutorial/graphics/background2.pngdeleted
Binary file not shown.
qml/Wizard/CheckableSetting.qmldeleted−92
This diff is too big to show here.
qml/Wizard/Components/InputMethod.qmldeleted−113
This diff is too big to show here.
qml/Wizard/Page.qmldeleted−340
This diff is too big to show here.
qml/Wizard/Pages.qmldeleted−269
This diff is too big to show here.
qml/Wizard/Pages/10-welcome-update.qmldeleted−137
This diff is too big to show here.
qml/Wizard/Pages/10-welcome.qmldeleted−197
This diff is too big to show here.
qml/Wizard/Pages/11-changelog.qmldeleted−95
This diff is too big to show here.
qml/Wizard/Pages/20-keyboard.qmldeleted−161
This diff is too big to show here.
qml/Wizard/Pages/30-wifi.qmldeleted−219
This diff is too big to show here.
qml/Wizard/Pages/50-timezone.qmldeleted−278
This diff is too big to show here.
qml/Wizard/Pages/60-account.qmldeleted−76
This diff is too big to show here.
qml/Wizard/Pages/70-passwd-type.qmldeleted−168
This diff is too big to show here.
qml/Wizard/Pages/78-firmware-update.qml.disableddeleted−246
This diff is too big to show here.
qml/Wizard/Pages/79-system-update.qmldeleted−148
This diff is too big to show here.
qml/Wizard/Pages/80-finished.qmldeleted−137
This diff is too big to show here.
qml/Wizard/Pages/data/Desktop_header_bkg.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/Desktop_splash_screen_bkg.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/Phone_header_bkg.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/Phone_splash_screen_bkg.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/Tick@30.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/map.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/pin.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-1.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-10.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-11.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-2.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-3.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-3.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-4.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-4.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-6.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-7.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-8.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-9.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-9.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_0.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_1.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_10.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_10.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_11.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_12.75.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_12.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_13.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_2.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_3.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_3.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_4.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_4.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_5.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_5.75.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_6.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_6.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_7.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_8.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_8.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_9.5.pngdeleted
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_9.pngdeleted
Binary file not shown.
qml/Wizard/Pages/passcode-confirm.qmldeleted−69
This diff is too big to show here.
qml/Wizard/Pages/passcode-desktop.qmldeleted−159
This diff is too big to show here.
qml/Wizard/Pages/passcode-set.qmldeleted−78
This diff is too big to show here.
qml/Wizard/Pages/password-set.qmldeleted−158
This diff is too big to show here.
qml/Wizard/Pages/sim.qmldeleted−108
This diff is too big to show here.
qml/Wizard/PasswordMeter.qmldeleted−108
This diff is too big to show here.
qml/Wizard/StackButton.qmldeleted−42
This diff is too big to show here.
qml/Wizard/Wizard.qmldeleted−58
This diff is too big to show here.
qml/Wizard/WizardItemSelector.qmldeleted−129
This diff is too big to show here.
qml/graphics/dropshadow2gu@30.pngdeleted
Binary file not shown.
qml/graphics/dropshadow2gu@30.scideleted−5
This diff is too big to show here.
qml/graphics/dropshadow_left@20.pngdeleted
Binary file not shown.
qml/graphics/dropshadow_right@20.pngdeleted
Binary file not shown.
This diff is too big to show here.
run_on_devicenew file+146
This diff is too big to show here.
This diff is too big to show here.
src/ApplicationArguments.hdeleted−58
This diff is too big to show here.
This diff is too big to show here.
src/CachingNetworkManagerFactory.cppdeleted−54
This diff is too big to show here.
src/CachingNetworkManagerFactory.hdeleted−47
This diff is too big to show here.
src/DebuggingController.cppdeleted−92
This diff is too big to show here.
src/DebuggingController.hdeleted−57
This diff is too big to show here.
src/MouseTouchAdaptor.cppdeleted−419
This diff is too big to show here.
src/Panel/CMakeLists.txtnew file+1
This diff is too big to show here.
src/Panel/Indicators/CMakeLists.txtnew file+2
This diff is too big to show here.
tools/indicatorsclient/CMakeLists.txt → src/Panel/Indicators/client/CMakeLists.txtrenamed+7−1
This diff is too big to show here.
tools/indicatorsclient/indicatorsclient.cpp → src/Panel/Indicators/client/indicatorsclient.cpprenamed+50−22
This diff is too big to show here.
tools/indicatorsclient/indicatorsclient.h → src/Panel/Indicators/client/indicatorsclient.hrenamed+2
This diff is too big to show here.
tools/indicatorsclient/main.cpp → src/Panel/Indicators/client/main.cpprenamed
The content is the same.
src/Panel/Indicators/servicefiles/CMakeLists.txtnew file+14
This diff is too big to show here.
src/Panel/Indicators/servicefiles/com.canonical.indicator.messagesnew file+10
This diff is too big to show here.
src/SecondaryWindow.cppdeleted−40
This diff is too big to show here.
src/ShellApplication.cppdeleted−231
This diff is too big to show here.
src/ShellApplication.hdeleted−61
This diff is too big to show here.
src/ShellView.cppdeleted−85
This diff is too big to show here.
src/UnityCommandLineParser.cppdeleted−130
This diff is too big to show here.
src/UnityCommandLineParser.hdeleted−60
This diff is too big to show here.
src/UnixSignalHandler.cppdeleted−139
This diff is too big to show here.
src/UnixSignalHandler.hdeleted−54
This diff is too big to show here.
src/libunity8-private/CMakeLists.txtdeleted−27
This diff is too big to show here.
src/libunity8-private/abstractdbusservicemonitor.cppdeleted−100
This diff is too big to show here.
src/libunity8-private/abstractdbusservicemonitor.hdeleted−70
This diff is too big to show here.
src/libunity8-private/unitydbusobject.cppdeleted−86
This diff is too big to show here.
src/libunity8-private/unitydbusobject.hdeleted−46
This diff is too big to show here.
src/libunity8-private/unitydbusvirtualobject.cppdeleted−83
This diff is too big to show here.
src/libunity8-private/unitydbusvirtualobject.hdeleted−47
This diff is too big to show here.
This diff is too big to show here.
src/qmldebuggerutils.hdeleted−33
This diff is too big to show here.
tests/CMakeLists.txt+9−148
This diff is too big to show here.
tests/autopilot/setup.py+2−2
This diff is too big to show here.
tests/autopilot/unity8/__init__.py+4−60
This diff is too big to show here.
tests/autopilot/unity8/application_lifecycle/tests/__init__.py−49
This diff is too big to show here.
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py+84−89
This diff is too big to show here.
tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.pydeleted−51
This diff is too big to show here.
tests/autopilot/unity8/fixture_setup.pydeleted−329
This diff is too big to show here.
tests/autopilot/unity8/greeter/__init__.pydeleted−97
This diff is too big to show here.
tests/autopilot/unity8/greeter/tests/test_args.pydeleted−49
This diff is too big to show here.
tests/autopilot/unity8/indicators/__init__.pydeleted−203
This diff is too big to show here.
tests/autopilot/unity8/indicators/tests/__init__.pydeleted−42
This diff is too big to show here.
tests/autopilot/unity8/indicators/tests/test_action_latency.pydeleted−237
This diff is too big to show here.
tests/autopilot/unity8/indicators/tests/test_display_indicator.pydeleted−52
This diff is too big to show here.
tests/autopilot/unity8/indicators/tests/test_indicators.pydeleted−88
This diff is too big to show here.
tests/autopilot/unity8/indicators_client/__init__.pynew file+8
This diff is too big to show here.
tests/autopilot/unity8/indicators_client/emulators/__init__.pynew file+31
This diff is too big to show here.
tests/autopilot/unity8/indicators_client/emulators/common.pynew file+14
This diff is too big to show here.
tests/autopilot/unity8/indicators_client/emulators/main_window.pynew file+27
This diff is too big to show here.
tests/autopilot/unity8/indicators_client/tests/__init__.pynew file+91
This diff is too big to show here.
tests/autopilot/unity8/indicators_client/tests/test_battery.pynew file+114
This diff is too big to show here.
tests/autopilot/unity8/launcher.pydeleted−66
This diff is too big to show here.
tests/autopilot/unity8/process_helpers.pydeleted−191
This diff is too big to show here.
tests/autopilot/unity8/sensors.pydeleted−93
This diff is too big to show here.
tests/autopilot/unity8/shell/__init__.py+14−231
This diff is too big to show here.
tests/autopilot/unity8/greeter/tests/__init__.py → tests/autopilot/unity8/shell/emulators/__init__.pyrenamed+5−8
This diff is too big to show here.
tests/autopilot/unity8/shell/create_interactive_notification.py → tests/autopilot/unity8/shell/emulators/create_interactive_notification.pyrenamed+4−3
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/dash.pynew file+52
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/greeter.pynew file+43
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/hud.pynew file+80
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators.py → tests/autopilot/unity8/shell/emulators/launcher.pyrenamed+15−27
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/main_window.pynew file+92
This diff is too big to show here.
tests/autopilot/unity8/shell/fixture_setup.pydeleted−65
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/__init__.py+103−218
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_helpers.pydeleted−44
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_hud.pynew file+150
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_lock_screen.py+83−51
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_notifications.py+209−217
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_rotation.pydeleted−113
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_system_integration.pydeleted−48
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_upstart.pydeleted−137
This diff is too big to show here.
tests/copyright/CMakeLists.txt+1−1
This diff is too big to show here.
tests/copyright/check_copyright.sh+4−35
This diff is too big to show here.
tests/data/unity/backgrounds/20x30.pngdeleted
Binary file not shown.
tests/data/unity/backgrounds/black.pngdeleted
Binary file not shown.
tests/data/unity/backgrounds/blue.png
Binary file not shown.
tests/data/unity/backgrounds/red.png
Binary file not shown.
tests/data/unity/indicators/com.canonical.indicator.fake1+4−4
This diff is too big to show here.
tests/data/unity/indicators/com.canonical.indicator.fake2+4−4
This diff is too big to show here.
tests/data/unity/indicators/com.canonical.indicator.fake3+4−4
This diff is too big to show here.
tests/data/unity/indicators/com.canonical.indicator.fake4+4−4
This diff is too big to show here.
tests/graphics/applicationIcons/browser@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/calendar@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/camera@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/contacts-app@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/dash@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/dialer-app@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/evernote@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/facebook@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/gallery@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/gmail@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/libreoffice@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/map@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/messages-app@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/notepad@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/pinterest@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/soundcloud@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/system-settings@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/twitter@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/weather@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/wikipedia@18.pngdeleted
Binary file not shown.
tests/graphics/applicationIcons/youtube@18.pngdeleted
Binary file not shown.
tests/graphics/avatars/amanda@12.pngdeleted
Binary file not shown.
tests/graphics/avatars/anna_olsson@12.pngdeleted
Binary file not shown.
tests/graphics/avatars/funky@12.pngdeleted
Binary file not shown.
tests/graphics/clock@18.pngdeleted
Binary file not shown.
tests/imports/CMakeLists.txtdeleted−5
This diff is too big to show here.
tests/imports/check_imports.pydeleted−183
This diff is too big to show here.
tests/mocks/AccountsService/AccountsService.cpp+12−161
This diff is too big to show here.
tests/mocks/AccountsService/AccountsService.h+15−94
This diff is too big to show here.
tests/mocks/AccountsService/CMakeLists.txt+12−15
This diff is too big to show here.
tests/mocks/AccountsService/plugin.cpp+1−2
This diff is too big to show here.
tests/mocks/AccountsService/plugin.h+1−1
This diff is too big to show here.
tests/mocks/AccountsService/qmldir−1
This diff is too big to show here.
tests/mocks/Biometryd/CMakeLists.txtdeleted−14
This diff is too big to show here.
tests/mocks/Biometryd/MockBiometryd.cppdeleted−43
This diff is too big to show here.
tests/mocks/Biometryd/MockBiometryd.hdeleted−50
This diff is too big to show here.
tests/mocks/Biometryd/MockDevice.cppdeleted−29
This diff is too big to show here.
tests/mocks/Biometryd/MockDevice.hdeleted−40
This diff is too big to show here.
tests/mocks/Biometryd/MockIdentifier.hdeleted−36
This diff is too big to show here.
tests/mocks/Biometryd/MockOperation.cppdeleted−56
This diff is too big to show here.
tests/mocks/Biometryd/MockOperation.hdeleted−47
This diff is too big to show here.
tests/mocks/Biometryd/plugin.cppdeleted−41
This diff is too big to show here.
tests/mocks/Biometryd/plugin.hdeleted−31
This diff is too big to show here.
tests/mocks/Biometryd/qmldirdeleted−3
This diff is too big to show here.
tests/mocks/CMakeLists.txt+2−45
This diff is too big to show here.
tests/mocks/Cursor/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/Cursor/Cursor.qmldeleted−34
This diff is too big to show here.
tests/mocks/Cursor/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/GSettings.1.0/CMakeLists.txt+6−2
This diff is too big to show here.
tests/mocks/GSettings.1.0/fake_gsettings.cpp+20−335
This diff is too big to show here.
tests/mocks/GSettings.1.0/fake_gsettings.h+13−103
This diff is too big to show here.
tests/mocks/GSettings.1.0/plugin.h+1−1
This diff is too big to show here.
tests/mocks/GSettings.1.0/qmldir−1
This diff is too big to show here.
tests/mocks/HudClient/CMakeLists.txtnew file+41
This diff is too big to show here.
tests/mocks/Unity/Application/MirMock.h → tests/mocks/HudClient/fake_hud_plugin.cpprenamed+18−22
This diff is too big to show here.
tests/mocks/LightDMController/plugin.h → tests/mocks/HudClient/fake_hud_plugin.hrenamed+8−6
This diff is too big to show here.
tests/mocks/HudClient/fake_libhud_client.cppnew file+240
This diff is too big to show here.
tests/mocks/HudClient/libhud_client_stub.cppnew file+93
This diff is too big to show here.
tests/mocks/HudClient/libhud_client_stub.hnew file+64
This diff is too big to show here.
tests/mocks/HudClient/qmldirnew file+1
This diff is too big to show here.
tests/mocks/LightDMController/CMakeLists.txtdeleted−14
This diff is too big to show here.
tests/mocks/LightDMController/plugin.cppdeleted−35
This diff is too big to show here.
tests/mocks/LightDMController/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Lights/CMakeLists.txtdeleted−8
This diff is too big to show here.
tests/mocks/Lights/Lights.cppdeleted−84
This diff is too big to show here.
tests/mocks/Lights/Lights.hdeleted−66
This diff is too big to show here.
tests/mocks/Lights/plugin.hdeleted−32
This diff is too big to show here.
tests/mocks/Lights/qmldirdeleted−3
This diff is too big to show here.
tests/mocks/MeeGo/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/CMakeLists.txtdeleted−11
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockOfonoSimManager.qmldeleted−53
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockQOfono.cppdeleted−90
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockQOfono.hdeleted−61
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockQOfonoManager.cppdeleted−66
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockQOfonoManager.hdeleted−49
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/plugin.cppdeleted−35
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/qmldirdeleted−3
This diff is too big to show here.
tests/mocks/Powerd/CMakeLists.txt+13−2
This diff is too big to show here.
tests/mocks/Powerd/Powerd.cpp+1−15
This diff is too big to show here.
tests/mocks/Powerd/Powerd.h+8−17
This diff is too big to show here.
tests/mocks/Powerd/plugin.h+1−1
This diff is too big to show here.
tests/mocks/Powerd/qmldir−1
This diff is too big to show here.
tests/mocks/QMenuModel/CMakeLists.txt+8−22
This diff is too big to show here.
tests/mocks/QMenuModel/QDBusActionGroup.qml+5−30
This diff is too big to show here.
tests/mocks/QMenuModel/plugin.cppdeleted−43
This diff is too big to show here.
tests/mocks/QMenuModel/qmldir−4
This diff is too big to show here.
tests/mocks/QMenuModel/unitymenumodel.cppdeleted−310
This diff is too big to show here.
tests/mocks/QMenuModel/unitymenumodel.hdeleted−115
This diff is too big to show here.
tests/mocks/QtMultimedia/CMakeLists.txtdeleted−15
This diff is too big to show here.
tests/mocks/QtMultimedia/VideoSurface.qmldeleted−111
This diff is too big to show here.
tests/mocks/QtMultimedia/declarativeplaylist.cppdeleted−73
This diff is too big to show here.
tests/mocks/QtMultimedia/declarativeplaylist.hdeleted−54
This diff is too big to show here.
tests/mocks/QtMultimedia/mediaplayer.cppdeleted−319
This diff is too big to show here.
tests/mocks/QtMultimedia/mediaplayer.hdeleted−224
This diff is too big to show here.
tests/mocks/QtMultimedia/plugin.cppdeleted−35
This diff is too big to show here.
tests/mocks/QtMultimedia/qmldirdeleted−3
This diff is too big to show here.
tests/mocks/QtMultimedia/videooutput.cppdeleted−127
This diff is too big to show here.
tests/mocks/QtMultimedia/videooutput.hdeleted−52
This diff is too big to show here.
tests/mocks/SessionBroadcast/CMakeLists.txtdeleted−8
This diff is too big to show here.
tests/mocks/SessionBroadcast/plugin.cppdeleted−31
This diff is too big to show here.
tests/mocks/SessionBroadcast/plugin.hdeleted−32
This diff is too big to show here.
tests/mocks/SessionBroadcast/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/SessionManager/CMakeLists.txtnew file+19
This diff is too big to show here.
tests/mocks/Biometryd/MockIdentifier.cpp → tests/mocks/SessionManager/SessionManager.cpprenamed+12−7
This diff is too big to show here.
tests/mocks/SessionBroadcast/SessionBroadcast.h → tests/mocks/SessionManager/SessionManager.hrenamed+11−9
This diff is too big to show here.
plugins/Unity/Connectivity/plugin.cpp → tests/mocks/SessionManager/plugin.cpprenamed+9−8
This diff is too big to show here.
tests/mocks/QMenuModel/plugin.h → tests/mocks/SessionManager/plugin.hrenamed+6−6
This diff is too big to show here.
tests/mocks/SessionManager/qmldirnew file+2
This diff is too big to show here.
tests/mocks/UInput/CMakeLists.txtdeleted−7
This diff is too big to show here.
tests/mocks/UInput/mockuinput.cppdeleted−73
This diff is too big to show here.
tests/mocks/UInput/mockuinput.hdeleted−63
This diff is too big to show here.
tests/mocks/UInput/plugin.cppdeleted−26
This diff is too big to show here.
tests/mocks/UInput/plugin.hdeleted−32
This diff is too big to show here.
tests/mocks/UInput/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Ubuntu/CMakeLists.txt−5
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/CMakeLists.txtdeleted−10
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/networking-status.cppdeleted−70
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/networking-status.hdeleted−74
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/plugin.cppdeleted−47
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/plugin.hdeleted−35
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Ubuntu/DownloadDaemonListener/CMakeLists.txt+10−2
This diff is too big to show here.
tests/mocks/Ubuntu/DownloadDaemonListener/MockDownloadTracker.cpp+1−3
This diff is too big to show here.
tests/mocks/Ubuntu/DownloadDaemonListener/MockDownloadTracker.h+1−2
This diff is too big to show here.
tests/mocks/Ubuntu/DownloadDaemonListener/plugin.h+1−1
This diff is too big to show here.
tests/mocks/Ubuntu/DownloadDaemonListener/qmldir−1
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/CMakeLists.txtdeleted−5
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/Diagnostics/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/Diagnostics/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qmldeleted−24
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/qmldirdeleted−3
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/CMakeLists.txtdeleted−10
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.hdeleted−50
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/plugin.cppdeleted−26
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/plugin.hdeleted−31
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/TimeDate/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/TimeDate/MockTimeDate.qmldeleted−37
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/TimeDate/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/Update/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/Update/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/CMakeLists.txtdeleted−14
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/ContactWatcherData.cppdeleted−43
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/ContactWatcherData.hdeleted−46
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockCallEntry.cppdeleted−91
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockCallEntry.hdeleted−65
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockCallManager.cppdeleted−80
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockCallManager.hdeleted−60
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockContactWatcher.cppdeleted−50
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockContactWatcher.hdeleted−49
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockTelepathyHelper.cppdeleted−62
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockTelepathyHelper.hdeleted−58
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/plugin.cppdeleted−52
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/plugin.hdeleted−37
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Ubuntu/Thumbnailer/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/Ubuntu/Thumbnailer/qmldirdeleted−4
This diff is too big to show here.
tests/mocks/Ubuntu/Web/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/Ubuntu/Web/qmldirdeleted−4
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationImage.cppnew file+123
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationImage.hnew file+79
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationInfo.cpp+47−362
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationInfo.h+62−123
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationManager.cpp+239−323
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationManager.h+66−56
This diff is too big to show here.
tests/mocks/Unity/Application/CMakeLists.txt+25−23
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockKeyboardPlugin.qml → tests/mocks/Unity/Application/InputFilterArea.qmlrenamed+3−3
This diff is too big to show here.
tests/mocks/Unity/Application/MirMock.cppdeleted−62
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurface.cppdeleted−559
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurface.hdeleted−237
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurfaceItem.cppdeleted−415
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurfaceItem.hdeleted−138
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurfaceListModel.cppdeleted−136
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurfaceListModel.hdeleted−54
This diff is too big to show here.
plugins/Wizard/Unity/Application/OSKController.qml → tests/mocks/Unity/Application/OSKController.qmlrenamed
The content is the same.
tests/mocks/Unity/Application/ObjectListModel.hdeleted−108
This diff is too big to show here.
tests/mocks/Unity/Application/SurfaceManager.cppdeleted−281
This diff is too big to show here.
tests/mocks/Unity/Application/SurfaceManager.hdeleted−116
This diff is too big to show here.
tests/mocks/Unity/Application/VirtualKeyboard.cppdeleted−58
This diff is too big to show here.
tests/mocks/Unity/Application/VirtualKeyboard.hdeleted−37
This diff is too big to show here.
tests/mocks/Unity/Application/plugin.cpp+9−38
This diff is too big to show here.
tests/mocks/Unity/Application/plugin.h+1−2
This diff is too big to show here.
tests/mocks/Unity/Application/qmldir+2−1
This diff is too big to show here.
tests/mocks/Unity/Application/resources/Kate.qmldeleted−49
This diff is too big to show here.
tests/mocks/Unity/Application/resources/KateDialog.qmldeleted−48
This diff is too big to show here.
tests/mocks/Unity/Application/resources/MirSurfaceItem.qmldeleted−126
This diff is too big to show here.
tests/mocks/Unity/Application/resources/VirtualKeyboard.qmldeleted−41
This diff is too big to show here.
tests/mocks/Unity/Application/resources/screenshots/browser@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/camera@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/dialer@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/facebook@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/gallery@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/gmail-webapp.svgdeleted−343
This diff is too big to show here.
tests/mocks/Unity/Application/resources/screenshots/libreoffice@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/map@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/music@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/twitter@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/ubuntu-weather-app.svgdeleted−201
This diff is too big to show here.
tests/mocks/Unity/Application/resources/screenshots/unity8-dash@12.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/vkb_portrait.pngdeleted
Binary file not shown.
tests/mocks/Unity/Application/resources/surfaces.qrcdeleted−23
This diff is too big to show here.
tests/mocks/Unity/Application/resources/vkb_portrait.pngdeleted
Binary file not shown.
tests/mocks/Unity/ApplicationMenu/CMakeLists.txtdeleted−18
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/mockapplicationmenuregistry.cppdeleted−47
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/mockapplicationmenuregistry.hdeleted−41
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/plugin.cppdeleted−42
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/plugin.hdeleted−32
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/qmldirdeleted−3
This diff is too big to show here.
tests/mocks/Unity/CMakeLists.txt+42−5
This diff is too big to show here.
tests/mocks/Unity/Connectivity/CMakeLists.txtdeleted−10
This diff is too big to show here.
tests/mocks/Unity/Connectivity/MockConnectivity.cppdeleted−27
This diff is too big to show here.
tests/mocks/Unity/Connectivity/plugin.hdeleted−31
This diff is too big to show here.
tests/mocks/Unity/Connectivity/qmldirdeleted−3
This diff is too big to show here.
tests/mocks/Unity/Indicators/ActionRootState.qmldeleted−46
This diff is too big to show here.
tests/mocks/Unity/Indicators/CMakeLists.txt+24−13
This diff is too big to show here.
tests/mocks/Unity/Indicators/IndicatorsModel.qml+51−237
This diff is too big to show here.
tests/mocks/Unity/Indicators/ModelActionRootState.qmldeleted−81
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeindicatorsmodel.cppdeleted−157
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeindicatorsmodel.hdeleted−70
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.jsdeleted−1328
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeplugin.cpp+3−24
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeplugin.h+1−1
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeunitymenumodelcache.cppdeleted−59
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeunitymenumodelcache.hdeleted−45
This diff is too big to show here.
tests/mocks/Unity/Indicators/indicators_fake.qrcnew file+14
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/FakeMenuPage.qmlnew file+37
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page1.qmlnew file+36
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page2.qmlnew file+36
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page3.qmlnew file+36
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page4.qmlnew file+36
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page5.qmlnew file+36
This diff is too big to show here.
plugins/Lights/android-hardware.h → tests/mocks/Unity/Indicators/qml/fake_menu_widget1.qmlrenamed+8−4
This diff is too big to show here.
tests/mocks/Biometryd/MockObserver.cpp → tests/mocks/Unity/Indicators/qml/fake_menu_widget2.qmlrenamed+8−5
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/QLightDM/Greeter → tests/mocks/Unity/Indicators/qml/fake_menu_widget3.qmlrenamed+8−2
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/QLightDM/UsersModel → tests/mocks/Unity/Indicators/qml/fake_menu_widget4.qmlrenamed+8−2
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_widget5.qmlnew file+23
This diff is too big to show here.
tests/mocks/Unity/Indicators/qmldir+1−3
This diff is too big to show here.
tests/mocks/Unity/InputInfo/CMakeLists.txtdeleted−31
This diff is too big to show here.
tests/mocks/Unity/InputInfo/mockcontroller.cppdeleted−35
This diff is too big to show here.
tests/mocks/Unity/InputInfo/mockcontroller.hdeleted−34
This diff is too big to show here.
tests/mocks/Unity/InputInfo/plugin.cppdeleted−46
This diff is too big to show here.
tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cppdeleted−56
This diff is too big to show here.
tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock_p.hdeleted−58
This diff is too big to show here.
tests/mocks/Unity/InputInfo/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Unity/Launcher/CMakeLists.txt+11−7
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockAppDrawerModel.cppdeleted−98
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockAppDrawerModel.hdeleted−43
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockLauncherItem.cpp+1−79
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockLauncherItem.h+17−34
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+5−112
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockLauncherModel.h+11−22
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockQuickListModel.cpp+2−6
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockQuickListModel.h+2−4
This diff is too big to show here.
tests/mocks/Unity/Launcher/plugin.cpp−4
This diff is too big to show here.
tests/mocks/Unity/Launcher/plugin.h+1−1
This diff is too big to show here.
tests/mocks/Unity/Launcher/qmldir−1
This diff is too big to show here.
tests/mocks/Unity/Notifications/CMakeLists.txt+8−13
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockActionModel.cppdeleted−74
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockActionModel.hdeleted−53
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockNotification.cppdeleted−198
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockNotification.hdeleted−101
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockNotificationModel.cppdeleted−169
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockNotificationModel.hdeleted−70
This diff is too big to show here.
src/ApplicationArguments.cpp → tests/mocks/Unity/Notifications/notification.jsrenamed+7−6
This diff is too big to show here.
tests/mocks/Unity/Notifications/qmldir+1−3
This diff is too big to show here.
tests/mocks/Unity/Platform/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/mocks/Unity/Platform/MockPlatform.qmldeleted−25
This diff is too big to show here.
tests/mocks/Unity/Platform/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Unity/Screens/CMakeLists.txtdeleted−14
This diff is too big to show here.
tests/mocks/Unity/Screens/plugin.cppdeleted−29
This diff is too big to show here.
tests/mocks/Unity/Screens/plugin.hdeleted−25
This diff is too big to show here.
tests/mocks/Unity/Screens/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Unity/Screens/screens.cppdeleted−71
This diff is too big to show here.
tests/mocks/Unity/Screens/screens.hdeleted−82
This diff is too big to show here.
tests/mocks/Unity/fake_applications_scope.cppnew file+68
This diff is too big to show here.
plugins/Unity/Platform/plugin.h → tests/mocks/Unity/fake_applications_scope.hrenamed+10−9
This diff is too big to show here.
tests/mocks/Unity/fake_categories.cppnew file+253
This diff is too big to show here.
tests/mocks/Unity/fake_categories.hnew file+74
This diff is too big to show here.
tests/mocks/Unity/fake_preview.cppnew file+66
This diff is too big to show here.
tests/mocks/Unity/fake_preview.hnew file+62
This diff is too big to show here.
tests/mocks/Unity/fake_scope.cppnew file+224
This diff is too big to show here.
tests/mocks/Unity/fake_scope.hnew file+111
This diff is too big to show here.
tests/mocks/Unity/fake_scopes.cppnew file+149
This diff is too big to show here.
tests/mocks/Unity/fake_scopes.hnew file+79
This diff is too big to show here.
tests/mocks/Unity/fake_unity_plugin.cppnew file+44
This diff is too big to show here.
plugins/UInput/plugin.h → tests/mocks/Unity/fake_unity_plugin.hrenamed+8−6
This diff is too big to show here.
tests/mocks/Unity/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Utils/CMakeLists.txtdeleted−61
This diff is too big to show here.
tests/mocks/Utils/Style.jsdeleted−37
This diff is too big to show here.
tests/mocks/Utils/URLDispatcher.hdeleted−47
This diff is too big to show here.
tests/mocks/Utils/WindowInputMonitor.qmldeleted−23
This diff is too big to show here.
tests/mocks/Utils/constants.cppdeleted−24
This diff is too big to show here.
tests/mocks/Utils/constants.hdeleted−43
This diff is too big to show here.
tests/mocks/Utils/plugin.cppdeleted−93
This diff is too big to show here.
tests/mocks/Utils/plugin.hdeleted−32
This diff is too big to show here.
tests/mocks/Utils/qmldirdeleted−6
This diff is too big to show here.
tests/mocks/Utils/windowstatestorage.cppdeleted−100
This diff is too big to show here.
tests/mocks/Utils/windowstatestorage.hdeleted−77
This diff is too big to show here.
tests/mocks/Wizard/CMakeLists.txtdeleted−20
This diff is too big to show here.
tests/mocks/Wizard/MockSystem.cppdeleted−64
This diff is too big to show here.
tests/mocks/Wizard/MockSystem.hdeleted−61
This diff is too big to show here.
tests/mocks/Wizard/mockplugin.cppdeleted−38
This diff is too big to show here.
tests/mocks/Wizard/mockplugin.hdeleted−32
This diff is too big to show here.
tests/mocks/Wizard/qmldirdeleted−3
This diff is too big to show here.
tests/mocks/data/applications/webbrowser-app.desktopdeleted
No changes to the content.
tests/mocks/data/unity/indicators/com.canonical.indicator.mockdeleted−10
This diff is too big to show here.
tests/mocks/indicator-service/CMakeLists.txtdeleted−19
This diff is too big to show here.
tests/mocks/indicator-service/mock-indicator-service.cdeleted−325
This diff is too big to show here.
tests/mocks/liblightdm/CMakeLists.txt+4−18
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp → tests/mocks/liblightdm/Greeter.cpprenamed+14−29
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h → tests/mocks/liblightdm/Greeter.hrenamed+6−9
This diff is too big to show here.
tests/mocks/liblightdm/GreeterPrivate.h+3−7
This diff is too big to show here.
tests/mocks/liblightdm/MockController.cppdeleted−192
This diff is too big to show here.
tests/mocks/liblightdm/MockController.hdeleted−106
This diff is too big to show here.
tests/mocks/liblightdm/MockGreeter.cppdeleted−316
This diff is too big to show here.
tests/mocks/liblightdm/MockGreeter.hdeleted−102
This diff is too big to show here.
tests/mocks/liblightdm/MockSessionsModel.cppdeleted−118
This diff is too big to show here.
tests/mocks/liblightdm/MockSessionsModel.hdeleted−64
This diff is too big to show here.
tests/mocks/liblightdm/MockUsersModel.cppdeleted−220
This diff is too big to show here.
tests/mocks/liblightdm/MockUsersModel.hdeleted−61
This diff is too big to show here.
tests/mocks/liblightdm/QLightDM/Greeternew file+1
This diff is too big to show here.
tests/mocks/liblightdm/QLightDM/InfographicModelnew file+1
This diff is too big to show here.
tests/mocks/liblightdm/QLightDM/UsersModelnew file+1
This diff is too big to show here.
tests/mocks/liblightdm/SessionsModelPrivate.cppdeleted−83
This diff is too big to show here.
tests/mocks/liblightdm/SessionsModelPrivate.hdeleted−63
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpp → tests/mocks/liblightdm/UsersModel.cpprenamed+21−14
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.h → tests/mocks/liblightdm/UsersModel.hrenamed+6−10
This diff is too big to show here.
tests/mocks/liblightdm/UsersModelPrivate.cppdeleted−124
This diff is too big to show here.
tests/mocks/liblightdm/UsersModelPrivate.h+3−8
This diff is too big to show here.
tests/mocks/liblightdm/demo/CMakeLists.txt+2−1
This diff is too big to show here.
tests/mocks/liblightdm/demo/GreeterPrivate.cpp+2−6
This diff is too big to show here.
tests/mocks/liblightdm/demo/InfographicModelPrivate.cppnew file+91
This diff is too big to show here.
tests/mocks/liblightdm/demo/UsersModelPrivate.cpp+3−11
This diff is too big to show here.
tests/mocks/liblightdm/full/CMakeLists.txtnew file+19
This diff is too big to show here.
tests/mocks/liblightdm/GreeterPrivate.cpp → tests/mocks/liblightdm/full/GreeterPrivate.cpprenamed+10−44
This diff is too big to show here.
tests/mocks/liblightdm/full/InfographicModelPrivate.cppnew file+182
This diff is too big to show here.
tests/mocks/liblightdm/full/UsersModelPrivate.cppnew file+52
This diff is too big to show here.
tests/mocks/liblightdm/qmldir−1
This diff is too big to show here.
tests/mocks/liblightdm/single-passphrase/CMakeLists.txtnew file+20
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/GreeterPrivate.h → tests/mocks/liblightdm/single-passphrase/GreeterPrivate.cpprenamed+23−22
This diff is too big to show here.
tests/mocks/liblightdm/single-passphrase/InfographicModelPrivate.cppnew file+61
This diff is too big to show here.
tests/mocks/liblightdm/single-passphrase/UsersModelPrivate.cppnew file+33
This diff is too big to show here.
tests/mocks/liblightdm/single-pin/CMakeLists.txtnew file+20
This diff is too big to show here.
tests/mocks/liblightdm/single-pin/GreeterPrivate.cppnew file+53
This diff is too big to show here.
tests/mocks/liblightdm/single-pin/InfographicModelPrivate.cppnew file+61
This diff is too big to show here.
tests/mocks/liblightdm/single-pin/UsersModelPrivate.cppnew file+33
This diff is too big to show here.
tests/mocks/liblightdm/single/CMakeLists.txtnew file+19
This diff is too big to show here.
tests/mocks/liblightdm/single/GreeterPrivate.cppnew file+46
This diff is too big to show here.
tests/mocks/liblightdm/single/InfographicModelPrivate.cppnew file+28
This diff is too big to show here.
tests/mocks/liblightdm/single/UsersModelPrivate.cppnew file+33
This diff is too big to show here.
tests/mocks/libusermetrics/CMakeLists.txt+2−7
This diff is too big to show here.
tests/mocks/libusermetrics/ColorTheme.cpp−4
This diff is too big to show here.
tests/mocks/libusermetrics/ColorTheme.h+1−2
This diff is too big to show here.
tests/mocks/libusermetrics/UserMetrics.cpp+21−55
This diff is too big to show here.
tests/mocks/libusermetrics/UserMetrics.h−2
This diff is too big to show here.
tests/mocks/libusermetrics/libusermetricsoutput/ColorTheme.hnew file+1
This diff is too big to show here.
tests/mocks/libusermetrics/libusermetricsoutput/UserMetrics.hnew file+1
This diff is too big to show here.
tests/plugins/AccountsService/AccountsServer.cpp+6−28
This diff is too big to show here.
tests/plugins/AccountsService/AccountsServer.h−5
This diff is too big to show here.
tests/plugins/AccountsService/CMakeLists.txt+7−33
This diff is too big to show here.
tests/plugins/AccountsService/PropertiesServer.cpp+7−104
This diff is too big to show here.
tests/plugins/AccountsService/PropertiesServer.h+3−17
This diff is too big to show here.
tests/plugins/AccountsService/client.cpp+9−303
This diff is too big to show here.
tests/plugins/AccountsService/interfaces.xml−50
This diff is too big to show here.
tests/plugins/AccountsService/server.cpp+6−17
This diff is too big to show here.
tests/plugins/AccountsService/types.hdeleted−25
This diff is too big to show here.
tests/plugins/CMakeLists.txt+2−7
This diff is too big to show here.
tests/plugins/Cursor/CMakeLists.txtdeleted−8
This diff is too big to show here.
tests/plugins/Cursor/TextEntry.qmldeleted−34
This diff is too big to show here.
tests/plugins/Cursor/tst_Cursor.qmldeleted−151
This diff is too big to show here.
tests/plugins/GlobalShortcut/CMakeLists.txtdeleted−19
This diff is too big to show here.
tests/plugins/GlobalShortcut/GlobalShortcutTest.cppdeleted−78
This diff is too big to show here.
tests/plugins/GlobalShortcut/shortcut.qmldeleted−39
This diff is too big to show here.
tests/plugins/Greeter/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/plugins/Greeter/Unity/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/plugins/Greeter/Unity/Launcher/CMakeLists.txtdeleted−42
This diff is too big to show here.
tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cppdeleted−240
This diff is too big to show here.
tests/plugins/LightDM/CMakeLists.txtdeleted−1
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/CMakeLists.txtdeleted−157
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/dbus.cppdeleted−223
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/greeter.qmldeleted−22
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/integrated.cppdeleted−88
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/pam.cppdeleted−54
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/promptsmodel.cppdeleted−175
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/sessionsmodel.cppdeleted−134
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/usersmodel.cppdeleted−168
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/CMakeLists.txtnew file+42
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cppnew file+1716
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cppnew file+2092
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsectionexternalmodel.cppnew file+251
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/test.qmlnew file+96
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/test_section.qmlnew file+106
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/test_sectionexternalmodel.qmlnew file+74
This diff is too big to show here.
tests/plugins/SessionBroadcast/BroadcastServer.cppdeleted−33
This diff is too big to show here.
tests/plugins/SessionBroadcast/CMakeLists.txtdeleted−51
This diff is too big to show here.
tests/plugins/SessionBroadcast/interfaces.xmldeleted−18
This diff is too big to show here.
tests/plugins/SessionBroadcast/server.cppdeleted−37
This diff is too big to show here.
tests/plugins/SessionBroadcast/sessionbroadcasttest.cppdeleted−111
This diff is too big to show here.
tests/plugins/SessionManager/CMakeLists.txtnew file+48
This diff is too big to show here.
tests/plugins/SessionManager/LightDMSessionServer.cppnew file+38
This diff is too big to show here.
tests/plugins/AccountsService/UscServer.h → tests/plugins/SessionManager/LightDMSessionServer.hrenamed+12−11
This diff is too big to show here.
tests/plugins/Unity/Session/LightDMServer.cpp → tests/plugins/SessionManager/LoginManagerServer.cpprenamed+11−6
This diff is too big to show here.
tests/plugins/Unity/Session/LightDMServer.h → tests/plugins/SessionManager/LoginManagerServer.hrenamed+10−11
This diff is too big to show here.
tests/plugins/AccountsService/UscServer.cpp → tests/plugins/SessionManager/LoginSessionServer.cpprenamed+5−8
This diff is too big to show here.
tests/plugins/SessionBroadcast/BroadcastServer.h → tests/plugins/SessionManager/LoginSessionServer.hrenamed+12−13
This diff is too big to show here.
tests/plugins/SessionManager/client.cpp+88
This diff is too big to show here.
tests/plugins/SessionManager/interfaces.xml+22
This diff is too big to show here.
tests/plugins/SessionManager/server.cpp+24−17
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/CMakeLists.txt+37−52
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/DownwardsLauncher.qml+87
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/GestureTest.cpp−193
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/GestureTest.h−102
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/LeftwardsLauncher.qml+90
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/RightwardsLauncher.qml+87
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/TestItem.cpp−30
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/TestItem.h−33
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/UpwardsLauncher.qml+90
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/edgeDragExample.qml+16−17
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_AxisVelocityCalculator.cpp+5−5
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_Damper.cpp+18−12
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cpp+551
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_FloatingFlickable.cpp−131
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_FloatingFlickable.qml−81
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.cpp−150
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.qml−62
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_TouchDispatcher.cpp−148
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp−392
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_TouchGestureArea.cpp−300
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_TouchGestureArea.qml−90
This diff is too big to show here.
tests/plugins/Unity/CMakeLists.txt+51−2
This diff is too big to show here.
tests/plugins/Unity/Indicators/CMakeLists.txt+23−41
This diff is too big to show here.
tests/plugins/Unity/Indicators/IndicatorsModelTest.cpp−141
This diff is too big to show here.
tests/plugins/Unity/Indicators/RootActionStateTest.cpp−95
This diff is too big to show here.
tests/plugins/Unity/Indicators/SharedUnityMenuModelTest.cpp−102
This diff is too big to show here.
tests/plugins/Unity/Indicators/UnityMenuModelStackTest.cpp−201
This diff is too big to show here.
tests/plugins/Unity/Indicators/indicatorsmanagertest.cpp+9−54
This diff is too big to show here.
tests/plugins/Unity/Indicators/indicatorsmodeltest.cpp+109
This diff is too big to show here.
tests/plugins/Unity/Indicators/menucontentactivatortest.cpp+4−4
This diff is too big to show here.
tests/plugins/Unity/Launcher/CMakeLists.txt+44−78
This diff is too big to show here.
tests/plugins/Unity/Launcher/abs-icon.desktop−1
This diff is too big to show here.
tests/plugins/Unity/Launcher/appdrawermodeltest.cpp−68
This diff is too big to show here.
tests/plugins/Unity/Launcher/click-icon.desktop−1
This diff is too big to show here.
tests/plugins/Unity/Launcher/click-icon.svg
This diff is too big to show here.
tests/plugins/Unity/Launcher/gsettings.cpp−45
This diff is too big to show here.
tests/plugins/Unity/Launcher/gsettings.h−47
This diff is too big to show here.
tests/plugins/Unity/Launcher/launcherbackendtest.cpp+93
This diff is too big to show here.
tests/plugins/Unity/Launcher/launchermodeltest.cpp+29−590
This diff is too big to show here.
tests/plugins/Unity/Launcher/no-icon.desktop+2
This diff is too big to show here.
tests/plugins/Unity/Launcher/no-name.desktop−1
This diff is too big to show here.
tests/plugins/Unity/Launcher/rel-icon.desktop−1
This diff is too big to show here.
tests/plugins/Unity/Launcher/rel-icon.svg
This diff is too big to show here.
tests/plugins/Unity/Launcher/ualwrapper.cpp−58
This diff is too big to show here.
tests/plugins/Unity/Launcher/ualwrapper.h−55
This diff is too big to show here.
tests/plugins/Unity/Launcher/xdgwatcher.cpp−45
This diff is too big to show here.
tests/plugins/Unity/Launcher/xdgwatcher.h−39
This diff is too big to show here.
tests/plugins/Unity/Platform/CMakeLists.txt−30
This diff is too big to show here.
tests/plugins/Unity/Platform/platformtest.cpp−142
This diff is too big to show here.
tests/plugins/Unity/Session/CMakeLists.txt−72
This diff is too big to show here.
tests/plugins/Unity/Session/LogindServer.cpp−43
This diff is too big to show here.
tests/plugins/Unity/Session/LogindServer.h−48
This diff is too big to show here.
tests/plugins/Unity/Session/interfaces.xml−29
This diff is too big to show here.
tests/plugins/Unity/Session/preload.c−43
This diff is too big to show here.
tests/plugins/Unity/Session/sessionbackendtest.cpp−289
This diff is too big to show here.
tests/plugins/Unity/filtersbindingstest.cpp+515
This diff is too big to show here.
tests/plugins/Unity/filtersbindingstest.h+47
This diff is too big to show here.
tests/plugins/Unity/previewbindingstest.cpp+167
This diff is too big to show here.
tests/plugins/Unity/previewbindingstest.h+12−13
This diff is too big to show here.
tests/plugins/Unity/resultstest.cpp+105
This diff is too big to show here.
tests/plugins/Unity/resultstest.h+12−11
This diff is too big to show here.
tests/plugins/Unity/signalslisttest.cpp+57
This diff is too big to show here.
tests/plugins/Unity/signalslisttest.h+8−8
This diff is too big to show here.
tests/plugins/Utils/CMakeLists.txt+19−34
This diff is too big to show here.
tests/plugins/Utils/DeviceConfigParserTest.cpp−76
This diff is too big to show here.
tests/plugins/Utils/URLDispatcherTest.cpp−78
This diff is too big to show here.
tests/plugins/Utils/WindowInputMonitorTest.cpp−461
This diff is too big to show here.
tests/plugins/Utils/WindowStateStorageTest.cpp−121
This diff is too big to show here.
tests/plugins/Utils/modeltest.cpp+42−25
This diff is too big to show here.
tests/plugins/Utils/modeltest.h
This diff is too big to show here.
tests/plugins/Utils/qlimitproxymodeltest.cpp+31−31
This diff is too big to show here.
tests/plugins/Utils/qsortfilterproxymodeltest.cpp+25−25
This diff is too big to show here.
tests/plugins/Utils/tst_UtilsStyle.qml−47
This diff is too big to show here.
tests/plugins/WindowManager/CMakeLists.txt−36
This diff is too big to show here.
tests/plugins/WindowManager/UnityApplicationMocks.h−211
This diff is too big to show here.
tests/plugins/WindowManager/tst_TopLevelWindowModel.cpp−193
This diff is too big to show here.
tests/plugins/Wizard/CMakeLists.txt−24
This diff is too big to show here.
tests/plugins/Wizard/tst_pagelist.cpp−183
This diff is too big to show here.
tests/plugins/Wizard/tst_system.cpp−124
This diff is too big to show here.
tests/qmltests/ApplicationMenuDataLoader.qml−99
This diff is too big to show here.
tests/qmltests/ApplicationMenus/tst_MenuBar.qml−437
This diff is too big to show here.
tests/qmltests/ApplicationMenus/tst_MenuPopup.qml−361
This diff is too big to show here.
tests/qmltests/CMakeLists.txt+62−71
This diff is too big to show here.
tests/qmltests/Components/CMakeLists.txt+13−41
This diff is too big to show here.
tests/qmltests/Components/RevealingRectangle.qml+78
This diff is too big to show here.
tests/qmltests/Components/tst_AnimationControllerWithSignals.qml+142
This diff is too big to show here.
tests/qmltests/Components/tst_Background.qml−91
This diff is too big to show here.
tests/qmltests/Components/tst_Carousel.qml+194
This diff is too big to show here.
tests/qmltests/Components/tst_Dialogs.qml−112
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle.cpp+66−175
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle.qml+57−133
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/BidirectionalShowable.qml−69
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/BottomEdgeShowable.qml−108
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/HorizontalShowable.qml+8−8
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/RightEdgeShowable.qml−108
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/TestButton.qml+41
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/UnityLogo.png
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/VerticalShowable.qml+15−15
This diff is too big to show here.
tests/qmltests/Components/tst_DraggingArea.qml+8−8
This diff is too big to show here.
tests/qmltests/Components/tst_EdgeDemoOverlay.qml+123
This diff is too big to show here.
tests/qmltests/Components/tst_EdgeDragEvaluator.cpp−166
This diff is too big to show here.
tests/qmltests/Components/tst_FilterGrid.qml+151
This diff is too big to show here.
tests/qmltests/Components/tst_LazyImage.qml−210
This diff is too big to show here.
tests/qmltests/Components/tst_LazyImage/ImageControls.qml−67
This diff is too big to show here.
tests/qmltests/Components/tst_LazyImage/portrait.png
This diff is too big to show here.
tests/qmltests/Components/tst_LazyImage/square.png
This diff is too big to show here.
tests/qmltests/Components/tst_LazyImage/wide.png
This diff is too big to show here.
tests/qmltests/Components/tst_Lockscreen.qml−474
This diff is too big to show here.
tests/qmltests/Components/tst_MathLocal.qml+91
This diff is too big to show here.
tests/qmltests/Components/tst_MediaServices.qml−231
This diff is too big to show here.
tests/qmltests/Components/tst_ModeSwitchWarningDialog.qml−75
This diff is too big to show here.
tests/qmltests/Components/tst_OpenEffect.qml+71
This diff is too big to show here.
tests/qmltests/Components/tst_PageHeader.qml+186
This diff is too big to show here.
tests/qmltests/Components/tst_PhysicalKeysMapper.qml−174
This diff is too big to show here.
tests/qmltests/Components/tst_Rating.qml−86
This diff is too big to show here.
tests/qmltests/Components/tst_RatingStars.qml+62
This diff is too big to show here.
tests/qmltests/Components/tst_ResponsiveFlowView.qml+192
This diff is too big to show here.
tests/qmltests/Components/tst_ResponsiveGridView.qml+193
This diff is too big to show here.
tests/qmltests/Components/tst_Revealer.qml+262
This diff is too big to show here.
tests/qmltests/Components/tst_SharingPicker.qml−73
This diff is too big to show here.
tests/qmltests/Components/tst_Showable.qml+3−43
This diff is too big to show here.
tests/qmltests/Components/tst_Stage.qml+278
This diff is too big to show here.
tests/qmltests/Components/tst_Stage/AppControl.qml+17−23
This diff is too big to show here.
tests/qmltests/Components/tst_Stage/FakeApplicationScreenshot.qml+53
This diff is too big to show here.
tests/qmltests/Components/tst_Tile.qml+71
This diff is too big to show here.
tests/qmltests/Components/tst_TimeLocal.qml+117
This diff is too big to show here.
tests/qmltests/Components/tst_VirtualTouchPad.qml−197
This diff is too big to show here.
tests/qmltests/Components/tst_Wallpaper.qml−118
This diff is too big to show here.
tests/qmltests/Components/tst_WallpaperResolver.qml−161
This diff is too big to show here.
tests/qmltests/Components/tst_ZoomableImage.qml−204
This diff is too big to show here.
tests/qmltests/Dash/Apps/tst_AppPreview.qml+239
This diff is too big to show here.
tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml+222
This diff is too big to show here.
tests/qmltests/Dash/Video/tst_VideoPreview.qml+63
This diff is too big to show here.
tests/qmltests/Dash/qml/FakeScopeView.qml+120
This diff is too big to show here.
tests/qmltests/Dash/qml/fake_generic_scopeView.qml+6−7
This diff is too big to show here.
tests/qmltests/Dash/qml/fake_scopeView1.qml+24
This diff is too big to show here.
tests/qmltests/Dash/qml/fake_scopeView2.qml+24
This diff is too big to show here.
tests/qmltests/Dash/qml/fake_scopeView3.qml+24
This diff is too big to show here.
tests/qmltests/Dash/qml/fake_scopeView4.qml+24
This diff is too big to show here.
tests/qmltests/Dash/tst_Dash.qml+133
This diff is too big to show here.
tests/qmltests/Dash/tst_DashBar.qml+111
This diff is too big to show here.
tests/qmltests/Dash/tst_DashContent.qml+209
This diff is too big to show here.
tests/qmltests/Dash/tst_DashPreview.qml+155
This diff is too big to show here.
tests/qmltests/Dash/tst_FilterGrids.qml+144
This diff is too big to show here.
tests/qmltests/Dash/tst_GenericScopeView.qml+71
This diff is too big to show here.
tests/qmltests/Dash/tst_ScopeView.qml+52
This diff is too big to show here.
tests/qmltests/EdgeBarrierControls.qml−97
This diff is too big to show here.
tests/qmltests/Greeter/TestView.qml−101
This diff is too big to show here.
tests/qmltests/Greeter/tst_Clock.qml+43−60
This diff is too big to show here.
tests/qmltests/Greeter/tst_Greeter.qml−683
This diff is too big to show here.
tests/qmltests/Greeter/tst_GreeterView.qml−1366
This diff is too big to show here.
tests/qmltests/Greeter/tst_Infographics.qml+18−83
This diff is too big to show here.
tests/qmltests/Greeter/tst_Lockscreen.qml+212
This diff is too big to show here.
tests/qmltests/Greeter/tst_Phone.qml+105
This diff is too big to show here.
tests/qmltests/Greeter/tst_Tablet.qml+328
This diff is too big to show here.
tests/qmltests/Hud/tst_Hud.qml+239
This diff is too big to show here.
tests/qmltests/Hud/tst_Result.qml+98
This diff is too big to show here.
tests/qmltests/Launcher/tst_Drawer.qml−520
This diff is too big to show here.
tests/qmltests/Launcher/tst_Launcher.qml+154−1375
This diff is too big to show here.
tests/qmltests/Notifications/tst_Notifications.qml+326−796
This diff is too big to show here.
tests/qmltests/Notifications/tst_OptionToggle.qml−290
This diff is too big to show here.
tests/qmltests/Notifications/tst_SwipeToAct.qml−326
This diff is too big to show here.
tests/qmltests/Notifications/tst_VisualSnapDecisionsQueue.qml−232
This diff is too big to show here.
tests/qmltests/Panel/Indicators/tst_IndicatorItem.qml−205
This diff is too big to show here.
tests/qmltests/Panel/Indicators/tst_IndicatorMenuItemFactory.qml−828
This diff is too big to show here.
tests/qmltests/Panel/Indicators/tst_IndicatorsLight.qml−292
This diff is too big to show here.
tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml−171
This diff is too big to show here.
tests/qmltests/Panel/PanelTest.qml−70
This diff is too big to show here.
tests/qmltests/Panel/PanelUI.qml−286
This diff is too big to show here.
tests/qmltests/Panel/tst_ActiveCallHint.qml−198
This diff is too big to show here.
tests/qmltests/Panel/tst_IndicatorItem.qml+61
This diff is too big to show here.
tests/qmltests/Panel/tst_IndicatorRow.qml+244
This diff is too big to show here.
tests/qmltests/Panel/tst_Indicators.qml+181
This diff is too big to show here.
tests/qmltests/Panel/tst_MenuContent.qml+91−37
This diff is too big to show here.
tests/qmltests/Panel/tst_Panel.qml+161−600
This diff is too big to show here.
tests/qmltests/Panel/tst_PanelBar.qml−240
This diff is too big to show here.
tests/qmltests/Panel/tst_PanelItemRow.qml−318
This diff is too big to show here.
tests/qmltests/Panel/tst_PanelMenu.qml−364
This diff is too big to show here.
tests/qmltests/Panel/tst_PanelMenuPage.qml−200
This diff is too big to show here.
tests/qmltests/Panel/tst_PanelSmallScreen.qml−133
This diff is too big to show here.
tests/qmltests/Panel/tst_SearchIndicator.qml+62
This diff is too big to show here.
tests/qmltests/SideStage/tst_SideStage.qml+52
This diff is too big to show here.
tests/qmltests/Stage/ApplicationCheckBox.qml−189
This diff is too big to show here.
tests/qmltests/Stage/SizeHintField.qml−33
This diff is too big to show here.
tests/qmltests/Stage/SurfaceManagerControls.qml−32
This diff is too big to show here.
tests/qmltests/Stage/SurfaceManagerField.qml−40
This diff is too big to show here.
tests/qmltests/Stage/tst_ApplicationWindow.qml−513
This diff is too big to show here.
tests/qmltests/Stage/tst_DecoratedWindow.qml−267
This diff is too big to show here.
tests/qmltests/Stage/tst_DesktopStage.qml−1085
This diff is too big to show here.
tests/qmltests/Stage/tst_PhoneStage.qml−624
This diff is too big to show here.
tests/qmltests/Stage/tst_QMLTopLevelWindowModel.qml−191
This diff is too big to show here.
tests/qmltests/Stage/tst_Splash.qml−131
This diff is too big to show here.
tests/qmltests/Stage/tst_SurfaceContainer.qml−258
This diff is too big to show here.
tests/qmltests/Stage/tst_TabletStage.qml−764
This diff is too big to show here.
tests/qmltests/Stage/tst_WindowDecoration.qml−244
This diff is too big to show here.
tests/qmltests/Stage/tst_WindowResizeArea.qml−465
This diff is too big to show here.
tests/qmltests/Tutorial/tst_Tutorial.qml−813
This diff is too big to show here.
tests/qmltests/UnityLogo.png
This diff is too big to show here.
tests/qmltests/Wizard/licenses/en_US.html−1
This diff is too big to show here.
tests/qmltests/Wizard/licenses/fr_CA.html−1
This diff is too big to show here.
tests/qmltests/Wizard/licenses/fr_FR.html−1
This diff is too big to show here.
tests/qmltests/Wizard/tst_Wizard.qml−487
This diff is too big to show here.
tests/qmltests/tst_DeviceConfiguration.qml−49
This diff is too big to show here.
tests/qmltests/tst_DisabledScreenNotice.qml−133
This diff is too big to show here.
tests/qmltests/tst_GreeterShell.qml+78
This diff is too big to show here.
tests/qmltests/tst_OrientedShell.qml−1705
This diff is too big to show here.
tests/qmltests/tst_Shell.qml+209−3253
This diff is too big to show here.
tests/qmltests/tst_ShellWithPin.qml−549
This diff is too big to show here.
tests/qmltests/utils/Unity/Test/MockObjectForInstanceOfTest.qml+1−1
This diff is too big to show here.
tests/qmltests/utils/Unity/Test/MockObjectForInstanceOfTestChild.qml+1−1
This diff is too big to show here.
tests/qmltests/utils/Unity/Test/tst_UnityTest.qml+8−36
This diff is too big to show here.
This diff is too big to show here.
tests/scripts/alert-launcher-icon.sh−19
This diff is too big to show here.
tests/scripts/get-progress.sh−19
This diff is too big to show here.
tests/scripts/list-launcher-icons.sh−19
This diff is too big to show here.
tests/scripts/set-count-visible.sh−19
This diff is too big to show here.
tests/scripts/set-count.sh−19
This diff is too big to show here.
tests/scripts/set-progress.sh−19
This diff is too big to show here.
tests/uqmlscene/CMakeLists.txt+2−21
This diff is too big to show here.
tests/uqmlscene/README+1−3
This diff is too big to show here.
tests/uqmlscene/main.cpp+12−39
This diff is too big to show here.
tests/utils/modules/Unity/Test/CMakeLists.txt+7−27
This diff is too big to show here.
tests/utils/modules/Unity/Test/StageTestCase.qml−64
This diff is too big to show here.
tests/utils/modules/Unity/Test/TouchEventSequenceWrapper.cpp+2−23
This diff is too big to show here.
tests/utils/modules/Unity/Test/TouchEventSequenceWrapper.h+2−7
This diff is too big to show here.
tests/utils/modules/Unity/Test/UnityTestCase.qml+119−464
This diff is too big to show here.
tests/utils/modules/Unity/Test/plugin.cpp+2−25
This diff is too big to show here.
tests/utils/modules/Unity/Test/plugin.h+1−1
This diff is too big to show here.
tests/utils/modules/Unity/Test/qmldir−4
This diff is too big to show here.
tests/utils/modules/Unity/Test/testutil.cpp+6−49
This diff is too big to show here.
tests/utils/modules/Unity/Test/testutil.h+2−4
This diff is too big to show here.
tests/whitespace/CMakeLists.txt+1−1
This diff is too big to show here.
tests/whitespace/check_whitespace.py+12−22
This diff is too big to show here.
This diff is too big to show here.
tools/menutool/CMakeLists.txt−5
This diff is too big to show here.
This diff is too big to show here.
tools/menutool/menutool.cpp−62
This diff is too big to show here.
tools/menutool/menutool.qml−118
This diff is too big to show here.
This diff is too big to show here.
unity8-greeter.desktop.in+6
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.