1777 files changed+224646−49274
.bazaar/Makefiledeleted−6
@@ -1,6 +0,0 @@
1−install:
2− mkdir -p ~/.bazaar/plugins
3− cp plugins/* ~/.bazaar/plugins
4−
5−uninstall:
6− rm ~/.bazaar/plugins/makecheck_unity_phablet.py*
.bazaar/plugins/makecheck_unity_phablet.pydeleted−43
@@ -1,43 +0,0 @@
1−#!/usr/bin/python
2−# Copyright 2013 Canonical Ltd.
3−#
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.
7−#
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.
12−#
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/>.
15−
16−import os, subprocess
17−from bzrlib import branch, errors
18−from bzrlib.urlutils import dirname, local_path_from_url
19−
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"):
22− return
23−
24− os.chdir(local_path_from_url(master_branch.base))
25−
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):
29−
30− print("\n\n*** Warning ***\n\nBasic tests failed. This commit will not pass continuous integration.")
31−
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)
36− msg_file.close()
37−
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")
42−
43−branch.Branch.hooks.install_named_hook('pre_commit', execute_makecheck, 'make check pre-commit')
.bzr-builddeb/default.confdeleted−2
@@ -1,2 +0,0 @@
1−[BUILDDEB]
2−split = True
.bzrignoredeleted−7
@@ -1,7 +0,0 @@
1−# default build dir
2−/builddir
3−# QtCreator project files
4−/*.user
5−# Eclipse project files
6−.settings
7−message.txt
.crossbuilder/post_deploynew file+1
@@ -0,0 +1 @@
1+restart unity8
.gitignore+7
@@ -2,8 +2,15 @@
22/builddir
33# QtCreator project files
44/*.user
5+*.qmlc
6+*.jsc
57# Eclipse project files
68/.project
79/.cproject
810/.settings
911/.pydevproject
12+# KDevelop project Files
13+/.kdev4/
14+/build/
15+/*.kdev4
16+.clickable/
tests/autopilot/.project → .projectrenamed+1−1
@@ -1,6 +1,6 @@
11<?xml version="1.0" encoding="UTF-8"?>
22<projectDescription>
3− <name>Unity8 Autopilot</name>
3+ <name>Unity8</name>
44 <comment></comment>
55 <projects>
66 </projects>
tests/autopilot/.pydevproject → .pydevprojectrenamed+3−1
@@ -1,7 +1,9 @@
11<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22<?eclipse-pydev version="1.0"?><pydev_project>
33<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
4−<path>/Unity8 Autopilot</path>
4+<path>/Unity8/tests/autopilot</path>
5+<path>/Unity8/.bazaar</path>
6+<path>/Unity8/tests/whitespace</path>
57</pydev_pathproperty>
68<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
79<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
.settings/Autopilot List.launchnew file+14
@@ -0,0 +1,14 @@
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"/>
8+</listAttribute>
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.launchnew file+14
@@ -0,0 +1,14 @@
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"/>
8+</listAttribute>
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>
ApplicationArguments.hdeleted−49
@@ -1,49 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− *
16− * Authored by: Nick Dedekind <nick.dedekind@canonical.com>
17− */
18−
19−
20−#ifndef APPLICATION_ARGUMENTS_H
21−#define APPLICATION_ARGUMENTS_H
22−
23−#include <QObject>
24−#include <QSize>
25−#include <QStringList>
26−
27−class ApplicationArguments : public QObject
28−{
29− Q_OBJECT
30−public:
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();
37− }
38− }
39− }
40−
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(); }
44−
45−private:
46− QSize m_size;
47−};
48−
49−#endif // APPLICATION_ARGUMENTS_H
Bottombar/Bottombar.qmldeleted−227
@@ -1,227 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import "../Components"
19−import Utils 0.1
20−import Unity.Application 0.1
21−import Ubuntu.Gestures 0.1
22−import Ubuntu.Components 0.1
23−
24−Item {
25− id: bottombar
26−
27− // Whether there's an application on foreground (as opposed to have shell's Dash on foreground)
28− property bool applicationIsOnForeground
29−
30− property variant theHud
31− property bool enabled: false
32− property bool preventHiding: dragArea.dragging
33− readonly property real bottomEdgeButtonCenterDistance: units.gu(34)
34−
35− state: "hidden"
36−
37− function hide() {
38− dismissTimer.stop()
39− bottombar.state = "hidden"
40− }
41−
42− onApplicationIsOnForegroundChanged: {
43− if (!applicationIsOnForeground) {
44− hide()
45− }
46− }
47−
48− onStateChanged: {
49− if (state == "hidden") {
50− dismissTimer.stop()
51− bottomBarVisibilityCommunicatorShell.forceHidden = false
52− } else {
53− dismissTimer.restart()
54− }
55− }
56−
57− onPreventHidingChanged: {
58− if (!preventHiding) {
59− if (state == "hint" || state == "reveal")
60− hide()
61− }
62−
63− if (dismissTimer.running) {
64− dismissTimer.restart();
65− }
66− }
67−
68− Timer {
69− id: dismissTimer
70− interval: 1000
71− onTriggered: {
72− if (!bottombar.preventHiding) {
73− bottombar.state = "hidden"
74− } else {
75− dismissTimer.restart()
76− }
77− }
78− }
79−
80− HudButton {
81− id: hudButton
82−
83− readonly property bool centeredHud: parent.width < units.gu(68) // Nexus 7 has 67 gu width
84−
85− x: centeredHud ? parent.width / 2 - width / 2 : MathUtils.clamp(dragArea.touchStartX - (width / 2), 0, bottombar.width - width)
86− y: bottombar.height - bottomEdgeButtonCenterDistance - (height / 2) - bottomMargin
87− z: 1
88− visible: opacity != 0
89−
90− mouseOver: {
91− if (dragArea.status === DirectionalDragArea.Recognized) {
92− var touchLocal = mapFromItem(dragArea, dragArea.touchX, dragArea.touchY)
93− return touchLocal.x > 0 && touchLocal.x < width
94− && touchLocal.y > 0 && touchLocal.y < height
95− } else {
96− return false
97− }
98− }
99−
100− onClicked: theHud.show()
101−
102− Behavior on bottomMargin {
103− NumberAnimation{duration: hudButton.opacity < 0.01 ? 200 : 70; easing.type: Easing.OutQuart}
104− }
105−
106− Behavior on opacity {
107− NumberAnimation{duration: 200; easing.type: Easing.OutCubic}
108− }
109− }
110−
111− Connections {
112− target: theHud
113− onShownChanged: {
114− bottomBarVisibilityCommunicatorShell.forceHidden = theHud.shown
115− if (theHud.shown) {
116− bottombar.state = "hidden"
117− }
118− }
119− }
120−
121− EdgeDragArea {
122− id: dragArea
123− objectName: "hudDragArea"
124− width: parent.width
125− height: shell.edgeSize
126− anchors.bottom: parent.bottom
127−
128− distanceThreshold: units.gu(8)
129− enabled: !theHud.shown && bottombar.enabled && applicationIsOnForeground
130− direction: Direction.Upwards
131− maxSilenceTime: 2000
132−
133− property int previousStatus: -1
134− property real touchStartX: -1
135−
136− readonly property real distanceFromThreshold: (-distance) - distanceThreshold // distance is negative
137− readonly property real revealDistance: units.gu(2)
138− readonly property real commitDistance: units.gu(6)
139− readonly property real commitProgress: MathUtils.clamp(distanceFromThreshold / commitDistance, 0, 1)
140−
141− onStatusChanged: {
142− if (status === DirectionalDragArea.WaitingForTouch) {
143− if (previousStatus == DirectionalDragArea.Recognized) {
144− if (hudButton.mouseOver) {
145− hudButton.clicked()
146− }
147− }
148− } else if (status === DirectionalDragArea.Undecided) {
149− if (!hudButton.centeredHud) {
150− touchStartX = touchX
151− }
152− } else if (status === DirectionalDragArea.Recognized) {
153− bottombar.state = "hint"
154− }
155− previousStatus = status
156− }
157−
158− onDistanceChanged: {
159− if (status === DirectionalDragArea.Recognized) {
160− if (distanceFromThreshold > commitDistance)
161− bottombar.state = "shown"
162− else if (distanceFromThreshold > revealDistance)
163− bottombar.state = "reveal"
164− }
165− }
166− }
167−
168− Item {
169− id: dismissArea
170− anchors {
171− top: parent.top
172− left: parent.left
173− right: parent.right
174− }
175− height: parent.height - bottomBarVisibilityCommunicatorShell.position
176−
177− MouseArea {
178− anchors.fill: parent
179− enabled: bottombar.state == "shown"
180− onPressed: {
181− bottomBarVisibilityCommunicatorShell.forceHidden = true
182− bottombar.state = "hidden"
183− }
184− }
185−
186− InputFilterArea {
187− anchors.fill: parent
188− blockInput: (hudButton.opacity == 1)
189− }
190− }
191−
192− MouseArea {
193− anchors {
194− top: dismissArea.bottom
195− left: parent.left
196− right: parent.right
197− bottom: parent.bottom
198− }
199− enabled: bottombar.state == "shown" && bottomBarVisibilityCommunicatorShell.position > 0
200− onPressed: {
201− bottombar.state = "hidden"
202− }
203− }
204−
205− states: [
206− State {
207− name: "hidden"
208− PropertyChanges { target: hudButton; opacity: 0 }
209− PropertyChanges { target: hudButton; bottomMargin: units.gu(-2) }
210− },
211− State {
212− name: "hint"
213− extend: "hidden"
214− PropertyChanges { target: hudButton; opacity: 0.5 }
215− },
216− State {
217− name: "reveal"
218− extend: "hint"
219− PropertyChanges { target: hudButton; bottomMargin: units.gu(-2) + units.gu(2) * dragArea.commitProgress }
220− },
221− State {
222− name: "shown"
223− PropertyChanges { target: hudButton; opacity: 1 }
224− PropertyChanges { target: hudButton; bottomMargin: units.gu(0) }
225− }
226− ]
227−}
Bottombar/HudButton.qmldeleted−64
@@ -1,64 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: item
22−
23− property bool mouseOver
24−
25− property int bottomMargin: units.gu(2)
26−
27− signal clicked()
28−
29− readonly property real scaleOnMouseOver: 1.2
30−
31− width: hudButton.width * scaleOnMouseOver
32− height: hudButton.height * scaleOnMouseOver
33−
34− Item {
35− id: hudButton
36−
37− anchors.centerIn: parent
38− height: units.gu(12)
39− width: height
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}}
44−
45− AbstractButton {
46− id: abstractButton
47− anchors.fill: parent
48− style: Image {
49− anchors.fill: parent
50− source: "graphics/hud_invoke_button_active.png"
51− }
52−
53− onClicked: item.clicked()
54− }
55−
56− Image {
57− width: units.gu(4)
58− height: width
59− source: "graphics/hud.png"
60− anchors.centerIn: parent
61− fillMode: Image.PreserveAspectFit
62− }
63− }
64−}
Bottombar/graphics/hud@20.pngdeleted
Binary file not shown.
Bottombar/graphics/hud_invoke_button_active@20.pngdeleted
Binary file not shown.
CMakeLists.txt+103−65
@@ -13,8 +13,9 @@ endif()
1313
1414set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
1515
16−# Instruct CMake to run moc automatically when needed.
16+# Instruct CMake to run moc and rcc automatically when needed.
1717set(CMAKE_AUTOMOC ON)
18+set(CMAKE_AUTORCC ON)
1819
1920# enable QML debugging
2021string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) # Build types should always be lowercase but sometimes they are not.
@@ -39,6 +40,19 @@ if(cmake_build_type_lower MATCHES coverage)
3940 ENABLE_COVERAGE_REPORT(TARGETS ${SHELL_APP} FILTER /usr/include ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*)
4041endif()
4142
43+find_package (ECM 1.7.0 QUIET NO_MODULE)
44+if (ECM_FOUND)
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")
48+endif()
49+
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" )
53+ endif()
54+endif()
55+
4256# Make sure we have all the needed symbols
4357set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
4458set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,defs")
@@ -48,40 +62,65 @@ add_custom_target(cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2
4862 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
4963
5064include(FindPkgConfig)
51−find_package(Qt5Core)
52−find_package(Qt5Qml)
53−find_package(Qt5Quick)
54−find_package(Qt5Gui)
55−find_package(Qt5DBus)
65+find_package(Qt5Core 5.6 REQUIRED)
66+find_package(Qt5Qml 5.6 REQUIRED)
67+find_package(Qt5Quick 5.6 REQUIRED)
68+find_package(Qt5Gui 5.6 REQUIRED)
69+find_package(Qt5DBus 5.6 REQUIRED)
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)
76+
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
87+ libqtdbustest-1
88+ libqtdbusmock-1
89+ )
90+
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}
95+ NO_DEFAULT_PATH)
96+if (${UBUNTUGESTUREPRIV} STREQUAL UBUNTUGESTUREPRIV-NOTFOUND)
97+ message(FATAL_ERROR "UbuntuGestures private headers not found.")
98+endif()
99+# end of UbuntuGesture private headers check
56100
57101# Standard install paths
58102include(GNUInstallDirs)
59103
60104set(SHELL_APP_DIR ${CMAKE_INSTALL_DATADIR}/unity8)
105+set(SHELL_PRIVATE_LIBDIR ${CMAKE_INSTALL_LIBDIR}/unity8)
106+
107+execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=plugin_private_module_dir SystemSettings OUTPUT_VARIABLE USS_PRIVATE_PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
108+if(USS_PRIVATE_PLUGINDIR STREQUAL "")
109+ message(FATAL_ERROR "Could not determine USS private plugin installation dir.")
110+endif()
61111
62112execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=plugindir_suffix unity-shell-api OUTPUT_VARIABLE SHELL_INSTALL_QML OUTPUT_STRIP_TRAILING_WHITESPACE)
63113if(SHELL_INSTALL_QML STREQUAL "")
64114 message(FATAL_ERROR "Could not determine plugin installation dir.")
65115endif()
66116
117+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
118+
67119execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=plugindir unity-shell-api OUTPUT_VARIABLE SHELL_PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
68120if(SHELL_PLUGINDIR STREQUAL "")
69121 message(FATAL_ERROR "Could not determine plugin import dir.")
70122endif()
71123
72−configure_file(paths.h.in ${CMAKE_CURRENT_BINARY_DIR}/paths.h @ONLY)
73−
74−pkg_check_modules(UNITY-MIR REQUIRED unity-mir)
75−
76−include_directories(
77− ${CMAKE_CURRENT_BINARY_DIR}
78− ${CMAKE_CURRENT_SOURCE_DIR}
79− ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
80− ${UNITY-MIR_INCLUDE_DIRS}
81− )
82−
83−set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
84−
85124set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")
86125
87126if ("${CMAKE_BUILD_TYPE}" STREQUAL "release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "relwithdebinfo")
@@ -98,66 +137,60 @@ endif()
98137# "signals" and "slots"
99138add_definitions(-DQT_NO_KEYWORDS)
100139
101−# Tests
102−include(CTest)
103−enable_testing()
140+# Save a few container detach and conversions
141+add_definitions(-DQT_STRICT_ITERATORS)
142+
143+# Use the fast string builder
144+add_definitions(-DQT_USE_QSTRINGBUILDER)
104145
105146# Autopilot tests
106147include(autopilot)
107148declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
108149
109150set(SHELL_APP unity8)
151+set(INDICATORS_CLIENT_APP indicators-client)
152+set(GREETER_APP unity8-greeter)
153+set(MOCK_INDICATOR_SERVICE_APP unity-mock-indicator-service)
110154
111−add_executable(${SHELL_APP}
112− ApplicationArguments.h
113− main.cpp
114− MouseTouchAdaptor.cpp
115− )
116−
117−qt5_use_modules(${SHELL_APP} Qml Quick Test)
118−pkg_check_modules(XCB REQUIRED xcb)
119−
120−if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
121− set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
122−
123− target_link_libraries(${SHELL_APP} ${XCB_LDFLAGS})
155+include_directories(
156+ ${CMAKE_SOURCE_DIR}/include
157+ ${CMAKE_BINARY_DIR}/include
158+ ${APPLICATION_API_INCLUDE_DIRS}
159+)
160+
161+# Quiet logger
162+set(QUIET_LOGGER OFF CACHE BOOL "Disable test output on stdout.")
163+if(NOT QUIET_LOGGER)
164+ set(STDOUT_LOGGER "-o" "-,txt")
124165endif()
125166
126−
127−# install binaries
128−install(TARGETS ${SHELL_APP}
129− RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
130− )
131−
132−# install top level qml and js files
133−file(GLOB QML_JS_FILES *.qml *.js)
134−
135−install(FILES ${QML_JS_FILES}
136− DESTINATION ${SHELL_APP_DIR}
137− )
167+execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH OUTPUT_VARIABLE ARCH)
168+if (NOT ARCH MATCHES "arm*")
169+ set(ENABLE_TOUCH_EMULATION true)
170+ add_definitions(-DUNITY8_ENABLE_TOUCH_EMULATION)
171+ pkg_check_modules(MOUSETOUCHADAPTOR_LIBS REQUIRED x11 xcb xi)
172+else()
173+ set(ENABLE_TOUCH_EMULATION false)
174+ message(STATUS "Touch emulation support disabled.")
175+endif()
138176
139177# add subdirectories to build
140−add_subdirectory(tests)
141−add_subdirectory(plugins)
178+add_subdirectory(include)
142179add_subdirectory(src)
180+add_subdirectory(tools)
181+add_subdirectory(qml)
143182
144−# install subdirectories
145−set(QML_DIRS
146− Bottombar
147− Components
148− Dash
149− graphics
150− Greeter
151− Hud
152− Panel
153− Launcher
154− SideStage
155− Notifications
156− )
183+# Tests
184+set(NO_TESTS OFF CACHE BOOL "Disable tests.")
185+if (NOT NO_TESTS)
186+ include(CTest)
187+ enable_testing()
188+ add_subdirectory(tests)
189+else()
190+ message(STATUS "Tests disabled")
191+endif()
157192
158−install(DIRECTORY ${QML_DIRS}
159− DESTINATION ${SHELL_APP_DIR}
160− )
193+add_subdirectory(plugins)
161194
162195#
163196# Data files
@@ -168,3 +201,8 @@ add_subdirectory(data)
168201# Translation
169202#
170203add_subdirectory(po)
204+
205+#
206+# Documentation
207+#
208+add_subdirectory(doc)
CODING+118−59
@@ -15,23 +15,17 @@ download source
1515 $ bzr branch lp:unity8 ~/unity8/trunk
1616 $ cd ~/unity8/trunk
1717
18−install dependencies
18+install dependencies and build Unity 8
1919--------------------
20−If its your first time, install build dependencies
2120
2221$ cd ~/unity8/trunk
23−$ ./build --setup
22+$ ./build.sh
2423
25− this will:
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
29−
30−build Unity 8
31−-------------
24+ If its your first time, this will install the required dependencies to build and
25+ build it.
3226
33−$ cd ~/unity8/trunk
34−$ ./build
27+ You might want to also install unity-scope-home and unity-scope-click which
28+ are technically "recommends", not strict dependencies
3529
3630You may also rebuild with the -c for clean, which just deletes the build
3731directory.
@@ -43,17 +37,21 @@ Running Unity 8 on your desktop
4337run the Unity 8 shell
4438---------------------
4539$ cd ~/unity8/trunk
46−$ ./run
40+$ cd builddir
4741
48−Options can be passed to test the lock screen
49−$ ./run -p OR -k
42+Each component of unity8 can be ran independently for development and testing
43+For example:
44+$ make tryShell
45+$ make tryLauncher
46+$ make tryLockscreen
5047
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"
48+Check out the tests/qmltests/ directory for a list of things that can be ran.
5349
5450Notes
5551-----
5652- 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.
5755- to get the translations work, currently you have to do make install to
5856 put the *.mo files into correct structure. We'll look for a better solution
5957 later.
@@ -68,50 +66,15 @@ Notes
6866
6967Running Unity 8 on devices
7068==========================
71−- Ubuntu Touch builds are currently only available in 14.04 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)
79−
80−$ cd ~/unity/trunk
81−$ ./run_on_device --setup
82− this will:
83− - install your public SSH key on the device
84− - install the needed dependencies
8569
86−$ ./run_on_device
87− this will:
88− - rsync the code to the device
89− - build on the device
90− - replace the running shell
91−
92−Options can be passed to test the lock screen
93−$ ./run_on_device -p OR -k
94−
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"
97−
98−Notes
99−-----
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
106− the screen
107−- exporting ANDROID_SERIAL=$your_device_serial or
108− ANDROID_SERIAL=$your_device_ip:5555 will make adb not complain about
109− multiple devices
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)
70+Running unity8 on a device should be done using crossbuilder.
71+Go to
72+* https://launchpad.net/crossbuilder and
73+* https://wiki.ubuntu.com/Touch/Crossbuilder
74+for more details on crossbuilder.
11475
76+unity8 will automatically restart on the phone once deployment
77+has finished due to post-build-steps set up in this repository.
11578
11679Coding guidelines
11780=================
@@ -127,3 +90,99 @@ Unity 8.
12790If using VIM, make sure you install some syntax highlighting for QML, like
12891https://github.com/peterhoeg/vim-qml
12992
93+Running tests
94+=============
95+
96+Tests are run from the build directory (which will be ./builddir if you used
97+the ./build.sh script).
98+
99+To run the tests that do not require any graphical capability and therefore
100+are pretty fast run:
101+
102+$ make test
103+
104+or, alternatively:
105+
106+$ ctest
107+
108+To run all graphical tests, which can take a couple of minutes:
109+
110+$ make uitests
111+
112+To run the tests for a single component/class:
113+
114+$ make testComponentName
115+
116+So, for the DragHandle component that would be:
117+
118+$ make testDragHandle
119+
120+To run the tests for a single component/class under gdb (so you can catch SEGFAULTS)
121+
122+$ make gdbtestComponentName
123+
124+To run a single test function of a single component/class:
125+
126+$ make testComponentName FUNCTION="TestCaseName::functionName"
127+
128+To run a test application that allow you to manually test or to simply try out
129+a given component:
130+
131+$ make tryComponentName
132+
133+So to try out, for instance, the DragHandle component, you would do:
134+
135+$ make tryDragHandle
136+
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
139+provided.
140+
141+Running autopilot tests
142+=======================
143+
144+Autopilot tests are run from the build directory (which will be ./builddir if you used
145+the ./build.sh script).
146+
147+$ make autopilot
148+
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
151+
152+$ make install
153+
154+To see the list of existing autopilot tests you can do
155+
156+$ PYTHONPATH=../tests/autopilot autopilot3 list unity8
157+
158+And then run a single test with
159+
160+$ PYTHONPATH=../tests/autopilot autopilot3 run unity8.some.very.long.test.name
161+
162+or run them all with
163+
164+$ PYTHONPATH=../tests/autopilot autopilot3 run unity8
165+
166+Debugging techniques
167+====================
168+
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:
171+
172+* Enable/disable Qt scenegraph visualizer on the fly:
173+
174+ $ qdbus com.canonical.Unity8.Debugging /com/canonical/Unity8/Debugging SetSceneGraphVisualizer <mode>
175+
176+ This is equivalent to exporting QSG_VISUALIZE=<mode> before running unity8, except it does it on the
177+ fly.
178+
179+* Toggle slow animations on the fly:
180+
181+ $ qdbus com.canonical.Unity8.Debugging /com/canonical/Unity8/Debugging SetSlowAnimations <true|false>
182+
183+* Change logging filter rules on the fly:
184+
185+ $ qdbus com.canonical.Unity8.Debugging /com/canonical/Unity8/Debugging SetLoggingFilterRules <filter>
186+
187+ This is equivalent to exporting QT_LOGGING_RULES or defining them in QT_LOGGING_CONF, except it does
188+ it on the fly.
Components/AnimationControllerWithSignals.qmldeleted−64
@@ -1,64 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−AnimationController {
20− signal animationCompletedAtBeginning()
21− signal animationCompletedAtEnd()
22− readonly property bool completed: progress == 1.0 || progress == 0.0
23− property bool completing: false
24−
25− function __completeAtBeginning() {
26− completing = false;
27− animationCompletedAtBeginning();
28− }
29−
30− function __completeAtEnd() {
31− completing = false;
32− animationCompletedAtEnd();
33− }
34−
35− function completeToBeginningWithSignal() {
36− if (progress == 0.0) {
37− __completeAtBeginning()
38− } else {
39− completing = true;
40− completeToBeginning();
41− }
42− }
43−
44− function completeToEndWithSignal() {
45− if (progress == 1.0) {
46− __completeAtEnd()
47− } else {
48− completing = true;
49− completeToEnd();
50− }
51− }
52−
53− onProgressChanged: {
54− if (!completing) {
55− return;
56− }
57−
58− if (progress == 0.0) {
59− __completeAtBeginning()
60− } else if (progress == 1.0) {
61− __completeAtEnd()
62− }
63− }
64−}
Components/ApplicationManagerWrapper.qmldeleted−169
@@ -1,169 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Unity.Application 0.1
19−
20−Item {
21− id: root
22−
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− property bool keyboardVisible: ApplicationManager.keyboardVisible
29− property int keyboardHeight: ApplicationManager.keyboardHeight
30−
31− property bool fake: ApplicationManager.fake ? ApplicationManager.fake : false
32−
33− signal focusRequested(string appId)
34−
35− ApplicationsModelStageFiltered {
36− id: mainStageModel
37− stage: ApplicationInfo.MainStage
38− }
39−
40− ApplicationsModelStageFiltered {
41− id: sideStageModel
42− stage: ApplicationInfo.SideStage
43− }
44−
45− Connections {
46− target: ApplicationManager
47− onFocusedApplicationIdChanged: {
48− var app = ApplicationManager.findApplication(ApplicationManager.focusedApplicationId)
49− if (!app) { //nothing at all focused, so clear all
50− mainStageFocusedApplication = null;
51− sideStageFocusedApplication = null;
52− } else {
53− if (app.stage == ApplicationInfo.MainStage) {
54− mainStageFocusedApplication = app;
55− // possible the side stage app being unfocused fired this signal, so check for it
56− if (sideStageFocusedApplication && !sideStageFocusedApplication.focused)
57− sideStageFocusedApplication = null;
58− } else {
59− sideStageFocusedApplication = app;
60− // possible the main stage app being unfocused fired this signal, so check for it
61− if (mainStageFocusedApplication && !mainStageFocusedApplication.focused)
62− mainStageFocusedApplication = null;
63− }
64− }
65− }
66−
67− onFocusRequested: {
68− // if no side stage enabled, override application's stage parameter
69− var app = ApplicationManager.findApplication(appId);
70− if (app && app.stage === ApplicationInfo.SideStage && !sideStageEnabled) {
71− app.stage = ApplicationInfo.MainStage;
72− }
73−
74− root.focusRequested(appId);
75− }
76− }
77−
78− function activateApplication(desktopFile, argument) {
79− var appId;
80−
81− // HACK: Applications identified sometimes with with appId, but mostly with desktopFile.
82− // TODO: convert entire shell to use appId only.
83− if (desktopFile.indexOf(".desktop") >= 0) {
84− appId = desktopFileToAppId(desktopFile);
85− } else {
86− appId = desktopFile;
87− }
88−
89− var application = ApplicationManager.findApplication(appId);
90− if (application !== null) {
91− return application;
92− }
93−
94− var execFlags = sideStageEnabled ? ApplicationManager.NoFlag : ApplicationManager.ForceMainStage;
95−
96− if (argument) {
97− return ApplicationManager.startApplication(appId, execFlags, [argument]);
98− } else {
99− return ApplicationManager.startApplication(appId, execFlags);
100− }
101− }
102−
103− function stopApplication(application) {
104− var appId;
105−
106− // HACK: Applications identified sometimes with with appId, but mostly with desktopFile.
107− // TODO: convert entire shell to use appId only.
108− if (typeof application == "string") {
109− appId = application;
110− } else {
111− appId = desktopFileToAppId(application.desktopFile);
112− }
113−
114− ApplicationManager.stopApplication(appId);
115− }
116−
117− function focusApplication(application) {
118− if (application == null || application == undefined) {
119− return;
120− }
121−
122− ApplicationManager.focusApplication(application.appId);
123− }
124−
125− function unfocusCurrentApplication() {
126− ApplicationManager.unfocusCurrentApplication();
127− }
128−
129− function moveRunningApplicationStackPosition(from, to, stage) {
130− if (from == to || from < 0 || to < 0) return;
131−
132− if (stage == ApplicationInfo.SideStage) {
133− sideStageModel.move(from, to);
134− } else {
135− mainStageModel.move(from, to);
136− }
137− }
138−
139− function getApplicationFromDesktopFile(desktopFile, stage) {
140− var appId;
141−
142− // HACK: Applications identified sometimes with with appId, but mostly with desktopFile.
143− // TODO: convert entire shell to use appId only.
144− if (desktopFile.indexOf(".desktop") >= 0) {
145− appId = desktopFileToAppId(desktopFile);
146− } else {
147− appId = desktopFile;
148− }
149−
150− for (var i = 0, len = ApplicationManager.count; i < len; i++ ) {
151− var app = ApplicationManager.get(i);
152−
153− // if stage not specified, return whichever app running on either stage
154− if (app.appId == appId && (stage == undefined || app.stage == stage)) {
155− return app;
156− }
157− }
158− }
159−
160− function desktopFileToAppId(desktopFile) {
161− var right = desktopFile.lastIndexOf(".desktop");
162− var left = desktopFile.lastIndexOf("/");
163− if (left == -1 || right == -1 || left == right) {
164− console.log("ApplicationManagerWrapper: unable to extract appId from '" + desktopFile + "'");
165− return "";
166− }
167− return desktopFile.substring(left+1, right);
168− }
169−}
Components/ApplicationScreenshot.qmldeleted−61
@@ -1,61 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity.Application 0.1
20−
21−Item {
22− id: applicationScreenshot
23−
24− property var application: null
25− property bool withBackground: false
26− property bool ready: applicationImage.ready || withBackground
27−
28− function setApplication(application) {
29− applicationScreenshot.application = application
30− }
31−
32− function clearApplication() {
33− applicationScreenshot.withBackground = false;
34− applicationScreenshot.application = null
35− applicationScreenshot.scheduleUpdate();
36− }
37−
38− function scheduleUpdate() {
39− applicationImage.scheduleUpdate()
40− }
41−
42− function updateFromCache() {
43− applicationImage.updateFromCache()
44− }
45−
46− Rectangle {
47− id: background
48− anchors.fill: parent
49− color: "white" // FIXME should use normal background color of Suru theme
50− visible: applicationScreenshot.withBackground
51− }
52−
53− ApplicationImage {
54− id: applicationImage
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 : "")
60− }
61−}
Components/ApplicationsModelStageFiltered.qmldeleted−49
@@ -1,49 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Utils 0.1
19−import Unity.Application 0.1
20−
21−SortFilterProxyModel {
22− id: root
23− property int stage
24−
25− function get(index) {
26− return model.get(mapRowToSource(index));
27− }
28−
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");
33− return;
34− }
35− var realTo = mapRowToSource(to);
36− if (realTo == -1) {
37− // assuming wanting to move to end of list
38− realTo = model.count - 1;
39− }
40−
41− if (realFrom == realTo) return;
42− model.move(realFrom, realTo);
43− }
44−
45− model: ApplicationManager
46− dynamicSortFilter: true
47− filterRole: ApplicationManager.RoleStage
48− filterRegExp: RegExp(stage)
49−}
Components/Carousel.qmldeleted−339
@@ -1,339 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "carousel.js" as CarouselJS
20−
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).
23− */
24−Item {
25− id: carousel
26−
27− clip: true // Don't leak horizontally to other dashes
28−
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
48− /// The index of the item that should be highlighted
49− property alias highlightIndex: listView.highlightIndex
50− /// exposes the delegate of the currentItem
51− readonly property alias currentItem: listView.currentItem
52− /// exposes the distance to the next row (only one row in carousel, so it's the topMargins)
53− readonly property alias verticalSpacing: listView.verticalMargin
54−
55− /// Emitted when the user clicked on an item
56− /// @param index is the index of the clicked item
57− /// @param itemY is y of the clicked delegate
58− signal clicked(int index, real itemY)
59−
60− /// Emitted when the user pressed and held on an item
61− /// @param index is the index of the held item
62− /// @param itemY is y of the held delegate
63− signal pressAndHold(int index, real itemY)
64−
65− implicitHeight: listView.tileHeight * selectedItemScaleFactor
66− opacity: listView.highlightIndex === -1 ? 1 : 0.6
67−
68− /* Basic idea behind the carousel effect is to move the items of the delegates (compacting /stuffing them).
69− One drawback is, that more delegates have to be drawn than usually. As some items are moved from the
70− invisible to the visible area. Setting the cacheBuffer does not fix this.
71− See https://bugreports.qt-project.org/browse/QTBUG-29173
72− Therefore the ListView has negative left and right anchors margins, and in addition a header
73− and footer item to compensate that.
74−
75− The scaling of the items is controlled by the variable continuousIndex, described below. */
76− ListView {
77− id: listView
78−
79− property int highlightIndex: -1
80− property real minimumTileWidth: 0
81− property real newContentX: disabledNewContentX
82− property real pathItemCount: referenceWidth / referenceTileWidth
83− property real tileAspectRatio: 1
84−
85− /* The positioning and scaling of the items in the carousel is based on the variable
86− 'continuousIndex', a continuous real variable between [0, 'carousel.model.count'],
87− roughly representing the index of the item that is prioritised over the others.
88− 'continuousIndex' is not linear, but is weighted depending on if it is close
89− to the beginning of the content (beginning phase), in the middle (middle phase)
90− or at the end (end phase).
91− Each tile is scaled and transformed in proportion to the difference between
92− its own index and continuousIndex.
93− To efficiently calculate continuousIndex, we have these values:
94− - 'gapToMiddlePhase' gap in pixels between beginning and middle phase
95− - 'gapToEndPhase' gap in pixels between middle and end phase
96− - 'kGapEnd' constant used to calculate 'continuousIndex' in end phase
97− - 'kMiddleIndex' constant used to calculate 'continuousIndex' in middle phase
98− - 'kXBeginningEnd' constant used to calculate 'continuousIndex' in beginning and end phase
99− - 'realContentWidth' the width of all the delegates only (without header/footer)
100− - 'realContentX' the 'contentX' of the listview ignoring the 'drawBuffer'
101− - 'realWidth' the 'width' of the listview, as it is used as component. */
102−
103− readonly property real gapToMiddlePhase: Math.min(realWidth / 2 - tileWidth / 2, (realContentWidth - realWidth) / 2)
104− readonly property real gapToEndPhase: realContentWidth - realWidth - gapToMiddlePhase
105− readonly property real kGapEnd: kMiddleIndex * (1 - gapToEndPhase / gapToMiddlePhase)
106− readonly property real kMiddleIndex: (realWidth / 2) / tileWidth - 0.5
107− readonly property real kXBeginningEnd: 1 / tileWidth + kMiddleIndex / gapToMiddlePhase
108− readonly property real maximumItemTranslation: (listView.tileWidth * 3) / listView.scaleFactor
109− readonly property real disabledNewContentX: -carousel.drawBuffer - 1
110− readonly property real realContentWidth: contentWidth - 2 * carousel.drawBuffer
111− readonly property real realContentX: contentX + carousel.drawBuffer
112− readonly property real realPathItemCount: Math.min(realWidth / tileWidth, pathItemCount)
113− readonly property real realWidth: carousel.width
114− readonly property real referenceGapToMiddlePhase: realWidth / 2 - tileWidth / 2
115− readonly property real referencePathItemCount: referenceWidth / referenceTileWidth
116− readonly property real referenceWidth: 848
117− readonly property real referenceTileWidth: 175
118− readonly property real scaleFactor: tileWidth / referenceTileWidth
119− readonly property real tileWidth: Math.max(realWidth / pathItemCount, minimumTileWidth)
120− readonly property real tileHeight: tileWidth / tileAspectRatio
121− readonly property real translationXViewFactor: 0.2 * (referenceGapToMiddlePhase / gapToMiddlePhase)
122− readonly property real verticalMargin: (parent.height - tileHeight) / 2
123− readonly property real visibleTilesScaleFactor: realPathItemCount / referencePathItemCount
124−
125− anchors {
126− fill: parent
127− topMargin: verticalMargin
128− bottomMargin: verticalMargin
129− // extending the "drawing area"
130− leftMargin: -carousel.drawBuffer
131− rightMargin: -carousel.drawBuffer
132− }
133−
134− /* The header and footer help to "extend" the area, the listview draws items.
135− This together with anchors.leftMargin and anchors.rightMargin. */
136− header: Item {
137− width: carousel.drawBuffer
138− height: listView.tileHeight
139− }
140− footer: Item {
141− width: carousel.drawBuffer
142− height: listView.tileHeight
143− }
144−
145− boundsBehavior: Flickable.DragOverBounds
146− cacheBuffer: carousel.cacheBuffer
147− flickDeceleration: Math.max(1500 * Math.pow(realWidth / referenceWidth, 1.5), 1500) // 1500 is platform default
148− maximumFlickVelocity: Math.max(2500 * Math.pow(realWidth / referenceWidth, 1.5), 2500) // 2500 is platform default
149− orientation: ListView.Horizontal
150−
151− function itemClicked(index, delegateItem) {
152− listView.currentIndex = index
153− var x = CarouselJS.getXFromContinuousIndex(index,
154− realWidth,
155− realContentWidth,
156− tileWidth,
157− gapToMiddlePhase,
158− gapToEndPhase,
159− carousel.drawBuffer)
160−
161− if (Math.abs(x - contentX) < 1 && delegateItem !== undefined) {
162− /* We're clicking the selected item and
163− we're in the neighbourhood of radius 1 pixel from it.
164− Let's emit the clicked signal. */
165− carousel.clicked(index, delegateItem.y)
166− return
167− }
168−
169− stepAnimation.stop()
170− newContentXAnimation.stop()
171−
172− newContentX = x
173− newContentXAnimation.start()
174− }
175−
176− function itemPressAndHold(index, delegateItem) {
177− var x = CarouselJS.getXFromContinuousIndex(index,
178− realWidth,
179− realContentWidth,
180− tileWidth,
181− gapToMiddlePhase,
182− gapToEndPhase,
183− carousel.drawBuffer);
184−
185− if (Math.abs(x - contentX) < 1 && delegateItem !== undefined) {
186− /* We're pressAndHold the selected item and
187− we're in the neighbourhood of radius 1 pixel from it.
188− Let's emit the pressAndHold signal. */
189− carousel.pressAndHold(index, delegateItem.y);
190− return;
191− }
192−
193− stepAnimation.stop();
194− newContentXAnimation.stop();
195−
196− newContentX = x;
197− newContentXAnimation.start();
198− }
199−
200− onHighlightIndexChanged: {
201− if (highlightIndex != -1) {
202− itemClicked(highlightIndex)
203− }
204− }
205−
206− onMovementStarted: {
207− stepAnimation.stop()
208− newContentXAnimation.stop()
209− newContentX = disabledNewContentX
210− }
211− onMovementEnded: {
212− if (realContentX > 0 && realContentX < realContentWidth - realWidth)
213− stepAnimation.start()
214− }
215−
216− SmoothedAnimation {
217− id: stepAnimation
218−
219− target: listView
220− property: "contentX"
221− to: CarouselJS.getXFromContinuousIndex(listView.selectedIndex,
222− listView.realWidth,
223− listView.realContentWidth,
224− listView.tileWidth,
225− listView.gapToMiddlePhase,
226− listView.gapToEndPhase,
227− carousel.drawBuffer)
228− duration: 450
229− velocity: 200
230− easing.type: Easing.InOutQuad
231− }
232−
233− SequentialAnimation {
234− id: newContentXAnimation
235−
236− NumberAnimation {
237− target: listView
238− property: "contentX"
239− from: listView.contentX
240− to: listView.newContentX
241− duration: 300
242− easing.type: Easing.InOutQuad
243− }
244− ScriptAction {
245− script: listView.newContentX = listView.disabledNewContentX
246− }
247− }
248−
249− readonly property int selectedIndex: Math.round(continuousIndex)
250− readonly property real continuousIndex: CarouselJS.getContinuousIndex(listView.realContentX,
251− listView.tileWidth,
252− listView.gapToMiddlePhase,
253− listView.gapToEndPhase,
254− listView.kGapEnd,
255− listView.kMiddleIndex,
256− listView.kXBeginningEnd)
257−
258− property real viewTranslation: CarouselJS.getViewTranslation(listView.realContentX,
259− listView.tileWidth,
260− listView.gapToMiddlePhase,
261− listView.gapToEndPhase,
262− listView.translationXViewFactor)
263−
264− delegate: Loader {
265− property bool explicitlyScaled: explicitScaleFactor == carousel.selectedItemScaleFactor
266− property real explicitScaleFactor: explicitScale ? carousel.selectedItemScaleFactor : 1.0
267− readonly property bool explicitScale: (!listView.moving ||
268− listView.realContentX <= 0 ||
269− listView.realContentX >= listView.realContentWidth - listView.realWidth) &&
270− listView.newContentX === listView.disabledNewContentX &&
271− index === listView.selectedIndex
272− readonly property real cachedTiles: listView.realPathItemCount + carousel.drawBuffer / listView.tileWidth
273− readonly property real distance: listView.continuousIndex - index
274− readonly property real itemTranslationScale: CarouselJS.getItemScale(0.5,
275− (index + 0.5), // good approximation of scale while changing selected item
276− listView.count,
277− listView.visibleTilesScaleFactor)
278− readonly property real itemScale: CarouselJS.getItemScale(distance,
279− listView.continuousIndex,
280− listView.count,
281− listView.visibleTilesScaleFactor)
282− readonly property real translationX: CarouselJS.getItemTranslation(index,
283− listView.selectedIndex,
284− distance,
285− itemScale,
286− itemTranslationScale,
287− listView.maximumItemTranslation)
288−
289− readonly property real xTransform: listView.viewTranslation + translationX * listView.scaleFactor
290− readonly property real center: x - listView.contentX + xTransform - drawBuffer + (width/2)
291−
292− width: listView.tileWidth
293− height: listView.tileHeight
294− scale: itemScale * explicitScaleFactor
295− sourceComponent: itemComponent
296− z: cachedTiles - Math.abs(index - listView.selectedIndex)
297−
298− transform: Translate {
299− x: xTransform
300− }
301−
302− Behavior on explicitScaleFactor {
303− SequentialAnimation {
304− ScriptAction {
305− script: if (!explicitScale)
306− explicitlyScaled = false
307− }
308− NumberAnimation {
309− duration: explicitScaleFactor === 1.0 ? 250 : 150
310− easing.type: Easing.InOutQuad
311− }
312− ScriptAction {
313− script: if (explicitScale)
314− explicitlyScaled = true
315− }
316− }
317− }
318−
319− onLoaded: {
320− item.explicitlyScaled = Qt.binding(function() { return explicitlyScaled; })
321− item.model = Qt.binding(function() { return model; })
322− }
323−
324− MouseArea {
325− id: mouseArea
326−
327− anchors.fill: parent
328−
329− onClicked: {
330− listView.itemClicked(index, item)
331− }
332−
333− onPressAndHold: {
334− listView.itemPressAndHold(index, item)
335− }
336− }
337− }
338− }
339−}
Components/EdgeDemo.qmldeleted−239
@@ -1,239 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import AccountsService 0.1
18−import LightDM 0.1 as LightDM
19−import QtQuick 2.0
20−
21−Item {
22− id: demo
23−
24− property Item greeter
25− property Item dash
26− property Item launcher
27− property Item indicators
28− property Item underlay
29−
30− property bool launcherEnabled: true
31− property bool dashEnabled: true
32− property bool panelEnabled: true
33− property bool panelContentEnabled: true
34− property bool running: !launcherEnabled || !dashEnabled || !panelEnabled || !panelContentEnabled
35−
36− property bool paused: false
37−
38− onPausedChanged: {
39− if (d.rightEdgeDemo) d.rightEdgeDemo.paused = paused
40− if (d.topEdgeDemo) d.topEdgeDemo.paused = paused
41− if (d.bottomEdgeDemo) d.bottomEdgeDemo.paused = paused
42− if (d.leftEdgeDemo) d.leftEdgeDemo.paused = paused
43− if (d.finalEdgeDemo) d.finalEdgeDemo.paused = paused
44− }
45−
46− function hideEdgeDemoInShell() {
47− AccountsService.demoEdges = false;
48− stopDemo();
49− }
50−
51− function hideEdgeDemoInGreeter() {
52− // TODO: AccountsService.demoEdges = false as lightdm user
53− }
54−
55− function hideEdgeDemos() {
56− hideEdgeDemoInGreeter();
57− hideEdgeDemoInShell();
58− }
59−
60− function stopDemo() {
61− launcherEnabled = true
62− dashEnabled = true
63− panelEnabled = true
64− panelContentEnabled = true
65− if (d.rightEdgeDemo) d.rightEdgeDemo.destroy()
66− if (d.topEdgeDemo) d.topEdgeDemo.destroy()
67− if (d.bottomEdgeDemo) d.bottomEdgeDemo.destroy()
68− if (d.leftEdgeDemo) d.leftEdgeDemo.destroy()
69− if (d.finalEdgeDemo) d.finalEdgeDemo.destroy()
70− }
71−
72− function startDemo() {
73− if (!d.overlay) {
74− d.overlay = Qt.createComponent("EdgeDemoOverlay.qml")
75− }
76−
77− launcherEnabled = false;
78− dashEnabled = false;
79− panelEnabled = false;
80− panelContentEnabled = false;
81−
82− // Begin with either greeter or dash, depending on which is visible
83− if (greeter && greeter.shown) {
84− startRightEdgeDemo()
85− } else {
86− startTopEdgeDemo()
87− }
88− }
89−
90− QtObject {
91− id: d
92− property Component overlay
93− property QtObject rightEdgeDemo
94− property QtObject topEdgeDemo
95− property QtObject bottomEdgeDemo
96− property QtObject leftEdgeDemo
97− property QtObject finalEdgeDemo
98− property bool showEdgeDemo: AccountsService.demoEdges
99− property bool showEdgeDemoInGreeter: AccountsService.demoEdges // TODO: AccountsService.demoEdges as lightdm user
100−
101− onShowEdgeDemoChanged: {
102− stopDemo()
103− if (d.showEdgeDemo) {
104− startDemo()
105− }
106− }
107− }
108−
109− function startRightEdgeDemo() {
110− if (demo.greeter) {
111− d.rightEdgeDemo = d.overlay.createObject(demo.greeter, {
112− "edge": "right",
113− "title": i18n.tr("Right edge"),
114− "text": i18n.tr("Try swiping from the right edge to unlock the phone"),
115− "anchors.fill": demo.greeter,
116− });
117− }
118− if (d.rightEdgeDemo) {
119− d.rightEdgeDemo.onSkip.connect(demo.hideEdgeDemos)
120− } else {
121− stopDemo();
122− }
123− }
124−
125− Connections {
126− target: demo.greeter
127−
128− function hide() {
129− if (d.rightEdgeDemo && d.rightEdgeDemo.available) {
130− d.rightEdgeDemo.hide()
131− hideEdgeDemoInGreeter()
132− startTopEdgeDemo()
133− }
134− }
135−
136− onUnlocked: hide()
137− onShownChanged: if (!greeter.shown) hide()
138− }
139−
140− function startTopEdgeDemo() {
141− demo.panelEnabled = true;
142− if (demo.dash && demo.underlay) {
143− d.topEdgeDemo = d.overlay.createObject(demo.underlay, {
144− "edge": "top",
145− "title": i18n.tr("Top edge"),
146− "text": i18n.tr("Try swiping from the top edge to access the indicators"),
147− "anchors.fill": demo.dash,
148− });
149− }
150− if (d.topEdgeDemo) {
151− d.topEdgeDemo.onSkip.connect(demo.hideEdgeDemoInShell)
152− } else {
153− stopDemo();
154− }
155− }
156−
157− Connections {
158− target: demo.indicators
159− onFullyOpenedChanged: {
160− if (d.topEdgeDemo && d.topEdgeDemo.available && demo.indicators.fullyOpened) {
161− d.topEdgeDemo.hideNow()
162− startBottomEdgeDemo()
163− }
164− }
165− }
166−
167− function startBottomEdgeDemo() {
168− if (demo.indicators) {
169− d.bottomEdgeDemo = d.overlay.createObject(demo.indicators, {
170− "edge": "bottom",
171− "title": i18n.tr("Close"),
172− "text": i18n.tr("Swipe up again to close the settings screen"),
173− "anchors.fill": demo.indicators.content,
174− });
175− }
176− if (d.bottomEdgeDemo) {
177− d.bottomEdgeDemo.onSkip.connect(demo.hideEdgeDemoInShell)
178− } else {
179− stopDemo();
180− }
181− }
182−
183− Connections {
184− target: demo.indicators
185− onPartiallyOpenedChanged: {
186− if (d.bottomEdgeDemo && d.bottomEdgeDemo.available && !demo.indicators.partiallyOpened && !demo.indicators.fullyOpened) {
187− d.bottomEdgeDemo.hideNow()
188− startLeftEdgeDemo()
189− }
190− }
191− }
192−
193− function startLeftEdgeDemo() {
194− demo.panelEnabled = false;
195− demo.launcherEnabled = true;
196− if (demo.dash && demo.underlay) {
197− d.leftEdgeDemo = d.overlay.createObject(demo.underlay, {
198− "edge": "left",
199− "title": i18n.tr("Left edge"),
200− "text": i18n.tr("Swipe from the left to reveal the launcher for quick access to apps"),
201− "anchors.fill": demo.dash,
202− });
203− }
204− if (d.leftEdgeDemo) {
205− d.leftEdgeDemo.onSkip.connect(demo.hideEdgeDemoInShell)
206− } else {
207− stopDemo();
208− }
209− }
210−
211− Connections {
212− target: demo.launcher
213− onStateChanged: {
214− if (d.leftEdgeDemo && d.leftEdgeDemo.available && launcher.state == "visible") {
215− d.leftEdgeDemo.hide()
216− launcher.hide()
217− startFinalEdgeDemo()
218− }
219− }
220− }
221−
222− function startFinalEdgeDemo() {
223− demo.launcherEnabled = false;
224− if (demo.dash && demo.underlay) {
225− d.finalEdgeDemo = d.overlay.createObject(demo.underlay, {
226− "edge": "none",
227− "title": i18n.tr("Well done"),
228− "text": i18n.tr("You have now mastered the edge gestures and can start using the phone<br><br>Tap anywhere to start"),
229− "anchors.fill": demo.dash,
230− "showSkip": false,
231− });
232− }
233− if (d.finalEdgeDemo) {
234− d.finalEdgeDemo.onSkip.connect(demo.hideEdgeDemoInShell)
235− } else {
236− stopDemo();
237− }
238− }
239−}
Components/EdgeDemoOverlay.qmldeleted−273
@@ -1,273 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import Powerd 0.1
18−import QtQuick 2.0
19−import QtGraphicalEffects 1.0
20−import Unity.Application 0.1
21−import Ubuntu.Components 0.1
22−
23−Showable {
24− id: overlay
25−
26− /*
27− * Valid values are "left", "right", "top", "bottom", or "none".
28− */
29− property string edge: "top"
30−
31− /*
32− * This is the header displayed, like "Right edge".
33− */
34− property alias title: titleLabel.text
35−
36− /*
37− * This is the block of text displayed below the header.
38− */
39− property alias text: textLabel.text
40−
41− /*
42− * This is the text for the skip button.
43− */
44− property alias skipText: skipLabel.text
45−
46− /*
47− * This is the visible status of the skip button.
48− */
49− property alias showSkip: skipLabel.visible
50−
51− /*
52− * Whether this demo is running currently.
53− */
54− readonly property bool active: available && visible
55−
56− /*
57− * Whether animations are paused.
58− */
59− property alias paused: wholeAnimation.paused
60−
61− /*
62− * Whether animations are running.
63− */
64− readonly property alias running: wholeAnimation.running
65−
66− signal skip()
67−
68− function doSkip() {
69− d.skipOnHide = true;
70− hide();
71− }
72−
73− function hideNow() {
74− overlay.visible = false;
75− overlay.available = false;
76− if (d.skipOnHide) {
77− overlay.skip();
78− }
79− }
80−
81− showAnimation: StandardAnimation {
82− property: "opacity"
83− to: 1
84− onRunningChanged: if (running) overlay.visible = true
85− }
86− hideAnimation: StandardAnimation {
87− property: "opacity"
88− to: 0
89− duration: UbuntuAnimation.BriskDuration
90− onRunningChanged: if (!running) overlay.hideNow()
91− }
92−
93− QtObject {
94− id: d
95− property bool skipOnHide: false
96− property int edgeMargin: units.gu(4)
97− }
98−
99− Rectangle {
100− objectName: "backgroundShade"
101−
102− anchors.fill: parent
103− color: "black"
104− opacity: 0.8
105− visible: overlay.active
106−
107− MouseArea {
108− objectName: "backgroundShadeMouseArea"
109−
110− anchors.fill: parent
111− enabled: overlay.edge == "none" && overlay.opacity == 1.0
112− onClicked: overlay.doSkip()
113− }
114− }
115−
116− Item {
117− id: hintGroup
118− x: 0
119− y: 0
120− width: parent.width
121− height: parent.height
122− visible: overlay.active
123−
124− Column {
125− id: labelGroup
126− spacing: units.gu(3)
127−
128− anchors {
129− margins: d.edgeMargin
130− left: parent.left
131− top: overlay.edge == "bottom" ? undefined : parent.top
132− bottom: overlay.edge == "bottom" ? parent.bottom : undefined
133− }
134−
135− Label {
136− id: titleLabel
137− fontSize: "x-large"
138− width: units.gu(25)
139− wrapMode: Text.WordWrap
140− }
141−
142− Label {
143− id: textLabel
144− width: units.gu(25)
145− wrapMode: Text.WordWrap
146− }
147−
148− Label {
149− id: skipLabel
150− objectName: "skipLabel"
151− text: i18n.tr("Skip intro")
152− color: UbuntuColors.orange
153− fontSize: "small"
154−
155− Icon {
156− anchors.left: parent.right
157− anchors.verticalCenter: parent.verticalCenter
158− height: units.dp(12)
159− width: units.dp(12)
160− name: "chevron"
161− color: UbuntuColors.orange
162− }
163−
164− MouseArea {
165− // Make clickable area bigger than just the link because
166− // otherwise, the edge demo will feel hard to dismiss.
167− anchors.fill: parent
168− anchors.margins: -units.gu(5)
169− onClicked: overlay.doSkip()
170− }
171− }
172− }
173−
174− LinearGradient {
175− id: edgeHint
176− property int size: 1
177− cached: false
178− visible: overlay.edge != "none"
179− gradient: Gradient {
180− GradientStop {
181− position: 0.0
182− color: Qt.hsla(16.0/360.0, 0.83, 0.47, 0.4) // UbuntuColors.orange, but transparent
183− }
184− GradientStop {
185− position: 1.0
186− color: "transparent"
187− }
188− }
189− anchors.fill: parent
190− start: {
191− if (overlay.edge == "right") {
192− return Qt.point(width, 0);
193− } else if (overlay.edge == "left") {
194− return Qt.point(0, 0);
195− } else if (overlay.edge == "top") {
196− return Qt.point(0, 0);
197− } else {
198− return Qt.point(0, height);
199− }
200− }
201− end: {
202− if (overlay.edge == "right") {
203− return Qt.point(width - size, 0);
204− } else if (overlay.edge == "left") {
205− return Qt.point(size, 0);
206− } else if (overlay.edge == "top") {
207− return Qt.point(0, size);
208− } else {
209− return Qt.point(0, height - size);
210− }
211− }
212− }
213− }
214−
215− SequentialAnimation {
216− id: wholeAnimation
217− objectName: "wholeAnimation"
218− running: overlay.active
219−
220− ParallelAnimation {
221− id: fadeInAnimation
222−
223− StandardAnimation {
224− target: labelGroup
225− property: {
226− if (overlay.edge == "right" || overlay.edge == "left") {
227− return "anchors.leftMargin";
228− } else if (overlay.edge == "bottom") {
229− return "anchors.bottomMargin";
230− } else {
231− return "anchors.topMargin";
232− }
233− }
234− from: {
235− if (overlay.edge == "right") {
236− return d.edgeMargin + units.gu(3)
237− } else {
238− return d.edgeMargin - units.gu(3)
239− }
240− }
241− to: d.edgeMargin
242− duration: overlay.edge == "none" ? 0 : UbuntuAnimation.SleepyDuration
243− }
244− StandardAnimation {
245− target: overlay
246− property: "opacity"
247− from: 0.0
248− to: 1.0
249− duration: UbuntuAnimation.SleepyDuration
250− }
251− }
252−
253− SequentialAnimation {
254− id: hintAnimation
255− loops: Animation.Infinite
256− property string prop: (overlay.edge == "left" || overlay.edge == "right") ? "x" : "y"
257− property double endVal: units.dp(5) * ((overlay.edge == "left" || overlay.edge == "top") ? 1 : -1)
258− property double maxGlow: units.dp(20)
259− property int duration: overlay.edge == "none" ? 0 : UbuntuAnimation.SleepyDuration
260−
261− ParallelAnimation {
262− StandardAnimation { target: hintGroup; property: hintAnimation.prop; from: 0; to: hintAnimation.endVal; duration: hintAnimation.duration }
263− StandardAnimation { target: edgeHint; property: "size"; from: 1; to: hintAnimation.maxGlow; duration: hintAnimation.duration }
264− }
265−
266− // Undo the above
267− ParallelAnimation {
268− StandardAnimation { target: hintGroup; property: hintAnimation.prop; from: hintAnimation.endVal; to: 0; duration: hintAnimation.duration }
269− StandardAnimation { target: edgeHint; property: "size"; from: hintAnimation.maxGlow; to: 1; duration: hintAnimation.duration }
270− }
271− }
272− }
273−}
Components/EdgeDragArea.qmldeleted−44
@@ -1,44 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Gestures 0.1
20−
21−/*
22− A DirectionalDragArea wrapper that provides some well-chosen defaults
23− for its gesture recognition parameters.
24−*/
25−DirectionalDragArea {
26−
27− // TODO: Re-evaluate those or even the recognition heuristics itself once
28− // we have gesture cancelling/forwarding in place.
29− //
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: defaultMaxDeviation
33− wideningAngle: defaultWideningAngle
34− distanceThreshold: defaultDistanceThreshold
35− minSpeed: defaultMinSpeed
36− maxSilenceTime: defaultMaxSilenceTime
37−
38− readonly property real defaultMaxDeviation: units.gu(3)
39− readonly property real defaultWideningAngle: 50
40− readonly property real defaultDistanceThreshold: units.gu(1.5)
41− // some people were getting false negatives with it enabled.
42− readonly property real defaultMinSpeed: units.gu(0)
43− readonly property int defaultMaxSilenceTime: 200
44−}
Components/FilterGrid.qmldeleted−112
@@ -1,112 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Utils 0.1
20−import "../Components"
21−
22−/*
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
26− to display all rows.
27− */
28−Item {
29− id: root
30−
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
35−
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
39−
40− property var model: null
41−
42− /* Maximum number of rows to be show when filter=true. */
43− property int collapsedRowCount: 2
44− property int uncollapsedRowCount: Math.ceil(model.count / columns)
45− readonly property int collapsedHeight: {
46− return iconTileGrid.contentHeightForRows(Math.min(collapsedRowCount, Math.ceil(model.count / columns)))
47− }
48− readonly property int uncollapsedHeight: {
49− return iconTileGrid.contentHeightForRows(uncollapsedRowCount)
50− }
51−
52− property alias minimumHorizontalSpacing: iconTileGrid.minimumHorizontalSpacing
53− property alias maximumNumberOfColumns: iconTileGrid.maximumNumberOfColumns
54− property alias columns: iconTileGrid.columns
55− property alias delegateWidth: iconTileGrid.delegateWidth
56− property alias delegateHeight: iconTileGrid.delegateHeight
57− property alias verticalSpacing: iconTileGrid.verticalSpacing
58− readonly property alias margins: iconTileGrid.margins
59− property alias delegate: iconTileGrid.delegate
60− property alias cellWidth: iconTileGrid.cellWidth
61− property alias cellHeight: iconTileGrid.cellHeight
62− property alias delegateCreationBegin: iconTileGrid.delegateCreationBegin
63− property alias delegateCreationEnd: iconTileGrid.delegateCreationEnd
64− readonly property alias flicking: iconTileGrid.flicking
65− readonly property alias moving: iconTileGrid.moving
66− readonly property alias pressDelay: iconTileGrid.pressDelay
67− property alias highlightIndex: iconTileGrid.highlightIndex
68− readonly property alias currentItem: iconTileGrid.currentItem
69−
70− height: !filterAnimation.running ? childrenRect.height : height
71− clip: filterAnimation.running
72−
73− NumberAnimation {
74− property bool filterEndValue
75− id: filterAnimation
76− target: root
77− property: "height"
78− to: filterEndValue ? root.collapsedHeight : root.uncollapsedHeight
79− // Duration and easing here match the ListViewWithPageHeader::m_contentYAnimation
80− // otherwise since both animations can run at the same time you'll get
81− // some visual weirdness.
82− duration: 200
83− easing.type: Easing.InOutQuad
84− onStopped: {
85− root.filter = filterEndValue;
86− }
87− }
88−
89− function startFilterAnimation(filter) {
90− filterAnimation.filterEndValue = filter
91− filterAnimation.start();
92− }
93−
94− ResponsiveGridView {
95− id: iconTileGrid
96−
97− anchors { left: parent.left; right: parent.right }
98− height: totalContentHeight
99− interactive: false
100−
101− minimumHorizontalSpacing: units.gu(0.5)
102− maximumNumberOfColumns: 6
103− delegateWidth: units.gu(11)
104− delegateHeight: units.gu(9.5)
105− verticalSpacing: units.gu(2)
106−
107− model: LimitProxyModel {
108− model: root.model
109− limit: (filter && !filterAnimation.running) ? collapsedRowCount * iconTileGrid.columns : -1
110− }
111− }
112−}
Components/ListItems/Base.qmldeleted−125
@@ -1,125 +0,0 @@
1−/*
2− * Copyright (C) 2012 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−AbstractButton {
21− id: emptyListItem
22− width: parent ? parent.width : units.gu(31)
23− height: body.height + bottomDividerLine.height
24−
25− /*!
26− \preliminary
27− Specifies whether the list item is selected.
28− */
29− property bool selected: false
30−
31− /*!
32− \preliminary
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).
37− */
38− property bool highlightWhenPressed: true
39−
40− /*!
41− \preliminary
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.
44− */
45− property bool showDivider: __showDivider()
46−
47− /*!
48− \internal
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)
54− */
55− function __showDivider() {
56− // if we're not in ListView, always show a thin dividing line at the bottom
57− var model = null;
58− if (typeof ListViewWithPageHeader !== 'undefined') {
59− if (typeof ListViewWithPageHeader.model !== 'undefined') {
60− model = ListViewWithPageHeader.model;
61− }
62− } else if (ListView.view !== null) {
63− model = ListView.view.model;
64− }
65− // if we're last item in ListView don't show divider
66− if (model && index === model.count - 1) return false;
67−
68− return true;
69− }
70−
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)
73−
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;
80− }
81− }
82− }
83− return 0;
84− }
85−
86− /*!
87− \internal
88− Reparent so that the visuals of the children does not
89− occlude the bottom divider line.
90− */
91− default property alias children: body.children
92−
93− Item {
94− id: clippingContainer
95− height: parent.height - __heightToClip
96− anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
97− clip: __heightToClip > 0
98−
99− Item {
100− id: body
101− anchors {
102− left: parent.left
103− right: parent.right
104− bottom: bottomDividerLine.top
105− }
106− height: childrenRect.height
107− }
108−
109− ThinDivider {
110− id: bottomDividerLine
111− anchors.bottom: parent.bottom
112− visible: showDivider
113− }
114−
115− Highlight {
116− anchors {
117− top: parent.top
118− left: parent.left
119− right: parent.right
120− bottom: bottomDividerLine.top
121− }
122− pressed: (emptyListItem.selected || (emptyListItem.highlightWhenPressed && emptyListItem.pressed)) ? "pressed" : ""
123− }
124− }
125−}
Components/ListItems/Header.qmldeleted−84
@@ -1,84 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− /*!
22− \preliminary
23− The text that is shown as the header text.
24− \qmlproperty string text
25− */
26− property alias text: label.text
27− property alias image: image.source
28−
29− signal clicked(variant mouse)
30−
31− height: units.gu(5)
32−
33− Item {
34− anchors {
35− left: parent.left
36− right: parent.right
37− rightMargin: units.gu(0.5)
38− top: parent.top
39− bottom: bottomBorder.top
40− }
41−
42− Label {
43− id: label
44− anchors {
45− left: parent.left
46− leftMargin: units.gu(2)
47− verticalCenter: parent.verticalCenter
48− }
49−
50− color: Theme.palette.selected.backgroundText //at 60%
51− opacity: 0.6
52− font.family: "Ubuntu"
53− fontSize: "medium"
54− elide: Text.ElideRight
55− textFormat: Text.PlainText
56− style: Text.Raised
57− styleColor: "black"
58− width: parent.width - image.width - image.leftMargin - anchors.leftMargin
59− }
60−
61− Image {
62− id: image
63− readonly property double leftMargin: units.gu(1)
64− x: label.x + label.contentWidth + leftMargin
65− anchors {
66− verticalCenter: parent.verticalCenter
67− }
68− }
69− }
70−
71− ThinDivider {
72− id: bottomBorder
73− anchors {
74− left: parent.left
75− right: parent.right
76− bottom: parent.bottom
77− }
78− }
79−
80− MouseArea {
81− anchors.fill: parent
82− onClicked: parent.clicked(mouse)
83− }
84−}
Components/ListItems/Highlight.qmldeleted−46
@@ -1,46 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−Rectangle {
20− id: highlight
21−
22− property bool pressed: false
23− property real pressedOpacity: 0.3
24−
25− color: "black"
26− opacity: 0
27− state: pressed ? "pressed" : ""
28− states: [
29− State {
30− name: "pressed"
31− PropertyChanges { target: highlight; opacity: pressedOpacity}
32− }
33− ]
34− transitions: [
35− Transition {
36− from: ""
37− to: "pressed"
38− NumberAnimation { target: highlight; property: "opacity"; duration: 50}
39− },
40− Transition {
41− from: "pressed"
42− to: ""
43− NumberAnimation { target: highlight; property: "opacity"; duration: 100}
44− }
45− ]
46−}
Components/ListItems/graphics/ListItemDividerHorizontal@18.pngdeleted
Binary file not shown.
Components/ListItems/graphics/ListItemDividerVertical@18.pngdeleted
Binary file not shown.
Components/OpenEffect.qmldeleted−138
@@ -1,138 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−Item {
20− id: effect
21− property bool enabled: topGapPx != positionPx || bottomGapPx != positionPx
22− property alias live: effectSource.live
23− property Item sourceItem
24− property ShaderEffectSource source: ShaderEffectSource {
25− id: effectSource
26− sourceItem: effect.enabled ? effect.sourceItem : null
27− hideSource: effect.enabled
28− live: false
29− sourceRect: {
30− if (effect.enabled) {
31− Qt.rect(0, -effect.topOverflow, sourceItem.width, sourceItem.height + effect.topOverflow + effect.bottomOverflow)
32− } else {
33− Qt.rect(0, 0, 0, 0)
34− }
35− }
36− }
37−
38− onEnabledChanged: if (!live && enabled) scheduleUpdate()
39−
40− /*!
41− \qmlproperty real positionPx
42− The y coordinate of where to perform the split.
43−
44− \qmlproperty real topGapPx
45− Gap's top edge.
46−
47− \qmlproperty real bottomGapPx
48− Gap's bottom edge.
49−
50− \qmlproperty real topOverflow
51− How much of the sourceItem should be sourced above its bounds.
52−
53− \qmlproperty real bottomOverflow
54− How much of the sourceItem should be sourced below its bounds.
55− */
56−
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
64−
65− property real __roundedPositionPx: Math.round(positionPx)
66−
67− function scheduleUpdate() {
68− source.scheduleUpdate();
69− }
70−
71− ShaderEffect {
72− id: top
73− visible: effect.enabled
74− opacity: topOpacity
75− property ShaderEffectSource source: effect.source
76− property real positionPx: __roundedPositionPx
77− property real factor: effect.height / height
78−
79− clip: true
80−
81− anchors {
82− top: parent.top
83− left: parent.left
84− right: parent.right
85− topMargin: -topOverflow - positionPx + topGapPx
86− }
87− height: topOverflow + positionPx
88−
89− vertexShader: "
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;
95−
96− void main() {
97− highp vec4 pos = qt_Vertex;
98− pos.y *= factor;
99− gl_Position = qt_Matrix * pos;
100− qt_TexCoord0 = qt_MultiTexCoord0;
101− }
102− "
103− }
104−
105− ShaderEffect {
106− id: bottom
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
112−
113− clip: true
114−
115− anchors {
116− left: parent.left
117− right: parent.right
118− }
119− y: topOverflow + bottomGapPx
120− height: sourceItem.height - positionPx + bottomOverflow
121−
122− vertexShader: "
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;
129−
130− void main() {
131− highp vec4 pos = qt_Vertex;
132− pos.y = (pos.y * factor) - offset;
133− gl_Position = qt_Matrix * pos;
134− qt_TexCoord0 = qt_MultiTexCoord0;
135− }
136− "
137− }
138−}
Components/PageHeader.qmldeleted−411
@@ -1,411 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.Popups 0.1
20−import Ubuntu.Components.ListItems 0.1 as ListItem
21−import Unity 0.1
22−
23−Item {
24− /*!
25− \preliminary
26− The text that is shown inside the Page Header
27− \qmlproperty string text
28− */
29− property alias text: label.text
30−
31− property bool searchEntryEnabled: false
32− property alias searchQuery: searchField.text
33− property ListModel searchHistory
34− property Scope scope
35−
36− height: units.gu(8.5)
37− implicitHeight: units.gu(8.5)
38−
39− function triggerSearch() {
40− if (searchEntryEnabled) searchField.forceActiveFocus()
41− }
42−
43− function resetSearch() {
44− if (!searchHistory) return;
45−
46− searchHistory.addQuery(searchField.text);
47− unfocus();
48− searchField.text = "";
49− }
50−
51− function unfocus() {
52− searchField.focus = false;
53− }
54−
55− Connections {
56− target: greeter
57− onShownChanged: if (shown) resetSearch()
58− }
59−
60− Flickable {
61− id: header
62− anchors {
63− left: parent.left
64− right: parent.right
65− top: parent.top
66− }
67− height: units.gu(6.5)
68−
69− interactive: false
70− contentHeight: headerContainer.height
71− clip: true
72−
73− contentY: searchField.activeFocus || searchField.text != "" ? searchContainer.y : headerContainer.y
74−
75− Behavior on contentY { NumberAnimation { duration: 200; easing.type: Easing.OutQuad } }
76−
77− // FIXME this could potentially be simplified to avoid all the containers
78− Item {
79− id: headerContainer
80−
81− width: parent.width
82− height: childrenRect.height
83−
84− Item {
85− id: textContainer
86−
87− width: header.width
88− height: header.height
89−
90− Label {
91− id: label
92− anchors {
93− left: parent.left
94− leftMargin: units.gu(2)
95− right: parent.right
96− verticalCenter: parent.verticalCenter
97− }
98−
99− color: Theme.palette.selected.backgroundText
100− opacity: 0.8
101− font.family: "Ubuntu"
102− font.weight: Font.Light
103− fontSize: "x-large"
104− elide: Text.ElideRight
105− style: Text.Raised
106− styleColor: "black"
107− }
108− }
109−
110− Item {
111− id: searchContainer
112− objectName: "searchContainer"
113−
114− visible: searchEntryEnabled
115− property bool popoverShouldOpen: false
116− property bool popoverShouldClose: false
117−
118− property bool narrowMode: parent.width < label.contentWidth + units.gu(50)
119−
120− property bool active: searchField.text != "" || searchField.activeFocus
121− property var popover: null
122−
123− anchors.right: textContainer.right
124− height: header.height
125−
126− state:
127− if (active && narrowMode) "narrowActive"
128− else if (!active && narrowMode) "narrowInactive"
129− else if (active && !narrowMode) "active"
130− else if (!active && !narrowMode) "inactive"
131−
132− onStateChanged: {
133− if (state == "active" || state == "narrowActive") {
134− popoverShouldOpen = true;
135− popoverShouldClose = false;
136− } else {
137− popoverShouldOpen = false;
138− popoverShouldClose = true;
139− }
140− }
141−
142− function openPopover() {
143− if (searchHistory.count > 0) {
144− searchContainer.popover = PopupUtils.open(popoverComponent, searchField,
145− {
146− "pointerTarget": pointerPositioner,
147− "contentWidth": searchField.width,
148− "edgeMargins": units.gu(1)
149− }
150− )
151− }
152− popoverShouldOpen = false;
153− popoverShouldClose = false;
154− }
155−
156− function closePopover() {
157− if (searchContainer.popover) {
158− PopupUtils.close(searchContainer.popover);
159− searchContainer.popover = null;
160− }
161− popoverShouldOpen = false;
162− popoverShouldClose = false;
163− }
164−
165− onActiveFocusChanged: if (!activeFocus) { searchHistory.addQuery(searchField.text) }
166−
167− TextField {
168− id: searchField
169−
170− anchors.fill: parent
171− anchors.margins: units.gu(1)
172−
173− hasClearButton: false
174−
175− primaryItem: AbstractButton {
176− enabled: searchField.text != "" && !searchIndicator.running
177− onClicked: {
178− if (searchField.text != "") {
179− searchHistory.addQuery(searchField.text)
180− searchField.text = ""
181− }
182− }
183− height: parent.height
184− width: height
185−
186− ActivityIndicator {
187− id: searchIndicator
188− objectName: "searchIndicator"
189−
190− anchors {
191− verticalCenter: parent.verticalCenter
192− left: parent.left
193− leftMargin: units.gu(0.5)
194− }
195−
196− running: opacity > 0
197− }
198−
199− Image {
200− id: primaryImage
201− objectName: "primaryImage"
202− anchors {
203− verticalCenter: parent.verticalCenter
204− left: parent.left
205− leftMargin: units.gu(0.5)
206− }
207− width: units.gu(3)
208− height: units.gu(3)
209− visible: opacity > 0
210− }
211−
212− Item {
213− id: pointerPositioner
214− anchors.left: parent.right
215− anchors.leftMargin: units.gu(0.5)
216− anchors.top: parent.bottom
217− }
218− }
219−
220− onTextChanged: {
221− if (text != "") searchContainer.closePopover()
222− else if (text == "" && activeFocus) searchContainer.openPopover()
223− }
224−
225− onActiveFocusChanged: {
226− if (!activeFocus) searchContainer.closePopover()
227− }
228−
229− states: [
230− State {
231− name: "searching"
232− when: scope && scope.searchInProgress
233− PropertyChanges { target: searchIndicator; running: true; opacity: 1 }
234− PropertyChanges { target: primaryImage; opacity: 0 }
235− },
236− State {
237− name: "idle"
238− when: !scope || !scope.searchInProgress
239− PropertyChanges { target: searchIndicator; opacity: 0 }
240− PropertyChanges { target: primaryImage; opacity: 1 }
241− }
242− ]
243−
244− transitions: [
245− Transition {
246− to: "searching"
247− reversible: true
248− SequentialAnimation {
249− NumberAnimation { target: primaryImage; property: "opacity"; duration: UbuntuAnimation.FastDuration; easing.type: Easing.Linear }
250− NumberAnimation { target: searchIndicator; property: "opacity"; duration: UbuntuAnimation.FastDuration; easing.type: Easing.Linear }
251− }
252− }
253− ]
254− }
255−
256− states: [
257− State {
258− name: "wide"
259− AnchorChanges { target: textContainer; anchors.top: headerContainer.top }
260− AnchorChanges { target: searchContainer; anchors.left: undefined; anchors.top: textContainer.top }
261− },
262− State {
263− name: "narrow"
264− PropertyChanges { target: searchField; highlighted: true }
265− AnchorChanges { target: textContainer; anchors.top: searchContainer.bottom }
266− AnchorChanges { target: searchContainer; anchors.left: headerContainer.left; anchors.top: headerContainer.top }
267− },
268− State {
269− name: "active"
270− extend: "wide"
271− PropertyChanges { target: searchContainer; width: units.gu(40) }
272− PropertyChanges { target: primaryImage; source: searchField.text ? "../Dash/graphics/icon_clear.png" : "../Dash/graphics/icon_search_active.png" }
273− PropertyChanges { target: searchField; highlighted: true }
274− },
275− State {
276− name: "inactive"
277− extend: "wide"
278− PropertyChanges { target: searchContainer; width: units.gu(25) }
279− PropertyChanges { target: primaryImage; source: "../Dash/graphics/icon_search_inactive.png" }
280− PropertyChanges { target: searchField; highlighted: false }
281− },
282− State {
283− name: "narrowActive"
284− extend: "narrow"
285− PropertyChanges { target: header; contentY: 0 }
286− PropertyChanges { target: primaryImage; source: searchField.text ? "../Dash/graphics/icon_clear.png" : "../Dash/graphics/icon_search_active.png" }
287− },
288− State {
289− name: "narrowInactive"
290− extend: "narrow"
291− PropertyChanges { target: header; contentY: header.height }
292− PropertyChanges { target: primaryImage; source: searchField.text ? "../Dash/graphics/icon_clear.png" : "../Dash/graphics/icon_search_active.png" }
293− }
294− ]
295−
296− transitions: [
297− Transition {
298− to: "active"
299− SequentialAnimation {
300− ParallelAnimation {
301− NumberAnimation { targets: [searchContainer, searchField]; property: "width"; duration: 200; easing.type: Easing.InOutQuad }
302− PropertyAction { target: primaryImage; property: "source" }
303− AnchorAnimation { targets: [searchContainer, textContainer]; duration: 200; easing.type: Easing.InOutQuad }
304− }
305− ScriptAction { script: if (searchContainer.popoverShouldOpen) { searchContainer.openPopover(); } }
306− }
307− },
308− Transition {
309− to: "inactive"
310− ScriptAction { script: if (searchContainer.popoverShouldClose) { searchContainer.closePopover(); } }
311− NumberAnimation { targets: [searchContainer, searchField] ; property: "width"; duration: 200; easing.type: Easing.InOutQuad }
312− AnchorAnimation { targets: [searchContainer, textContainer]; duration: 200; easing.type: Easing.InOutQuad }
313− },
314− Transition {
315− to: "narrowActive"
316− SequentialAnimation {
317− ParallelAnimation {
318− NumberAnimation { targets: [searchContainer, searchField] ; property: "width"; duration: 200; easing.type: Easing.OutQuad }
319− AnchorAnimation { targets: [searchContainer, textContainer]; duration: 200; easing.type: Easing.InOutQuad }
320− }
321− ScriptAction { script: if (searchContainer.popoverShouldOpen) { searchContainer.openPopover(); } }
322− }
323− },
324− Transition {
325− to: "narrowInactive"
326− ScriptAction { script: if (searchContainer.popoverShouldClose) { searchContainer.closePopover(); } }
327− NumberAnimation { targets: [searchContainer, searchField] ; property: "width"; duration: 200; easing.type: Easing.OutQuad }
328− AnchorAnimation { targets: [searchContainer, textContainer]; duration: 200; easing.type: Easing.InOutQuad }
329− }
330− ]
331−
332− Component {
333− id: popoverComponent
334− Popover {
335− id: popover
336−
337− // FIXME: this should go into the first item below, but enable: false
338− // prevents mouse events propagation
339− AbstractButton {
340− anchors {
341− top: parent.top
342− right: parent.right
343− }
344− height: units.gu(6)
345− width: height
346−
347− onClicked: searchContainer.closePopover()
348−
349− Image {
350− anchors.centerIn: parent
351− width: units.gu(2)
352− height: units.gu(2)
353− source: "../Dash/graphics/icon_listview_clear.png"
354− }
355− }
356−
357− Column {
358− anchors {
359− top: parent.top
360− left: parent.left
361− right: parent.right
362− }
363−
364− ListItem.Standard { enabled: false; text: i18n.tr("Recent searches") }
365−
366− Repeater {
367− id: recentSearches
368− model: searchHistory
369−
370− delegate: ListItem.Standard {
371− showDivider: index < recentSearches.count - 1
372− text: query
373− onClicked: {
374− searchHistory.addQuery(text)
375− searchField.text = text
376− }
377− }
378− }
379− }
380− }
381− }
382−
383− InverseMouseArea {
384− enabled: searchField.activeFocus
385−
386− anchors {
387− top: parent.top
388− left: parent.left
389− right: parent.right
390− }
391−
392− height: searchContainer.popover ? parent.height + searchContainer.popover.contentHeight + units.gu(2) : parent.height
393−
394− onPressed: searchField.focus = false
395− }
396− }
397− }
398− }
399−
400− BorderImage {
401− id: bottomBorder
402− anchors {
403− top: header.bottom
404− left: parent.left
405− right: parent.right
406− bottom: parent.bottom
407− }
408−
409− source: "graphics/PageHeaderBaseDivider.sci"
410− }
411−}
Components/PinPadButton.qmldeleted−75
@@ -1,75 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: root
22−
23− property alias text: label.text
24− property alias subText: subTextLabel.text
25− property string iconName
26−
27− signal clicked()
28−
29− Column {
30− anchors.centerIn: parent
31− width: parent.width
32− height: childrenRect.height
33−
34− Item {
35− anchors {
36− left: parent.left
37− right: parent.right
38− }
39− height: label.visible || icon.visible ? Math.max(label.height, icon.height) : 0
40−
41− Label {
42− id: label
43− anchors.centerIn: parent
44− width: parent.width
45− horizontalAlignment: Text.AlignHCenter
46− color: "#f3f3e7"
47− fontSize: "large"
48− font.weight: Font.DemiBold
49− visible: text.length > 0
50− }
51−
52− Icon {
53− id: icon
54− height: units.gu(3)
55− width: height
56− anchors.centerIn: parent
57− name: root.iconName
58− color: "#f3f3e7"
59− visible: name.length > 0
60− }
61− }
62− Label {
63− id: subTextLabel
64− fontSize: "small"
65− color: "grey"
66− anchors.horizontalCenter: parent.horizontalCenter
67− visible: text.length > 0
68− }
69− }
70−
71− MouseArea {
72− anchors.fill: parent
73− onClicked: root.clicked()
74− }
75−}
Components/RatingStars.qmldeleted−41
@@ -1,41 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−Row {
20− id: root
21− property int rating
22− property int maximumRating: 5
23− property int starCount: 5
24− height: childrenRect.height
25− width: childrenRect.width
26−
27− readonly property int effectiveRating: Math.max(0, Math.min(root.starCount * root.rating / root.maximumRating, root.maximumRating))
28−
29− Repeater {
30− model: root.effectiveRating
31− Image {
32− source: "graphics/icon_star_on.png"
33− }
34− }
35− Repeater {
36− model: root.starCount - root.effectiveRating
37− Image {
38− source: "graphics/icon_star_off.png"
39− }
40− }
41−}
Components/ResponsiveFlowView.qmldeleted−81
@@ -1,81 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: root
22−
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
36−
37− height: flow.height + flow.anchors.topMargin
38−
39− Flow {
40− id: flow
41− anchors {
42− left: parent.left
43− right: parent.right
44− top: parent.top
45− leftMargin: margin/2
46− rightMargin: margin/2
47− topMargin: verticalSpacing
48− }
49−
50− function pixelToGU(value) {
51− return Math.floor(value / units.gu(1));
52− }
53−
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);
58− }
59−
60− function columnsForSpacing(space) {
61− // minimum margin is half of the spacing
62− return Math.floor((parent.width - space/2) / (referenceDelegateWidth + space));
63− }
64−
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
70−
71− Repeater {
72− id: repeater1
73− model: (root.model) ? root.model[0] : null
74− }
75− Repeater {
76− id: repeater2
77− model: (root.model) ? root.model[1] : null
78− delegate: repeater1.delegate
79− }
80− }
81−}
Components/ResponsiveGridView.qmldeleted−94
@@ -1,94 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−/*
21− Essentially a GridView where you can specify the maximum number of columns it can have.
22− */
23−Item {
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− readonly property alias margins: gridView.margin
30− property int delegateWidth
31− property int delegateHeight
32− property alias model: gridView.model
33− property alias delegate: gridView.delegate
34− readonly property int cellWidth: gridView.cellWidth
35− readonly property int cellHeight: gridView.cellHeight
36− readonly property int totalContentHeight: {
37− return contentHeightForRows(Math.ceil(gridView.model.count / columns))
38− }
39− property alias interactive: gridView.interactive
40− readonly property alias flicking: gridView.flicking
41− readonly property alias moving: gridView.moving
42− readonly property alias pressDelay: gridView.pressDelay
43− property alias delegateCreationBegin: gridView.delegateCreationBegin
44− property alias delegateCreationEnd: gridView.delegateCreationEnd
45− property alias highlightIndex: gridView.highlightIndex
46− readonly property alias currentItem: gridView.currentItem
47−
48− function contentHeightForRows(rows) {
49− return rows * cellHeight + verticalSpacing
50− }
51−
52− GridView {
53− id: gridView
54− objectName: "responsiveGridViewGrid"
55− anchors {
56− fill: parent
57− leftMargin: margin/2
58− rightMargin: margin/2
59− topMargin: verticalSpacing
60− }
61− clip: parent.height != totalContentHeight
62−
63− function pixelToGU(value) {
64− return Math.floor(value / units.gu(1));
65− }
66−
67− function spacingForColumns(columns) {
68− // spacing between columns as an integer number of GU, the remainder goes in the margins
69− var spacingGU = pixelToGU(allocatableHorizontalSpace / columns);
70− return units.gu(spacingGU);
71− }
72−
73− function columnsForSpacing(spacing) {
74− // minimum margin is half of the spacing
75− return Math.max(1, Math.floor((parent.width - spacing/2) / (delegateWidth + spacing)));
76− }
77−
78− property real allocatableHorizontalSpace: parent.width - columns * delegateWidth
79− property int columns: Math.min(columnsForSpacing(minimumHorizontalSpacing), maximumNumberOfColumns)
80− property real horizontalSpacing: spacingForColumns(columns)
81− property real verticalSpacing: horizontalSpacing
82− property int margin: allocatableHorizontalSpace - columns * horizontalSpacing
83− property int highlightIndex: -1
84−
85− cellWidth: delegateWidth + horizontalSpacing
86− cellHeight: delegateHeight + verticalSpacing
87−
88− onHighlightIndexChanged: {
89− if (highlightIndex != -1) {
90− currentIndex = highlightIndex
91− }
92− }
93− }
94−}
Components/Revealer.qmldeleted−241
@@ -1,241 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: revealer
22−
23− property Showable target
24− property var hintingAnimation: hintingAnimation
25− property string boundProperty: orientation == Qt.Vertical ? "y" : "x"
26− property int orientation: Qt.Vertical
27− property int direction: Qt.LeftToRight
28− property real openedValue: orientation == Qt.Vertical ? y : x
29− property real closedValue: orientation == Qt.Vertical ? y + (direction == Qt.LeftToRight ? -height : height) : x + (direction == Qt.LeftToRight ? -width : width)
30− property real hintDisplacement: 0
31− property real handleSize: units.gu(2)
32− property real dragVelocity: draggingArea.dragVelocity != 0 ? Math.abs(draggingArea.dragVelocity) : -1
33− property real dragVelocityThreshold: units.gu(5)
34− property bool dragging: false
35− property bool pressed: draggingArea.pressed
36− property int lateralPosition: draggingArea.lateralPosition
37− property real dragPosition
38− property bool openOnPress: true
39−
40− signal openPressed(int mouseX, int mouseY)
41− signal openReleased(int mouseX, int mouseY)
42− signal closePressed
43− signal openClicked
44− signal closeClicked
45−
46− dragPosition: {
47− var value
48− if (orientation == Qt.Vertical) {
49− value = draggingArea.dragValue + draggingArea.y
50− if (direction == Qt.RightToLeft) {
51− value += draggingArea.height - height
52− }
53− } else {
54− value = draggingArea.dragValue + draggingArea.x
55− if (direction == Qt.RightToLeft) {
56− value += draggingArea.width - width
57− }
58− }
59− if (__opened) {
60− if (direction == Qt.LeftToRight) {
61− value += handleSize
62− } else {
63− value -= handleSize
64− }
65− } else if (dragging) {
66− if (direction == Qt.LeftToRight) {
67− value += hintDisplacement
68− } else {
69− value -= hintDisplacement
70− }
71− }
72−
73− return value
74− }
75− property var draggingArea: leftDraggingArea.enabled ? leftDraggingArea : rightDraggingArea
76−
77− property real __hintValue: closedValue + (direction == Qt.LeftToRight ? hintDisplacement : -hintDisplacement)
78−
79− function dragToValue(dragPosition) {
80− return dragPosition + closedValue
81− }
82−
83− property bool __opened: target.shown
84− enabled: target.available
85−
86− // Can be replaced with a fake implementation during tests
87− // property var __getCurrentTimeMs: function () { return new Date().getTime() }
88− property var __dateTime: new function() {
89− this.getCurrentTimeMs = function() {return new Date().getTime()}
90− }
91−
92− Component.onCompleted: target[boundProperty] = __opened ? openedValue : closedValue
93− onOpenedValueChanged: if (__opened && !dragging) target[boundProperty] = openedValue
94− onClosedValueChanged: if (!__opened && !dragging) target[boundProperty] = closedValue
95−
96− function __computeValue(dragPosition) {
97− return MathUtils.clamp(dragToValue(dragPosition), __hintValue, openedValue)
98− }
99−
100− function __open() {
101− hintingAnimation.stop()
102− target.show()
103− }
104−
105− function __close() {
106− hintingAnimation.stop()
107− target.hide()
108− }
109−
110− function __hint() {
111− target.showAnimation.stop()
112− target.hideAnimation.stop()
113− hintingAnimation.restart()
114− }
115−
116− function __settle() {
117− hintingAnimation.stop()
118− if (__opened) target.show()
119− else target.hide()
120− }
121−
122− function __startDragging() {
123− hintingAnimation.stop()
124− dragging = true
125− }
126−
127− function __endDragging(dragVelocity) {
128− dragging = false
129− if (revealer.direction == Qt.RightToLeft) {
130− dragVelocity = -dragVelocity
131− }
132− if (Math.abs(dragVelocity) >= dragVelocityThreshold) {
133− if (dragVelocity > 0) __open()
134− else __close()
135− } else {
136− __settle()
137− }
138− }
139−
140− Binding {
141− id: dragBinding
142−
143− target: revealer.target
144− property: revealer.boundProperty
145− value: __computeValue(dragPosition)
146− when: dragging
147− }
148−
149− SmoothedAnimation {
150− id: hintingAnimation
151−
152− target: revealer.target
153− property: revealer.boundProperty
154− duration: 150
155− to: revealer.__hintValue
156− }
157−
158− DraggingArea {
159− id: leftDraggingArea
160−
161− property bool isOpeningArea: revealer.direction == Qt.LeftToRight
162−
163− height: orientation == Qt.Vertical ? handleSize : parent.height
164− width: orientation == Qt.Horizontal ? handleSize : parent.width
165− orientation: revealer.orientation
166− enabled: isOpeningArea ? !revealer.__opened : revealer.__opened
167−
168− __dateTime: revealer.__dateTime
169−
170− onPressed: {
171− if (isOpeningArea) {
172− if (revealer.openOnPress) {
173− revealer.openPressed(mouseX, mouseY)
174− __hint()
175− }
176− } else {
177− revealer.closePressed()
178− }
179− }
180− onReleased: {
181− if (isOpeningArea && revealer.openOnPress) {
182− revealer.openReleased(mouseX, mouseY)
183− __settle()
184− }
185− }
186− onDragStart: __startDragging()
187− onDragEnd: __endDragging(dragVelocity)
188− onClicked: {
189− if (clickValidated) {
190− if (isOpeningArea) {
191− if (revealer.openOnPress) revealer.openClicked()
192− } else {
193− revealer.closeClicked()
194− }
195− }
196− }
197− }
198−
199− DraggingArea {
200− id: rightDraggingArea
201−
202− property bool isOpeningArea: revealer.direction == Qt.RightToLeft
203−
204− x: orientation == Qt.Vertical ? 0 : parent.width - width
205− y: orientation == Qt.Vertical ? parent.height - height : 0
206− height: orientation == Qt.Vertical ? handleSize : parent.height
207− width: orientation == Qt.Horizontal ? handleSize : parent.width
208− orientation: revealer.orientation
209− enabled: isOpeningArea ? !revealer.__opened : revealer.__opened
210−
211− __dateTime: revealer.__dateTime
212−
213− onPressed: {
214− if (isOpeningArea) {
215− if (revealer.openOnPress) {
216− revealer.openPressed(mouseX, mouseY)
217− __hint()
218− }
219− } else {
220− revealer.closePressed()
221− }
222− }
223− onReleased: {
224− if (isOpeningArea && revealer.openOnPress) {
225− revealer.openReleased(mouseX, mouseY)
226− __settle()
227− }
228− }
229− onDragStart: __startDragging()
230− onDragEnd: __endDragging(dragVelocity)
231− onClicked: {
232− if (clickValidated) {
233− if (isOpeningArea) {
234− if (revealer.openOnPress) revealer.openClicked()
235− } else {
236− revealer.closeClicked()
237− }
238− }
239− }
240− }
241−}
Components/Stage.qmldeleted−563
@@ -1,563 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Unity.Application 0.1
19−import Ubuntu.Components 0.1
20−import Ubuntu.Gestures 0.1
21−
22−/*
23− Responsible for application switching.
24−
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).
29− */
30−Showable {
31− id: stage
32−
33− width: units.gu(40)
34− height: units.gu(71)
35−
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
47−
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;
53− } else {
54− return newApplicationScreenshot.ready || oldApplicationScreenshot.ready;
55− }
56− }
57−
58− property bool rightEdgeEnabled: true
59− property bool switchingFromFullscreenToFullscreen: false
60−
61− property alias rightEdgeDraggingAreaWidth: rightEdgeDraggingArea.width
62−
63− // Y coordinate for non-fullscreen applications
64− property int normalApplicationY: 0
65−
66− function activateApplication(desktopFile, addDelay) {
67− var application = applicationManager.getApplicationFromDesktopFile(desktopFile, stage.type);
68− if (application != null && application == stage.focusedApplication) {
69− stage.show();
70− return;
71− }
72−
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;
77− stage.show();
78− } else {
79− showStartingApplicationAnimation.start();
80− }
81−
82− if (addDelay) {
83− stage.__startingApplicationDesktopFile = desktopFile;
84− }
85− }
86−
87− Connections {
88− target: applicationManager
89− onFocusRequested: activateApplication(appId)
90− }
91−
92− /* Keep a reference to the focused application so that we can safely
93− unfocus it when the stage is not fully shown and refocus it when the stage
94− is fully shown again.
95− */
96− property var focusedApplicationWhenUsingScreenshots
97− onShouldUseScreenshotsChanged: {
98− if (showStartingApplicationAnimation.running || switchToApplicationAnimation.running) {
99− return;
100− }
101−
102− if (shouldUseScreenshots) {
103− stage.__focusApplicationUsingScreenshots(stage.focusedApplication);
104− } else {
105− if (stage.focusedApplicationWhenUsingScreenshots) {
106− stage.__focusActualApplication(stage.focusedApplicationWhenUsingScreenshots);
107− }
108− }
109− }
110−
111−
112− property Item newApplicationScreenshot: ApplicationScreenshot {
113− parent: stage
114− width: stage.width
115− height: stage.height - y
116− }
117− property Item oldApplicationScreenshot: ApplicationScreenshot {
118− parent: stage
119− width: stage.width
120− height: stage.height - y
121− }
122−
123− function __getApplicationIndex(application) {
124− if (!application)
125− return -1
126− for (var i = 0; i < stage.applications.count; i++ ) {
127− if (stage.applications.get(i).desktopFile == application.desktopFile) {
128− return i
129− }
130− }
131− return -1
132− }
133−
134−
135− property string __startingApplicationDesktopFile
136−
137− Timer {
138− id: delayedHideScreenshots
139− interval: 500 // on Galaxy Nexus, Telephony app is slowest application to draw a frame so needs this delay
140− onTriggered: {
141− __hideScreenshots();
142− }
143− }
144−
145− function __hideScreenshots() {
146− newApplicationScreenshot.clearApplication();
147− oldApplicationScreenshot.clearApplication();
148− newApplicationScreenshot.visible = false;
149− oldApplicationScreenshot.visible = false;
150− }
151−
152− function __focusApplication(application) {
153− if (!application) return
154− if (shouldUseScreenshots) {
155− stage.__focusApplicationUsingScreenshots(application);
156− } else {
157− stage.__focusActualApplication(application);
158− }
159− }
160−
161−
162− function __focusActualApplication(application) {
163− if (application == null) {
164− return;
165− }
166−
167− if (stage.focusedApplication == application) {
168− /* FIXME: this case is reached when showing the sidestage, we
169− need to refocus the side stage app in order to show it.
170− FIXME: this case is reached when doing a right edge swipe
171− while in the dash to bring back the stage.
172− FIXME: this case is reached when showStartingApplicationAnimation
173− finishes after the newly started application has been focused
174− automatically by the ApplicationManager.
175− */
176− if (stage.type == ApplicationInfo.SideStage) {
177− applicationManager.focusApplication(application);
178− }
179− if (!delayedHideScreenshots.running) {
180− stage.__hideScreenshots();
181− }
182− } else {
183− /* FIXME: calling ApplicationManager::focusApplication does not focus
184− the application immediately nor show the application's surface
185− immediately. Delay hiding the screenshots until it has done so.
186− */
187− delayedHideScreenshots.stop();
188− applicationManager.focusApplication(application);
189− }
190− stage.focusedApplicationWhenUsingScreenshots = null;
191− }
192−
193− function __focusApplicationUsingScreenshots(application) {
194− delayedHideScreenshots.stop();
195− if (application == null) {
196− return;
197− }
198−
199− if (newApplicationScreenshot.application != null) {
200− stage.focusedApplicationWhenUsingScreenshots = application;
201− return;
202− }
203−
204− newApplicationScreenshot.setApplication(application);
205− newApplicationScreenshot.scheduleUpdate();
206− newApplicationScreenshot.opacity = 1.0;
207− newApplicationScreenshot.x = 0.0;
208− newApplicationScreenshot.y = __getApplicationY(application);
209− newApplicationScreenshot.scale = 1.0;
210− newApplicationScreenshot.visible = true;
211− stage.focusedApplicationWhenUsingScreenshots = application;
212− stage.switchingFromFullscreenToFullscreen = false;
213− }
214−
215− function __getApplicationY(application) {
216− return Qt.binding( function(){
217− return (application && application.fullscreen
218− && application.stage !== ApplicationInfo.SideStage)
219− ? 0 : normalApplicationY;
220− } )
221− }
222−
223− /* FIXME: should hide the screenshots when the focused application's surface
224− is visible. There is no API in QtUbuntu to support that yet.
225− */
226− Connections {
227− target: stage
228− onFocusedApplicationChanged: {
229− if (stage.focusedApplication != null) {
230− /* Move application to the beginning of the list of running applications */
231− var index = stage.__getApplicationIndex(stage.focusedApplication);
232− applicationManager.moveRunningApplicationStackPosition(index, 0, stage.type);
233−
234− var startingApplication = applicationManager.getApplicationFromDesktopFile(
235− stage.__startingApplicationDesktopFile, stage.type);
236−
237− if (stage.focusedApplication == startingApplication) {
238− stage.__startingApplicationDesktopFile = "";
239−
240− /* Screenshots might still be in use at this point and their
241− use can be stopped before delayedHideScreenshots is complete.
242− Prepare for that case by setting appropriately
243− stage.focusedApplicationWhenUsingScreenshots.
244− */
245− stage.focusedApplicationWhenUsingScreenshots = stage.focusedApplication;
246−
247− /* FIXME: should hide the screenshots when the focused application's window
248− is visible. There is no API in qtubuntu to support that yet. Therefore
249− we delay their hiding to avoid a state where neither the screenshot nor
250− the application's window is visible.
251− */
252− delayedHideScreenshots.start();
253− } else {
254− stage.focusedApplicationWhenUsingScreenshots = null;
255− stage.__hideScreenshots();
256− }
257− }
258− }
259− }
260−
261− Connections {
262− target: stage.applications
263− onCountChanged: { __discardObsoleteScreenshots(); }
264− ignoreUnknownSignals: true
265− }
266− onFullyHiddenChanged: { __discardObsoleteScreenshots(); }
267− function __discardObsoleteScreenshots() {
268− if (stage.fullyHidden && stage.applications && stage.applications.count == 0) {
269− stage.focusedApplicationWhenUsingScreenshots = undefined;
270− stage.__hideScreenshots();
271− }
272− }
273−
274−
275− SequentialAnimation {
276− id: showStartingApplicationAnimation
277−
278− function prepare(newApplication) {
279− var oldApplication = stage.focusedApplication;
280− newApplicationScreenshot.setApplication(newApplication);
281− newApplicationScreenshot.updateFromCache();
282− oldApplicationScreenshot.setApplication(oldApplication);
283− oldApplicationScreenshot.scheduleUpdate();
284− newApplicationScreenshot.withBackground = true; // FIXME: should be withBackground = newApplication.state == Application.Starting
285− newApplicationScreenshot.y = __getApplicationY(newApplication);
286− oldApplicationScreenshot.y = __getApplicationY(oldApplication);
287− stage.focusedApplicationWhenUsingScreenshots = newApplication;
288− stage.switchingFromFullscreenToFullscreen = false;
289− }
290−
291− PropertyAction {target: newApplicationScreenshot; property: "visible"; value: false}
292− PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: false}
293− PropertyAction {target: newApplicationScreenshot; property: "z"; value: 0}
294− PropertyAction {target: oldApplicationScreenshot; property: "z"; value: 1}
295− PropertyAction {target: newApplicationScreenshot; property: "scale"; value: 0.8}
296− PropertyAction {target: oldApplicationScreenshot; property: "scale"; value: 1.0}
297− PropertyAction {target: newApplicationScreenshot; property: "opacity"; value: 0.0}
298− PropertyAction {target: oldApplicationScreenshot; property: "opacity"; value: 1.0}
299− PropertyAction {target: newApplicationScreenshot; property: "x"; value: 0.0}
300− PropertyAction {target: oldApplicationScreenshot; property: "x"; value: 0.0}
301−
302− ParallelAnimation {
303− PropertyAction {target: newApplicationScreenshot; property: "visible"; value: true}
304− NumberAnimation {
305− target: newApplicationScreenshot
306− property: "scale"
307− duration: 500
308− easing.type: Easing.OutQuad
309− to: 1.0
310− }
311− NumberAnimation {
312− target: newApplicationScreenshot
313− property: "opacity"
314− duration: 500
315− easing.type: Easing.OutQuad
316− to: 1.0
317− }
318−
319− PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: true}
320−
321− NumberAnimation {
322− target: oldApplicationScreenshot
323− property: "x"
324− duration: 400
325− easing.type: Easing.OutQuad
326− to: stage.width
327− }
328− }
329−
330− ScriptAction {
331− script: {
332− if (!stage.focusedApplicationWhenUsingScreenshots) {
333− // FIXME: only here to support case where application does
334− // not exist yet but is about to
335− return;
336− }
337−
338− stage.__focusApplication(stage.focusedApplicationWhenUsingScreenshots);
339− }
340− }
341− }
342−
343−
344− SequentialAnimation {
345− id: switchToApplicationAnimation
346−
347− function prepare(newApplication) {
348− var oldApplication = stage.focusedApplication;
349− newApplicationScreenshot.setApplication(newApplication);
350− newApplicationScreenshot.updateFromCache();
351− oldApplicationScreenshot.setApplication(oldApplication);
352− oldApplicationScreenshot.scheduleUpdate();
353− newApplicationScreenshot.withBackground = false;
354− newApplicationScreenshot.y = __getApplicationY(newApplication);
355− oldApplicationScreenshot.y = __getApplicationY(oldApplication);
356− stage.focusedApplicationWhenUsingScreenshots = newApplication;
357− stage.switchingFromFullscreenToFullscreen = newApplication && newApplication.fullscreen;
358− }
359−
360− PropertyAction {target: newApplicationScreenshot; property: "visible"; value: false}
361− PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: false}
362− PropertyAction {target: newApplicationScreenshot; property: "z"; value: 1}
363− PropertyAction {target: oldApplicationScreenshot; property: "z"; value: 0}
364− PropertyAction {target: newApplicationScreenshot; property: "scale"; value: 1.0}
365− PropertyAction {target: oldApplicationScreenshot; property: "scale"; value: 1.0}
366− PropertyAction {target: newApplicationScreenshot; property: "opacity"; value: 1.0}
367− PropertyAction {target: oldApplicationScreenshot; property: "opacity"; value: 1.0}
368− PropertyAction {target: newApplicationScreenshot; property: "x"; value: stage.width}
369− PropertyAction {target: oldApplicationScreenshot; property: "x"; value: 0.0}
370− PropertyAction {target: newApplicationScreenshot; property: "visible"; value: true}
371− PropertyAction {target: oldApplicationScreenshot; property: "visible"; value: true}
372−
373− ParallelAnimation {
374− NumberAnimation {
375− target: oldApplicationScreenshot
376− property: "scale"
377− duration: 500
378− easing.type: Easing.OutQuad
379− to: 0.8
380− }
381− NumberAnimation {
382− target: oldApplicationScreenshot
383− property: "opacity"
384− duration: 500
385− easing.type: Easing.OutQuad
386− to: 0.0
387− }
388−
389− NumberAnimation {
390− target: newApplicationScreenshot
391− property: "x"
392− duration: 500
393− easing.type: Easing.OutQuad
394− to: 0
395− }
396− }
397−
398− ScriptAction {
399− script: {
400− // move previously focused application to the end of the list of running applications
401− var oldApplication = oldApplicationScreenshot.application;
402− if (oldApplication != null) {
403− var oldApplicationIndex = stage.__getApplicationIndex(oldApplicationScreenshot.application);
404− applicationManager.moveRunningApplicationStackPosition(
405− oldApplicationIndex, stage.applications.count - 1, stage.type);
406− }
407−
408− stage.__focusApplication(stage.focusedApplicationWhenUsingScreenshots);
409− }
410− }
411− }
412−
413−
414− function __dragValueToProgress(dragValue, startValue, applicationsCount) {
415− if (applicationsCount == 0) {
416− return 0;
417− } else if (applicationsCount == 1) {
418− // prevent the current app from moving more than 1/4 of the screen
419− var elasticValue = __elastic(dragValue, startValue/4);
420− return elasticValue / startValue;
421− } else {
422− return dragValue / startValue;
423− }
424− }
425−
426− function __elastic(x, limit) {
427− return limit * ( 1 - Math.pow( ( limit - 1 ) / limit, x ) )
428− }
429−
430− property real __startValue: stage.width
431−
432− AnimationControllerWithSignals {
433− id: switchToApplicationAnimationController
434−
435− onAnimationCompletedAtBeginning: {
436− animation = null;
437− stage.__focusApplication(oldApplicationScreenshot.application);
438− }
439− }
440−
441− EdgeDragEvaluator {
442− id: dragEvaluator
443− trackedPosition: rightEdgeDraggingArea.touchX
444− direction: rightEdgeDraggingArea.direction
445− maxDragDistance: stage.width
446− }
447−
448− EdgeDragArea {
449− id: rightEdgeDraggingArea
450−
451− enabled: {
452− if (status == DirectionalDragArea.WaitingForTouch) {
453− return switchToApplicationAnimationController.completed
454− && stage.applications.count > 0 && stage.rightEdgeEnabled
455− && !delayedHideScreenshots.running
456− } else {
457− return true
458− }
459− }
460− width: units.gu(2)
461− anchors.top: parent.top
462− anchors.bottom: parent.bottom
463− anchors.right: parent.right
464−
465− direction: Direction.Leftwards
466−
467− onDistanceChanged: {
468− if (status !== DirectionalDragArea.Recognized)
469− return
470−
471− var targetProgress = __dragValueToProgress(-distance, __startValue,
472− stage.applications.count)
473− var delta = targetProgress - switchToApplicationAnimationController.progress
474−
475− // When the gesture finally gets recognized, the finger will likely be
476− // reasonably far from the edge. If we made the progress immediately
477− // follow the finger position it would be visually unpleasant as there
478− // would be a jump to meet the finger's current position.
479− //
480− // The trick is not to go all the way (1.0) as it would cause the
481− // aforementioned jump.
482− switchToApplicationAnimationController.progress += 0.4 * delta
483− }
484−
485− property int lastStatus: -1
486−
487− onStatusChanged: {
488− if (status == DirectionalDragArea.Undecided) {
489− onUndecided();
490− } else if (status == DirectionalDragArea.WaitingForTouch) {
491− if (lastStatus == DirectionalDragArea.Undecided) {
492− // got rejected
493− switchToApplicationAnimationController.completeToBeginningWithSignal();
494− } else {
495− onGestureEnded();
496− }
497− }
498− lastStatus = status;
499− }
500−
501− function onUndecided() {
502− dragEvaluator.reset();
503−
504− var nextApplication = null;
505− if (stage.applications.count > 1) {
506− nextApplication = stage.applications.get(1);
507− }
508− switchToApplicationAnimationController.progress = 0
509− switchToApplicationAnimation.prepare(nextApplication);
510− switchToApplicationAnimationController.animation = switchToApplicationAnimation;
511−
512− }
513−
514− function onGestureEnded() {
515− if (stage.applications.count > 1 && dragEvaluator.shouldAutoComplete()) {
516− switchToApplicationAnimationController.completeToEndWithSignal();
517− } else {
518− switchToApplicationAnimationController.completeToBeginningWithSignal();
519− }
520− }
521− }
522−
523−
524− // FIXME: very bad hack to detect when an application was closed or crashed
525− property var __previouslyFocusedApplication
526− Connections {
527− target: stage
528− onFocusedApplicationChanged: {
529− if (stage.focusedApplication == null
530− && __getApplicationIndex(stage.__previouslyFocusedApplication) == -1) {
531− stage.__onFocusedApplicationClosed();
532− }
533− stage.__previouslyFocusedApplication = stage.focusedApplication;
534− }
535− }
536−
537− function __onFocusedApplicationClosed() {
538− if (!stage.shown) {
539− return;
540− }
541−
542− if (stage.applications.count > 0) {
543− // Do not change the focused application from within onFocusedApplicationChanged.
544− // This causes binding loop warnings besides being a bad practice in general
545− // (setting a property from within its "changed" signal handling)
546− // Hence the timer.
547− focusTopmostAppTimer.start();
548− } else {
549− stage.hide();
550− }
551− }
552−
553− Timer {
554− id: focusTopmostAppTimer
555− interval: 1; repeat: false
556− onTriggered: {
557− if (stage.applications.count > 0) {
558− stage.__focusApplication(stage.applications.get(0));
559− }
560− }
561− }
562−
563−}
Components/TileStyle.qmldeleted−81
@@ -1,81 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: tile
22−
23− anchors.fill: parent
24−
25− UbuntuShape {
26− id: icon
27− anchors {
28− top: parent.top
29− horizontalCenter: parent.horizontalCenter
30− }
31− radius: "medium"
32− width: styledItem.imageWidth
33− height: styledItem.imageHeight
34− image: Image {
35− id: image
36− objectName: "image"
37− sourceSize { width: icon.width; height: icon.height }
38− asynchronous: true
39− cache: false
40− source: styledItem.source
41− fillMode: styledItem.fillMode
42− horizontalAlignment: Image.AlignHCenter
43− verticalAlignment: Image.AlignVCenter
44− }
45− }
46−
47− UbuntuShape {
48− id: borderPressed
49− objectName: "borderPressed"
50−
51− anchors.fill: icon
52− radius: "medium"
53− borderSource: "radius_pressed.sci"
54− opacity: styledItem.pressed ? 1.0 : 0.0
55− Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
56− }
57−
58− Label {
59− id: label
60− objectName: "label"
61− anchors {
62− baseline: icon.bottom
63− baselineOffset: units.gu(2)
64− left: parent.left
65− right: parent.right
66− leftMargin: units.gu(1)
67− rightMargin: units.gu(1)
68− }
69−
70− color: Theme.palette.selected.backgroundText
71− opacity: 0.9
72− style: Text.Raised
73− styleColor: "black"
74− fontSize: "small"
75− elide: Text.ElideMiddle
76− horizontalAlignment: styledItem.horizontalAlignment
77− text: styledItem.text
78− wrapMode: Text.Wrap
79− maximumLineCount: styledItem.maximumLineCount
80− }
81−}
Components/UbuntuShapeForItem.qmldeleted−46
@@ -1,46 +0,0 @@
1−/*
2− * Copyright (C) 2012 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
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
24− */
25−
26−Item {
27− id: root
28−
29− property alias radius: shape.radius
30− property alias image: source.sourceItem
31−
32− ShaderEffectSource {
33− id: source
34− anchors.centerIn: parent // Placed under shape, so it's hidden
35− width: 1
36− height: 1
37− hideSource: true
38− }
39−
40− Shape {
41− id: shape
42− image: source
43−
44− anchors.fill: parent
45− }
46−}
Components/graphics/PageHeaderBaseDivider@18.pngdeleted
Binary file not shown.
Components/graphics/PageHeaderBaseDivider@18.scideleted−5
@@ -1,5 +0,0 @@
1−border.top: 4
2−border.bottom: 4
3−border.left: 0
4−border.right: 0
5−source: PageHeaderBaseDivider@18.png
Components/graphics/close@20.pngdeleted
Binary file not shown.
Components/graphics/icon_star_off@20.pngdeleted
Binary file not shown.
Components/graphics/icon_star_on@20.pngdeleted
Binary file not shown.
Components/graphics/non-selected@18.pngdeleted
Binary file not shown.
Dash/Apps/AppPreview.qmldeleted−166
@@ -1,166 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1 as ListItems
20−import ".."
21−import "../Generic"
22−import "../Previews"
23−import "../../Components"
24−
25−GenericPreview {
26− id: root
27−
28− signal sendUserReview(string review)
29−
30− previewImages: previewImagesComponent
31− description: descriptionComponent
32− header: headerComponent
33−
34− // TODO: Ratings are not yet complete... enable this once they work
35− //ratings: ratingsComponent
36−
37− Component {
38− id: previewImagesComponent
39− ListView {
40− id: previewImageListView
41− spacing: units.gu(1)
42− orientation: ListView.Horizontal
43− height: units.gu(22)
44− model: previewData.infoMap["more-screenshots"] != null ? previewData.infoMap["more-screenshots"].value : [previewData.image]
45− cacheBuffer: width * 3
46−
47− // FIXME: Because of ListViews inside ListViews inside Flickables inside ListViews (and some more)
48− // we finally reached the point where this ListView doesn't correctly get swipe input any more but
49− // instead the parent ListView is the one that is swiped. This MouseArea sort of creates a blocking
50− // layer to make sure this ListView can be swiped, regardless of what's behind it.
51− MouseArea {
52− anchors.fill: parent
53− enabled: parent.contentWidth > parent.width
54− }
55−
56− LazyImage {
57− objectName: "placeholderScreenshot"
58− anchors {
59− top: parent.top
60− bottom: parent.bottom
61− }
62− scaleTo: "height"
63− source: "broken_image"
64− initialWidth: units.gu(13)
65− visible: previewImageListView.count == 0
66− }
67−
68− delegate: LazyImage {
69− id: shape
70− anchors {
71− top: parent.top
72− bottom: parent.bottom
73− }
74− source: modelData ? modelData : ""
75− scaleTo: "height"
76− initialWidth: units.gu(13)
77− }
78− }
79− }
80−
81− Component {
82− id: headerComponent
83− Header {
84− objectName: "previewHeader"
85− title: previewData.title
86− icon: previewData.appIcon
87− subtitle: root.previewData.infoMap["publisher"] ? root.previewData.infoMap["publisher"].value : ""
88− rating: Math.round(root.previewData.rating * 10)
89− reviews: root.previewData.numRatings
90− rated: root.previewData.infoMap["rated"] ? root.previewData.infoMap["rated"].value : 0
91− }
92− }
93−
94− Component {
95− id: descriptionComponent
96− Column {
97− spacing: units.gu(1)
98−
99− Label {
100− anchors { left: parent.left; right: parent.right }
101− text: root.previewData.description
102− fontSize: "medium"
103− color: Theme.palette.selected.backgroundText
104− opacity: .6
105− wrapMode: Text.WordWrap
106− style: Text.Raised
107− styleColor: "black"
108− }
109− }
110− }
111−
112− Component {
113− id: ratingsComponent
114− Column {
115− id: columnReviewRating
116− objectName: "columnReviewRating"
117− visible: root.previewData.rating >= 0
118−
119− spacing: units.gu(1)
120− height: childrenRect.height
121−
122− ListItems.ThinDivider { }
123−
124− Item {
125− anchors { left: parent.left; right: parent.right }
126− height: rateLabel.height
127−
128− Label {
129− id: rateLabel
130− fontSize: "medium"
131− color: "white"
132− style: Text.Raised
133− styleColor: "black"
134− opacity: .9
135− text: i18n.tr("Rate this")
136−
137− anchors.left: parent.left
138− anchors.verticalCenter: parent.verticalCenter
139− }
140−
141− // FIXME these need to be made interactive and connected to the scope
142− RatingStars {
143− anchors.right: parent.right
144− anchors.verticalCenter: parent.verticalCenter
145− }
146− }
147−
148− ListItems.ThinDivider { }
149−
150− Reviews {
151− id: appReviews
152− objectName: "appReviews"
153−
154− anchors { left: parent.left; right: parent.right }
155−
156− model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
157−
158− onSendReview: root.sendUserReview(review);
159−
160− onEditing: {
161− root.ensureVisible(appReviews.textArea);
162− }
163− }
164− }
165− }
166−}
Dash/Apps/CloseIcon.qmldeleted−62
@@ -1,62 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−Item {
20− id: root
21−
22− Image {
23− id: closeIcon
24− anchors.centerIn: parent
25− source: "graphics/close_btn.png"
26−
27− state: (root.enabled) ? "shown" : "hidden"
28−
29− states: [
30− State {
31− name: "shown"
32− PropertyChanges {
33− target: closeIcon
34− height: root.height
35− width: root.width
36− }
37− },
38− State {
39− name: "hidden"
40− PropertyChanges {
41− target: closeIcon
42− height: 0
43− width: 0
44− }
45− }
46−
47− ]
48− transitions: [
49− Transition {
50− to: "shown"
51− NumberAnimation {
52− properties: "width, height"; duration: 300
53− easing { type: Easing.OutBack; overshoot: 5 }
54− }
55− },
56− Transition {
57− to: "hidden"
58− NumberAnimation { properties: "width, height"; duration: 250; }
59− }
60− ]
61− }
62−}
Dash/Apps/DashPluginFilterGrid.qmldeleted−47
@@ -1,47 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−import "../Generic"
21−
22−GenericFilterGrid {
23− id: filtergrid
24−
25− delegate: Tile {
26− id: tile
27− objectName: "delegate" + index
28− width: filtergrid.cellWidth
29− height: filtergrid.cellHeight
30− text: model.title
31− imageWidth: filtergrid.iconWidth
32− imageHeight: filtergrid.iconHeight
33− source: model.icon
34−
35− style: FlatTileStyle {
36− disabled: model.rendererHints['scope_disabled'] === 1;
37− }
38−
39− onClicked: {
40− filtergrid.clicked(index, tile.y)
41− }
42−
43− onPressAndHold: {
44− filtergrid.pressAndHold(index, tile.y)
45− }
46− }
47−}
Dash/Apps/FrequentlyUsedAppsModel.qmldeleted−110
@@ -1,110 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−ListModel {
20− ListElement {
21− uri: "application://dialer-app.desktop"
22− icon: "../../graphics/applicationIcons/phone-app.png"
23− category: 0
24− mimetype: "application/x-desktop"
25− title: "Dialer"
26− comment: ""
27− dndUri: "file:///usr/share/applications/dialer-app.desktop"
28− metadata: "subscope:applications.scope/applications-non-click.scope"
29− }
30− ListElement {
31− uri: "application://messaging-app.desktop"
32− icon: "../../graphics/applicationIcons/messages-app.png"
33− category: 0
34− mimetype: "application/x-desktop"
35− title: "Messaging"
36− comment: ""
37− dndUri: "file:///usr/share/applications/messaging-app.desktop"
38− metadata: "subscope:applications.scope/applications-non-click.scope"
39− }
40− ListElement {
41− uri: "application://address-book-app.desktop"
42− icon: "../../graphics/applicationIcons/contacts-app.png"
43− category: 0
44− mimetype: "application/x-desktop"
45− title: "Contacts"
46− comment: ""
47− dndUri: "file:///usr/share/applications/address-book-app.desktop"
48− metadata: "subscope:applications.scope/applications-non-click.scope"
49− }
50− ListElement {
51− uri: "application://camera-app.desktop"
52− icon: "../../graphics/applicationIcons/camera.png"
53− category: 0
54− mimetype: "application/x-desktop"
55− title: "Camera"
56− comment: ""
57− dndUri: "file:///usr/share/applications/camera-app.desktop"
58− metadata: "subscope:applications.scope/applications-non-click.scope"
59− }
60− ListElement {
61− uri: "application://gallery-app.desktop"
62− icon: "../../graphics/applicationIcons/gallery.png"
63− category: 0
64− mimetype: "application/x-desktop"
65− title: "Gallery"
66− comment: ""
67− dndUri: "file:///usr/share/applications/gallery.desktop"
68− metadata: "subscope:applications.scope/applications-non-click.scope"
69− }
70− ListElement {
71− uri: "appid://com.ubuntu.developer.webapps.webapp-facebook/webapp-facebook/current-user-version"
72− icon: "../../graphics/applicationIcons/facebook.png"
73− category: 0
74− mimetype: "application/x-desktop"
75− title: "Facebook"
76− comment: ""
77− dndUri: "appid://com.ubuntu.developer.webapps.webapp-facebook/webapp-facebook/current-user-version"
78− metadata: "subscope:applications.scope/applications-click.scope?app_id=com.ubuntu.developer.webapps.webapp-facebook"
79− }
80− ListElement {
81− uri: "application://webbrowser-app.desktop"
82− icon: "../../graphics/applicationIcons/browser.png"
83− category: 0
84− mimetype: "application/x-desktop"
85− title: "Browser"
86− comment: ""
87− dndUri: "file:///usr/share/applications/webbrowser-app.desktop"
88− metadata: "subscope:applications.scope/applications-non-click.scope"
89− }
90− ListElement {
91− uri: "appid://com.ubuntu.developer.webapps.webapp-gmail/webapp-gmail/current-user-version"
92− icon: "../../graphics/applicationIcons/gmail.png"
93− category: 0
94− mimetype: "application/x-desktop"
95− title: "GMail"
96− comment: ""
97− dndUri: "appid://com.ubuntu.developer.webapps.webapp-gmail/webapp-gmail/current-user-version"
98− metadata: "subscope:applications.scope/applications-click.scope?app_id=com.ubuntu.developer.webapps.webapp-gmail"
99− }
100− ListElement {
101− uri: "application://ubuntu-system-settings.desktop"
102− icon: "../../graphics/applicationIcons/system-settings.png"
103− category: 0
104− mimetype: "application/x-desktop"
105− title: "System Settings"
106− comment: ""
107− dndUri: "file:///usr/share/applications/ubuntu-system-settings.desktop"
108− metadata: "subscope:applications.scope/applications-non-click.scope"
109− }
110−}
Dash/Apps/RunningApplicationTile.qmldeleted−139
@@ -1,139 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity.Application 0.1
20−import "../../Components/"
21−import "../../Components/ListItems"
22−
23−AbstractButton {
24− id: root
25− property var application
26− property bool __sideStageEnabled: shell.applicationManager.sideStageEnabled
27−
28− signal requestedApplicationActivation(var application)
29− signal requestedApplicationTermination(var application)
30− signal requestedActivationMode()
31− signal requestedTerminationMode()
32−
33− // Was: childrenRect.height
34− // To avoid "binding loop" warning
35− height: shapedApplicationImage.height + labelContainer.height
36−
37− width: shapedApplicationImage.width
38−
39− property bool terminationModeEnabled: false
40−
41− onClicked: {
42− if (!terminationModeEnabled)
43− requestedApplicationActivation(application)
44− }
45−
46− onPressAndHold: {
47− if (terminationModeEnabled) {
48− requestedActivationMode()
49− } else {
50− requestedTerminationMode()
51− }
52− }
53−
54− function updateScreenshotFromCache() {
55− applicationImage.updateFromCache();
56− }
57−
58− // FIXME: should use UbuntuShape from SDK
59− UbuntuShapeForItem {
60− id: shapedApplicationImage
61− anchors {
62− top: parent.top
63− horizontalCenter: parent.horizontalCenter
64− }
65−
66− // FIXME: width and height should be defined according to the
67− // application window's aspect ratio.
68− width: (application.stage === ApplicationInfo.MainStage && __sideStageEnabled) ?
69− units.gu(22) : units.gu(11)
70− height: (__sideStageEnabled) ? units.gu(22) : units.gu(19)
71− radius: "medium"
72− image: applicationImage
73− }
74−
75− ApplicationImage {
76− id: applicationImage
77− source: ApplicationManager.findApplication((application) ? application.appId : "")
78− width: shapedApplicationImage.width
79− height: shapedApplicationImage.height
80− }
81−
82− UbuntuShape {
83− id: borderPressed
84−
85− anchors.fill: shapedApplicationImage
86− radius: "medium"
87− borderSource: "radius_pressed.sci"
88− opacity: root.pressed ? 1.0 : 0.0
89− Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
90− }
91−
92− // FIXME: label code duplicated with Tile
93− Item {
94− id: labelContainer
95− anchors {
96− left: parent.left
97− right: parent.right
98− top: shapedApplicationImage.bottom
99− }
100− height: units.gu(2)
101−
102− Label {
103− id: label
104− anchors {
105− baseline: parent.bottom
106− left: parent.left
107− right: parent.right
108− }
109− text: (application) ? application.name : ""
110−
111− color: Theme.palette.selected.backgroundText
112− opacity: 0.9
113− style: Text.Raised
114− styleColor: "black"
115− fontSize: "small"
116− elide: Text.ElideMiddle
117− horizontalAlignment: Text.AlignHCenter
118− }
119− }
120−
121− CloseIcon {
122− objectName: "closeIcon " + model.name
123− anchors {
124− left: shapedApplicationImage.left
125− leftMargin: -units.gu(1)
126− top: parent.top
127− topMargin: -units.gu(1)
128− }
129− height: units.gu(6)
130− width: units.gu(6)
131− id: closeIcon
132− enabled: root.terminationModeEnabled
133−
134− MouseArea {
135− anchors { fill: parent; margins: -units.gu(1) }
136− onClicked: requestedApplicationTermination(application)
137− }
138− }
139−}
Dash/Apps/RunningApplicationsGrid.qmldeleted−120
@@ -1,120 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import "../../Components"
19−
20−import Ubuntu.Gestures 0.1
21−
22−ResponsiveFlowView {
23− id: root
24− clip: true
25−
26− signal updateScreenshots
27− property alias enableHeightBehavior: heightBehaviour.enabled
28− property bool enableHeightBehaviorOnNextCreation: firstModel.count + secondModel.count == 0
29−
30− Connections {
31− target: shell
32− onDashShownChanged: if (shell.dashShown && shell.stageScreenshotsReady) updateScreenshots();
33− onStageScreenshotsReadyChanged: if (shell.dashShown && shell.stageScreenshotsReady) updateScreenshots();
34− }
35−
36− Behavior on height {
37− id: heightBehaviour
38− enabled: false
39− NumberAnimation { duration: 200; easing.type: Easing.InOutQuad }
40− }
41−
42− Connections {
43− target: root.firstModel
44− onCountChanged: {
45− heightBehaviour.enabled = true;
46− }
47− }
48− Connections {
49− target: root.secondModel
50− onCountChanged: {
51− heightBehaviour.enabled = true;
52− }
53− }
54−
55− property bool canEnableTerminationMode: true
56−
57− onCanEnableTerminationModeChanged: {
58− if (!canEnableTerminationMode)
59− terminationModeEnabled = false
60− }
61−
62− // when false, it means it's on activation mode
63− property bool terminationModeEnabled: false
64−
65− maximumNumberOfColumns: 10
66− minimumHorizontalSpacing: units.gu(2)
67− referenceDelegateWidth: units.gu(11)
68− verticalSpacing: units.gu(2)
69−
70− delegate: Item {
71− width: runningAppTile.width + root.horizontalSpacing
72− height: runningAppTile.height + root.verticalSpacing
73−
74− RunningApplicationTile {
75− id: runningAppTile
76− objectName: "runningAppTile " + model.name
77− anchors {
78− top: parent.top
79− horizontalCenter: parent.horizontalCenter
80− }
81− application: model
82− onRequestedActivationMode: { root.terminationModeEnabled = false }
83− onRequestedTerminationMode: {
84− if (canEnableTerminationMode)
85− root.terminationModeEnabled = true
86− }
87− onRequestedApplicationTermination: {
88− shell.applicationManager.stopApplication(model.appId)
89− }
90− onRequestedApplicationActivation: {
91− shell.activateApplication(model.appId)
92− }
93−
94− terminationModeEnabled: root.terminationModeEnabled
95−
96− Component.onCompleted: {
97− root.updateScreenshots.connect(updateScreenshotFromCache);
98− }
99− }
100− }
101−
102− move: Transition {
103− NumberAnimation { properties: "x,y"; duration: 400; easing.type: Easing.OutCubic }
104− }
105−
106− MouseArea {
107− anchors.fill: parent
108− z: -1 // behind all RunningApplicationTiles
109− enabled: root.terminationModeEnabled
110− onPressed: { root.terminationModeEnabled = false; }
111− }
112−
113− PressedOutsideNotifier {
114− anchors.fill: parent
115− enabled: root.terminationModeEnabled
116− onPressedOutside: {
117− root.terminationModeEnabled = false;
118− }
119− }
120−}
Dash/Apps/graphics/close_btn@9.pngdeleted
Binary file not shown.
Dash/Dash.qmldeleted−96
@@ -1,96 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity 0.1
20−import Utils 0.1
21−import "../Components"
22−
23−Showable {
24− id: dash
25− objectName: "dash"
26−
27− visible: shown
28−
29− property ListModel searchHistory: SearchHistoryModel {}
30−
31− property alias contentProgress: dashContent.contentProgress
32− property string showScopeOnLoaded: "home.scope"
33− property real contentScale: 1.0
34−
35− function setCurrentScope(scopeId, animate, reset) {
36− var scopeIndex = filteredScopes.findFirst(Scopes.RoleId, scopeId)
37−
38− if (scopeIndex == -1) {
39− console.warn("No match for scope with id: %1".arg(scopeId))
40− return
41− }
42−
43− if (scopeIndex == dashContent.currentIndex && !reset) {
44− // the scope is already the current one
45− return
46− }
47−
48− dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset)
49− }
50−
51− SortFilterProxyModel {
52− id: filteredScopes
53− model: Scopes {
54− id: scopes
55− }
56− dynamicSortFilter: true
57−
58− filterRole: Scopes.RoleVisible
59− filterRegExp: RegExp("^true$")
60− }
61−
62− DashContent {
63− id: dashContent
64− objectName: "dashContent"
65− anchors.fill: parent
66− model: filteredScopes
67− scopes: scopes
68− searchHistory: dash.searchHistory
69− onMovementStarted: dashbar.startNavigation()
70− onMovementEnded: dashbar.stopNavigation()
71− onContentFlickStarted: dashbar.finishNavigation()
72− onContentEndReached: dashbar.finishNavigation()
73− onPreviewShown: dashbar.finishNavigation()
74− onScopeLoaded: {
75− if (scopeId == dash.showScopeOnLoaded) {
76− dash.setCurrentScope(scopeId, false, false)
77− dash.showScopeOnLoaded = ""
78− }
79− }
80− scale: dash.contentScale
81− clip: scale != 1.0
82− }
83−
84− DashBar {
85− id: dashbar
86− objectName: "dashbar"
87− anchors.bottom: parent.bottom
88− anchors.left: parent.left
89− anchors.right: parent.right
90− model: filteredScopes
91− currentIndex: dashContent.currentIndex
92− onItemSelected: dashContent.setCurrentScopeAtIndex(index, true, false)
93− opacity: dash.contentScale == 1.0 ? 1.0 : 0.0
94− Behavior on opacity { NumberAnimation { easing.type: Easing.OutQuad; duration: 150 } }
95− }
96−}
Dash/DashApps.qmldeleted−59
@@ -1,59 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Utils 0.1
20−import "../Components"
21−import "../Components/ListItems"
22−import "Apps"
23−
24−GenericScopeView {
25− id: scopeView
26− objectName: "DashApps"
27−
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
31−
32− //FIXME an alias to itself shouldn't be required. More than likely a Qt bug. Try removing with newer Qt.
33− property alias searchHistory: scopeView.searchHistory
34−
35− ListModel {
36− id: dummyVisibilityModifier
37−
38− ListElement { name: "running-apps" }
39− }
40−
41− SortFilterProxyModel {
42− id: runningApplicationsModel
43−
44− property var firstModel: mainStageApplicationsModel
45− property var secondModel: sideStageApplicationModel
46− property bool canEnableTerminationMode: scopeView.isCurrent
47−
48− model: dummyVisibilityModifier
49− filterRole: 0
50− filterRegExp: invertMatch ? ((mainStageApplicationsModel.count === 0 &&
51− sideStageApplicationModel.count === 0) ? RegExp("running-apps") : RegExp("")) : RegExp("disabled")
52− invertMatch: scopeView.scope.searchQuery.length == 0
53− }
54−
55− onScopeChanged: {
56− scopeView.scope.categories.overrideResults("recent", runningApplicationsModel);
57− enableHeightBehaviorOnNextCreation = (mainStageApplicationsModel.count + sideStageApplicationModel.count == 0)
58− }
59−}
Dash/DashBar.qmldeleted−128
@@ -1,128 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity 0.1
20−
21−Item {
22− id: dashBar
23−
24− property var model
25− property alias currentIndex: row.currentIndex
26−
27− property int lineHeight: units.dp(2)
28− property int itemSize: units.gu(7)
29− property int iconSize: units.gu(3.5)
30−
31− signal itemSelected(int index)
32−
33− width: units.gu(40)
34− height: units.gu(6)
35−
36− function startNavigation() {
37− timeout.stop()
38− panel.open()
39− }
40−
41− function stopNavigation() {
42− timeout.restart()
43− }
44−
45− function finishNavigation() {
46− panel.close()
47− }
48−
49− Timer {
50− id: timeout
51− interval: 1500
52− running: false
53− repeat: false
54− onTriggered: finishNavigation()
55− }
56−
57− Panel {
58− id: panel
59− objectName: "panel"
60− anchors.fill: parent
61−
62− locked: true // TODO: remove this when lp bug #1179569 will be fixed
63−
64− Rectangle {
65− color: "black"
66− anchors.fill: parent
67−
68− ListView {
69− id: row
70− objectName: "row"
71− model: dashBar.model
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
79−
80− onCurrentItemChanged: {
81− highlightLine.width = currentItem.width
82− highlightLine.x = x + currentItem.x
83− }
84−
85− delegate:
86− // FIXME: Use Panel's integrated trigger() once that works again.
87− MouseArea {
88− width: itemSize
89− height: dashBar.height
90− anchors.top: parent.top
91−
92− onClicked: {
93− dashBar.itemSelected(index)
94− timeout.restart()
95− }
96−
97− Image {
98− anchors.centerIn: parent
99− source: scope.iconHint
100− sourceSize { width: iconSize; height: iconSize }
101− // opacity: index == currentIndex ? 1 : 1 // same opacity for now
102− }
103− }
104− }
105− }
106− }
107−
108− Rectangle {
109− anchors {
110− left: parent.left
111− right: parent.right
112− bottom: parent.bottom
113− }
114− height: dashBar.lineHeight
115− color: "black"
116−
117− Rectangle {
118− id: highlightLine
119− color: Theme.palette.selected.foreground
120− height: parent.height
121− anchors.bottom: parent.bottom
122− z: 1
123−
124− Behavior on x {NumberAnimation { duration: 150; easing.type: Easing.OutCubic}}
125− Behavior on width {NumberAnimation { duration: 150; easing.type: Easing.OutCubic}}
126− }
127− }
128−}
Dash/DashCarousel.qmldeleted−47
@@ -1,47 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−DashRenderer {
22− id: dashCarousel
23−
24− property alias cacheBuffer: carousel.cacheBuffer
25− property alias itemComponent: carousel.itemComponent
26− property alias minimumTileWidth: carousel.minimumTileWidth
27− property alias selectedItemScaleFactor: carousel.selectedItemScaleFactor
28− property alias tileAspectRatio: carousel.tileAspectRatio
29−
30− currentItem: carousel.currentItem
31− height: carousel.implicitHeight + units.gu(6)
32− verticalSpacing: units.gu(3)
33−
34− Carousel {
35− id: carousel
36− anchors.fill: parent
37− tileAspectRatio: 198 / 288
38− minimumTileWidth: units.gu(13)
39− selectedItemScaleFactor: 1.14
40− cacheBuffer: 1404 // 18px * 13gu * 6
41− model: dashCarousel.model
42− highlightIndex: dashCarousel.highlightIndex
43−
44− onClicked: dashCarousel.clicked(index, itemY)
45− onPressAndHold: dashCarousel.pressAndHold(index, itemY)
46− }
47−}
Dash/DashContent.qmldeleted−156
@@ -1,156 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity 0.1
20−
21−Item {
22− id: dashContent
23−
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
28−
29− property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
30− property ListModel searchHistory
31−
32− signal movementStarted()
33− signal movementEnded()
34− signal contentFlickStarted()
35− signal contentEndReached()
36− signal previewShown()
37− signal scopeLoaded(string scopeId)
38− signal positionedAtBeginning()
39−
40− // If we set the current scope index before the scopes have been added,
41− // then we need to wait until the loaded signals gets emitted from the scopes
42− property var set_current_index: undefined
43− Connections {
44− target: scopes
45− onLoadedChanged: {
46− if (scopes.loaded && set_current_index != undefined) {
47− setCurrentScopeAtIndex(set_current_index[0], set_current_index[1], set_current_index[2]);
48− set_current_index = undefined;
49− }
50− }
51− }
52−
53− function setCurrentScopeAtIndex(index, animate, reset) {
54− var storedMoveDuration = dashContentList.highlightMoveDuration
55− var storedMoveSpeed = dashContentList.highlightMoveVelocity
56− if (!animate) {
57− dashContentList.highlightMoveVelocity = units.gu(4167)
58− dashContentList.highlightMoveDuration = 0
59− }
60−
61− // if the scopes haven't loaded yet, then wait until they are.
62− if (!scopes.loaded) {
63− set_current_index = [ index, animate, reset ]
64− return;
65− }
66− set_current_index = undefined;
67−
68− if (dashContentList.count > index)
69− {
70− dashContentList.currentIndex = index
71−
72− if (reset) {
73− dashContent.positionedAtBeginning()
74− }
75− }
76−
77− if (!animate) {
78− dashContentList.highlightMoveDuration = storedMoveDuration
79− dashContentList.highlightMoveVelocity = storedMoveSpeed
80− }
81− }
82−
83− ListView {
84− id: dashContentList
85− objectName: "dashContentList"
86−
87− interactive: dashContent.scopes.loaded && !currentItem.previewShown && !currentItem.moving
88−
89− anchors.fill: parent
90− model: dashContent.model
91− orientation: ListView.Horizontal
92− boundsBehavior: Flickable.DragAndOvershootBounds
93− flickDeceleration: units.gu(625)
94− maximumFlickVelocity: width * 5
95− snapMode: ListView.SnapOneItem
96− highlightMoveDuration: 250
97− highlightRangeMode: ListView.StrictlyEnforceRange
98− /* FIXME: workaround rendering issue due to use of ShaderEffectSource in
99− UbuntuShape. While switching from the home scope to the People scope the
100− rendering would block midway.
101− */
102− cacheBuffer: 2147483647
103− onMovementStarted: dashContent.movementStarted()
104− onMovementEnded: dashContent.movementEnded()
105−
106− // If the number of items is less than the current index, then need to reset to another item.
107− onCountChanged: {
108− if (count > 0) {
109− if (currentIndex >= count) {
110− dashContent.setCurrentScopeAtIndex(count-1, true, true)
111− } else if (currentIndex < 0) {
112− // setting currentIndex directly, cause we don't want to loose set_current_index
113− dashContent.currentIndex = 0
114− }
115− }
116− }
117−
118− delegate:
119− Loader {
120− width: ListView.view.width
121− height: ListView.view.height
122− asynchronous: true
123− source: scopeMapper.map(scope.id)
124− objectName: scope.id + " loader"
125−
126− readonly property bool previewShown: item ? item.previewShown : false
127− readonly property bool moving: item ? item.moving : false
128−
129− // these are needed for autopilot tests
130− readonly property string scopeId: scope.id
131− readonly property bool isCurrent: ListView.isCurrentItem
132− readonly property bool isLoaded: status == Loader.Ready
133−
134− onLoaded: {
135− item.scope = Qt.binding(function() { return scope })
136− item.isCurrent = Qt.binding(function() { return visible && ListView.isCurrentItem })
137− item.searchHistory = Qt.binding(function() { return dashContent.searchHistory })
138− dashContentList.movementStarted.connect(item.movementStarted)
139− dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
140− dashContent.scopeLoaded(item.scope.id)
141− }
142− Connections {
143− target: item
144− ignoreUnknownSignals: true
145− onEndReached: contentEndReached()
146− onPreviewShownChanged: {
147− if (item.previewShown) {
148− dashContent.previewShown()
149− }
150− }
151− }
152−
153− Component.onDestruction: active = false
154− }
155− }
156−}
Dash/DashFilterGrid.qmldeleted−65
@@ -1,65 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import "../Components"
19−import ".."
20−
21−DashRenderer {
22− id: dashFilterGrid
23−
24− property alias cellWidth: filterGrid.cellWidth
25− property alias cellHeight: filterGrid.cellHeight
26− property alias delegate: filterGrid.delegate
27− property alias delegateWidth: filterGrid.delegateWidth
28− property alias delegateHeight: filterGrid.delegateHeight
29− property alias maximumNumberOfColumns: filterGrid.maximumNumberOfColumns
30− property alias minimumHorizontalSpacing: filterGrid.minimumHorizontalSpacing
31−
32− collapsedHeight: filterGrid.collapsedHeight
33− collapsedRowCount: filterGrid.collapsedRowCount
34− columns: filterGrid.columns
35− rows: filter ? filterGrid.collapsedRowCount : filterGrid.uncollapsedRowCount
36− currentItem: filterGrid.currentItem
37− expandable: filterGrid.expandable
38− height: filterGrid.height
39− margins: filterGrid.margins
40− uncollapsedHeight: filterGrid.uncollapsedHeight
41− verticalSpacing: filterGrid.verticalSpacing
42−
43− function startFilterAnimation(filter) {
44− filterGrid.startFilterAnimation(filter)
45− }
46−
47− FilterGrid {
48− id: filterGrid
49− width: dashFilterGrid.width
50− minimumHorizontalSpacing: units.gu(0.5)
51− delegateWidth: units.gu(11)
52− delegateHeight: units.gu(9.5)
53− verticalSpacing: units.gu(2)
54− model: dashFilterGrid.model
55− filter: dashFilterGrid.filter
56− highlightIndex: dashFilterGrid.highlightIndex
57− delegateCreationBegin: dashFilterGrid.delegateCreationBegin
58− delegateCreationEnd: dashFilterGrid.delegateCreationEnd
59−
60− onFilterChanged: {
61− dashFilterGrid.filter = filter
62− filter = Qt.binding(function() { return dashFilterGrid.filter })
63− }
64− }
65−}
Dash/DashPreview.qmldeleted−206
@@ -1,206 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: root
22−
23− property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
24− property var previewData
25− property alias showProcessingAction: waitingForActionMouseArea.enabled
26−
27− property real previewWidthRatio: 0.5
28− property bool isCurrent: false
29−
30− property Component previewImages
31− property Component header
32− property Component actions
33− property Component description
34− property Component ratings
35−
36− readonly property bool narrowMode: width <= height * 1.5
37− readonly property int columnWidth: narrowMode ? contentRow.width : (contentRow.width / 3) - contentRow.spacing
38− readonly property int contentSpacing: units.gu(3)
39−
40− clip: true
41−
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;
47− }
48− }
49−
50− Connections {
51− target: shell.applicationManager
52− onMainStageFocusedApplicationChanged: {
53− root.close();
54− }
55− onSideStageFocusedApplicationChanged: {
56− root.close();
57− }
58− }
59−
60− MouseArea {
61− anchors.fill: parent
62− }
63−
64− Row {
65− id: contentRow
66− anchors {
67− left: parent.left
68− top: parent.top
69− right: parent.right
70− bottom: parent.bottom
71− topMargin: root.contentSpacing
72− leftMargin: root.contentSpacing
73− rightMargin: root.contentSpacing
74− }
75− height: childrenRect.height
76−
77− spacing: units.gu(2)
78−
79−
80− Flickable {
81− id: leftFlickable
82− objectName: "leftFlickable"
83− anchors {
84− top: parent.top
85− bottom: parent.bottom
86− }
87− width: root.columnWidth
88− contentHeight: leftColumn.height + root.contentSpacing
89− anchors.bottomMargin: root.keyboardSize
90− clip: true
91−
92− Behavior on contentY { NumberAnimation { duration: 300 } }
93−
94− Column {
95− id: leftColumn
96− objectName: "leftColumn"
97− height: childrenRect.height
98− spacing: root.contentSpacing
99− anchors {
100− left: parent.left
101− right: parent.right
102− }
103− }
104− }
105−
106− Flickable {
107− id: centerFlickable
108− anchors {
109− top: parent.top
110− bottom: parent.bottom
111− }
112− width: root.columnWidth
113− contentHeight: centerColumn.height
114− clip: true
115−
116− Column {
117− id: centerColumn
118− objectName: "centerColumn"
119− height: childrenRect.height
120− anchors {
121− left: parent.left
122− right: parent.right
123− }
124− spacing: root.contentSpacing
125− }
126− }
127−
128− Flickable {
129− id: rightFlickable
130− anchors {
131− top: parent.top
132− bottom: parent.bottom
133− }
134− width: root.columnWidth
135− contentHeight: rightColumn.height
136− clip: true
137−
138− Column {
139− id: rightColumn
140− objectName: "rightColumn"
141− height: childrenRect.height
142− anchors {
143− left: parent.left
144− right: parent.right
145− }
146− }
147− }
148− }
149−
150− Loader {
151− id: previewImageLoader
152− parent: leftColumn
153− sourceComponent: root.previewImages
154− anchors {
155− left: parent.left
156− right: parent.right
157− }
158− }
159−
160− Loader {
161− id: ratingsLoader
162− parent: root.narrowMode ? leftColumn : rightColumn
163− anchors {
164− left: parent.left
165− right: parent.right
166− }
167− sourceComponent: root.ratings
168− }
169−
170− Loader {
171− id: descriptionLoader
172− parent: root.narrowMode ? leftColumn : centerColumn
173− anchors {
174− left: parent.left
175− right: parent.right
176− }
177− sourceComponent: root.description
178− }
179−
180− Loader {
181− id: actionsLoader
182− parent: root.narrowMode ? leftColumn : centerColumn
183− anchors {
184− left: parent.left
185− right: parent.right
186− }
187− sourceComponent: root.actions
188− }
189−
190− Loader {
191− id: headerLoader
192− parent: root.narrowMode ? leftColumn : centerColumn
193− anchors {
194− left: parent.left
195− right: parent.right
196− }
197− sourceComponent: root.header
198− }
199−
200− MouseArea {
201− id: waitingForActionMouseArea
202− objectName: "waitingForActionMouseArea"
203− anchors.fill: parent
204− enabled: false
205− }
206−}
Dash/DashRenderer.qmldeleted−65
@@ -1,65 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−Item {
20− // Can the item be expanded?
21− property bool expandable: false
22−
23− // In case it can be expanded, should we filter it
24− property bool filter: true
25−
26− property int collapsedRowCount: 1
27−
28− property int collapsedHeight: height
29−
30− property int columns: 1
31−
32− property int rows: 1
33−
34− // Index of the highlighted item
35− property int highlightIndex: -1
36−
37− property int margins: 0
38−
39− property int uncollapsedHeight: height
40−
41− property var delegateCreationBegin: undefined
42−
43− property var delegateCreationEnd: undefined
44−
45− property real verticalSpacing: 0
46−
47− // The current item of the renderer
48− property var currentItem
49−
50− // The model to renderer
51− property var model
52−
53− /// Emitted when the user clicked on an item
54− /// @param index is the index of the clicked item
55− /// @param itemY is y of the clicked delegate
56− signal clicked(int index, real itemY)
57−
58− /// Emitted when the user pressed and held on an item
59− /// @param index is the index of the held item
60− /// @param itemY is y of the held delegate
61− signal pressAndHold(int index, real itemY)
62−
63− function startFilterAnimation(filter) {
64− }
65−}
Dash/Generic/FlatTileStyle.qmldeleted−79
@@ -1,79 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: tile
22−
23− property bool disabled: false
24−
25− anchors.fill: parent
26−
27− Image {
28− id: icon
29− objectName: "image"
30− width: styledItem.imageWidth
31− height: styledItem.imageHeight
32−
33− anchors.horizontalCenter: parent.horizontalCenter
34−
35− sourceSize { width: width; height: height }
36− asynchronous: true
37− cache: false
38− source: styledItem.source
39− fillMode: styledItem.fillMode
40− opacity: tile.disabled ? 0.3 : 1.0
41− horizontalAlignment: Image.AlignHCenter
42− verticalAlignment: Image.AlignVCenter
43− }
44−
45− UbuntuShape {
46− id: borderPressed
47− objectName: "borderPressed"
48−
49− anchors.fill: icon
50− radius: "medium"
51− borderSource: "radius_pressed.sci"
52− opacity: styledItem.pressed ? 1.0 : 0.0
53− Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
54− }
55−
56− Label {
57− id: label
58− objectName: "label"
59− anchors {
60− baseline: icon.bottom
61− baselineOffset: units.gu(2)
62− left: parent.left
63− right: parent.right
64− leftMargin: units.gu(1)
65− rightMargin: units.gu(1)
66− }
67−
68− color: Theme.palette.selected.backgroundText
69− opacity: 0.9
70− style: Text.Raised
71− styleColor: "black"
72− fontSize: "small"
73− elide: Text.ElideMiddle
74− horizontalAlignment: styledItem.horizontalAlignment
75− text: styledItem.text
76− wrapMode: Text.Wrap
77− maximumLineCount: styledItem.maximumLineCount
78− }
79−}
Dash/Generic/GenericCarousel.qmldeleted−53
@@ -1,53 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−import ".."
21−
22−DashCarousel {
23− id: genericCarousel
24− itemComponent: carouselDelegateGeneric
25−
26− Component {
27− id: carouselDelegateGeneric
28−
29− BaseCarouselDelegate {
30− id: item
31− objectName: "carouselDelegate"
32−
33− UbuntuShape {
34− anchors.fill: parent
35− radius: "medium"
36− borderSource: ""
37− image: Image {
38− asynchronous: true
39− sourceSize { width: item.width; height: item.height }
40− source: model ? model.icon : ""
41− }
42− }
43−
44− BorderImage {
45− anchors.centerIn: parent
46− opacity: 0.6
47− source: "../../Components/graphics/non-selected.sci"
48− width: parent.width + units.gu(1.5)
49− height: parent.height + units.gu(1.5)
50− }
51− }
52− }
53−}
Dash/Generic/GenericFilterGrid.qmldeleted−46
@@ -1,46 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−import ".."
21−
22−DashFilterGrid {
23− id: genericFilterGrid
24−
25− property int iconWidth: units.gu(8)
26− property int iconHeight: units.gu(7.5)
27−
28− minimumHorizontalSpacing: units.gu(0.5)
29− delegateWidth: units.gu(11)
30− delegateHeight: units.gu(9.5)
31− verticalSpacing: units.gu(2)
32−
33− delegate: Tile {
34− id: tile
35− objectName: "delegate" + index
36− width: genericFilterGrid.cellWidth
37− height: genericFilterGrid.cellHeight
38− text: model.title
39− imageWidth: genericFilterGrid.iconWidth
40− imageHeight: genericFilterGrid.iconHeight
41− source: model.icon
42−
43− onClicked: genericFilterGrid.clicked(index, tile.y)
44− onPressAndHold: genericFilterGrid.pressAndHold(index, tile.y)
45− }
46−}
Dash/Generic/GenericFilterGridPotrait.qmldeleted−28
@@ -1,28 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−
21−GenericFilterGrid {
22− minimumHorizontalSpacing: units.gu(0.5)
23− delegateWidth: units.gu(11)
24− delegateHeight: units.gu(18)
25− verticalSpacing: units.gu(2)
26− iconWidth: (width / columns) * 0.8
27− iconHeight: iconWidth * 16 / 11
28−}
Dash/Generic/GenericPreview.qmldeleted−196
@@ -1,196 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1 as ListItems
20−import Ubuntu.DownloadDaemonListener 0.1
21−import "../../Components"
22−import ".."
23−import "../Previews"
24−
25−DashPreview {
26− id: genericPreview
27−
28− previewImages: previewImagesComponent
29− header: headerComponent
30− actions: (previewData.infoMap !== undefined && previewData.infoMap["show_progressbar"]) ? progressComponent : actionsComponent
31− description: descriptionComponent
32−
33− Component {
34− id: previewImagesComponent
35−
36− LazyImage {
37− objectName: "genericPreviewImage"
38− anchors {
39− left: parent.left
40− right: parent.right
41− }
42− scaleTo: "width"
43− source: genericPreview.previewData.image
44− initialHeight: width
45− }
46− }
47−
48− Component {
49− id: headerComponent
50− Header {
51− title: previewData.title
52− subtitle: previewData.subtitle
53− }
54− }
55−
56− Component {
57− id: actionsComponent
58−
59− Column {
60− id: buttonList
61− spacing: units.gu(1)
62− Repeater {
63− objectName: "buttonList"
64− model: previewData.actions
65−
66− delegate: Button {
67− objectName: "button" + index
68− width: parent.width
69− height: buttonList.buttonHeight
70− color: Theme.palette.selected.foreground
71− text: modelData.displayName
72− iconSource: modelData.iconHint
73− iconPosition: "right"
74− onClicked: {
75− previewData.execute(modelData.id, { })
76− genericPreview.showProcessingAction = true;
77− }
78− }
79− }
80− }
81− }
82−
83− Component {
84− id: progressComponent
85−
86− ProgressBar {
87− id: progressBar
88− objectName: "progressBar"
89− value: 0
90− maximumValue: 100
91− height: units.gu(5)
92−
93− property var model: previewData.actions
94−
95− DownloadTracker {
96− service: "com.canonical.applications.Downloader"
97− dbusPath: previewData.infoMap["progressbar_source"] ? previewData.infoMap["progressbar_source"].value : ""
98−
99− onProgress: {
100− var percentage = parseInt(received * 100 / total);
101− progressBar.value = percentage;
102− }
103−
104− onFinished: {
105− previewData.execute(progressBar.model[0].id, { })
106− }
107−
108− onError: {
109− previewData.execute(progressBar.model[1].id, { "error": error });
110− }
111− }
112−
113− }
114− }
115−
116− Component {
117− id: descriptionComponent
118− Column {
119− spacing: units.gu(2)
120−
121− Label {
122− id: descriptionLabel
123− anchors { left: parent.left; right: parent.right }
124− visible: text != ""
125− fontSize: "small"
126− opacity: 0.6
127− color: "white"
128− text: previewData.description.replace(/[\r\n]/g, "<br />")
129− style: Text.Raised
130− styleColor: "black"
131− wrapMode: Text.WordWrap
132− textFormat: Text.RichText
133− // FIXME: workaround for https://bugreports.qt-project.org/browse/QTBUG-33020
134− onWidthChanged: { wrapMode = Text.NoWrap; wrapMode = Text.WordWrap }
135− }
136−
137− Column {
138− objectName: "infoHintColumn"
139− anchors {
140− left: parent.left
141− right: parent.right
142− }
143− Repeater {
144− objectName: "infoHintRepeater"
145− model: previewData.infoHints
146−
147− delegate: Item {
148− objectName: "infoHintItem" + index
149− width: parent.width
150− height: units.gu(5)
151− Row {
152− width: parent.width
153− spacing: units.gu(1)
154− property int columnWidth: (width - spacing) / 2
155− anchors.verticalCenter: parent.verticalCenter
156−
157− Label {
158− objectName: "displayNameLabel"
159− visible: valueLabel.visible
160− fontSize: "small"
161− opacity: 0.9
162− color: "white"
163− horizontalAlignment: Text.AlignLeft
164− width: parent.columnWidth
165− text: modelData.displayName
166− style: Text.Raised
167− styleColor: "black"
168− }
169− Label {
170− id: valueLabel
171− objectName: "valueLabel"
172− visible: modelData.value != ""
173− fontSize: "small"
174− opacity: 0.6
175− color: "white"
176− horizontalAlignment: Text.AlignRight
177− width: parent.columnWidth
178− text: modelData.value ? modelData.value : ""
179− style: Text.Raised
180− styleColor: "black"
181− wrapMode: Text.WordWrap
182− }
183− }
184− ListItems.ThinDivider {
185− anchors {
186− left: parent.left
187− bottom: parent.bottom
188− right: parent.right
189− }
190− }
191− }
192− }
193− }
194− }
195− }
196−}
Dash/Generic/WeatherFilterGrid.qmldeleted−47
@@ -1,47 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−
21−GenericFilterGrid {
22− id: filtergrid
23−
24− delegateHeight: units.gu(11.5)
25−
26− delegate: Tile {
27− id: tile
28− objectName: "delegate" + index
29− width: filtergrid.cellWidth
30− height: filtergrid.cellHeight
31− text: model.title
32− imageWidth: filtergrid.iconWidth
33− imageHeight: filtergrid.iconHeight
34− source: model.icon
35− maximumLineCount: 2
36−
37− style: FlatTileStyle {}
38−
39− onClicked: {
40− filtergrid.clicked(index, tile.y)
41− }
42−
43− onPressAndHold: {
44− filtergrid.pressAndHold(index, tile.y)
45− }
46− }
47−}
Dash/GenericScopeView.qmldeleted−594
@@ -1,594 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Utils 0.1
20−import Unity 0.1
21−import "../Components"
22−import "../Components/ListItems" as ListItems
23−
24−FocusScope {
25− id: scopeView
26−
27− property Scope scope
28− property SortFilterProxyModel categories: categoryFilter
29− property bool isCurrent
30− property ListModel searchHistory
31− property alias moving: categoryView.moving
32−
33− signal endReached
34− signal movementStarted
35− signal positionedAtBeginning
36−
37− readonly property alias previewShown: previewListView.onScreen
38− property bool enableHeightBehaviorOnNextCreation: false
39−
40− // FIXME delay the search so that daemons have time to settle, note that
41− // removing this will break ScopeView::test_changeScope
42− onScopeChanged: {
43− if (scope) {
44− timer.restart();
45− scope.activateApplication.connect(activateApp);
46− }
47− }
48−
49− function activateApp(appId) {
50− shell.activateApplication(appId);
51− }
52−
53− Binding {
54− target: scope
55− property: "isActive"
56− value: isCurrent
57− }
58−
59− Timer {
60− id: timer
61− interval: 2000
62− onTriggered: scope.searchQuery = ""
63− }
64−
65− SortFilterProxyModel {
66− id: categoryFilter
67− model: scope ? scope.categories : null
68− dynamicSortFilter: true
69− filterRole: Categories.RoleCount
70− filterRegExp: /^0$/
71− invertMatch: true
72− }
73−
74− onIsCurrentChanged: {
75− pageHeader.resetSearch();
76− previewListView.open = false;
77− }
78−
79− onMovementStarted: categoryView.showHeader()
80−
81− onPositionedAtBeginning: categoryView.positionAtBeginning()
82−
83− Binding {
84− target: scopeView.scope
85− property: "searchQuery"
86− value: pageHeader.searchQuery
87− }
88−
89− Binding {
90− target: pageHeader
91− property: "searchQuery"
92− value: scopeView.scope.searchQuery
93− }
94−
95− Connections {
96− target: panel
97− onSearchClicked: if (isCurrent) {
98− pageHeader.triggerSearch()
99− categoryView.showHeader()
100− }
101− }
102−
103− Connections {
104− target: scopeView.scope
105− onShowDash: previewListView.open = false;
106− onHideDash: previewListView.open = false;
107− }
108−
109− ScopeListView {
110− id: categoryView
111− objectName: "categoryListView"
112− anchors.fill: parent
113− model: scopeView.categories
114− forceNoClip: previewListView.onScreen
115−
116− onAtYEndChanged: if (atYEnd) endReached()
117− onMovingChanged: if (moving && atYEnd) endReached()
118−
119− property string expandedCategoryId: ""
120− signal correctExpandedCategory();
121−
122− Behavior on contentY {
123− enabled: previewListView.open
124− UbuntuNumberAnimation {}
125− }
126−
127− delegate: ListItems.Base {
128− id: baseItem
129− objectName: "dashCategory" + category
130− highlightWhenPressed: false
131−
132− readonly property bool expandable: rendererLoader.item ? rendererLoader.item.expandable : false
133− readonly property bool filtered: rendererLoader.item ? rendererLoader.item.filter : true
134− readonly property string category: categoryId
135−
136− Loader {
137− id: rendererLoader
138− anchors {
139− top: parent.top
140− left: parent.left
141− right: parent.right
142− }
143−
144− source: getRenderer(model.renderer, model.contentType, model.rendererHint, results)
145−
146− onLoaded: {
147− if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
148− item.enableHeightBehavior = scopeView.enableHeightBehaviorOnNextCreation;
149− scopeView.enableHeightBehaviorOnNextCreation = false;
150− }
151− if (source.toString().indexOf("Apps/RunningApplicationsGrid.qml") != -1) {
152− // TODO: the running apps grid doesn't support standard scope results model yet
153− item.firstModel = Qt.binding(function() { return results.firstModel })
154− item.secondModel = Qt.binding(function() { return results.secondModel })
155− item.canEnableTerminationMode = Qt.binding(function() { return scopeView.isCurrent })
156− } else {
157− item.model = Qt.binding(function() { return results })
158− }
159− item.objectName = Qt.binding(function() { return categoryId })
160− if (item.expandable) {
161− var shouldFilter = categoryId != categoryView.expandedCategoryId;
162− if (shouldFilter != item.filter) {
163− item.filter = shouldFilter;
164− }
165− }
166− updateDelegateCreationRange();
167− }
168−
169− Component.onDestruction: {
170− if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
171− scopeView.enableHeightBehaviorOnNextCreation = item.enableHeightBehaviorOnNextCreation;
172− }
173− }
174−
175− Connections {
176− target: rendererLoader.item
177− onClicked: {
178− // Prepare the preview in case activate() triggers a preview only
179− effect.positionPx = Math.max(mapToItem(categoryView, 0, itemY).y, pageHeader.height + categoryView.stickyHeaderHeight);
180− previewListView.categoryId = categoryId
181− previewListView.categoryDelegate = rendererLoader.item
182− previewListView.model = target.model;
183− previewListView.init = true;
184− previewListView.currentIndex = index;
185−
186− var item = target.model.get(index);
187−
188− if ((scopeView.scope.id == "applications.scope" && categoryId == "installed")
189− || (scopeView.scope.id == "home.scope" && categoryId == "applications.scope")) {
190− scopeView.scope.activate(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
191− item.comment, item.dndUri, item.metadata)
192− } else {
193− previewListView.open = true
194−
195− scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
196− item.comment, item.dndUri, item.metadata)
197− }
198− }
199− onPressAndHold: {
200− effect.positionPx = Math.max(mapToItem(categoryView, 0, itemY).y, pageHeader.height + categoryView.stickyHeaderHeight);
201− previewListView.categoryId = categoryId
202− previewListView.categoryDelegate = rendererLoader.item
203− previewListView.model = target.model;
204− previewListView.init = true;
205− previewListView.currentIndex = index;
206− previewListView.open = true
207−
208− var item = target.model.get(index)
209− scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
210− item.comment, item.dndUri, item.metadata)
211− }
212− }
213− Connections {
214− target: categoryView
215− onExpandedCategoryIdChanged: {
216− collapseAllButExpandedCategory();
217− }
218− onCorrectExpandedCategory: {
219− collapseAllButExpandedCategory();
220− }
221− function collapseAllButExpandedCategory() {
222− var item = rendererLoader.item;
223− if (item.expandable) {
224− var shouldFilter = categoryId != categoryView.expandedCategoryId;
225− if (shouldFilter != item.filter) {
226− // If the filter animation will be seen start it, otherwise, just flip the switch
227− var shrinkingVisible = shouldFilter && y + item.collapsedHeight < categoryView.height;
228− var growingVisible = !shouldFilter && y + height < categoryView.height;
229− if (!previewListView.open || !shouldFilter) {
230− if (shrinkingVisible || growingVisible) {
231− item.startFilterAnimation(shouldFilter)
232− } else {
233− item.filter = shouldFilter;
234− }
235− if (!shouldFilter && !previewListView.open) {
236− categoryView.maximizeVisibleArea(index, item.uncollapsedHeight);
237− }
238− }
239− }
240− }
241− }
242− onContentYChanged: rendererLoader.updateDelegateCreationRange();
243− onHeightChanged: rendererLoader.updateDelegateCreationRange();
244− }
245−
246− function updateDelegateCreationRange() {
247− // Do not update the range if we are overshooting up or down, since we'll come back
248− // to the stable position and delete/create items without any reason
249− if (categoryView.contentY < categoryView.originY) {
250− return;
251− } else if (categoryView.contentY + categoryView.height > categoryView.contentHeight) {
252− return;
253− }
254−
255− if (item.hasOwnProperty("delegateCreationBegin")) {
256− if (baseItem.y + baseItem.height <= 0) {
257− // Not visible (item at top of the list)
258− item.delegateCreationBegin = baseItem.height
259− item.delegateCreationEnd = baseItem.height
260− } else if (baseItem.y >= categoryView.height) {
261− // Not visible (item at bottom of the list)
262− item.delegateCreationBegin = 0
263− item.delegateCreationEnd = 0
264− } else {
265− item.delegateCreationBegin = Math.max(-baseItem.y, 0)
266− item.delegateCreationEnd = Math.min(categoryView.height + item.delegateCreationBegin, baseItem.height)
267− }
268− }
269− }
270− }
271− }
272−
273− sectionProperty: "name"
274− sectionDelegate: ListItems.Header {
275− objectName: "dashSectionHeader" + delegate.category
276− property var delegate: categoryView.item(delegateIndex)
277− width: categoryView.width
278− text: section
279− image: {
280− if (delegate && delegate.expandable)
281− return delegate.filtered ? "graphics/header_handlearrow.png" : "graphics/header_handlearrow2.png"
282− return "";
283− }
284− onClicked: {
285− if (categoryView.expandedCategoryId != delegate.category)
286− categoryView.expandedCategoryId = delegate.category;
287− else
288− categoryView.expandedCategoryId = "";
289− }
290− }
291− pageHeader: PageHeader {
292− id: pageHeader
293− objectName: "pageHeader"
294− width: categoryView.width
295− text: scopeView.scope.name
296− searchEntryEnabled: true
297− scope: scopeView.scope
298− searchHistory: scopeView.searchHistory
299− }
300− }
301−
302− function getDefaultRendererId(contentType) {
303− switch (contentType) {
304− default: return "grid";
305− }
306− }
307−
308− function getRenderer(rendererId, contentType, rendererHint, results) {
309− if (rendererId == "default") {
310− rendererId = getDefaultRendererId(contentType);
311− }
312− if (rendererId == "carousel") {
313− // Selectively disable carousel, 6 is fixed for now, should change on the form factor
314− if (results.count <= 6)
315− rendererId = "grid"
316− }
317− switch (rendererId) {
318− case "carousel": {
319− switch (contentType) {
320− case "music": return "Music/MusicCarousel.qml";
321− case "video": return "Video/VideoCarousel.qml";
322− default: return "Generic/GenericCarousel.qml";
323− }
324− }
325− case "grid": {
326− switch (contentType) {
327− case "apps": {
328− if (rendererHint == "toggled")
329− return "Apps/DashPluginFilterGrid.qml";
330− else
331− return "Generic/GenericFilterGrid.qml";
332− }
333− case "music": return "Music/MusicFilterGrid.qml";
334− case "video": return "Video/VideoFilterGrid.qml";
335− case "weather": return "Generic/WeatherFilterGrid.qml";
336− default: return "Generic/GenericFilterGrid.qml";
337− }
338− }
339− case "special": {
340− switch (contentType) {
341− case "apps": return "Apps/RunningApplicationsGrid.qml";
342− default: return "Generic/GenericFilterGrid.qml";
343− }
344− }
345− default: return "Generic/GenericFilterGrid.qml";
346− }
347− }
348−
349− OpenEffect {
350− id: effect
351− objectName: "openEffect"
352− anchors {
353− fill: parent
354− bottomMargin: -bottomOverflow
355− }
356− sourceItem: categoryView
357−
358− enabled: gap > 0.0
359−
360− topGapPx: (1 - gap) * positionPx
361− topOpacity: (1 - gap * 1.2)
362− bottomGapPx: positionPx + gap * (targetBottomGapPx - positionPx)
363− bottomOverflow: units.gu(20)
364− live: !expansionAnimation.running
365−
366− property int targetBottomGapPx: height - units.gu(8) - bottomOverflow
367− property real gap: previewListView.open ? 1.0 : 0.0
368−
369− Behavior on gap {
370− NumberAnimation {
371− id: expansionAnimation
372− duration: 200
373− easing.type: Easing.InOutQuad
374− onRunningChanged: {
375− if (!previewListView.open && !running) {
376− previewListView.onScreen = false
377− }
378− }
379− }
380− }
381− Behavior on positionPx {
382− enabled: previewListView.open
383− UbuntuNumberAnimation {}
384− }
385− }
386−
387− Connections {
388− target: scopeView.scope
389− onPreviewReady: {
390− if (previewListView.init) {
391− // Preview was triggered because of a click on the item. Need to expand now.
392− if (!previewListView.open) {
393− previewListView.open = true
394− }
395−
396− var index = previewListView.currentIndex
397− previewListView.currentIndex = -1
398− previewListView.currentIndex = index
399− previewListView.init = false
400− }
401− previewListView.currentItem.previewData = preview
402− }
403− }
404−
405− PreviewDelegateMapper {
406− id: previewDelegateMapper
407− }
408−
409− ListView {
410− id: previewListView
411− objectName: "previewListView"
412− height: effect.bottomGapPx - effect.topGapPx
413− anchors {
414− top: parent.top
415− topMargin: effect.topGapPx
416− left: parent.left
417− right: parent.right
418− }
419− orientation: ListView.Horizontal
420− highlightRangeMode: ListView.StrictlyEnforceRange
421− snapMode: ListView.SnapOneItem
422− boundsBehavior: Flickable.DragAndOvershootBounds
423− highlightMoveDuration: 250
424− flickDeceleration: units.gu(625)
425− maximumFlickVelocity: width * 5
426− cacheBuffer: 0
427−
428− // To be set before opening the preview
429− property string categoryId: ""
430− property var categoryDelegate
431−
432− // because the ListView is built asynchronous, setting the
433− // currentIndex directly won't work. We need to refresh it
434− // when the first preview is ready to be displayed.
435− property bool init: true
436−
437− onCurrentIndexChanged: {
438− var row = Math.floor(currentIndex / categoryDelegate.columns);
439− if (categoryDelegate.collapsedRowCount <= row) {
440− categoryView.expandedCategoryId = categoryId
441− }
442−
443− if (open) {
444− categoryDelegate.highlightIndex = currentIndex
445− }
446−
447− if (!init && model !== undefined) {
448− var item = model.get(currentIndex)
449− scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title, item.comment, item.dndUri, item.metadata)
450− }
451−
452− // Adjust contentY in case we need to change to it to show the next row
453− if (categoryDelegate.rows > 1) {
454− var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y;
455−
456− // Find new contentY and effect.postionPx
457− var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
458−
459− // Make sure the item is not covered by a header. Move the effect split down if necessary
460− var headerHeight = pageHeader.height + categoryView.stickyHeaderHeight;
461− var effectAdjust = Math.max(effect.positionPx, headerHeight);
462−
463− // Make sure we don't overscroll the listview. If yes, adjust effect position
464− if (newContentY < 0) {
465− effectAdjust += newContentY;
466− newContentY = 0;
467− }
468− if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
469− effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
470− newContentY = categoryView.contentHeight - categoryView.height;
471− }
472−
473− effect.positionPx = effectAdjust;
474− categoryView.contentY = newContentY;
475− }
476− }
477−
478− property bool open: false
479− property bool onScreen: false
480−
481− onOpenChanged: {
482− if (open) {
483− onScreen = true;
484− categoryDelegate.highlightIndex = currentIndex;
485− pageHeader.unfocus();
486− } else {
487− // Cancel any pending preview requests or actions
488− if (previewListView.currentItem.previewData !== undefined) {
489− previewListView.currentItem.previewData.cancelAction();
490− }
491− scopeView.scope.cancelActivation();
492− model = undefined;
493− categoryView.correctExpandedCategory();
494− categoryDelegate.highlightIndex = -1;
495− }
496− }
497−
498− Rectangle {
499− anchors.fill: parent
500− color: Qt.rgba(0, 0, 0, .3)
501− z: -1
502− }
503−
504− delegate: Loader {
505− id: previewLoader
506− objectName: "previewLoader" + index
507− height: previewListView.height
508− width: previewListView.width
509− asynchronous: true
510− source: previewListView.onScreen ?
511− (previewData !== undefined ? previewDelegateMapper.map(previewData.rendererName) : "DashPreviewPlaceholder.qml") : ""
512−
513− onPreviewDataChanged: {
514− if (previewData !== undefined && source.toString().indexOf("DashPreviewPlaceholder.qml") != -1) {
515− previewLoader.opacity = 0;
516− }
517− }
518−
519− onSourceChanged: {
520− if (previewData !== undefined) {
521− fadeIn.start()
522− }
523− }
524−
525− PropertyAnimation {
526− id: fadeIn
527− target: previewLoader
528− property: "opacity"
529− from: 0.0
530− to: 1.0
531− duration: UbuntuAnimation.BriskDuration
532− }
533−
534− property var previewData
535− property bool valid: item !== null
536−
537− onLoaded: {
538− if (previewListView.onScreen && previewData !== undefined) {
539− item.previewData = Qt.binding(function() { return previewData })
540− item.isCurrent = Qt.binding(function() { return ListView.isCurrentItem })
541− }
542− }
543−
544− Connections {
545− ignoreUnknownSignals: true
546− target: item
547− onClose: {
548− previewListView.open = false
549− }
550− }
551−
552− function closePreviewSpinner() {
553− if (item) {
554− item.showProcessingAction = false;
555− }
556− }
557− }
558− }
559−
560− Image {
561− objectName: "pointerArrow"
562− anchors {
563− top: previewListView.bottom
564− left: parent.left
565− leftMargin: previewListView.categoryDelegate !== undefined && previewListView.categoryDelegate.currentItem ?
566− previewListView.categoryDelegate.currentItem.center + (-width + margins) / 2 : 0
567−
568− Behavior on leftMargin {
569− SmoothedAnimation {
570− duration: UbuntuAnimation.FastDuration
571− }
572− }
573− }
574− height: units.gu(1)
575− width: units.gu(2)
576− property int margins: previewListView.categoryDelegate ? previewListView.categoryDelegate.margins : 0
577− opacity: previewListView.open ? .5 : 0
578−
579− source: "graphics/tooltip_arrow.png"
580− }
581−
582− // TODO: Move as InverseMouseArea to DashPreview
583− MouseArea {
584− objectName: "closePreviewMouseArea"
585− enabled: previewListView.onScreen
586− anchors {
587− fill: parent
588− topMargin: effect.bottomGapPx
589− }
590− onClicked: {
591− previewListView.open = false;
592− }
593− }
594−}
Dash/Movie/MoviePreview.qmldeleted−71
@@ -1,71 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import ".."
20−import "../Generic"
21−import "../../Components"
22−import "../Previews"
23−
24−GenericPreview {
25− id: root
26−
27− property bool ready: previewData ? true : false
28− property url url: ready ? previewData.image : ""
29−
30− previewImages: previewImageComponent
31− header: headerComponent
32−
33− Component {
34− id: previewImageComponent
35− LazyImage {
36− anchors.left: parent.left
37− anchors.right: parent.right
38− scaleTo: "width"
39− visible: height > 0
40− source: root.url
41− initialHeight: width * 10 / 16
42−
43− Image {
44− objectName: "playButton"
45− anchors.centerIn: parent
46− readonly property bool bigButton: parent.width > units.gu(40)
47− width: bigButton ? units.gu(8) : units.gu(4.5)
48− height: width
49− source: "../graphics/play_button%1%2.png".arg(previewImageMouseArea.pressed ? "_active" : "").arg(bigButton ? "_big" : "")
50− }
51−
52− MouseArea {
53− id: previewImageMouseArea
54− anchors.fill: parent
55− onClicked: {
56− Qt.openUrlExternally(previewData.result.uri);
57− }
58− }
59− }
60− }
61−
62− Component {
63− id: headerComponent
64− Header {
65− title: previewData.title
66− rating: Math.round(previewData.rating * 10)
67− reviews: previewData.numRatings
68− rated: previewData.infoMap["rated"] ? previewData.infoMap["rated"].value : 0
69− }
70− }
71−}
Dash/Music/MusicFilterGrid.qmldeleted−48
@@ -1,48 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import "../../Components"
19−import "../Generic"
20−
21−GenericFilterGrid {
22− id: musicFilterGrid
23−
24− delegateWidth: units.gu(11)
25− delegateHeight: units.gu(16)
26− iconWidth: units.gu(11)
27− iconHeight: units.gu(11)
28−
29− delegate: Tile {
30− id: tile
31− objectName: "delegate" + index
32− width: musicFilterGrid.cellWidth
33− height: musicFilterGrid.cellHeight
34− text: model.comment
35− imageWidth: musicFilterGrid.iconWidth
36− imageHeight: musicFilterGrid.iconHeight
37− source: model.icon
38− maximumLineCount: 2
39− horizontalAlignment: Text.AlignLeft
40−
41− style: MusicTileStyle {
42− artist: model.title
43− }
44−
45− onClicked: musicFilterGrid.clicked(index, tile.y)
46− onPressAndHold: musicFilterGrid.pressAndHold(index, tile.y)
47− }
48−}
Dash/Music/MusicPreview.qmldeleted−203
@@ -1,203 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import QtMultimedia 5.0
19−import Ubuntu.Components 0.1
20−import Ubuntu.Components.ListItems 0.1
21−import ".."
22−import "../Generic"
23−import "../../Components"
24−import "../Previews"
25−
26−GenericPreview {
27− id: root
28−
29− previewImages: previewImageComponent
30− header: headerComponent
31− description: descriptionComponent
32−
33− Component {
34− id: previewImageComponent
35− LazyImage {
36− height: units.gu(22)
37− scaleTo: "height"
38− source: previewData ? previewData.image : ""
39− initialHeight: height
40− initialWidth: height
41− }
42− }
43−
44− Component {
45− id: headerComponent
46− Header {
47− title: previewData.title
48− subtitle: previewData.subtitle
49− }
50− }
51−
52− Component {
53− id: descriptionComponent
54−
55− Item {
56− height: childrenRect.height
57− Audio {
58− id: audioPlayer
59− objectName: "audioPlayer"
60− property real progress: audioPlayer.position / audioPlayer.duration
61−
62− property Item playingItem
63−
64− Component.onDestruction: {
65− audioPlayer.stop();
66− }
67−
68− onErrorStringChanged: console.warn("Audio player error:", errorString)
69−
70− }
71−
72− Connections {
73− target: root
74− onIsCurrentChanged: {
75− if (!root.isCurrent) {
76− audioPlayer.stop();
77− }
78− }
79− }
80−
81− Column {
82− anchors { left: parent.left; right: parent.right }
83− visible: trackRepeater.count > 0
84−
85− ThinDivider {
86− objectName: "topDivider"
87− anchors { left: parent.left; right: parent.right }
88− }
89−
90− Repeater {
91− id: trackRepeater
92− objectName: "trackRepeater"
93−
94− model: previewData.tracks
95−
96− delegate: Item {
97− id: trackItem
98− objectName: "trackItem" + index
99− anchors { left: parent.left; right: parent.right }
100− height: units.gu(5)
101− property bool isPlayingItem: audioPlayer.playingItem == trackItem
102−
103− function play() {
104− audioPlayer.stop();
105− // Make sure we change the source, even if two items point to the same uri location
106− audioPlayer.source = "";
107− audioPlayer.source = model.uri;
108− audioPlayer.playingItem = trackItem;
109− audioPlayer.play();
110− }
111−
112− Row {
113− id: trackRow
114− width: parent.width
115− spacing: units.gu(1)
116− property int column1Width: units.gu(3)
117− property int column2Width: width - (2 * spacing) - column1Width - column3Width
118− property int column3Width: units.gu(4)
119− anchors.verticalCenter: parent.verticalCenter
120−
121− Button {
122− objectName: "playButton"
123− width: trackRow.column1Width
124− height: width
125− iconSource: audioPlayer.playbackState == Audio.PlayingState && trackItem.isPlayingItem ? "image://theme/media-playback-pause" : "image://theme/media-playback-start"
126−
127− // Can't be "transparent" or "#00xxxxxx" as the button optimizes away the surrounding shape
128− // FIXME when this is resolved: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1251685
129− color: "#01000000"
130−
131− onClicked: {
132− if (trackItem.isPlayingItem) {
133− if (audioPlayer.playbackState == Audio.PlayingState) {
134− audioPlayer.pause();
135− } else if (audioPlayer.playbackState == Audio.PausedState){
136− audioPlayer.play();
137− }
138− } else {
139− trackItem.play();
140− }
141− }
142− }
143−
144− Label {
145− objectName: "trackTitleLabel"
146− fontSize: "small"
147− opacity: 0.9
148− color: "white"
149− horizontalAlignment: Text.AlignLeft
150− anchors.verticalCenter: parent.verticalCenter
151− width: parent.column2Width
152− text: title
153− style: Text.Raised
154− styleColor: "black"
155− elide: Text.ElideRight
156−
157− UbuntuShape {
158− id: progressBarFill
159− objectName: "progressBarFill"
160− color: UbuntuColors.orange
161− anchors.left: progressBarImage.left
162− anchors.right: progressBarImage.right
163− anchors.verticalCenter: progressBarImage.verticalCenter
164− height: units.dp(2)
165− anchors.margins: units.dp(2)
166− anchors.rightMargin: maxWidth - (maxWidth * audioPlayer.progress) + units.dp(2)
167− visible: progressBarImage.visible
168− property int maxWidth: progressBarImage.width - units.dp(4)
169− }
170−
171− Image {
172− id: progressBarImage
173− anchors { left: parent.left; top: parent.bottom; right: parent.right }
174− height: units.dp(6)
175− visible: audioPlayer.playbackState != Audio.StoppedState && trackItem.isPlayingItem && model.length.length > 0
176− source: "graphics/music_progress_bg.png"
177− }
178− }
179−
180− Label {
181− id: valueLabel
182− objectName: "timeLabel"
183− fontSize: "small"
184− opacity: 0.9
185− color: "white"
186− anchors.verticalCenter: parent.verticalCenter
187− horizontalAlignment: Text.AlignRight
188− width: parent.column3Width
189− text: length
190− style: Text.Raised
191− styleColor: "black"
192− }
193− }
194−
195− ThinDivider {
196− anchors { left: parent.left; bottom: parent.bottom; right: parent.right }
197− }
198− }
199− }
200− }
201− }
202− }
203−}
Dash/Music/MusicTileStyle.qmldeleted−102
@@ -1,102 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: tile
22−
23− property alias artist: artistLabel.text
24−
25− anchors.fill: parent
26−
27− UbuntuShape {
28− id: icon
29− anchors {
30− top: parent.top
31− horizontalCenter: parent.horizontalCenter
32− }
33− radius: "medium"
34− width: styledItem.imageWidth
35− height: styledItem.imageHeight
36− image: Image {
37− id: image
38− objectName: "image"
39− sourceSize { width: icon.width; height: icon.height }
40− asynchronous: true
41− cache: false
42− source: styledItem.source
43− fillMode: styledItem.fillMode
44− horizontalAlignment: Image.AlignHCenter
45− verticalAlignment: Image.AlignVCenter
46− }
47− }
48−
49− UbuntuShape {
50− id: borderPressed
51− objectName: "borderPressed"
52−
53− anchors.fill: icon
54− radius: "medium"
55− borderSource: "radius_pressed.sci"
56− opacity: styledItem.pressed ? 1.0 : 0.0
57− Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
58− }
59−
60− Label {
61− id: label
62− objectName: "label"
63− anchors {
64− baseline: icon.bottom
65− baselineOffset: units.gu(2)
66− left: icon.left
67− right: parent.right
68− rightMargin: units.gu(1)
69− leftMargin: units.dp(2)
70− }
71−
72− color: Theme.palette.selected.backgroundText
73− opacity: 0.9
74− style: Text.Raised
75− styleColor: "black"
76− fontSize: "small"
77− font.weight: Font.Bold
78− elide: Text.ElideRight
79− horizontalAlignment: styledItem.horizontalAlignment
80− text: styledItem.text
81− wrapMode: Text.Wrap
82− maximumLineCount: styledItem.maximumLineCount
83− }
84−
85− Label {
86− id: artistLabel
87− anchors {
88− top: label.bottom
89− left: label.left
90− right: label.right
91− rightMargin: units.gu(1)
92− }
93−
94− color: Theme.palette.selected.backgroundText
95− opacity: 0.9
96− style: Text.Raised
97− styleColor: "black"
98− fontSize: "x-small"
99− elide: Text.ElideMiddle
100− horizontalAlignment: styledItem.horizontalAlignment
101− }
102−}
Dash/Music/graphics/music_progress_bg.pngdeleted
Binary file not shown.
Dash/PreviewDelegateMapper.qmldeleted−38
@@ -1,38 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−QtObject {
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,
25− "preview-movie": "Movie/MoviePreview.qml",
26− "preview-music": "Music/MusicPreview.qml",
27− }
28− }
29−
30− function map(rendererName) {
31− var customPreview = d.previewDelegateMapping[rendererName]
32− if (customPreview != undefined) {
33− return customPreview
34− }
35− console.debug("Renderer "+rendererName+" not found, using preview-generic")
36− return d.genericPreview
37− }
38−}
Dash/Previews/Header.qmldeleted−109
@@ -1,109 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−
21−Row {
22− id: root
23− property alias icon: image.source
24− property alias title: titleLabel.text
25− property alias subtitle: subtitleLabel.text
26− property alias rating: ratingStars.rating
27− property int rated: 0
28− property int reviews: 0
29−
30− spacing: units.gu(2)
31− height: imageShape.visible ? imageShape.height : contentColumn.height
32−
33− UbuntuShape {
34− id: imageShape
35− width: height
36− height: Math.max(units.gu(6), contentColumn.height)
37− visible: image.source.toString().length > 0
38− image: Image {
39− id: image
40− sourceSize { width: imageShape.width; height: imageShape.height }
41− asynchronous: true
42− fillMode: Image.PreserveAspectFit
43− }
44− }
45−
46− Column {
47− id: contentColumn
48− spacing: units.gu(1)
49− width: parent.width - x
50−
51− Label {
52− id: titleLabel
53− objectName: "titleLabel"
54− fontSize: "large"
55− color: "white"
56− style: Text.Raised
57− styleColor: "black"
58− opacity: .9
59− width: parent.width
60− elide: Text.ElideRight
61− }
62−
63− Label {
64− id: subtitleLabel
65− objectName: "subtitleLabel"
66− fontSize: "medium"
67− color: "white"
68− style: Text.Raised
69− styleColor: "black"
70− opacity: .6
71− visible: text.length > 0
72− }
73−
74− Row {
75− visible: root.rating >= 0
76− spacing: units.gu(1)
77−
78− RatingStars {
79− id: ratingStars
80− maximumRating: 10
81− rating: -1
82− }
83−
84− Label {
85− id: ratedLabel
86− objectName: "ratedLabel"
87− fontSize: "medium"
88− color: "white"
89− style: Text.Raised
90− styleColor: "black"
91− opacity: .6
92− //TRANSLATORS: Number of persons who rated this app/video/whatever
93− text: i18n.tr("(%1)").arg(root.rated)
94− }
95−
96− Label {
97− id: reviewsLabel
98− objectName: "reviewsLabel"
99− fontSize: "medium"
100− color: "white"
101− style: Text.Raised
102− styleColor: "black"
103− opacity: .6
104− //TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
105− text: i18n.tr("%1 review", "%1 reviews", root.reviews).arg(root.reviews)
106− }
107− }
108− }
109−}
Dash/Previews/Reviews.qmldeleted−194
@@ -1,194 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1 as ListItem
20−import "../../Components"
21−
22−Column {
23− id: root
24−
25− property var model
26− property alias textArea: reviewField
27−
28− signal sendReview(string review)
29− signal editing
30−
31− spacing: units.gu(2)
32− state: ""
33−
34− states: [
35− State {
36− name: ""
37− PropertyChanges { target: reviewField; width: root.width }
38− PropertyChanges { target: sendButton; opacity: 0 }
39− PropertyChanges { target: inverseArea; enabled: false }
40− },
41− State {
42− name: "editing"
43− PropertyChanges { target: reviewField; width: (root.width - row.spacing - sendButton.width) }
44− PropertyChanges { target: sendButton; opacity: 1 }
45− PropertyChanges { target: inverseArea; enabled: true }
46− }
47− ]
48−
49− transitions: [
50− Transition {
51− from: ""
52− to: "editing"
53− SequentialAnimation {
54− UbuntuNumberAnimation { target: reviewField; properties: "width"; duration: UbuntuAnimation.SlowDuration }
55− UbuntuNumberAnimation { target: sendButton; properties: "opacity"; duration: UbuntuAnimation.SlowDuration }
56− }
57− },
58− Transition {
59− from: "editing"
60− to: ""
61− SequentialAnimation {
62− UbuntuNumberAnimation { target: sendButton; properties: "opacity"; duration: UbuntuAnimation.SlowDuration }
63− UbuntuNumberAnimation { target: reviewField; properties: "width"; duration: UbuntuAnimation.SlowDuration }
64− }
65− }
66− ]
67−
68− Label {
69− fontSize: "medium"
70− color: "white"
71− style: Text.Raised
72− styleColor: "black"
73− opacity: .9
74− text: i18n.tr("Add a review")
75− }
76−
77− Row {
78− id: row
79− spacing: units.gu(1)
80− width: root.width
81−
82− // FIXME: needs to react to Qt.inputMethod geometry
83− TextArea {
84− id: reviewField
85− objectName: "reviewField"
86− placeholderText: i18n.tr("Review")
87− width: parent.width
88− verticalAlignment: Text.AlignVCenter
89− autoSize: true
90− maximumLineCount: 5
91−
92− Behavior on height { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
93−
94− onFocusChanged: {
95− if(reviewField.focus){
96− root.state = "editing";
97− reviewField.selectAll();
98− root.editing();
99− }
100− }
101−
102− // FIXME: not active when in wide mode
103− InverseMouseArea {
104− id: inverseArea
105− anchors.fill: parent
106− enabled: false
107− onPressed: {
108− reviewField.focus = false;
109− root.state = "";
110− }
111− }
112− }
113−
114− Button {
115− id: sendButton
116− objectName: "sendButton"
117− width: units.gu(10)
118− height: units.gu(4)
119− anchors.bottom: reviewField.bottom
120− color: Theme.palette.selected.foreground
121− text: i18n.tr("Send")
122− opacity: 0
123−
124− onClicked: {
125− root.sendReview(reviewField.text);
126− reviewField.text = ""
127− }
128− }
129− }
130−
131− ListItem.ThinDivider {}
132−
133− Label {
134− fontSize: "medium"
135− color: "white"
136− style: Text.Raised
137− styleColor: "black"
138− opacity: .9
139− text: i18n.tr("Comments:")
140− }
141−
142− Repeater {
143− objectName: "commentsArea"
144− model: root.model
145−
146− Column {
147− anchors { left: parent.left; right: parent.right }
148−
149− Column {
150− anchors { left: parent.left; right: parent.right }
151−
152− Label {
153− anchors { left: parent.left; right: parent.right }
154− text: modelData[0]
155− fontSize: "medium"
156− color: "white"
157− opacity: .8
158− wrapMode: Text.WordWrap
159− style: Text.Raised
160− styleColor: "black"
161− }
162−
163− Row {
164− spacing: units.gu(1)
165−
166− RatingStars {
167− maximumRating: 10
168− rating: modelData[1]
169− }
170−
171− Label {
172− text: modelData[2]
173− fontSize: "medium"
174− color: Theme.palette.selected.backgroundText
175− opacity: .6
176− style: Text.Raised
177− styleColor: "black"
178− }
179− }
180− }
181−
182− Label {
183− anchors { left: parent.left; right: parent.right }
184− text: modelData[3]
185− fontSize: "medium"
186− color: Theme.palette.selected.backgroundText
187− opacity: .6
188− wrapMode: Text.WordWrap
189− style: Text.Raised
190− styleColor: "black"
191− }
192− }
193− }
194−}
Dash/SearchableResultModel.qmldeleted−44
@@ -1,44 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import Utils 0.1
18−import Unity 0.1
19−
20−SortFilterProxyModel {
21− id: root
22−
23− property string searchQuery: ""
24− property bool hideOnSearch: false
25−
26− filterRole: CategoryResults.RoleTitle
27−
28− function get(index) {
29− return model.get(mapToSource(index))
30− }
31−
32− onSearchQueryChanged: {
33− if (searchQuery.length == 0) {
34− filterRegExp = RegExp("");
35− filterCaseSensitivity = Qt.CaseInsensitive;
36− } else if (!hideOnSearch) {
37− setFilterWildcard(searchQuery);
38− filterCaseSensitivity = Qt.CaseInsensitive;
39− } else {
40− filterRegExp = /^$/;
41− filterCaseSensitivity = Qt.CaseInsensitive;
42− }
43− }
44−}
Dash/Video/VideoFilterGrid.qmldeleted−47
@@ -1,47 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../Components"
20−import "../Generic"
21−
22−GenericFilterGrid {
23− id: videoFilterGrid
24−
25− delegateWidth: units.gu(11)
26− delegateHeight: units.gu(15)
27− iconWidth: units.gu(11)
28− iconHeight: units.gu(11)
29−
30− delegate: Tile {
31− id: tile
32− objectName: "delegate" + index
33− width: videoFilterGrid.cellWidth
34− height: videoFilterGrid.cellHeight
35− text: model.title
36− imageWidth: videoFilterGrid.iconWidth
37− imageHeight: videoFilterGrid.iconHeight
38− source: model.icon
39− maximumLineCount: 2
40− horizontalAlignment: Text.AlignLeft
41−
42− style: VideoTileStyle {}
43−
44− onClicked: videoFilterGrid.clicked(index, tile.y)
45− onPressAndHold: videoFilterGrid.pressAndHold(index, tile.y)
46− }
47−}
Dash/Video/VideoTileStyle.qmldeleted−87
@@ -1,87 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: tile
22−
23− anchors.fill: parent
24−
25− Image {
26− id: icon
27− anchors {
28− top: parent.top
29− horizontalCenter: parent.horizontalCenter
30− }
31− width: styledItem.imageWidth
32− height: styledItem.imageHeight
33− source: "graphics/movie_icon_holder.png"
34−
35− Image {
36− id: image
37− objectName: "image"
38− anchors {
39− fill: parent;
40− topMargin: units.gu(2);
41− bottomMargin: units.gu(2)
42− }
43− sourceSize { width: icon.width; height: icon.height }
44− asynchronous: true
45− cache: false
46− source: styledItem.source
47− fillMode: styledItem.fillMode
48− horizontalAlignment: Image.AlignHCenter
49− verticalAlignment: Image.AlignVCenter
50− }
51− }
52−
53− UbuntuShape {
54− id: borderPressed
55− objectName: "borderPressed"
56−
57− anchors.fill: icon
58− radius: "medium"
59− borderSource: "radius_pressed.sci"
60− opacity: styledItem.pressed ? 1.0 : 0.0
61− Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
62− }
63−
64− Label {
65− id: label
66− objectName: "label"
67− anchors {
68− baseline: icon.bottom
69− baselineOffset: units.gu(2)
70− left: icon.left
71− right: parent.right
72− rightMargin: units.gu(1)
73− leftMargin: units.dp(2)
74− }
75−
76− color: Theme.palette.selected.backgroundText
77− opacity: 0.9
78− style: Text.Raised
79− styleColor: "black"
80− fontSize: "small"
81− elide: Text.ElideRight
82− horizontalAlignment: styledItem.horizontalAlignment
83− text: styledItem.text
84− wrapMode: Text.Wrap
85− maximumLineCount: styledItem.maximumLineCount
86− }
87−}
Dash/Video/graphics/icon_button_amazon@20.pngdeleted
Binary file not shown.
Dash/Video/graphics/icon_button_u1@20.pngdeleted
Binary file not shown.
Dash/Video/graphics/movie_icon_holder@27.pngdeleted
Binary file not shown.
Dash/graphics/header_handlearrow2@20.pngdeleted
Binary file not shown.
Dash/graphics/header_handlearrow@20.pngdeleted
Binary file not shown.
Dash/graphics/icon_clear@20.pngdeleted
Binary file not shown.
Dash/graphics/icon_listview_clear@20.pngdeleted
Binary file not shown.
Dash/graphics/icon_search_active@20.pngdeleted
Binary file not shown.
Dash/graphics/icon_search_inactive@20.pngdeleted
Binary file not shown.
Dash/graphics/phone/screenshots/browser@12.pngdeleted
Binary file not shown.
Dash/graphics/phone/screenshots/camera@12.pngdeleted
Binary file not shown.
Dash/graphics/phone/screenshots/facebook@12.pngdeleted
Binary file not shown.
Dash/graphics/phone/screenshots/map@12.pngdeleted
Binary file not shown.
Dash/graphics/phone/screenshots/music@12.pngdeleted
Binary file not shown.
Dash/graphics/phone/screenshots/phone@12.pngdeleted
Binary file not shown.
Dash/graphics/phone/screenshots/settings@12.pngdeleted
Binary file not shown.
Dash/graphics/phone/screenshots/twitter@12.pngdeleted
Binary file not shown.
Dash/graphics/play_button@18.pngdeleted
Binary file not shown.
Dash/graphics/play_button_active@18.pngdeleted
Binary file not shown.
Dash/graphics/play_button_active_big@20.pngdeleted
Binary file not shown.
Dash/graphics/play_button_big@20.pngdeleted
Binary file not shown.
Dash/graphics/tablet/icon_close_preview@20.pngdeleted
Binary file not shown.
Dash/graphics/tooltip_arrow@27.pngdeleted
Binary file not shown.
Greeter/Greeter.qmldeleted−122
@@ -1,122 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Gestures 0.1
20−import LightDM 0.1 as LightDM
21−import "../Components"
22−
23−Showable {
24− id: greeter
25− enabled: shown
26− created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
27−
28− property url defaultBackground
29−
30− // 1 when fully shown and 0 when fully hidden
31− property real showProgress: MathUtils.clamp((width + x) / width, 0, 1)
32−
33− showAnimation: StandardAnimation { property: "x"; to: 0 }
34− hideAnimation: StandardAnimation { property: "x"; to: -width }
35−
36− property alias dragHandleWidth: dragHandle.width
37− property alias model: greeterContentLoader.model
38− property bool locked: shown && !LightDM.Greeter.promptless
39−
40− readonly property bool narrowMode: !multiUser && width <= units.gu(60)
41− readonly property bool multiUser: LightDM.Users.count > 1
42−
43− readonly property bool leftTeaserPressed: greeterContentLoader.status == Loader.Ready &&
44− greeterContentLoader.item.leftTeaserPressed
45− readonly property bool rightTeaserPressed: greeterContentLoader.status == Loader.Ready &&
46− greeterContentLoader.item.rightTeaserPressed
47−
48− readonly property int currentIndex: greeterContentLoader.currentIndex
49−
50− signal selected(int uid)
51− signal unlocked(int uid)
52−
53− onRightTeaserPressedChanged: {
54− if (rightTeaserPressed && (!locked || narrowMode) && x == 0) {
55− teasingTimer.start();
56− }
57− }
58−
59− Loader {
60− id: greeterContentLoader
61− objectName: "greeterContentLoader"
62− anchors.fill: parent
63− property var model: LightDM.Users
64− property int currentIndex: 0
65− property var infographicModel: LightDM.Infographic
66− readonly property int backgroundTopMargin: -greeter.y
67−
68− source: required ? "GreeterContent.qml" : ""
69−
70− Connections {
71− target: greeterContentLoader.item
72−
73− onSelected: {
74− greeter.selected(uid);
75− greeterContentLoader.currentIndex = uid;
76− }
77− onUnlocked: greeter.unlocked(uid);
78− }
79− }
80−
81− Timer {
82− id: teasingTimer
83− interval: 200
84− }
85−
86− states: [
87− State {
88− name: "teasing"
89− when: teasingTimer.running
90− PropertyChanges {
91− target: greeter
92− x: -dragHandle.hintDisplacement
93− }
94− }
95− ]
96− transitions: [
97− Transition {
98− from: "*"
99− to: "*"
100− NumberAnimation {
101− target: greeter
102− property: "x"
103− duration: 300
104− easing.type: Easing.OutCubic
105− }
106− }
107− ]
108−
109− DragHandle {
110− id: dragHandle
111−
112− anchors.top: parent.top
113− anchors.bottom: parent.bottom
114− anchors.right: parent.right
115−
116− hintDisplacement: units.gu(2)
117−
118− enabled: greeter.narrowMode || !greeter.locked
119−
120− direction: Direction.Leftwards
121− }
122−}
Greeter/GreeterContent.qmldeleted−166
@@ -1,166 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import AccountsService 0.1
19−import Ubuntu.Components 0.1
20−import LightDM 0.1 as LightDM
21−import "../Components"
22−
23−MouseArea {
24− id: root
25− anchors.fill: parent
26−
27− property bool ready: background.source == "" || background.status == Image.Ready || background.status == Image.Error
28− property bool leftTeaserPressed: teasingMouseArea.pressed &&
29− teasingMouseArea.mouseX < teasingMouseArea.width / 2
30− property bool rightTeaserPressed: teasingMouseArea.pressed &&
31− teasingMouseArea.mouseX > teasingMouseArea.width / 2
32−
33− signal selected(int uid)
34− signal unlocked(int uid)
35−
36− Rectangle {
37− // In case background fails to load
38− id: backgroundBackup
39− anchors.fill: parent
40− color: "black"
41− }
42−
43− property url backgroundValue: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : greeter.defaultBackground
44− onBackgroundValueChanged: background.source = backgroundValue
45−
46− CrossFadeImage {
47− id: background
48− objectName: "greeterBackground"
49− anchors {
50− fill: parent
51− topMargin: backgroundTopMargin
52− }
53− fillMode: Image.PreserveAspectCrop
54− }
55−
56− // See Shell.qml's backgroundSettings treatment for why we need a separate
57− // Image, but it boils down to avoiding binding loop detection.
58− Image {
59− source: background.source
60− height: 0
61− width: 0
62− sourceSize.height: 0
63− sourceSize.width: 0
64− onStatusChanged: {
65− if (status == Image.Error && source != greeter.defaultBackground) {
66− background.source = greeter.defaultBackground
67− }
68− }
69− }
70−
71− Rectangle {
72− anchors.fill: parent
73− color: "black"
74− opacity: 0.4
75− }
76−
77− MouseArea {
78− id: teasingMouseArea
79− anchors.fill: parent
80− }
81−
82− Loader {
83− id: loginLoader
84− objectName: "loginLoader"
85− anchors {
86− left: parent.left
87− leftMargin: Math.min(parent.width * 0.16, units.gu(20))
88− verticalCenter: parent.verticalCenter
89− }
90− width: units.gu(29)
91− height: parent.height
92−
93− // TODO: Once we have a system API for determining which mode we are
94− // in, tablet/phone/desktop, that should be used instead of narrowMode.
95− source: greeter.narrowMode ? "" : "LoginList.qml"
96−
97− onLoaded: {
98− item.currentIndex = greeterContentLoader.currentIndex;
99− selected(item.currentIndex);
100− item.resetAuthentication();
101− }
102−
103− Binding {
104− target: loginLoader.item
105− property: "model"
106− value: greeterContentLoader.model
107− }
108−
109− Connections {
110− target: loginLoader.item
111−
112− onSelected: {
113− root.selected(uid);
114− }
115−
116− onUnlocked: {
117− root.unlocked(uid);
118− }
119−
120− onCurrentIndexChanged: {
121− if (greeterContentLoader.currentIndex !== loginLoader.item.currentIndex) {
122− greeterContentLoader.currentIndex = loginLoader.item.currentIndex;
123− }
124− }
125− }
126− }
127−
128− Infographics {
129− id: infographics
130− objectName: "infographics"
131− height: narrowMode ? parent.height : 0.75 * parent.height
132− model: greeterContentLoader.infographicModel
133−
134− property string selectedUser
135− property string infographicUser: AccountsService.statsWelcomeScreen ? selectedUser : ""
136− onInfographicUserChanged: greeterContentLoader.infographicModel.username = infographicUser
137−
138− Component.onCompleted: {
139− selectedUser = greeterContentLoader.model.data(greeterContentLoader.currentIndex, LightDM.UserRoles.NameRole)
140− greeterContentLoader.infographicModel.username = infographicUser
141− greeterContentLoader.infographicModel.readyForDataChange()
142− }
143−
144− Connections {
145− target: root
146− onSelected: infographics.selectedUser = greeterContentLoader.model.data(uid, LightDM.UserRoles.NameRole)
147− }
148−
149− anchors {
150− verticalCenter: parent.verticalCenter
151− left: narrowMode ? root.left : loginLoader.right
152− right: root.right
153− }
154− }
155−
156− Clock {
157− id: clock
158− visible: narrowMode
159−
160− anchors {
161− top: parent.top
162− topMargin: units.gu(2)
163− horizontalCenter: parent.horizontalCenter
164− }
165− }
166−}
Greeter/Lockscreen.qmldeleted−156
@@ -1,156 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−Showable {
22− id: root
23−
24− // Determine if a numeric or alphanumeric pad is used.
25− property bool alphaNumeric: false
26−
27− // Placeholder text
28− property string placeholderText: ""
29−
30− // In case the Lockscreen can show a greeter message, this is the username
31− property string username: ""
32−
33− // As the numeric PIN pad doesn't have a OK button by design, we need to auto-confirm on a certain length.
34− // This is ignored by the alphaNumeric lockscreen as that one is confirmed with pressing enter on the OSK.
35− property int pinLength: 4
36−
37− property url background: ""
38−
39− signal entered(string passphrase)
40− signal cancel()
41− signal emergencyCall()
42−
43− onRequiredChanged: {
44− if (required && pinPadLoader.item) {
45− pinPadLoader.item.clear(false);
46− }
47− }
48−
49− function reset() {
50− // This causes the loader below to destry and recreate the source
51− pinPadLoader.resetting = true;
52− pinPadLoader.resetting = false;
53− }
54−
55− function clear(showAnimation) {
56− pinPadLoader.item.clear(showAnimation);
57− }
58−
59− Rectangle {
60− // In case background fails to load or is undefined
61− id: backgroundBackup
62− anchors.fill: parent
63− color: "black"
64− }
65−
66− Image {
67− id: backgroundImage
68− objectName: "lockscreenBackground"
69− anchors {
70− fill: parent
71− topMargin: backgroundTopMargin
72− }
73− source: root.required ? root.background : ""
74− fillMode: Image.PreserveAspectCrop
75− }
76−
77− MouseArea {
78− anchors.fill: root
79− }
80−
81− Loader {
82− id: pinPadLoader
83− objectName: "pinPadLoader"
84− anchors {
85− left: parent.left
86− right: parent.right
87− verticalCenter: parent.verticalCenter
88− verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
89− }
90− property bool resetting: false
91−
92− source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
93−
94− Connections {
95− target: pinPadLoader.item
96−
97− onEntered: {
98− root.entered(passphrase);
99− }
100−
101− onCancel: {
102− root.cancel()
103− }
104− }
105−
106− Binding {
107− target: pinPadLoader.item
108− property: "pinLength"
109− value: root.pinLength
110− }
111− Binding {
112− target: pinPadLoader.item
113− property: "placeholderText"
114− value: root.placeholderText
115− }
116− Binding {
117− target: pinPadLoader.item
118− property: "username"
119− value: root.username
120− }
121− }
122−
123− Column {
124− anchors {
125− left: parent.left
126− bottom: parent.bottom
127− bottomMargin: units.gu(4)
128− right: parent.right
129− }
130− height: childrenRect.height
131− spacing: units.gu(1)
132−
133− Icon {
134− objectName: "emergencyCallIcon"
135− height: units.gu(3)
136− width: height
137− anchors.horizontalCenter: parent.horizontalCenter
138− name: "phone-app-call-symbolic"
139− color: "#f3f3e7"
140− opacity: 0.6
141−
142− MouseArea {
143− anchors.fill: parent
144− onClicked: root.emergencyCall()
145− }
146− }
147−
148− Label {
149− text: i18n.tr("Emergency Call")
150− color: "#f3f3e7"
151− opacity: 0.6
152− fontSize: "medium"
153− anchors.horizontalCenter: parent.horizontalCenter
154− }
155− }
156−}
Greeter/LoginList.qmldeleted−304
@@ -1,304 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import LightDM 0.1 as LightDM
20−import "../Components"
21−
22−Item {
23− id: root
24−
25− property alias userList: userList
26− property alias model: userList.model
27− property alias currentIndex: userList.currentIndex
28−
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
34−
35− signal selected(int uid)
36− signal unlocked(int uid)
37−
38− Keys.onEscapePressed: root.resetAuthentication()
39−
40− Rectangle {
41− id: highlightItem
42− anchors {
43− left: parent.left
44− right: parent.right
45− verticalCenter: parent.verticalCenter
46− }
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)
52− antialiasing: true
53− }
54−
55− ListView {
56− id: userList
57− objectName: "userList"
58−
59− anchors.fill: parent
60−
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
66−
67− readonly property bool movingInternally: moveTimer.running || userList.moving
68−
69− onCurrentIndexChanged: {
70− if (LightDM.Greeter.authenticationUser != userList.model.data(currentIndex, LightDM.UserRoles.NameRole)) {
71− root.resetAuthentication();
72− }
73− }
74−
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);
79− }
80− }
81−
82− delegate: Item {
83− width: parent.width
84− height: root.cellHeight
85−
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
88−
89− opacity: {
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;
96− if (belowHighlight)
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;
102− else
103− return 1;
104− return 1 - Math.min(1, (Math.abs(highlightDist) + root.cellHeight) / ((root.numAboveBelow + 1) * root.cellHeight))
105− }
106−
107− Label {
108− objectName: "username" + index
109−
110− anchors {
111− left: parent.left
112− leftMargin: units.gu(2)
113− right: parent.right
114− rightMargin: units.gu(2)
115− top: parent.top
116− // Add an offset to topMargin for any items below the highlight
117− topMargin: units.gu(1) + (parent.belowHighlight ? parent.belowOffset : 0)
118− }
119− text: realName
120− color: "white"
121− elide: Text.ElideRight
122−
123− Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
124− }
125−
126− MouseArea {
127− anchors {
128− left: parent.left
129− right: parent.right
130− top: parent.top
131− // Add an offset to topMargin for any items below the highlight
132− topMargin: parent.belowHighlight ? parent.belowOffset : 0
133− }
134− height: parent.height
135− enabled: userList.currentIndex !== index
136− onClicked: {
137− moveTimer.start();
138− userList.currentIndex = index;
139− }
140−
141− Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
142− }
143− }
144−
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)
147− Timer {
148− id: moveTimer
149− running: false
150− repeat: false
151− interval: root.moveDuration
152− }
153− }
154−
155− Label {
156− id: infoLabel
157− objectName: "infoLabel"
158− anchors {
159− bottom: passwordInput.top
160− left: parent.left
161− topMargin: units.gu(1)
162− bottomMargin: units.gu(1)
163− leftMargin: units.gu(2)
164− rightMargin: units.gu(1)
165− }
166−
167− color: "white"
168− width: root.width - anchors.leftMargin - anchors.rightMargin
169− fontSize: "small"
170− textFormat: Text.StyledText
171− clip: true
172−
173− opacity: (userList.movingInternally || text == "") ? 0 : 1
174− Behavior on opacity {
175− NumberAnimation { duration: 100 }
176− }
177− }
178−
179− TextField {
180− id: passwordInput
181− objectName: "passwordInput"
182− anchors {
183− bottom: highlightItem.bottom
184− horizontalCenter: parent.horizontalCenter
185− margins: units.gu(1)
186− }
187− height: units.gu(4.5)
188− width: parent.width - anchors.margins * 2
189− opacity: userList.movingInternally ? 0 : 1
190−
191− Behavior on opacity {
192− NumberAnimation { duration: 100 }
193− }
194−
195− onAccepted: {
196− if (!enabled)
197− return;
198− root.focus = true; // so that it can handle Escape presses for us
199− enabled = false;
200− LightDM.Greeter.respond(text);
201− }
202− Keys.onEscapePressed: root.resetAuthentication()
203−
204− Image {
205− anchors {
206− right: parent.right
207− rightMargin: units.gu(2)
208− verticalCenter: parent.verticalCenter
209− }
210− visible: LightDM.Greeter.promptless
211− source: "graphics/icon_arrow.png"
212− }
213−
214− WrongPasswordAnimation {
215− id: wrongPasswordAnimation
216− target: passwordInput
217− }
218−
219− Connections {
220− target: Qt.inputMethod
221− onVisibleChanged: {
222− if (!Qt.inputMethod.visible) {
223− passwordInput.focus = false;
224− }
225− }
226− }
227−
228− }
229−
230− MouseArea {
231− anchors.fill: passwordInput
232− enabled: LightDM.Greeter.promptless
233− onClicked: {
234− if (LightDM.Greeter.authenticated)
235− root.unlocked(userList.currentIndex);
236− else
237− root.resetAuthentication();
238− }
239− }
240−
241− function resetAuthentication() {
242− if (!userList.currentItem) {
243− return;
244− }
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));
252− }
253−
254− Connections {
255− target: LightDM.Greeter
256−
257− onShowMessage: {
258− // inefficient, but we only rarely deal with messages
259− text = text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<br>");
260− if (isError)
261− text = "<font color=\"#df382c\">" + text + "</font>"
262− if (infoLabel.text == "")
263− infoLabel.text = text;
264− else
265− infoLabel.text = infoLabel.text + "<br>" + text;
266− }
267−
268− onShowPrompt: {
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;
276− }
277−
278− onAuthenticationComplete: {
279− if (LightDM.Greeter.promptless) {
280− passwordInput.placeholderText = LightDM.Greeter.authenticated ? "Tap to unlock" : "Retry";
281− return;
282− }
283− if (LightDM.Greeter.authenticated) {
284− root.unlocked(userList.currentIndex);
285− } else {
286− wrongPasswordAnimation.start();
287− root.resetAuthentication();
288− passwordInput.focus = true;
289− }
290− passwordInput.text = "";
291− }
292−
293− onRequestAuthenticationUser: {
294− // Find index for requested user, if it exists
295− for (var i = 0; i < userList.model.count; i++) {
296− if (user == userList.model.data(i, LightDM.UserRoles.NameRole)) {
297− moveTimer.start();
298− userList.currentIndex = i;
299− return;
300− }
301− }
302− }
303− }
304−}
Greeter/PassphraseLockscreen.qmldeleted−88
@@ -1,88 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−Item {
22− id: root
23− height: highlightItem.height
24−
25− property alias placeholderText: pinentryField.placeholderText
26− property string username: ""
27−
28− signal entered(string passphrase)
29− signal cancel()
30−
31− function clear(playAnimation) {
32− pinentryField.text = "";
33− if (playAnimation) {
34− wrongPasswordAnimation.start();
35− } else {
36− pinentryField.focus = false
37− }
38− }
39−
40− Rectangle {
41− id: highlightItem
42− width: units.gu(32)
43− height: units.gu(10)
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)
49− antialiasing: true
50−
51− Label {
52− objectName: "greeterLabel"
53− anchors {
54− left: parent.left
55− top: parent.top
56− right: parent.right
57− margins: units.gu(1.5)
58− }
59− text: root.username.length > 0 ? i18n.tr("Hello %1").arg(root.username) : i18n.tr("Hello")
60− color: "white"
61− }
62−
63− TextField {
64− id: pinentryField
65− objectName: "pinentryField"
66− anchors {
67− horizontalCenter: parent.horizontalCenter
68− bottom: parent.bottom
69− margins: units.gu(1)
70− }
71− height: units.gu(4.5)
72− width: parent.width - units.gu(2)
73− echoMode: TextInput.Password
74− opacity: 0.9
75− hasClearButton: false
76−
77− onAccepted: {
78− root.entered(pinentryField.text);
79− }
80− }
81− }
82−
83− WrongPasswordAnimation {
84− id: wrongPasswordAnimation
85− objectName: "wrongPasswordAnimation"
86− target: pinentryField
87− }
88−}
Greeter/PinLockscreen.qmldeleted−216
@@ -1,216 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1
20−import "../Components"
21−
22−Column {
23− id: root
24− anchors.centerIn: parent
25− spacing: units.gu(3.5)
26−
27− property alias placeholderText: pinentryField.placeholderText
28− property int padWidth: units.gu(34)
29− property int padHeight: units.gu(28)
30− property int pinLength: -1
31−
32− signal entered(string passphrase)
33− signal cancel()
34−
35− property bool entryEnabled: true
36−
37− function clear(playAnimation) {
38− pinentryField.text = "";
39− if (playAnimation) {
40− wrongPasswordAnimation.start();
41− }
42− }
43−
44−
45− UbuntuShape {
46− id: pinentryField
47− objectName: "pinentryField"
48− anchors.horizontalCenter: parent.horizontalCenter
49− color: "#55000000"
50− width:root.padWidth
51− height: units.gu(5)
52− radius: "medium"
53− property string text: ""
54− property string placeholderText: ""
55− onTextChanged: {
56− pinentryFieldLabel.text = "";
57− for (var i = 0; i < text.length; ++i) {
58− pinentryFieldLabel.text += "•";
59− }
60− if (text.length === root.pinLength) {
61− root.entered(text);
62− }
63− }
64−
65− Label {
66− id: pinentryFieldLabel
67− anchors.centerIn: parent
68− width: parent.width - (backspaceIcon.width + backspaceIcon.anchors.rightMargin) * 2
69− elide: Text.ElideMiddle
70− horizontalAlignment: Text.AlignHCenter
71− font.pixelSize: units.dp(44)
72− color: "#f3f3e7"
73− opacity: 0.6
74− }
75− Label {
76− id: pinentryFieldPlaceHolder
77− anchors.centerIn: parent
78− color: "grey"
79− text: parent.placeholderText
80− visible: pinentryFieldLabel.text.length == 0
81− }
82−
83− Icon {
84− id: backspaceIcon
85− objectName: "backspaceIcon"
86− anchors {
87− top: parent.top
88− topMargin: units.gu(1)
89− right: parent.right
90− rightMargin: units.gu(2)
91− bottom: parent.bottom
92− bottomMargin: units.gu(1)
93− }
94− visible: root.pinLength == -1
95− width: height
96− name: "erase"
97− MouseArea {
98− anchors.fill: parent
99− onClicked: pinentryField.text = pinentryField.text.substring(0, pinentryField.text.length-1);
100− }
101− }
102− }
103−
104− UbuntuShape {
105− anchors {
106− left: parent.left
107− right: parent.right
108− margins: (parent.width - root.padWidth) / 2
109− }
110− height: root.padHeight
111− color: "#55000000"
112− radius: "medium"
113−
114− ThinDivider {
115− anchors {
116− left: parent.left
117− right: parent.right
118− top: parent.top
119− topMargin: root.padHeight / 4
120− }
121− }
122− ThinDivider {
123− anchors {
124− left: parent.left
125− right: parent.right
126− verticalCenter: parent.verticalCenter
127− }
128− }
129− ThinDivider {
130− anchors {
131− left: parent.left
132− right: parent.right
133− bottom: parent.bottom
134− bottomMargin: root.padHeight / 4
135− }
136− }
137−
138− ThinDivider {
139− anchors.centerIn: parent
140− anchors.horizontalCenterOffset: -root.padWidth / 6
141− width: root.padHeight
142− rotation: -90
143− }
144− ThinDivider {
145− anchors.centerIn: parent
146− anchors.horizontalCenterOffset: root.padWidth / 6
147− width: root.padHeight
148− rotation: -90
149− }
150−
151− Grid {
152− anchors {
153− left: parent.left
154− right: parent.right
155− margins: (parent.width - root.padWidth) / 2
156− }
157−
158− columns: 3
159−
160− Repeater {
161− model: 9
162−
163− PinPadButton {
164− objectName: "pinPadButton" + (index + 1)
165− width: root.padWidth / 3
166− height: root.padHeight / 4
167− text: index + 1
168− enabled: entryEnabled
169−
170− onClicked: {
171− pinentryField.text = pinentryField.text + text;
172− }
173− }
174− }
175−
176− PinPadButton {
177− objectName: "pinPadButtonBack"
178− width: root.padWidth / 3
179− height: root.padHeight / 4
180− subText: "CANCEL"
181− onClicked: root.cancel();
182− }
183−
184− PinPadButton {
185− objectName: "pinPadButton0"
186− width: root.padWidth / 3
187− height: root.padHeight / 4
188− text: "0"
189− onClicked: pinentryField.text = pinentryField.text + text
190− enabled: entryEnabled
191− }
192−
193− PinPadButton {
194− objectName: "pinPadButtonErase"
195− width: root.padWidth / 3
196− height: root.padHeight / 4
197− iconName: root.pinLength == -1 ? "" : "erase"
198− subText: root.pinLength == -1 ? "DONE" : ""
199− onClicked: {
200− if (root.pinLength !== -1) {
201− pinentryField.text = pinentryField.text.substring(0, pinentryField.text.length-1);
202− } else {
203− root.entered(pinentryField.text);
204− }
205− }
206− enabled: entryEnabled
207− }
208− }
209− }
210−
211− WrongPasswordAnimation {
212− id: wrongPasswordAnimation
213− objectName: "wrongPasswordAnimation"
214− target: pinentryField
215− }
216−}
Greeter/graphics/dot_empty.pngdeleted
Binary file not shown.
Greeter/graphics/dot_filled.pngdeleted
Binary file not shown.
Greeter/graphics/dot_pointer.pngdeleted
Binary file not shown.
Greeter/graphics/icon_arrow.pngdeleted
Binary file not shown.
Greeter/graphics/infographic_circle_back.pngdeleted
Binary file not shown.
Hud/Hud.qmldeleted−496
@@ -1,496 +0,0 @@
1−/*
2− * Copyright (C) 2012, 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import HudClient 0.1
20−
21−import "../Components"
22−
23−Item {
24− id: hud
25−
26− readonly property real elementsPadding: units.gu(1)
27− readonly property real elementsYSliding: units.gu(2)
28−
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
35−
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
41−
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
45− function show() {
46− hudShowable.show()
47− }
48− function hide() {
49− hudShowable.hide()
50− }
51− function resetToInitialState() {
52− hud.state = "initial"
53− searchBar.unfocus()
54− searchBar.text = ""
55− parametrizedActionsPage.shown = false
56− }
57−
58− states: [
59− State {
60− name: "initial"
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; }
66− },
67− State {
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 }
72− },
73− State {
74− name: "voice_input" //only inherited by other states.
75− extend: "input"
76− PropertyChanges { target: soundAmplitudeVisualAnimator; visible: true }
77− PropertyChanges { target: resultsCardAnimator; visible: false }
78− PropertyChanges { target: soundAmplitudeVisualAnimator; progress: 1 }
79− PropertyChanges { target: searchBar; searchEnabled: false }
80− },
81− State {
82− name: "voice_recognition_loading"
83− extend: "voice_input"
84− PropertyChanges { target: searchBar; placeholderText: i18n.tr("Loading. Please Wait...") }
85− },
86− State {
87− name: "voice_recognition_listening"
88− extend: "voice_input"
89− PropertyChanges { target: searchBar; placeholderText: i18n.tr("Speak Now...") }
90− },
91− State {
92− name: "voice_recognition_processing"
93− extend: "voice_input"
94− PropertyChanges { target: searchBar; placeholderText: i18n.tr("Speaking...") }
95− },
96− State {
97− name: "showing_results"
98− extend: "input"
99− PropertyChanges { target: searchBar; placeholderText: i18n.tr("Type or say a command") }
100− PropertyChanges { target: searchBar; searchEnabled: true }
101− }
102− ]
103−
104− transitions: [
105− Transition {
106− from: "initial"
107− to: "voice_recognition_loading"
108− SequentialAnimation {
109− NumberAnimation { // hide these components
110− targets: [toolBarAnimator, searchBarAnimator, resultsCardAnimator]
111− property: "progress"; duration: animationDuration; to: 0
112− }
113−
114− PropertyAction { targets: [toolBarAnimator, resultsCardAnimator]; property: "visible"; value: false}
115− PropertyAction { target: soundAmplitudeVisualAnimator; property: "visible"; value: true}
116−
117− AnchorAnimation { duration: 0 } // so anchor change happens at this point
118−
119− NumberAnimation { // show these components
120− targets: [searchBarAnimator, soundAmplitudeVisualAnimator]
121− property: "progress"; duration: animationDuration; from: 0; to: 1
122− }
123− }
124− },
125− Transition {
126− from: "showing_results"
127− to: "voice_recognition_loading"
128− SequentialAnimation {
129− PropertyAction { target: soundAmplitudeVisualAnimator; property: "progress"; value: 0}
130−
131− PropertyAction { // hide these components
132− target: resultsCardAnimator; property: "progress"; value: 0
133− }
134−
135− NumberAnimation { // show these components
136− target: soundAmplitudeVisualAnimator; property: "progress"; duration: animationDuration; from: 0; to: 1
137− }
138− }
139− },
140− Transition {
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
146− }
147− PropertyAction { target: resultsCardAnimator; property: "visible"; value: true}
148−
149− NumberAnimation { // show these components
150− target: resultsCardAnimator; property: "progress"; duration: animationDuration; from: 0; to: 1
151− }
152− }
153− },
154− Transition {
155− from: "initial"
156− to: "showing_results"
157− SequentialAnimation {
158− NumberAnimation {
159− targets: [toolBarAnimator, searchBarAnimator, resultsCardAnimator]
160− property: "progress"; duration: animationDuration; to: 0
161− }
162−
163− PropertyAction { target: toolBarAnimator; property: "visible"; value: false}
164−
165− AnchorAnimation { duration: 0 } // so anchor change happens at this point
166−
167− NumberAnimation {
168− targets: [searchBarAnimator, resultsCardAnimator]
169− property: "progress"; duration: animationDuration; from: 0; to: 1
170− }
171− }
172− }
173− ]
174−
175− state: "initial"
176−
177− HudClient {
178− id: hudClient
179−
180− onCommandExecuted: {
181− hudShowable.hide()
182− }
183−
184− onShowParametrizedAction: {
185− parametrizedActionsPage.header = action
186− parametrizedActionsPage.setItems(items)
187− parametrizedActionsPage.shown = true
188− }
189−
190− onVoiceQueryLoading: {
191− hud.state = "voice_recognition_loading"
192− searchBar.ignoreNextTextChange = true
193− searchBar.text = ""
194− searchBar.unfocus()
195− soundAmplitudeVisual.startIdle()
196− }
197− onVoiceQueryListening: {
198− if (hud.state == "voice_recognition_loading" || hud.state == "showing_results") {
199− searchBar.ignoreNextTextChange = true
200− searchBar.text = ""
201− searchBar.unfocus()
202− hud.state = "voice_recognition_listening"
203− }
204− }
205− onVoiceQueryHeardSomething: {
206− if (hud.state == "voice_recognition_listening") {
207− hud.state = "voice_recognition_processing"
208− soundAmplitudeVisual.setDetectorEnabled(true)
209− }
210− }
211− onVoiceQueryFinished: {
212− hud.state = "showing_results"
213− searchBar.text = query
214− soundAmplitudeVisual.setDetectorEnabled(false)
215− }
216− onVoiceQueryFailed: {
217− hud.state = "showing_results"
218− searchBar.text = ""
219− soundAmplitudeVisual.setDetectorEnabled(false)
220− }
221− }
222−
223− Showable {
224− id: hudShowable
225− objectName: "hudShowable"
226− height: parent.height
227− width: parent.width
228−
229− onYChanged: {
230− if (greeter.shown) {
231− showAnimation.duration = 0
232− hideAnimation.duration = 0
233− } else if (!showAnimation.running && !hideAnimation.running) {
234− if (parent.height > 0) {
235− showAnimation.duration = Math.min(showableAnimationDuration * (1 - (parent.height - y) / parent.height), showableAnimationDuration)
236− hideAnimation.duration = showableAnimationDuration - showAnimation.duration
237− }
238− }
239− }
240−
241− MouseArea {
242− // Eat everything that doesn't go to other places
243− anchors.fill: parent
244− }
245−
246− Image {
247− anchors.fill: parent
248− fillMode: Image.Tile
249− source: "graphics/hud_bg.png"
250− }
251−
252− Connections {
253− target: hideAnimation
254− onRunningChanged: {
255− if (!hideAnimation.running) {
256− showAnimation.duration = showableAnimationDuration
257− hud.resetToInitialState()
258− }
259− }
260− }
261−
262− Connections {
263− target: showAnimation
264− onRunningChanged: {
265− if (!showAnimation.running) {
266− hideAnimation.duration = showableAnimationDuration
267− }
268− }
269− }
270− }
271−
272− Item {
273− id: handle
274− objectName: "handle"
275−
276− y: hudShowable.y
277− anchors {
278− left: parent.left
279− right: parent.right
280− }
281− height: handleImage.height
282−
283− Image {
284− id: handleImage
285− anchors {
286− left: parent.left
287− right: parent.right
288− }
289− source: "graphics/hud_handlebar.png"
290− }
291−
292− Image {
293− id: handleArrow
294− y: units.gu(1)
295− anchors.horizontalCenter: parent.horizontalCenter
296− source: "graphics/hud_handlearrow.png"
297− cache: false
298− }
299− }
300−
301− Item {
302− id: hudContentClipper
303−
304− anchors {
305− left: parent.left
306− right: parent.right
307− bottom: parent.bottom
308− top: handle.bottom
309− }
310− clip: visible && hudContent.height !== height
311− visible: hudContent.height >= 0
312−
313− Item {
314− id: hudContent
315− anchors {
316− left: parent.left
317− right: parent.right
318− bottom: parent.bottom
319− }
320− height: hud.height
321−
322− Item {
323− id: mainPage
324− x: parametrizedActionsPage.x - width
325− height: hud.height
326− width: hud.width
327−
328− ShowingAnimation {
329− id: toolBarAnimator
330− objectName: "toolBarAnimator"
331− anchors {
332− left: parent.left
333− right: parent.right
334− bottom: searchBarAnimator.top
335− margins: 2*elementsPadding //ensures positioning correct
336− }
337− progress: MathUtils.clamp((y - hudShowable.y - anchors.margins)/elementsYSliding, 0, 1)
338−
339− ToolBar {
340− id: toolBar
341− objectName: "toolBar"
342− model: hudClient.toolBarModel
343− anchors.horizontalCenter: parent.horizontalCenter
344− onActionTriggered: {
345− hudClient.executeToolBarAction(action)
346− }
347− }
348− }
349−
350− ShowingAnimation {
351− id: searchBarAnimator
352− objectName: "searchBarAnimator"
353− anchors {
354− left: parent.left
355− right: parent.right
356− bottom: parent.bottom
357− margins: elementsPadding
358− topMargin: handle.height + units.dp(1) + elementsPadding
359− }
360− progress: MathUtils.clamp((y - hudShowable.y - anchors.margins)/elementsYSliding, 0, 1)
361−
362− SearchBar {
363− id: searchBar
364− objectName: "searchBar"
365−
366− property bool ignoreNextTextChange: false
367−
368− anchors.left: parent.left
369− anchors.right: parent.right
370− height: units.gu(5)
371−
372− placeholderText: i18n.tr("Type or say a command")
373− activityIndicatorVisible: hud.state == "voice_recognition_processing"
374−
375− onMicrophoneClicked: hudClient.startVoiceQuery()
376−
377− onTextChanged: {
378− if (ignoreNextTextChange) {
379− ignoreNextTextChange = false
380− } else {
381− hudClient.setQuery(searchBar.text)
382− }
383− }
384−
385− onTextFocused: {
386− hud.state = "showing_results"
387− }
388− }
389− }
390−
391− ShowingAnimation {
392− id: resultsCardAnimator
393− objectName: "resultsCardAnimator"
394−
395− anchors {
396− left: parent.left
397− right: parent.right
398− top: searchBarAnimator.bottom
399− margins: elementsPadding
400− }
401− progress: MathUtils.clamp((y - hudShowable.y + height - units.gu(8))/elementsYSliding, 0, 1)
402−
403− Flickable {
404− anchors.left: parent.left
405− anchors.right: parent.right
406− contentHeight: resultList.height
407− contentWidth: width
408− clip: height < contentHeight
409− interactive: height < contentHeight
410−
411− height: {
412− if (hud.state == "showing_results") {
413− return shell.applicationManager.keyboardVisible ? Math.min(hud.height - searchBarAnimator.y - searchBarAnimator.height - units.gu(2) - shell.applicationManager.keyboardHeight, contentHeight) : contentHeight
414− } else {
415− return contentHeight
416− }
417− }
418−
419−
420− ResultList {
421− id: resultList
422−
423− anchors.left: parent.left
424− anchors.right: parent.right
425− height: childrenRect.height
426−
427− onActivated: {
428− hudClient.executeCommand(index)
429− }
430−
431− model: hudClient.results
432− }
433− }
434− }
435−
436− ShowingAnimation {
437− id: soundAmplitudeVisualAnimator
438−
439− anchors {
440− horizontalCenter: parent.horizontalCenter
441− verticalCenter: parent.verticalCenter
442− verticalCenterOffset: (searchBar.height + 2*elementsPadding)/2
443− }
444− visible: false
445− width: units.gu(33)
446− progress: MathUtils.clamp((y - hudShowable.y - anchors.verticalCenterOffset)/elementsYSliding, 0, 1)
447−
448− SoundAmplitudeVisual {
449− id: soundAmplitudeVisual
450− width: units.gu(33)
451− height: width
452− }
453− }
454− }
455−
456− HudParametrizedActionsPage {
457− id: parametrizedActionsPage
458− objectName: "parametrizedActionsPage"
459− property bool shown: false
460−
461− anchors.bottom: parent.bottom
462− height: hud.height - handle.height - units.dp(1)
463− width: parent.width
464− x: shown ? 0 : width
465− onConfirmPressed: {
466− hudClient.executeParametrizedAction(values())
467− }
468− onValuesUpdated: {
469− hudClient.updateParametrizedAction(values())
470− }
471− onBackPressed: {
472− shown = false
473− }
474− onShownChanged: {
475− if (!shown) {
476− hudClient.cancelParametrizedAction()
477− }
478− }
479− Behavior on x {
480− NumberAnimation {
481− easing.type: outEasing
482− duration: animationDuration
483− }
484− }
485− }
486− }
487− }
488−
489− Image {
490− anchors.left: hudContentClipper.right
491− anchors.top: hudContentClipper.top
492− anchors.bottom: hudContentClipper.bottom
493− fillMode: Image.Tile
494− source: "graphics/dropshadow_right.png"
495− }
496−}
Hud/HudParametrizedActionsPage.qmldeleted−172
@@ -1,172 +0,0 @@
1−/*
2− * Copyright (C) 2012, 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−Item {
22− property alias header: header.text
23− signal backPressed
24− signal confirmPressed
25− signal valuesUpdated
26− id: root
27−
28− ListModel {
29− id: actionItems
30− }
31−
32− function setItems(items) {
33− while (actionItems.count > 0) {
34− var item = actionItems.get(0).item
35− actionItems.remove(0)
36− item.visible = false
37− item.destroy()
38− }
39−
40− var sliderCreator = Qt.createComponent("SliderLabel.qml");
41− var first = true
42− var topAnchor = header.bottom
43− for (var i = 0; i < items.length; i++) {
44− var item = items[i]
45− if (item["parameter-type"] == "slider")
46− {
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)
57− }
58− first = false
59− }
60− }
61−
62− function valueChanged()
63− {
64− valuesUpdated()
65− }
66−
67− function values() {
68− var values = {}
69− for (var i = 0; i < actionItems.count; ++i) {
70− var item = actionItems.get(i).item
71− values[item.action] = item.value
72− }
73− return values
74− }
75−
76− Flickable {
77− anchors.top: parent.top
78− anchors.bottom: buttons.top
79− anchors.left: parent.left
80− anchors.right: parent.right
81− clip: true
82−
83− flickableDirection: Flickable.VerticalFlick
84− interactive: !tooltip.visible
85−
86− Item {
87− id: flickableColumn
88− anchors.top: parent.top
89− anchors.left: parent.left
90− anchors.right: parent.right
91−
92− PageHeader {
93− id: header
94− anchors.top: parent.top
95− anchors.left: parent.left
96− anchors.right: parent.right
97− anchors.topMargin: units.gu(1)
98− }
99− }
100− }
101− Item {
102− id: buttons
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
108−
109− Button {
110− id: backButton
111− anchors.left: parent.left
112− anchors.top: parent.top
113− anchors.bottom: parent.bottom
114− width: units.gu(7)
115− color: "black"
116− opacity: 0.25
117− MouseArea {
118− anchors.fill: parent
119− onClicked: backPressed()
120− }
121− }
122− Image {
123− anchors.centerIn: backButton
124− source: "graphics/icon_arrow.png"
125− }
126−
127− Button {
128− id: confirmButton
129− anchors.right: parent.right
130− width: units.gu(13)
131− height: units.gu(5)
132− text: i18n.tr("Confirm")
133− color: "#F05D22"
134− onClicked: confirmPressed()
135− }
136− }
137−
138− Item {
139− id: tooltip
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
144−
145− width: childrenRect.width
146− height: childrenRect.height
147−
148− Rectangle {
149− id: tooltipRectangle
150− width: units.gu(8)
151− height: units.gu(6)
152− color: "white"
153− radius: units.gu(0.5)
154−
155− Label {
156− anchors.fill: parent
157− text: tooltip.target ? tooltip.target.realFormatValue(tooltip.target.value) : ""
158− horizontalAlignment: Text.AlignHCenter
159− verticalAlignment: Text.AlignVCenter
160− fontSize: "large"
161− }
162− }
163− Image {
164− id: tooltipTip
165− source: "graphics/popup_triangle.png"
166−
167− anchors.top: tooltipRectangle.bottom
168− anchors.horizontalCenter: parent.horizontalCenter
169− }
170−
171− }
172−}
Hud/Result.qmldeleted−84
@@ -1,84 +0,0 @@
1−/*
2− * Copyright (C) 2012, 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− property string contextSnippetText
22− property variant contextSnippetHighlights
23− property string nameText
24− property variant nameHighlights
25−
26− function highlightedText(text, highlights) {
27− var hText = "";
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)
34− continue;
35− if (highlightStart < nextIndexToProcess)
36− continue;
37− if (highlightStart != nextIndexToProcess) {
38− // Prev non marked text
39− hText += text.substr(nextIndexToProcess, highlightStart - nextIndexToProcess);
40− }
41−
42− // Marked text
43− hText += "<font color=\"#ffffff\">" + text.substr(highlightStart, highlightEnd - highlightStart + 1) + "</font>";
44− nextIndexToProcess = highlightEnd + 1;
45− }
46− }
47− if (nextIndexToProcess != text.length) {
48− // End non marked text
49− hText += text.substr(nextIndexToProcess);
50− }
51− return hText;
52− }
53−
54− Label {
55− id: actionLabel
56− objectName: "actionLabel"
57− anchors.left: parent.left
58− anchors.leftMargin: units.gu(1)
59− anchors.verticalCenter: parent.verticalCenter
60− width: parent.width / 2
61− fontSize: "medium"
62− elide: Text.ElideRight
63− maximumLineCount: 1
64− text: highlightedText(nameText, nameHighlights)
65− color: "#80ffffff"
66− }
67−
68− Label {
69− horizontalAlignment: Text.AlignRight
70− id: contextSnippetLabel
71− objectName: "contextSnippetLabel"
72− width: parent.width / 2 - units.gu(1)
73− visible: text != ""
74− anchors.right: parent.right
75− anchors.rightMargin: units.gu(1)
76− anchors.verticalCenter: parent.verticalCenter
77− fontSize: "small"
78− opacity: 0.5
79− elide: Text.ElideRight
80− maximumLineCount: 2
81− text: highlightedText(contextSnippetText, contextSnippetHighlights)
82− color: "#80ffffff"
83− }
84−}
Hud/ResultList.qmldeleted−106
@@ -1,106 +0,0 @@
1−/*
2− * Copyright (C) 2012, 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Column {
21− property var model: undefined
22−
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
28− ListModel {
29− id: internalModel
30− }
31−
32− Connections {
33− target: model
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()
38− }
39−
40− onModelChanged: updateModelTimer.restart()
41−
42− Timer {
43− id: updateModelTimer
44− interval: 30
45− onTriggered: updateModel()
46− }
47−
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})
53− }
54− }
55−
56− signal activated(int index)
57−
58− height: repeater.height
59−
60− Repeater {
61− id: repeater
62− objectName: "resultListRepeater"
63− model: internalModel
64−
65− delegate: MouseArea {
66− id: delegate
67− height: result.height + separatorLine.height * 2
68− anchors.left: parent.left
69− anchors.right: parent.right
70−
71− onClicked: activated(index)
72−
73− BorderImage {
74− id: separatorLine
75− anchors.top: parent.top
76− anchors.left: parent.left
77− anchors.right: parent.right
78− source: "graphics/divider.sci"
79− visible: index == 0
80− }
81−
82− Result {
83− id: result
84− height: units.gu(6)
85− anchors.top: separatorLine.bottom
86− anchors.left: parent.left
87− anchors.right: parent.right
88−
89− nameText: name
90− nameHighlights: highlights
91− contextSnippetText: context
92− contextSnippetHighlights: contextHighlights
93− }
94−
95− BorderImage {
96− anchors.top: result.bottom
97− anchors.left: parent.left
98− anchors.right: parent.right
99− source: "graphics/divider.sci"
100− }
101−
102− Component.onCompleted: fadeIn.start()
103− NumberAnimation { id: fadeIn; target: resultList; alwaysRunToEnd: true; property: "opacity"; duration: 200; from: 0; to: 1 }
104− }
105− }
106−}
Hud/SearchBar.qmldeleted−100
@@ -1,100 +0,0 @@
1−/*
2− * Copyright (C) 2012, 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: root
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
27− signal textFocused
28−
29− readonly property real imageSize: units.gu(3)
30−
31− function unfocus()
32− {
33− searchBar.focus = false
34− }
35−
36− ActivityIndicator {
37− id: activityIndicator
38− height: imageSize
39− width: height
40− x: magnifierImage.x
41− y: magnifierImage.y
42− running: visible
43− }
44−
45− TextField {
46− id: searchBar
47− anchors.fill: parent
48−
49− hasClearButton: false
50− font.pixelSize: FontUtils.sizeToPixels("large")
51−
52− onActiveFocusChanged: {
53− if (activeFocus) {
54− root.textFocused()
55− }
56− }
57−
58− Item {
59− id: primary
60− height: searchBar.height
61− width: height
62−
63− Image {
64− id: magnifierImage
65− height: imageSize
66− width: height
67− anchors.centerIn: parent
68− source: "graphics/icon_search.png"
69− visible: !activityIndicator.visible && !clearImage.visible
70− }
71−
72− Image {
73− id: clearImage
74− height: imageSize
75− width: height
76− anchors.centerIn: parent
77− source: "graphics/icon_clear.png"
78− visible: !activityIndicator.visible && searchBar.text != ""
79− MouseArea {
80− anchors.fill: parent
81− onClicked: searchBar.text = ""
82− }
83− }
84− }
85−
86− primaryItem: primary
87− secondaryItem: MouseArea {
88− height: searchBar.height
89− width: height
90− onClicked: microphoneClicked()
91−
92− Image {
93− height: imageSize
94− width: height
95− anchors.centerIn: parent
96− source: "graphics/microphone.png"
97− }
98− }
99− }
100−}
Hud/ShowingAnimation.qmldeleted−54
@@ -1,54 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−Item {
22− id: root
23− property real yOffsetAtAnimationStart: units.gu(2)
24− property real progress: 0
25− property int animationDuration: 200
26− default property alias __itemsToAnimate: container.children
27−
28− property bool showing: progress > 0
29−
30− height: childrenRect.height
31−
32− Item {
33− id: container
34− anchors {
35− left: parent.left
36− right: parent.right
37− }
38− height: childrenRect.height
39− }
40−
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}
43−
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
49− }
50− AnimationController {
51− animation: yAnimation
52− progress: root.progress
53− }
54−}
Hud/SliderLabel.qmldeleted−76
@@ -1,76 +0,0 @@
1−/*
2− * Copyright (C) 2012, 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− height: childrenRect.height
22− width: childrenRect.width
23− property variant tooltip
24−
25− property variant sliderData
26− property string action
27− property alias value: slider.value
28− onValueChanged: {
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
33− }
34−
35− onSliderDataChanged: {
36− label.text = sliderData["label"]
37− slider.minimumValue = sliderData["min"]
38− slider.maximumValue = sliderData["max"]
39− if("live" in sliderData)
40− slider.live = sliderData["live"]
41− // SDK Slider does not support step yet
42−// slider.step = sliderData["step"]
43− if("value" in sliderData)
44− slider.value = sliderData["value"]
45− action = sliderData["action"]
46− }
47−
48− Label {
49− id: label
50− anchors.top: parent.top
51− anchors.left: parent.left
52− anchors.right: parent.right
53− anchors.margins: units.gu(1)
54− anchors.leftMargin: units.gu(2)
55− color: "white"
56− }
57− Slider {
58− id: slider
59− anchors.top: label.bottom
60− anchors.left: parent.left
61− anchors.right: parent.right
62− anchors.margins: units.gu(1)
63− height: units.gu(6)
64− live: true
65− function realFormatValue(v) { return Math.round(v) + " %" }
66− function formatValue(v) { return tooltip.target == slider ? "" : realFormatValue(v) }
67− onPressedChanged: tooltip.target = pressed ? slider : undefined
68− }
69− BorderImage {
70− source: "graphics/divider.sci"
71− anchors.top: slider.bottom
72− anchors.left: parent.left
73− anchors.right: parent.right
74− anchors.topMargin: units.gu(2)
75− }
76−}
Hud/SoundAmplitudeDelegate.qmldeleted−52
@@ -1,52 +0,0 @@
1−/*
2− * Copyright (C) 2012, 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−
19−Rectangle {
20− id: delegate
21− property real amplitude: 0
22− property int totalCount
23− property int ballIndex
24− width: {
25− var t = amplitude / 0.6
26− t = -t * (t - 2)
27− return units.gu(0.25) + units.gu(5) * t
28− }
29− visible: amplitude != 0
30− height: width
31− color: "#DD4814"
32− radius: width * 0.5
33− antialiasing: true
34− opacity: {
35− // TODO This formula has hardocded values everywhere :D
36− var t
37− var dampenAfterThisIndex = 7
38− if (ballIndex < dampenAfterThisIndex) {
39− t = (totalCount - ballIndex) / totalCount
40− return Math.pow(t, 4);
41− } else {
42− t = (totalCount - dampenAfterThisIndex) / totalCount
43− t = Math.pow(t, 4);
44− t = t * 0.7;
45− return 0.09 + t * (totalCount - ballIndex) / (totalCount - dampenAfterThisIndex)
46− }
47− }
48−
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))
52−}
Hud/SoundAmplitudeVisual.qmldeleted−146
@@ -1,146 +0,0 @@
1−/*
2− * Copyright (C) 2012, 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import HudClient 0.1
19−
20−Item {
21− id: voiceInput
22−
23− readonly property int totalSpots: 30
24− readonly property int totalIdles: 7
25−
26− property real __newPeak: 0
27−
28− VolumePeakDetector {
29− id: peakDetector
30− desiredInterval: peakMover.interval
31− onNewPeak: {
32− __newPeak = volume
33− }
34− }
35−
36− Timer {
37− id: peakMover
38− interval: 10
39− repeat: true
40− onTriggered: {
41− moveBalls()
42− voiceAmplitudes.itemAt(0).amplitude = __newPeak
43− }
44− }
45−
46− Repeater {
47− id: fixedPositionSoundAmplitudes
48− model: totalSpots
49− delegate: SoundAmplitudeDelegate {
50− totalCount: fixedPositionSoundAmplitudes.count
51− ballIndex: index
52− opacity: 1
53− visible: true
54− }
55− }
56−
57− Repeater {
58− id: voiceAmplitudes
59− model: totalSpots
60− delegate: SoundAmplitudeDelegate {
61− totalCount: voiceAmplitudes.count
62− ballIndex: index
63− }
64− }
65−
66− Repeater {
67− id: idleAmplitudes
68− model: totalSpots
69− delegate: SoundAmplitudeDelegate {
70− totalCount: idleAmplitudes.count
71− ballIndex: index
72− amplitude: 0.05
73− visible: idleAmplitudes.enabled
74− }
75− }
76−
77− function setDetectorEnabled(enabled) {
78− idleAmplitudes.enabled = false
79− if (enabled) {
80− peakMover.start()
81− } else {
82− peakDetector.enabled = false
83− peakMover.stop()
84− }
85− }
86−
87− function moveBalls() {
88− var i = 0
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
95− }
96− }
97−
98− property int __firstIdle
99− property int __idleCount
100−
101− Timer {
102− id: idleBallsTimer
103− interval: 40
104− onTriggered: moveAndAddIdleBalls()
105− }
106−
107− function moveAndAddIdleBalls() {
108− // Check if we are doing the real thing
109− if (!idleAmplitudes.enabled) {
110− return
111− }
112−
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
118− }
119− __firstIdle++
120− idleAmplitudes.itemAt((__firstIdle - __idleCount) % totalSpots).opacity = 0
121−
122− if (__idleCount < totalIdles) {
123− idleAmplitudes.itemAt(0).opacity = 1 - (__idleCount / totalIdles)
124− __idleCount++
125− }
126− idleBallsTimer.start()
127− }
128−
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
135− }
136− for (var i = 0; i < totalSpots; ++i) {
137− voiceAmplitudes.itemAt(i).amplitude = 0
138− }
139−
140− idleAmplitudes.enabled = true
141− idleAmplitudes.itemAt(0).opacity = 1
142− __idleCount = 1
143− __firstIdle = 0
144− idleBallsTimer.start()
145− }
146−}
Hud/graphics/divider@20.pngdeleted
Binary file not shown.
Hud/graphics/divider@20.scideleted−5
@@ -1,5 +0,0 @@
1−border.left: 0
2−border.top: 0
3−border.bottom: 0
4−border.right: 2
5−source: divider@20.png
Hud/graphics/dropshadow_right@20.pngdeleted
Binary file not shown.
Hud/graphics/help@20.pngdeleted
Binary file not shown.
Hud/graphics/hud_bg@20.pngdeleted
Binary file not shown.
Hud/graphics/hud_handlearrow@20.pngdeleted
Binary file not shown.
Hud/graphics/hud_handlebar@20.pngdeleted
Binary file not shown.
Hud/graphics/icon_arrow@20.pngdeleted
Binary file not shown.
Hud/graphics/icon_clear@20.pngdeleted
Binary file not shown.
Hud/graphics/icon_search@20.pngdeleted
Binary file not shown.
Hud/graphics/microphone@20.pngdeleted
Binary file not shown.
Hud/graphics/popup_triangle@20.pngdeleted
Binary file not shown.
Hud/graphics/settings@20.pngdeleted
Binary file not shown.
Hud/graphics/undo@20.pngdeleted
Binary file not shown.
Hud/graphics/view-fullscreen@20.pngdeleted
Binary file not shown.
Jenkinsfilenew file+2
@@ -0,0 +1,2 @@
1+@Library('ubports-build-tools') _
2+buildAndProvideDebianPackage()
Launcher/Launcher.qmldeleted−253
@@ -1,253 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import "../Components"
19−import Ubuntu.Components 0.1
20−import Ubuntu.Gestures 0.1
21−import Unity 0.1
22−import Unity.Launcher 0.1
23−
24−Item {
25− id: root
26−
27− property bool available: true // can be used to disable all interactions
28−
29− property int panelWidth: units.gu(8)
30− property int dragAreaWidth: units.gu(1)
31− property int minimizeDistance: units.gu(26)
32− property real progress: dragArea.dragging && dragArea.touchX > panelWidth ?
33− (width * (dragArea.touchX-panelWidth) / (width - panelWidth)) : 0
34−
35− readonly property bool shown: panel.x > -panel.width
36−
37− // emitted when an application is selected
38− signal launcherApplicationSelected(string appId)
39−
40− // emitted when the apps dash should be shown because of a swipe gesture
41− signal dash()
42−
43− // emitted when the dash icon in the launcher has been tapped
44− signal showDashHome()
45−
46− onStateChanged: {
47− if (state == "") {
48− dismissTimer.stop()
49− } else {
50− dismissTimer.restart()
51− }
52− }
53−
54− function hide() {
55− switchToNextState("")
56− }
57−
58− function switchToNextState(state) {
59− animateTimer.nextState = state
60− animateTimer.start();
61− }
62−
63− function tease() {
64− if (available) {
65− teaseTimer.start();
66− }
67− }
68−
69− Timer {
70− id: teaseTimer
71− interval: 200
72− }
73−
74− Timer {
75− id: dismissTimer
76− interval: 5000
77− onTriggered: {
78− if (!panel.preventHiding) {
79− root.state = ""
80− } else {
81− dismissTimer.restart()
82− }
83− }
84− }
85−
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
90− Timer {
91− id: animateTimer
92− interval: 1
93− property string nextState: ""
94− onTriggered: {
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
97− root.state = "tmp"
98− root.state = nextState
99− }
100− }
101−
102− MouseArea {
103− id: launcherDragArea
104− enabled: root.state == "visible"
105− anchors.fill: panel
106− anchors.rightMargin: -units.gu(2)
107− drag {
108− axis: Drag.XAxis
109− maximumX: 0
110− target: panel
111− }
112−
113− onReleased: {
114− if (panel.x < -panel.width/3) {
115− root.switchToNextState("")
116− } else {
117− root.switchToNextState("visible")
118− }
119− }
120−
121− }
122− MouseArea {
123− id: closeMouseArea
124− anchors {
125− left: launcherDragArea.right
126− top: parent.top
127− right: parent.right
128− bottom: parent.bottom
129− }
130− enabled: root.state == "visible"
131− onPressed: {
132− root.state = ""
133− }
134− }
135−
136− Rectangle {
137− id: backgroundShade
138− anchors.fill: parent
139− color: "black"
140− opacity: root.state == "visible" ? 0.6 : 0
141−
142− Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.BriskDuration } }
143− }
144−
145− LauncherPanel {
146− id: panel
147− objectName: "launcherPanel"
148− enabled: root.available
149− width: root.panelWidth
150− anchors {
151− top: parent.top
152− bottom: parent.bottom
153− }
154− x: -width
155− opacity: (x == -width && dragArea.status === DirectionalDragArea.WaitingForTouch) ? 0 : 1
156− model: LauncherModel
157−
158− property bool animate: true
159−
160− onApplicationSelected: {
161− root.state = ""
162− launcherApplicationSelected(appId)
163− }
164− onShowDashHome: {
165− root.state = ""
166− root.showDashHome();
167− }
168−
169− onPreventHidingChanged: {
170− if (dismissTimer.running) {
171− dismissTimer.restart();
172− }
173− }
174−
175− Behavior on x {
176− NumberAnimation {
177− // Disabling animation when dragging
178− duration: dragArea.dragging || launcherDragArea.drag.active ? 0 : 300;
179− easing.type: Easing.OutCubic
180− }
181− }
182−
183− Behavior on opacity {
184− NumberAnimation {
185− duration: UbuntuAnimation.FastDuration; easing.type: Easing.OutCubic
186− }
187− }
188− }
189−
190− EdgeDragArea {
191− id: dragArea
192−
193− direction: Direction.Rightwards
194−
195− enabled: root.available
196− width: root.dragAreaWidth
197− height: root.height
198−
199− onTouchXChanged: {
200− if (status !== DirectionalDragArea.Recognized || launcher.state == "visible")
201− return;
202−
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
213− }
214−
215− onDraggingChanged: {
216− if (!dragging) {
217− if (distance > panel.width / 2) {
218− root.switchToNextState("visible")
219− if (distance > minimizeDistance) {
220− root.dash()
221− }
222− } else {
223− root.switchToNextState("")
224− }
225− }
226− }
227− }
228−
229− states: [
230− State {
231− name: "" // hidden state. Must be the default state ("") because "when:" falls back to this.
232− PropertyChanges {
233− target: panel
234− x: -root.panelWidth
235− }
236− },
237− State {
238− name: "visible"
239− PropertyChanges {
240− target: panel
241− x: 0
242− }
243− },
244− State {
245− name: "teasing"
246− when: teaseTimer.running
247− PropertyChanges {
248− target: panel
249− x: -root.panelWidth + units.gu(2)
250− }
251− }
252− ]
253−}
Launcher/LauncherPanel.qmldeleted−578
@@ -1,578 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1 as ListItems
20−import Unity 0.1
21−import Unity.Launcher 0.1
22−import Ubuntu.Components.Popups 0.1
23−import "../Components/ListItems"
24−import "../Components/"
25−
26−Item {
27− id: root
28−
29− rotation: inverted ? 180 : 0
30−
31− property var model
32− property bool inverted: true
33− property bool dragging: false
34− property bool moving: launcherListView.moving || launcherListView.flicking
35− property bool preventHiding: moving || dndArea.draggedIndex >= 0 || quickList.state === "open" || dndArea.pressed
36− property int highlightIndex: -1
37−
38− signal applicationSelected(string appId)
39− signal showDashHome()
40−
41− BorderImage {
42− id: background
43− source: "graphics/launcher_bg.sci"
44− anchors.fill: parent
45− anchors.rightMargin: root.inverted ? 0 : -units.gu(1)
46− anchors.leftMargin: root.inverted ? -units.gu(1) : 0
47− rotation: root.rotation
48− }
49−
50− Column {
51− id: mainColumn
52− anchors {
53− fill: parent
54− }
55−
56− MouseArea {
57− id: dashItem
58− width: parent.width
59− height: units.gu(7)
60− onClicked: root.showDashHome()
61− z: 1
62− Image {
63− objectName: "dashItem"
64− width: units.gu(5)
65− height: width
66− anchors.centerIn: parent
67− source: "graphics/home.png"
68− rotation: root.rotation
69− }
70− }
71− ThinDivider {
72− anchors {
73− left: parent.left
74− right: parent.right
75− margins: -mainColumn.anchors.leftMargin
76− }
77− rotation: root.rotation
78− }
79−
80− Item {
81− anchors.left: parent.left
82− anchors.right: parent.right
83− height: parent.height - dashItem.height - parent.spacing*2
84−
85− Item {
86− anchors.fill: parent
87− clip: true
88−
89− ListView {
90− id: launcherListView
91− objectName: "launcherListView"
92− anchors {
93− fill: parent
94− topMargin: -extensionSize + units.gu(0.5)
95− bottomMargin: -extensionSize + units.gu(1)
96− leftMargin: units.gu(0.5)
97− rightMargin: units.gu(0.5)
98− }
99− topMargin: extensionSize
100− bottomMargin: extensionSize
101− height: parent.height - dashItem.height - parent.spacing*2
102− model: root.model
103− cacheBuffer: itemHeight * 3
104− snapMode: interactive ? ListView.SnapToItem : ListView.NoSnap
105− highlightRangeMode: ListView.ApplyRange
106− preferredHighlightBegin: (height - itemHeight) / 2
107− preferredHighlightEnd: (height + itemHeight) / 2
108− spacing: units.gu(0.5)
109−
110− // The size of the area the ListView is extended to make sure items are not
111− // destroyed when dragging them outside the list. This needs to be at least
112− // itemHeight to prevent folded items from disappearing and DragArea limits
113− // need to be smaller than this size to avoid breakage.
114− property int extensionSize: 0
115−
116− // Setting extensionSize after the list has been populated because it has
117− // the potential to mess up with the intial positioning in combination
118− // with snapping to the center of the list. This catches all the cases
119− // where the item would be outside the list for more than itemHeight / 2.
120− // For the rest, give it a flick to scroll to the beginning. Note that
121− // the flicking alone isn't enough because in some cases it's not strong
122− // enough to overcome the snapping.
123− // https://bugreports.qt-project.org/browse/QTBUG-32251
124− Component.onCompleted: {
125− extensionSize = itemHeight * 3
126− flick(0, clickFlickSpeed)
127− }
128−
129− // The height of the area where icons start getting folded
130− property int foldingStartHeight: units.gu(6.5)
131− // The height of the area where the items reach the final folding angle
132− property int foldingStopHeight: foldingStartHeight - itemHeight - spacing
133− property int itemWidth: units.gu(7)
134− property int itemHeight: units.gu(6.5)
135− property int clickFlickSpeed: units.gu(60)
136− property int draggedIndex: dndArea.draggedIndex
137− property real realContentY: contentY - originY + topMargin
138− property int realItemHeight: itemHeight + spacing
139−
140− // In case the start dragging transition is running, we need to delay the
141− // move because the displaced transition would clash with it and cause items
142− // to be moved to wrong places
143− property bool draggingTransitionRunning: false
144− property int scheduledMoveTo: -1
145−
146− displaced: Transition {
147− NumberAnimation { properties: "x,y"; duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
148− }
149−
150− delegate: FoldingLauncherDelegate {
151− id: launcherDelegate
152− objectName: "launcherDelegate" + index
153− itemHeight: launcherListView.itemHeight
154− itemWidth: launcherListView.itemWidth
155− width: itemWidth
156− height: itemHeight
157− iconName: model.icon
158− count: model.count
159− progress: model.progress
160− itemFocused: model.focused
161− inverted: root.inverted
162− z: -Math.abs(offset)
163− maxAngle: 55
164− property bool dragging: false
165−
166− ThinDivider {
167− id: dropIndicator
168− objectName: "dropIndicator"
169− anchors.centerIn: parent
170− width: parent.width + mainColumn.anchors.leftMargin + mainColumn.anchors.rightMargin
171− opacity: 0
172− }
173−
174− states: [
175− State {
176− name: "selected"
177− when: dndArea.selectedItem === launcherDelegate && fakeDragItem.visible && !dragging
178− PropertyChanges {
179− target: launcherDelegate
180− itemOpacity: 0
181− }
182− },
183− State {
184− name: "dragging"
185− when: dragging
186− PropertyChanges {
187− target: launcherDelegate
188− height: units.gu(1)
189− itemOpacity: 0
190− }
191− PropertyChanges {
192− target: dropIndicator
193− opacity: 1
194− }
195− },
196− State {
197− name: "expanded"
198− when: dndArea.draggedIndex >= 0 && (dndArea.preDragging || dndArea.dragging || dndArea.postDragging) && dndArea.draggedIndex != index
199− PropertyChanges {
200− target: launcherDelegate
201− angle: 0
202− offset: 0
203− itemOpacity: 0.6
204− }
205− }
206− ]
207−
208− transitions: [
209− Transition {
210− from: ""
211− to: "selected"
212− NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.FastDuration }
213− },
214− Transition {
215− from: "*"
216− to: "expanded"
217− NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.FastDuration }
218− UbuntuNumberAnimation { properties: "angle,offset" }
219− },
220− Transition {
221− from: "expanded"
222− to: ""
223− NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.BriskDuration }
224− UbuntuNumberAnimation { properties: "angle,offset" }
225− },
226− Transition {
227− id: draggingTransition
228− from: "selected"
229− to: "dragging"
230− SequentialAnimation {
231− PropertyAction { target: launcherListView; property: "draggingTransitionRunning"; value: true }
232− ParallelAnimation {
233− UbuntuNumberAnimation { properties: "height" }
234− NumberAnimation { target: dropIndicator; properties: "opacity"; duration: UbuntuAnimation.FastDuration }
235− }
236− ScriptAction {
237− script: {
238− if (launcherListView.scheduledMoveTo > -1) {
239− launcherListView.model.move(dndArea.draggedIndex, launcherListView.scheduledMoveTo)
240− dndArea.draggedIndex = launcherListView.scheduledMoveTo
241− launcherListView.scheduledMoveTo = -1
242− }
243− }
244− }
245− PropertyAction { target: launcherListView; property: "draggingTransitionRunning"; value: false }
246− }
247− },
248− Transition {
249− from: "dragging"
250− to: "*"
251− NumberAnimation { target: dropIndicator; properties: "opacity"; duration: UbuntuAnimation.FastDuration }
252− NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.BriskDuration }
253− SequentialAnimation {
254− ScriptAction { script: if (index == launcherListView.count-1) launcherListView.flick(0, -launcherListView.clickFlickSpeed); }
255− UbuntuNumberAnimation { properties: "height" }
256− ScriptAction { script: if (index == launcherListView.count-1) launcherListView.flick(0, -launcherListView.clickFlickSpeed); }
257− PropertyAction { target: dndArea; property: "postDragging"; value: false }
258− PropertyAction { target: dndArea; property: "draggedIndex"; value: -1 }
259− }
260− }
261− ]
262− }
263−
264− MouseArea {
265− id: dndArea
266− objectName: "dndArea"
267− anchors {
268− fill: parent
269− topMargin: launcherListView.topMargin
270− bottomMargin: launcherListView.bottomMargin
271− }
272− drag.minimumY: -launcherListView.topMargin
273− drag.maximumY: height + launcherListView.bottomMargin
274−
275− property int draggedIndex: -1
276− property var selectedItem
277− property bool preDragging: false
278− property bool dragging: selectedItem !== undefined && selectedItem !== null && selectedItem.dragging
279− property bool postDragging: false
280− property int startX
281− property int startY
282−
283− onPressed: {
284− selectedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
285− }
286−
287− onClicked: {
288− var index = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
289− var clickedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
290−
291− // Check if we actually clicked an item or only at the spacing in between
292− if (clickedItem === null) {
293− return;
294− }
295−
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);
302− } else {
303− root.applicationSelected(LauncherModel.get(index).appId);
304− }
305− return;
306− }
307−
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);
313− } else {
314− root.applicationSelected(LauncherModel.get(index).appId);
315− }
316− }
317−
318− onCanceled: {
319− selectedItem = undefined;
320− preDragging = false;
321− postDragging = false;
322− }
323−
324− onReleased: {
325− var droppedIndex = draggedIndex;
326− if (dragging) {
327− postDragging = true;
328− } else {
329− draggedIndex = -1;
330− }
331−
332− if (!selectedItem) {
333− return;
334− }
335−
336− selectedItem.dragging = false;
337− selectedItem = undefined;
338− preDragging = false;
339−
340− drag.target = undefined
341−
342− progressiveScrollingTimer.stop();
343− launcherListView.interactive = true;
344− if (droppedIndex >= launcherListView.count - 2 && postDragging) {
345− launcherListView.flick(0, -launcherListView.clickFlickSpeed);
346− }
347− if (droppedIndex == 0 && postDragging) {
348− launcherListView.flick(0, launcherListView.clickFlickSpeed);
349− }
350− }
351−
352− onPressAndHold: {
353− if (Math.abs(selectedItem.angle) > 30) {
354− return;
355− }
356−
357− draggedIndex = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
358−
359− // Opening QuickList
360− quickList.item = selectedItem;
361− quickList.model = launcherListView.model.get(draggedIndex).quickList;
362− quickList.appId = launcherListView.model.get(draggedIndex).appId;
363− quickList.state = "open";
364−
365− launcherListView.interactive = false
366−
367− var yOffset = draggedIndex > 0 ? (mouseY + launcherListView.realContentY) % (draggedIndex * launcherListView.realItemHeight) : mouseY + launcherListView.realContentY
368−
369− fakeDragItem.iconName = launcherListView.model.get(draggedIndex).icon
370− fakeDragItem.x = units.gu(0.5)
371− fakeDragItem.y = mouseY - yOffset + launcherListView.anchors.topMargin + launcherListView.topMargin
372− fakeDragItem.angle = selectedItem.angle * (root.inverted ? -1 : 1)
373− fakeDragItem.offset = selectedItem.offset * (root.inverted ? -1 : 1)
374− fakeDragItem.count = LauncherModel.get(draggedIndex).count
375− fakeDragItem.progress = LauncherModel.get(draggedIndex).progress
376− fakeDragItem.flatten()
377− drag.target = fakeDragItem
378−
379− startX = mouseX
380− startY = mouseY
381− }
382−
383− onPositionChanged: {
384− if (draggedIndex >= 0) {
385− if (!selectedItem.dragging) {
386− var distance = Math.max(Math.abs(mouseX - startX), Math.abs(mouseY - startY))
387− if (!preDragging && distance > units.gu(1.5)) {
388− preDragging = true;
389− quickList.state = "";
390− }
391− if (distance > launcherListView.itemHeight) {
392− selectedItem.dragging = true
393− preDragging = false;
394− }
395− }
396− if (!selectedItem.dragging) {
397− return
398− }
399−
400− var itemCenterY = fakeDragItem.y + fakeDragItem.height / 2
401−
402− // Move it down by the the missing size to compensate index calculation with only expanded items
403− itemCenterY += (launcherListView.itemHeight - selectedItem.height) / 2
404−
405− if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - launcherListView.realItemHeight) {
406− progressiveScrollingTimer.downwards = false
407− progressiveScrollingTimer.start()
408− } else if (mouseY < launcherListView.realItemHeight) {
409− progressiveScrollingTimer.downwards = true
410− progressiveScrollingTimer.start()
411− } else {
412− progressiveScrollingTimer.stop()
413− }
414−
415− var newIndex = (itemCenterY + launcherListView.realContentY) / launcherListView.realItemHeight
416−
417− if (newIndex > draggedIndex + 1) {
418− newIndex = draggedIndex + 1
419− } else if (newIndex < draggedIndex) {
420− newIndex = draggedIndex -1
421− } else {
422− return
423− }
424−
425− if (newIndex >= 0 && newIndex < launcherListView.count) {
426− if (launcherListView.draggingTransitionRunning) {
427− launcherListView.scheduledMoveTo = newIndex
428− } else {
429− launcherListView.model.move(draggedIndex, newIndex)
430− draggedIndex = newIndex
431− }
432− }
433− }
434− }
435− }
436− Timer {
437− id: progressiveScrollingTimer
438− interval: 2
439− repeat: true
440− running: false
441− property bool downwards: true
442− onTriggered: {
443− if (downwards) {
444− var minY = -launcherListView.topMargin
445− if (launcherListView.contentY > minY) {
446− launcherListView.contentY = Math.max(launcherListView.contentY - units.dp(2), minY)
447− }
448− } else {
449− var maxY = launcherListView.contentHeight - launcherListView.height + launcherListView.topMargin + launcherListView.originY
450− if (launcherListView.contentY < maxY) {
451− launcherListView.contentY = Math.min(launcherListView.contentY + units.dp(2), maxY)
452− }
453− }
454− }
455− }
456− }
457− }
458−
459− LauncherDelegate {
460− id: fakeDragItem
461− objectName: "fakeDragItem"
462− visible: dndArea.draggedIndex >= 0 && !dndArea.postDragging
463− itemWidth: launcherListView.itemWidth
464− itemHeight: launcherListView.itemHeight
465− height: itemHeight
466− width: itemWidth
467− rotation: root.rotation
468− itemOpacity: 0.9
469−
470− function flatten() {
471− fakeDragItemAnimation.start();
472− }
473−
474− UbuntuNumberAnimation {
475− id: fakeDragItemAnimation
476− target: fakeDragItem;
477− properties: "angle,offset";
478− to: 0
479− }
480− }
481− }
482− }
483−
484− UbuntuShapeForItem {
485− id: quickListShape
486− objectName: "quickListShape"
487− anchors.fill: quickList
488− opacity: quickList.state === "open" ? 0.8 : 0
489− visible: opacity > 0
490− rotation: root.rotation
491−
492− Behavior on opacity {
493− UbuntuNumberAnimation {}
494− }
495−
496− image: quickList
497−
498− Image {
499− anchors {
500− right: parent.left
501− rightMargin: -units.dp(4)
502− verticalCenter: parent.verticalCenter
503− verticalCenterOffset: -quickList.offset
504− }
505− height: units.gu(1)
506− width: units.gu(2)
507− source: "graphics/quicklist_tooltip.png"
508− rotation: 90
509− }
510−
511− InverseMouseArea {
512− anchors.fill: parent
513− enabled: quickList.state == "open"
514− onClicked: {
515− quickList.state = ""
516− }
517− }
518−
519− }
520−
521− Rectangle {
522− id: quickList
523− objectName: "quickList"
524− color: "#221e1c"
525− width: units.gu(30)
526− height: quickListColumn.height
527− anchors {
528− left: root.inverted ? undefined : parent.right
529− right: root.inverted ? parent.left : undefined
530− margins: units.gu(1)
531−
532− }
533− y: itemCenter - (height / 2) + offset
534− rotation: root.rotation
535−
536− property var model
537− property string appId
538− property var item
539−
540− // internal
541− property int itemCenter: item ? root.mapFromItem(quickList.item).y + (item.height / 2) : units.gu(1)
542− property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
543− itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
544−
545− Column {
546− id: quickListColumn
547− width: parent.width
548− height: childrenRect.height
549−
550− Repeater {
551− id: popoverRepeater
552− model: quickList.model
553−
554− ListItems.Standard {
555− objectName: "quickListEntry" + index
556− text: (model.clickable ? "" : "<b>") + model.label + (model.clickable ? "" : "</b>")
557− highlightWhenPressed: model.clickable
558−
559− // FIXME: This is a workaround for the theme not being context sensitive. I.e. the
560− // ListItems don't know that they are sitting in a themed Popover where the color
561− // needs to be inverted.
562− __foregroundColor: Theme.palette.selected.backgroundText
563−
564− onClicked: {
565− if (!model.clickable) {
566− return;
567− }
568− quickList.state = "";
569− // Unsetting model to prevent showing changing entries during fading out
570− // that may happen because of triggering an action.
571− LauncherModel.quickListActionInvoked(quickList.appId, index);
572− quickList.model = undefined;
573− }
574− }
575− }
576− }
577− }
578−}
Launcher/graphics/focused_app_arrow@30.pngdeleted
Binary file not shown.
Launcher/graphics/highlight@18.pngdeleted
Binary file not shown.
Launcher/graphics/home@18.pngdeleted
Binary file not shown.
Launcher/graphics/launcher_bg@30.pngdeleted
Binary file not shown.
Launcher/graphics/launcher_bg@30.scideleted−5
@@ -1,5 +0,0 @@
1−border.left: 4
2−border.top: 4
3−border.bottom: 4
4−border.right: 66
5−source: launcher_bg@30.png
Launcher/graphics/non-selected@18.pngdeleted
Binary file not shown.
Launcher/graphics/non-selected@18.scideleted−5
@@ -1,5 +0,0 @@
1−border.left: 54
2−border.top: 60
3−border.bottom: 60
4−border.right: 54
5−source: non-selected@18.png
Launcher/graphics/notification@30.pngdeleted
Binary file not shown.
Launcher/graphics/notification@30.scideleted−5
@@ -1,5 +0,0 @@
1−border.left: 36
2−border.top: 36
3−border.bottom: 36
4−border.right: 36
5−source: notification@30.png
Launcher/graphics/progressbar-fill@30.pngdeleted
Binary file not shown.
Launcher/graphics/progressbar-fill@30.scideleted−5
@@ -1,5 +0,0 @@
1−border.left: 36
2−border.top: 16
3−border.bottom: 28
4−border.right: 36
5−source: progressbar-fill@30.png
Launcher/graphics/progressbar-trough@30.pngdeleted
Binary file not shown.
Launcher/graphics/progressbar-trough@30.scideleted−5
@@ -1,5 +0,0 @@
1−border.left: 36
2−border.top: 16
3−border.bottom: 26
4−border.right: 36
5−source: progressbar-trough@30.png
Launcher/graphics/quicklist_tooltip@30.pngdeleted
Binary file not shown.
Launcher/graphics/selected@18.pngdeleted
Binary file not shown.
Launcher/graphics/selected@18.scideleted−5
@@ -1,5 +0,0 @@
1−border.left: 54
2−border.top: 60
3−border.bottom: 60
4−border.right: 54
5−source: selected@18.png
Launcher/graphics/triangle@18.pngdeleted
Binary file not shown.
MouseTouchAdaptor.cppdeleted−153
@@ -1,153 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− *
16− * Authored by: Daniel d'Andrada <daniel.dandrada@canonical.com>
17− */
18−
19−#include "MouseTouchAdaptor.h"
20−
21−#include <qpa/qwindowsysteminterface.h>
22−
23−#include <QtGui/QMouseEvent>
24−#include <QtTest/QTest>
25−
26−using QTest::QTouchEventSequence;
27−
28−namespace {
29−Qt::MouseButton translateMouseButton(xcb_button_t detail)
30−{
31− switch (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;
37− }
38−}
39−} // end of anonymous namespace
40−
41−MouseTouchAdaptor::MouseTouchAdaptor()
42− : m_leftButtonIsPressed(false)
43−{
44− m_touchDevice = new QTouchDevice;
45− m_touchDevice->setType(QTouchDevice::TouchScreen);
46− QWindowSystemInterface::registerTouchDevice(m_touchDevice);
47−}
48−
49−bool MouseTouchAdaptor::nativeEventFilter(const QByteArray & eventType,
50− void * message, long * /*result*/)
51−{
52− if (eventType != "xcb_generic_event_t") {
53− // wrong backend.
54− qWarning("MouseTouchAdaptor: XCB backend not in use. Adaptor inoperative!");
55− return false;
56− }
57−
58− xcb_generic_event_t *xcbEvent = static_cast<xcb_generic_event_t *>(message);
59−
60− switch (xcbEvent->response_type & ~0x80) {
61− case XCB_BUTTON_PRESS:
62− return handleButtonPress(reinterpret_cast<xcb_button_press_event_t *>(xcbEvent));
63− break;
64− case XCB_BUTTON_RELEASE:
65− return handleButtonRelease(reinterpret_cast<xcb_button_release_event_t *>(xcbEvent));
66− break;
67− case XCB_MOTION_NOTIFY:
68− return handleMotionNotify(reinterpret_cast<xcb_motion_notify_event_t *>(xcbEvent));
69− break;
70− default:
71− return false;
72− break;
73− };
74−}
75−
76−bool MouseTouchAdaptor::handleButtonPress(xcb_button_press_event_t *pressEvent)
77−{
78− Qt::MouseButton button = translateMouseButton(pressEvent->detail);
79−
80− // Just eat the event if it wasn't a left mouse press
81− if (button != Qt::LeftButton)
82− return true;
83−
84− QPoint windowPos(pressEvent->event_x, pressEvent->event_y);
85−
86− QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(pressEvent->event));
87−
88− QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
89− false /* autoCommit */);
90− touchEvent.press(0 /* touchId */, windowPos);
91− touchEvent.commit(false /* processEvents */);
92−
93− m_leftButtonIsPressed = true;
94− return true;
95−}
96−
97−bool MouseTouchAdaptor::handleButtonRelease(xcb_button_release_event_t *releaseEvent)
98−{
99− Qt::MouseButton button = translateMouseButton(releaseEvent->detail);
100−
101− // Just eat the event if it wasn't a left mouse release
102− if (button != Qt::LeftButton)
103− return true;
104−
105− QPoint windowPos(releaseEvent->event_x, releaseEvent->event_y);
106−
107− QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(releaseEvent->event));
108−
109− QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
110− false /* autoCommit */);
111− touchEvent.release(0 /* touchId */, windowPos);
112− touchEvent.commit(false /* processEvents */);
113−
114− m_leftButtonIsPressed = false;
115− return true;
116−}
117−
118−bool MouseTouchAdaptor::handleMotionNotify(xcb_motion_notify_event_t *event)
119−{
120− if (!m_leftButtonIsPressed) {
121− return true;
122− }
123−
124− QPoint windowPos(event->event_x, event->event_y);
125−
126− QWindow *targetWindow = findQWindowWithXWindowID(static_cast<WId>(event->event));
127−
128− QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice,
129− false /* autoCommit */);
130− touchEvent.move(0 /* touchId */, windowPos);
131− touchEvent.commit(false /* processEvents */);
132−
133− return true;
134−}
135−
136−QWindow *MouseTouchAdaptor::findQWindowWithXWindowID(WId windowId)
137−{
138− QWindowList windowList = QGuiApplication::topLevelWindows();
139− QWindow *foundWindow = nullptr;
140−
141− int i = 0;
142− while (!foundWindow && i < windowList.count()) {
143− QWindow *window = windowList[i];
144− if (window->winId() == windowId) {
145− foundWindow = window;
146− } else {
147− ++i;
148− }
149− }
150−
151− Q_ASSERT(foundWindow);
152− return foundWindow;
153−}
Notifications/Notification.qmldeleted−325
@@ -1,325 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity.Notifications 1.0
20−import QMenuModel 0.1
21−import Utils 0.1
22−
23−Item {
24− id: notification
25−
26− property alias iconSource: icon.fileSource
27− property alias secondaryIconSource: secondaryIcon.source
28− property alias summary: summaryLabel.text
29− property alias body: bodyLabel.text
30− property var actions
31− property var notificationId
32− property var type
33− property var hints
34− property var notification
35− property color color
36− property bool fullscreen
37−
38− fullscreen: false
39− objectName: "background"
40− implicitHeight: type != Notification.PlaceHolder ? (fullscreen ? notificationList.fullHeight : contentColumn.height + contentColumn.spacing * 4) : 0
41−
42− color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
43− opacity: 0
44−
45− clip: fullscreen ? false : true
46− visible: type != Notification.PlaceHolder
47−
48− UbuntuShape {
49− id: shapedBack
50−
51− visible: !fullscreen
52− anchors.fill: parent
53− anchors.margins: notificationList.margin
54− color: parent.color
55− opacity: parent.opacity
56− radius: "medium"
57− }
58−
59− Rectangle {
60− id: nonShapedBack
61−
62− visible: fullscreen
63− anchors.fill: parent
64− color: parent.color
65− opacity: parent.opacity
66− }
67−
68− Item {
69− id: contents
70− anchors.fill: fullscreen ? nonShapedBack : shapedBack
71−
72− UnityMenuModelPaths {
73− id: paths
74−
75− source: hints["x-canonical-private-menu-model"]
76−
77− busNameHint: "busName"
78− actionsHint: "actions"
79− menuObjectPathHint: "menuPath"
80− }
81−
82− UnityMenuModel {
83− id: unityMenuModel
84−
85− busName: paths.busName
86− actions: paths.actions
87− menuObjectPath: paths.menuObjectPath
88− }
89−
90− Behavior on implicitHeight {
91− id: heightBehavior
92−
93− enabled: false
94− UbuntuNumberAnimation {
95− duration: UbuntuAnimation.SnapDuration
96− }
97− }
98−
99− // delay enabling height behavior until the add transition is complete
100− onOpacityChanged: if (opacity == 1) heightBehavior.enabled = true
101−
102− MouseArea {
103− id: interactiveArea
104−
105− anchors.fill: contentColumn
106− objectName: "interactiveArea"
107− enabled: notification.type == Notification.Interactive
108− onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
109− }
110−
111− Column {
112− id: contentColumn
113−
114− anchors {
115− left: parent.left
116− right: parent.right
117− top: parent.top
118− margins: fullscreen ? 0 : spacing
119− }
120−
121− spacing: units.gu(1)
122−
123− Row {
124− id: topRow
125−
126− spacing: contentColumn.spacing
127− anchors {
128− left: parent.left
129− right: parent.right
130− }
131−
132− ShapedIcon {
133− id: icon
134−
135− objectName: "icon"
136− width: units.gu(6)
137− height: units.gu(6)
138− shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
139− visible: iconSource !== undefined && iconSource != ""
140− }
141−
142− Image {
143− id: secondaryIcon
144−
145− objectName: "secondaryIcon"
146− width: units.gu(2)
147− height: units.gu(2)
148− visible: source !== undefined && source != ""
149− fillMode: Image.PreserveAspectCrop
150− }
151−
152− Column {
153− id: labelColumn
154− width: parent.width - x
155−
156− anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
157−
158− Label {
159− id: summaryLabel
160−
161− objectName: "summaryLabel"
162− anchors {
163− left: parent.left
164− right: parent.right
165− }
166− fontSize: "medium"
167− font.bold: true
168− color: Theme.palette.selected.backgroundText
169− elide: Text.ElideRight
170− }
171−
172− Label {
173− id: bodyLabel
174−
175− objectName: "bodyLabel"
176− anchors {
177− left: parent.left
178− right: parent.right
179− }
180− visible: body != ""
181− fontSize: "small"
182− color: Theme.palette.selected.backgroundText
183− opacity: 0.6
184− wrapMode: Text.WordWrap
185− maximumLineCount: 10
186− elide: Text.ElideRight
187− }
188− }
189− }
190−
191− Column {
192− objectName: "dialogListView"
193− spacing: units.gu(2)
194−
195− visible: count > 0
196−
197− anchors.left: parent.left; anchors.right: parent.right
198− anchors.top: fullscreen ? parent.top : undefined
199− anchors.bottom: fullscreen ? parent.bottom : undefined
200−
201− Repeater {
202− model: unityMenuModel
203−
204− NotificationMenuItemFactory {
205− anchors.left: parent.left; anchors.right: parent.right
206−
207− menuModel: unityMenuModel
208− menuData: model
209− menuIndex: index
210− }
211− }
212− }
213−
214− Item {
215− id: buttonRow
216−
217− objectName: "buttonRow"
218− anchors {
219− left: parent.left
220− right: parent.right
221− }
222− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
223− height: units.gu(5)
224−
225− property real buttonWidth: (width - contentColumn.spacing) / 2
226− property bool expanded
227−
228− Button {
229− id: leftButton
230−
231− objectName: "button1"
232− width: parent.expanded ? parent.width : parent.buttonWidth
233− anchors {
234− top: parent.top
235− bottom: parent.bottom
236− }
237− text: notification.type == Notification.SnapDecision && actionRepeater.count >= 2 ? actionRepeater.itemAt(1).actionLabel : ""
238− gradient: UbuntuColors.greyGradient
239− onClicked: {
240− if (actionRepeater.count > 2) {
241− buttonRow.expanded = !buttonRow.expanded
242− } else {
243− notification.notification.invokeAction(actionRepeater.itemAt(1).actionId)
244− }
245− }
246−
247− Behavior on width {
248− UbuntuNumberAnimation {
249− duration: UbuntuAnimation.SnapDuration
250− }
251− }
252− }
253−
254− Button {
255− id: rightButton
256−
257− objectName: "button0"
258− anchors {
259− left: leftButton.right
260− leftMargin: contentColumn.spacing
261− right: parent.right
262− }
263− text: notification.type == Notification.SnapDecision && actionRepeater.count >= 1 ? actionRepeater.itemAt(0).actionLabel : ""
264− anchors {
265− top: parent.top
266− bottom: parent.bottom
267− }
268− gradient: notification.hints["x-canonical-private-button-tint"] == "true" ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient
269− visible: width > 0
270− onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
271− }
272− }
273−
274− Column {
275− objectName: "buttonColumn"
276− spacing: contentColumn.spacing
277− anchors {
278− left: parent.left
279− right: parent.right
280− }
281−
282− // calculate initial position before Column takes over
283− y: buttonRow.y + buttonRow.height + contentColumn.spacing
284−
285− visible: notification.type == Notification.SnapDecision && buttonRow.expanded
286− height: buttonRow.expanded ? implicitHeight : 0
287−
288− Repeater {
289− id: actionRepeater
290−
291− model: notification.actions
292− delegate: Loader {
293− id: loader
294−
295− property string actionId: id
296− property string actionLabel: label
297−
298− anchors {
299− left: parent.left
300− right: parent.right
301− }
302−
303− Component {
304− id: actionButton
305−
306− Button {
307− objectName: "button" + index
308− anchors {
309− left: parent.left
310− right: parent.right
311− }
312−
313− text: loader.actionLabel
314− height: units.gu(5)
315− gradient: UbuntuColors.greyGradient
316− onClicked: notification.notification.invokeAction(loader.actionId)
317− }
318− }
319− sourceComponent: (index == 0 || index == 1) ? undefined : actionButton
320− }
321− }
322− }
323− }
324− }
325−}
Notifications/NotificationMenuItemFactory.qmldeleted−117
@@ -1,117 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− *
16− * Authors:
17− * Nick Dedekind <nick.dedekind@canonical.com>
18− */
19−
20−import QtQuick 2.0
21−import Ubuntu.Components 0.1
22−import "../Components"
23−import "../Greeter"
24−
25−Loader {
26− id: menuFactory
27−
28− property QtObject menuModel: null
29− property QtObject menuData: null
30− property int menuIndex
31−
32− property var _map: {
33− "com.canonical.snapdecision.textfield": textfield,
34− "com.canonical.snapdecision.pinlock" : pinLock,
35− }
36−
37− sourceComponent: {
38− if (menuData.type !== undefined) {
39− var component = _map[menuData.type];
40− if (component !== undefined) {
41− return component;
42− }
43− }
44− }
45−
46− Component.onCompleted: {
47− notification.fullscreen = menuData.type == "com.canonical.snapdecision.pinlock"
48− }
49−
50− Component {
51− id: textfield
52−
53− Column {
54− spacing: units.gu(2)
55−
56− anchors.left: parent.left; anchors.right: parent.right
57−
58− Component.onCompleted: {
59− menuModel.loadExtendedAttributes(menuIndex, {"x-echo-mode-password": "bool"});
60− checkBox.checked = menuData.ext.xEchoModePassword ? false : true
61− checkBoxRow.visible = menuData.ext.xEchoModePassword
62− }
63−
64− Label {
65− text: menuData.label
66− }
67−
68− TextField {
69− id: textfield
70−
71− anchors.left: parent.left; anchors.right: parent.right
72− echoMode: checkBox.checked ? TextInput.Normal : TextInput.Password
73− height: units.gu(5)
74− onTextChanged: {
75− menuModel.changeState(menuIndex, text);
76− }
77− }
78−
79− Row {
80− id: checkBoxRow
81−
82− spacing: units.gu(.5)
83−
84− CheckBox {
85− id: checkBox
86−
87− checked: false
88− }
89−
90− Label {
91− anchors.verticalCenter: checkBox.verticalCenter
92− text: i18n.tr("Show password")
93− }
94− }
95− }
96− }
97−
98− Component {
99− id: pinLock
100−
101− Lockscreen {
102− anchors.left: parent.left; anchors.right: parent.right
103− height: notificationList.fullHeight
104− placeholderText: i18n.tr("Please enter SIM PIN")
105− background: shell.background
106−
107− onEntered: {
108− menuModel.changeState(menuIndex, passphrase);
109− entryEnabled = false;
110− }
111−
112− onCancel: {
113− menuModel.activate(menuIndex, false);
114− }
115− }
116− }
117−}
Notifications/Notifications.qmldeleted−79
@@ -1,79 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−ListView {
22− id: notificationList
23−
24− objectName: "notificationList"
25− interactive: false
26−
27− property real margin
28− property real fullHeight
29−
30− delegate: Notification {
31− objectName: "notification" + index
32− anchors {
33− left: parent.left
34− right: parent.right
35− }
36− type: model.type
37− hints: model.hints
38− iconSource: model.icon
39− secondaryIconSource: model.secondaryIcon
40− summary: model.summary
41− body: model.body
42− actions: model.actions
43− notificationId: model.id
44− notification: notificationList.model.getRaw(notificationId)
45−
46− // make sure there's no opacity-difference between the several
47− // elements in a notification
48− layer.enabled: add.running || remove.running || populate.running
49− }
50−
51− populate: Transition {
52− UbuntuNumberAnimation {
53− property: "opacity"
54− to: 1
55− duration: UbuntuAnimation.SnapDuration
56− }
57− }
58−
59− add: Transition {
60− UbuntuNumberAnimation {
61− property: "opacity"
62− to: 1
63− duration: UbuntuAnimation.SnapDuration
64− }
65− }
66−
67− remove: Transition {
68− UbuntuNumberAnimation {
69− property: "opacity"
70− to: 0
71− }
72− }
73−
74− displaced: Transition {
75− UbuntuNumberAnimation {
76− properties: "x,y"
77− }
78− }
79−}
Panel/IndicatorItem.qmldeleted−61
@@ -1,61 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity.Indicators 0.1 as Indicators
20−import "../Components"
21−
22−Item {
23− id: indicatorItem
24−
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
30−
31− opacity: dimmed ? 0.4 : 1
32− Behavior on opacity { StandardAnimation {} }
33−
34− width: loader.item ? loader.item.width : 0
35−
36− Loader {
37− id: loader
38−
39− onLoaded: {
40− item.height = Qt.binding(function() { return indicatorItem.height; });
41−
42− for(var pName in indicatorProperties) {
43− if (item.hasOwnProperty(pName)) {
44− item[pName] = indicatorProperties[pName];
45− }
46− }
47− }
48− }
49−
50− Rectangle {
51− color: Theme.palette.selected.foreground
52− objectName: "highlight"
53− height: units.dp(2)
54− width: parent.width
55− anchors.top: parent.bottom
56− visible: highlighted
57−
58− opacity: highlighted ? 1 : 0
59− Behavior on opacity { StandardAnimation {} }
60− }
61−}
Panel/IndicatorRow.qmldeleted−148
@@ -1,148 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity.Indicators 0.1 as Indicators
20−import "../Components"
21−
22−Item {
23− id: indicatorRow
24−
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
30− property int overFlowWidth: width
31− property bool showAll: false
32−
33− width: units.gu(40)
34− height: units.gu(3)
35−
36− function setDefaultItem() {
37− // The leftmost indicator
38− setCurrentItem(0);
39− }
40−
41− function setCurrentItem(index) {
42− if (currentItemIndex !== index) {
43− currentItem = rowRepeater.itemAt(index);
44− }
45− }
46−
47− Timer {
48− id: allVisible
49− interval: 1000
50−
51− onTriggered: {
52− showAll = false;
53− }
54− }
55−
56− Row {
57− id: row
58−
59− width: children.width
60− height: parent.height
61− anchors.right: parent.right
62−
63− Repeater {
64− id: rowRepeater
65− objectName: "rowRepeater"
66− model: indicatorsModel ? indicatorsModel : undefined
67−
68− property int lastCount: 0
69− onCountChanged: {
70− if (lastCount < count) {
71− showAll = true;
72− allVisible.start();
73− }
74− lastCount = count;
75− }
76−
77− Item {
78− id: itemWrapper
79− height: indicatorRow.height
80− width: indicatorItem.width
81− visible: indicatorItem.indicatorVisible
82− opacity: 1.0
83− y: 0
84− state: "standard"
85−
86− property int ownIndex: index
87− property alias highlighted: indicatorItem.highlighted
88− property alias dimmed: indicatorItem.dimmed
89−
90− property bool hidden: !showAll && !indicatorItem.highlighted && (indicatorRow.state == "locked" || indicatorRow.state == "commit")
91− property bool overflow: row.width - itemWrapper.x > overFlowWidth
92−
93− IndicatorItem {
94− id: indicatorItem
95− height: parent.height
96−
97− highlighted: indicatorRow.state != "initial" ? itemWrapper.ownIndex == indicatorRow.currentItemIndex : false
98− dimmed: indicatorRow.state != "initial" ? itemWrapper.ownIndex != indicatorRow.currentItemIndex : false
99−
100− widgetSource: model.widgetSource
101− indicatorProperties : model.indicatorProperties
102−
103− Component.onCompleted: {
104− if (visibleIndicators == undefined) {
105− visibleIndicators = {}
106− }
107− indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
108− indicatorRow.visibleIndicatorsChanged();
109− }
110− onIndicatorVisibleChanged: {
111− if (visibleIndicators == undefined) {
112− visibleIndicators = {}
113− }
114− indicatorRow.visibleIndicators[model.identifier] = indicatorVisible;
115− indicatorRow.visibleIndicatorsChanged();
116−
117− if (indicatorVisible) {
118− showAll = true;
119− allVisible.start();
120− }
121− }
122− }
123−
124− states: [
125− State {
126− name: "standard"
127− when: !hidden && !overflow
128− },
129− State {
130− name: "overflow"
131− when: hidden || overflow
132− PropertyChanges { target: itemWrapper; opacity: 0.0 }
133− }
134− ]
135−
136− transitions: [
137− Transition {
138− StandardAnimation {
139− target: itemWrapper
140− property: "opacity"
141− duration: 300
142− }
143− }
144− ]
145− }
146− }
147− }
148−}
Panel/Indicators.qmldeleted−421
@@ -1,421 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Ubuntu.Gestures 0.1
20−import Unity.Indicators 0.1 as Indicators
21−
22−import "../Components"
23−import "../Components/ListItems"
24−
25−Showable {
26− id: indicators
27−
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
31− property alias overFlowWidth: indicatorRow.overFlowWidth
32− property alias showAll: indicatorRow.showAll
33−
34− property int hintValue
35− readonly property int lockThreshold: openedHeight / 2
36− property bool fullyOpened: height == openedHeight
37− property bool partiallyOpened: height > panelHeight && !fullyOpened
38− property real visualBottom: Math.max(y+height, y+indicatorRow.y+indicatorRow.height)
39− property bool contentEnabled: true
40− property bool initalizeItem: true
41− readonly property alias content: menuContent
42−
43− // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
44− // use its own values. Need to ask design about this.
45− showAnimation: StandardAnimation {
46− property: "height"
47− duration: 350
48− to: openedHeight
49− easing.type: Easing.OutCubic
50−
51− // Re-size if we've changed the openHeight while shown.
52− onToChanged: {
53− if (indicators.shown) {
54− indicators.show();
55− }
56− }
57− }
58−
59− hideAnimation: StandardAnimation {
60− property: "height"
61− duration: 350
62− to: panelHeight
63− easing.type: Easing.OutCubic
64− }
65−
66− height: panelHeight
67− onHeightChanged: updateRevealProgressState(indicators.height - panelHeight, true)
68−
69− function updateRevealProgressState(revealProgress, enableRelease) {
70− if (!showAnimation.running && !hideAnimation.running) {
71− if (revealProgress === 0) {
72− indicators.state = "initial";
73− } else if (revealProgress > 0 && revealProgress <= hintValue) {
74− indicators.state = "hint";
75− } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
76− indicators.state = "reveal";
77− } else if (revealProgress >= lockThreshold && lockThreshold > 0) {
78− indicators.state = "locked";
79− }
80− }
81−
82− if (enableRelease && revealProgress === 0) {
83− menuContent.releaseContent();
84− }
85− }
86−
87− function calculateCurrentItem(xValue, useBuffer) {
88− var rowCoordinates;
89− var itemCoordinates;
90− var currentItem;
91− var distanceFromRightEdge;
92− var bufferExceeded = false;
93−
94− if (indicators.state == "commit" || indicators.state == "locked" || showAnimation.running || hideAnimation.running) return;
95−
96− /*
97− If user drags the indicator handle bar down a distance hintValue or less, this is 0.
98− If bar is dragged down a distance greater than or equal to lockThreshold, this is 1.
99− Otherwise it contains the bar's location as a fraction of the distance between hintValue (is 0) and lockThreshold (is 1).
100− */
101− var verticalProgress =
102− MathUtils.clamp((indicators.height - handle.height - hintValue) /
103− (lockThreshold - hintValue), 0, 1);
104−
105− /*
106− Vertical velocity check. Don't change the indicator if we're moving too quickly.
107− */
108− var verticalSpeed = Math.abs(yVelocityCalculator.calculate());
109− if (verticalSpeed >= 0.05 && !initalizeItem) {
110− return;
111− }
112−
113− /*
114− Percentage of an indicator icon's width the user's press can stray horizontally from the
115− focused icon before we change focus to another icon. E.g. a value of 0.5 means you must
116− go right a distance of half an icon's width before focus moves to the icon on the right
117− */
118− var maxBufferThreshold = 0.5;
119−
120− /*
121− To help users find the indicator of their choice while opening the indicators, we add logic to add a
122− left/right buffer to each icon so it is harder for the focus to be moved accidentally to another icon,
123− as the user moves their finger down, but yet allows them to switch indicator if they want.
124− This buffer is wider the further the user's finger is from the top of the screen.
125− */
126− var effectiveBufferThreshold = maxBufferThreshold * verticalProgress;
127−
128− rowCoordinates = indicatorRow.mapToItem(indicatorRow.row, xValue, 0);
129− // get the current delegate
130− currentItem = indicatorRow.row.childAt(rowCoordinates.x, 0);
131− if (currentItem && currentItem != indicatorRow.currentItem ) {
132− itemCoordinates = indicatorRow.row.mapToItem(currentItem, rowCoordinates.x, 0);
133− distanceFromRightEdge = (currentItem.width - itemCoordinates.x) / (currentItem.width);
134− if (Math.abs(currentItem.ownIndex - indicatorRow.currentItemIndex) > 1) {
135− bufferExceeded = true;
136− } else {
137− if (indicatorRow.currentItemIndex < currentItem.ownIndex && distanceFromRightEdge < (1 - effectiveBufferThreshold)) {
138− bufferExceeded = true;
139− } else if (indicatorRow.currentItemIndex > currentItem.ownIndex && distanceFromRightEdge > effectiveBufferThreshold) {
140− bufferExceeded = true;
141− }
142− }
143− if ((!useBuffer || (useBuffer && bufferExceeded)) || indicatorRow.currentItem < 0 || indicatorRow.currentItem == null) {
144− indicatorRow.currentItem = currentItem;
145− }
146− } else if (!currentItem) {
147− indicatorRow.setDefaultItem();
148− }
149− initalizeItem = indicatorRow.currentItem == null;
150− }
151−
152− // eater
153− MouseArea {
154− anchors {
155− top: parent.top
156− bottom: handle.bottom
157− left: parent.left
158− right: parent.right
159− }
160− }
161−
162− VerticalThinDivider {
163− anchors {
164− top: indicators.top
165− topMargin: panelHeight
166− bottom: handle.bottom
167− right: indicators.left
168− }
169− width: units.dp(2)
170− source: "graphics/VerticalDivider.png"
171− }
172−
173− MenuContent {
174− id: menuContent
175− objectName: "menuContent"
176−
177− anchors {
178− left: parent.left
179− right: parent.right
180− top: indicatorRow.bottom
181− bottom: handle.top
182− }
183− indicatorsModel: indicatorsModel
184− clip: !indicators.fullyOpened
185− activeHeader: indicators.state == "hint" || indicators.state == "reveal"
186− enabled: contentEnabled
187− visibleIndicators: indicatorRow.visibleIndicators
188−
189− Connections {
190− property bool enableIndexChangeSignal: true
191−
192− target: enableIndexChangeSignal ? indicatorRow : null
193− onCurrentItemIndexChanged: {
194− var oldActive = enableIndexChangeSignal;
195− enableIndexChangeSignal = false;
196−
197− menuContent.setCurrentMenuIndex(indicatorRow.currentItemIndex);
198−
199− enableIndexChangeSignal = oldActive;
200− }
201− }
202−
203− //small shadow gradient at bottom of menu
204− Rectangle {
205− anchors {
206− left: parent.left
207− right: parent.right
208− bottom: parent.bottom
209− }
210− height: units.gu(0.5)
211− gradient: Gradient {
212− GradientStop { position: 0.0; color: "transparent" }
213− GradientStop { position: 1.0; color: "black" }
214− }
215− opacity: 0.4
216− }
217− }
218−
219− Rectangle {
220− id: handle
221−
222− color: menuContent.backgroundColor
223−
224− anchors {
225− left: parent.left
226− right: parent.right
227− bottom: parent.bottom
228− }
229− height: get_height()
230− clip: height < handleImage.height
231−
232− function get_height() {
233− return Math.max(Math.min(handleImage.height, indicators.height - handleImage.height), 0);
234− }
235−
236− BorderImage {
237− id: handleImage
238− source: "graphics/handle.sci"
239− height: panelHeight
240− anchors {
241− left: parent.left
242− right: parent.right
243− bottom: parent.bottom
244− }
245− }
246− MouseArea { //prevent clicks passing through
247− anchors.fill: parent
248− }
249− }
250−
251− PanelBackground {
252− anchors.fill: indicatorRow
253− }
254−
255− Indicators.IndicatorsModel {
256− id: indicatorsModel
257−
258− Component.onCompleted: load()
259− }
260−
261− IndicatorRow {
262− id: indicatorRow
263− objectName: "indicatorRow"
264− anchors {
265− left: parent.left
266− right: parent.right
267− }
268− height: indicators.panelHeight
269− indicatorsModel: indicatorsModel
270− state: indicators.state
271−
272− Connections {
273− property bool enableIndexChangeSignal: true
274−
275− target: enableIndexChangeSignal ? menuContent : null
276− onCurrentMenuIndexChanged: {
277− var oldActive = enableIndexChangeSignal;
278− enableIndexChangeSignal = false;
279−
280− indicatorRow.setCurrentItem(menuContent.currentMenuIndex);
281−
282− enableIndexChangeSignal = oldActive;
283− }
284− }
285−
286− EdgeDragArea {
287− id: rowDragArea
288− anchors.fill: indicatorRow
289− direction: Direction.Downwards
290− maxSilenceTime: 2000
291− distanceThreshold: 0
292−
293− enabled: fullyOpened
294− onDraggingChanged: {
295− if (dragging) {
296− initalizeItem = true;
297− updateRevealProgressState(Math.max(touchSceneY - panelHeight, hintValue), false);
298− indicators.calculateCurrentItem(touchX, false);
299− } else {
300− indicators.state = "commit";
301− }
302− }
303−
304− onTouchXChanged: {
305− indicators.calculateCurrentItem(touchX, true);
306− }
307− onTouchSceneYChanged: {
308− updateRevealProgressState(Math.max(touchSceneY - panelHeight, hintValue), false);
309− yVelocityCalculator.trackedPosition = touchSceneY;
310− }
311− }
312− }
313−
314− Connections {
315− target: showAnimation
316− onRunningChanged: {
317− if (showAnimation.running) {
318− indicators.state = "commit";
319− }
320− }
321− }
322−
323− Connections {
324− target: hideAnimation
325− onRunningChanged: {
326− if (hideAnimation.running) {
327− indicators.state = "initial";
328− initalizeItem = true;
329− }
330− }
331− }
332−
333− property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null
334− // connections to the active drag handle
335− Connections {
336− target: activeDragHandle
337− onTouchXChanged: {
338− indicators.calculateCurrentItem(activeDragHandle.touchX, true);
339− }
340− onTouchSceneYChanged: {
341− yVelocityCalculator.trackedPosition = activeDragHandle.touchSceneY;
342− }
343− }
344−
345− DragHandle {
346− id: showDragHandle
347− anchors.bottom: parent.bottom
348− // go beyond parent so that it stays reachable, at the top of the screen.
349− anchors.bottomMargin: pinnedMode ? 0 : -panelHeight
350− anchors.left: parent.left
351− anchors.right: parent.right
352− height: panelHeight
353− direction: Direction.Downwards
354− enabled: !indicators.shown && indicators.available
355− hintDisplacement: pinnedMode ? indicators.hintValue : 0
356− autoCompleteDragThreshold: maxTotalDragDistance / 2
357− stretch: true
358− maxTotalDragDistance: openedHeight - panelHeight
359− distanceThreshold: pinnedMode ? 0 : units.gu(3)
360−
361− onStatusChanged: {
362− if (status === DirectionalDragArea.Recognized) {
363− menuContent.activateContent();
364− }
365− }
366− }
367− DragHandle {
368− id: hideDragHandle
369− anchors.fill: handle
370− direction: Direction.Upwards
371− enabled: indicators.shown && indicators.available
372− hintDisplacement: indicators.hintValue
373− autoCompleteDragThreshold: maxTotalDragDistance / 6
374− stretch: true
375− maxTotalDragDistance: openedHeight - panelHeight
376− distanceThreshold: 0
377− }
378−
379− AxisVelocityCalculator {
380− id: yVelocityCalculator
381− }
382−
383− states: [
384− State {
385− name: "initial"
386− },
387− State {
388− name: "hint"
389− PropertyChanges {
390− target: indicatorRow;
391− y: pinnedMode ? 0 : panelHeight
392− }
393− StateChangeScript {
394− script: {
395− if (activeDragHandle) {
396− calculateCurrentItem(activeDragHandle.touchX, false);
397− }
398− }
399− }
400− },
401− State {
402− name: "reveal"
403− extend: "hint"
404− },
405− State {
406− name: "locked"
407− extend: "hint"
408− },
409− State {
410− name: "commit"
411− extend: "hint"
412− }
413− ]
414− state: "initial"
415−
416− transitions: [
417− Transition {
418− NumberAnimation {targets: [indicatorRow, menuContent]; property: "y"; duration: 300; easing.type: Easing.OutCubic}
419− }
420− ]
421−}
Panel/Indicators/DefaultIndicatorWidget.qmldeleted−125
@@ -1,125 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− *
16− * Authors:
17− * Nick Dedekind <nick.dedekind@canonical.com>
18− */
19−
20−import QtQuick 2.0
21−import Ubuntu.Components 0.1
22−import Unity.Indicators 0.1 as Indicators
23−
24−Indicators.IndicatorWidget {
25− id: indicatorWidget
26−
27− width: itemRow.width
28−
29− property alias leftLabel: itemLeftLabel.text
30− property alias rightLabel: itemRightLabel.text
31− property var icons: undefined
32−
33− Row {
34− id: itemRow
35− width: childrenRect.width
36− objectName: "itemRow"
37− anchors {
38− top: parent.top
39− bottom: parent.bottom
40− horizontalCenter: parent.horizontalCenter
41− }
42−
43− Label {
44− id: itemLeftLabel
45− width: guRoundUp(implicitWidth)
46− objectName: "leftLabel"
47− color: Theme.palette.selected.backgroundText
48− opacity: 0.8
49− font.family: "Ubuntu"
50− fontSize: "medium"
51− anchors.verticalCenter: parent.verticalCenter
52− visible: text != ""
53− }
54−
55− Row {
56− width: childrenRect.width
57− anchors {
58− top: parent.top
59− bottom: parent.bottom
60− }
61−
62− Repeater {
63− model: indicatorWidget.icons
64−
65− Item {
66− width: guRoundUp(itemImage.width)
67− height: indicatorWidget.iconSize
68−
69− Image {
70− id: itemImage
71− objectName: "itemImage"
72− visible: source != ""
73− source: modelData
74− height: parent.height
75− anchors.horizontalCenter: parent.horizontalCenter
76− fillMode: Image.PreserveAspectFit
77−
78− sourceSize {
79− width: indicatorWidget.iconSize
80− height: indicatorWidget.iconSize
81− }
82− }
83− }
84− }
85− }
86−
87− Label {
88− id: itemRightLabel
89− width: guRoundUp(implicitWidth)
90− objectName: "rightLabel"
91− color: Theme.palette.selected.backgroundText
92− opacity: 0.8
93− font.family: "Ubuntu"
94− fontSize: "medium"
95− anchors.verticalCenter: parent.verticalCenter
96− visible: text != ""
97− }
98− }
99−
100− // TODO: Use toolkit function https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1242575
101− function guRoundUp(width) {
102− if (width == 0) {
103− return 0;
104− }
105− var gu1 = units.gu(1.0);
106− var mod = (width % gu1);
107−
108− return mod == 0 ? width : width + (gu1 - mod);
109− }
110−
111− onRootActionStateChanged: {
112− if (rootActionState == undefined) {
113− leftLabel = "";
114− rightLabel = "";
115− icons = undefined;
116− enabled = false;
117− return;
118− }
119−
120− leftLabel = rootActionState.leftLabel ? rootActionState.leftLabel : "";
121− rightLabel = rootActionState.rightLabel ? rootActionState.rightLabel : "";
122− icons = rootActionState.icons;
123− enabled = rootActionState.visible;
124− }
125−}
Panel/Indicators/client/IndicatorsPage.qmldeleted−91
@@ -1,91 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− *
16− * Authors:
17− * Renato Araujo Oliveira Filho <renato@canonical.com>
18− * Nick Dedekind <nick.dedekind@canonical.com>
19− */
20−
21−import QtQuick 2.0
22−import Ubuntu.Components 0.1
23−import Ubuntu.Components.ListItems 0.1 as ListItem
24−
25−Page {
26− id: page
27−
28− title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title : ""
29− property variant indicatorProperties
30− property string pageSource : pageLoader.source
31−
32− anchors.fill: parent
33−
34− ListItem.Standard {
35− id: visualCheckItem
36− text: "Enable Visual Representation"
37− control: Switch {
38− id: visualCheck
39− checked: true
40− }
41− }
42−
43− Loader {
44− id: pageLoader
45− objectName: "pageLoader"
46− clip:true
47−
48− Rectangle {
49− anchors.fill: pageLoader
50− color: "#221e1c" // FIXME not in palette yet
51− }
52−
53− anchors {
54− top: visualCheckItem.bottom
55− left: parent.left
56− right: parent.right
57− bottom: buttons.top
58− topMargin: units.gu(2)
59− bottomMargin: units.gu(2)
60− }
61− source : visualCheck.checked ? page.pageSource : "IndicatorsTree.qml"
62−
63− onLoaded: {
64− for(var pName in indicatorProperties) {
65− if (item.hasOwnProperty(pName)) {
66− item[pName] = indicatorProperties[pName];
67− }
68− }
69− item.start();
70− }
71− }
72−
73− Item {
74− id: buttons
75− anchors {
76− left: parent.left
77− right: parent.right
78− bottom: parent.bottom
79− margins: units.gu(1)
80− }
81− height: childrenRect.height
82−
83− Button {
84− anchors {
85− left: parent.left
86− }
87− text: "Back"
88− onClicked: page.pageStack.reset()
89− }
90− }
91−}
Panel/Indicators/client/IndicatorsTree.qmldeleted−65
@@ -1,65 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− *
16− * Authors:
17− * Nick Dedekind <nick.dededkind@canonical.com>
18− */
19−
20−import QtQuick 2.0
21−import Ubuntu.Components 0.1
22−import Unity.Indicators 0.1 as Indicators
23−import QMenuModel 0.1
24−import Ubuntu.Components.ListItems 0.1 as ListItem
25−
26−Page {
27− id: page
28− anchors.fill: parent
29−
30− property string busName: unityModel.busName
31− property string actionsObjectPath
32− property string menuObjectPath
33−
34− property string deviceMenuObjectPath: menuObjectPath
35−
36− function start() {
37− }
38−
39− UnityMenuModel {
40− id: unityModel
41− busName: page.busName
42− actions: { "indicator": page.actionsObjectPath }
43− menuObjectPath: page.deviceMenuObjectPath
44− }
45−
46− Indicators.RootActionState {
47− menu: unityModel
48− }
49−
50− Indicators.ModelPrinter {
51− id: printer
52− model: unityModel
53− }
54−
55− Flickable {
56− anchors.fill: parent
57− contentHeight: all_data.height
58− clip:true
59− Text {
60− id: all_data
61− color: "white"
62− text: printer.text
63− }
64− }
65−}
Panel/MenuContent.qmldeleted−168
@@ -1,168 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import Unity.Indicators 0.1 as Indicators
20−import Utils 0.1
21−import "../Components"
22−
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
26−MainView {
27− id: content
28−
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
36−
37− width: units.gu(40)
38− height: units.gu(42)
39−
40− function setCurrentMenuIndex(index) {
41− var filteredIndex = filteredIndicators.mapFromSource(index)
42−
43− if (tabs.selectedTabIndex !== filteredIndex) {
44− if (tabs.selectedTabIndex == -1) {
45− tabs.tabBar.animate = false;
46− }
47− tabs.selectedTabIndex = filteredIndex;
48− tabs.tabBar.animate = true;
49− }
50− }
51−
52− function activateContent() {
53− contentReleaseTimer.stop();
54− __contentActive = true;
55− }
56−
57− function releaseContent() {
58− if (__contentActive) {
59− contentReleaseTimer.restart();
60− }
61− }
62−
63− onActiveHeaderChanged: {
64− tabs.tabBar.selectionMode = activeHeader;
65− tabs.tabBar.alwaysSelectionMode = activeHeader;
66− }
67−
68− SortFilterProxyModel {
69− id: filteredIndicators
70− model: visibleIndicatorsModel
71− dynamicSortFilter: true
72−
73− filterRole: Indicators.IndicatorsModelRole.IsVisible
74− filterRegExp: RegExp("^true$")
75− }
76−
77− Indicators.VisibleIndicatorsModel {
78− id: visibleIndicatorsModel
79− model: indicatorsModel
80− }
81−
82− Tabs {
83− id: tabs
84− objectName: "tabs"
85− anchors.fill: parent
86− selectedTabIndex: -1
87−
88− Repeater {
89− id: repeater
90− model: filteredIndicators
91− objectName: "tabsRepeater"
92−
93− // FIXME: This is needed because tabs dont handle repeaters well.
94− // Due to the child ordering happening after child insertion.
95− // QTBUG-32438
96− onItemAdded: {
97− parent.childrenChanged();
98− }
99−
100− Tab {
101− id: tab
102− objectName: model.identifier
103−
104− page: Page {
105− Loader {
106− id: loader
107− clip: true
108− anchors.fill: parent
109− source: pageSource
110− asynchronous: true
111−
112− readonly property bool indexActive: index >= 0 && index < menuActivator.count && menuActivator.content[index].active
113− readonly property bool contentActive: content.__contentActive && indexActive
114−
115− onContentActiveChanged: {
116− if (contentActive && item) {
117− item.start()
118− } else if (!contentActive && item) {
119− item.stop()
120− }
121− }
122−
123− onVisibleChanged: {
124− // Reset the indicator states
125− if (!visible && item && item["reset"]) {
126− item.reset()
127− }
128− }
129−
130− onLoaded: {
131− for(var pName in indicatorProperties) {
132− if (item.hasOwnProperty(pName)) {
133− item[pName] = indicatorProperties[pName]
134− }
135− }
136− if (contentActive && tabs.visible) {
137− item.start()
138− }
139− }
140−
141− Binding {
142− target: tab
143− property: "title"
144− value: loader.item && loader.item.hasOwnProperty("title") && loader.item.title !== "" ? loader.item.title : model.identifier
145− }
146− }
147− }
148− }
149− }
150− }
151−
152− Timer {
153− id: contentReleaseTimer
154−
155− interval: contentReleaseInterval
156− onTriggered: {
157− content.__contentActive = false;
158− menuActivator.clear();
159− }
160− }
161−
162− Indicators.MenuContentActivator {
163− id: menuActivator
164− running: content.__contentActive
165− baseIndex: content.currentMenuIndex
166− count: indicatorsModel.count
167− }
168−}
Panel/Panel.qmldeleted−175
@@ -1,175 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−Item {
22− id: root
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
28−
29− readonly property real separatorLineHeight: leftSeparatorLine.height
30− readonly property real __panelMinusSeparatorLineHeight: panelHeight - separatorLineHeight
31−
32− signal searchClicked
33−
34− function hideIndicatorMenu(delay) {
35− if (delay !== undefined) {
36− hideTimer.interval = delay;
37− hideTimer.start();
38− } else {
39− indicatorsMenu.hide();
40− }
41− }
42−
43− Timer {
44− id: hideTimer
45− running: false
46− onTriggered: {
47− indicatorsMenu.hide();
48− }
49− }
50−
51− Connections {
52− target: indicatorsMenu
53− onShown: hideTimer.stop()
54− }
55−
56− PanelBackground {
57− id: panelBackground
58− anchors {
59− left: parent.left
60− right: parent.right
61− }
62− height: __panelMinusSeparatorLineHeight
63− y: 0
64−
65− Behavior on y { StandardAnimation {} }
66− }
67−
68− PanelSeparatorLine {
69− id: leftSeparatorLine
70− anchors {
71− top: panelBackground.bottom
72− left: parent.left
73− right: indicatorsMenu.left
74− }
75− saturation: 1 - indicatorsMenu.unitProgress
76− }
77−
78− Rectangle {
79− id: darkenedArea
80− property real darkenedOpacity: 0.6
81− anchors {
82− left: parent.left
83− right: parent.right
84− top: panelBackground.bottom
85− bottom: parent.bottom
86− }
87− color: "black"
88− opacity: indicatorsMenu.unitProgress * darkenedOpacity
89− MouseArea {
90− anchors.fill: parent
91− enabled: indicatorsMenu.shown
92− onClicked: if (indicatorsMenu.fullyOpened) indicatorsMenu.hide();
93− }
94− }
95−
96− Indicators {
97− id: indicatorsMenu
98− objectName: "indicators"
99−
100− anchors.right: parent.right
101− y: panelBackground.y
102− width: root.indicatorsMenuWidth
103− shown: false
104− hintValue: __panelMinusSeparatorLineHeight * 3
105− panelHeight: __panelMinusSeparatorLineHeight
106− openedHeight: parent.height + (pinnedMode ? 0 : root.panelHeight)
107− pinnedMode: !fullscreenMode
108− overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width
109−
110− property real unitProgress: (height - panelHeight) / (openedHeight - panelHeight)
111− }
112−
113− PanelSeparatorLine {
114− id: indicatorsSeparatorLine
115− visible: true
116− anchors {
117− left: indicatorsMenu.left
118− right: indicatorsMenu.right
119− }
120− y: indicatorsMenu.visualBottom
121− }
122−
123− BorderImage {
124− id: dropShadow
125− anchors {
126− top: indicators.top
127− bottom: indicatorsSeparatorLine.bottom
128− left: indicators.left
129− right: indicators.right
130− margins: -units.gu(1)
131− }
132− visible: indicatorsMenu.height > indicatorsMenu.panelHeight
133− source: "graphics/rectangular_dropshadow.sci"
134− }
135−
136− SearchIndicator {
137− id: search
138− objectName: "search"
139− enabled: root.searchVisible
140−
141− state: {
142− if (parent.width < indicatorsMenu.width + width) {
143− if (indicatorsMenu.state != "initial") {
144− return "hidden";
145− }
146− }
147− if (root.searchVisible && !indicatorsMenu.showAll) {
148− return "visible";
149− }
150−
151− return "hidden";
152− }
153−
154− height: __panelMinusSeparatorLineHeight
155− anchors {
156− top: panelBackground.top
157− left: panelBackground.left
158− }
159−
160− onClicked: root.searchClicked()
161− }
162−
163− states: [
164− State {
165− name: "in" //fully opaque and visible at top edge of screen
166− when: !fullscreenMode
167− PropertyChanges { target: panelBackground; y: 0 }
168− },
169− State {
170− name: "out" //pushed off screen
171− when: fullscreenMode
172− PropertyChanges { target: panelBackground; y: -panelHeight }
173− }
174− ]
175−}
Panel/SearchIndicator.qmldeleted−82
@@ -1,82 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../Components"
20−
21−Item {
22− id: search
23−
24− width: container.width + units.gu(2)
25− height: units.gu(3)
26−
27− property string headerText: i18n.tr("Search")
28−
29− signal clicked
30−
31− // eater
32− MouseArea {
33− anchors.fill: parent
34− onClicked: search.clicked()
35− }
36−
37− Row {
38− id: container
39− objectName: "container"
40−
41− height: parent.height
42− width: childrenRect.width
43− anchors {
44− left: parent.left
45− leftMargin: units.gu(1)
46− }
47− spacing: units.gu(1)
48−
49− Behavior on opacity { StandardAnimation { duration: 300 } }
50−
51− Image {
52− id: icon
53− source: "graphics/search.png"
54− anchors.verticalCenter: parent.verticalCenter
55− }
56−
57− Label {
58− text: search.headerText
59− color: Qt.rgba(0.8, 0.8, 0.8, 1.0)
60− fontSize: "small"
61− font.capitalization: Font.AllUppercase
62− anchors.verticalCenter: parent.verticalCenter
63− }
64− }
65−
66− states: [
67− State {
68− name: "visible"
69− PropertyChanges {
70− target: container
71− opacity: 1
72− }
73− },
74− State {
75− name: "hidden"
76− PropertyChanges {
77− target: container
78− opacity: 0
79− }
80− }
81− ]
82−}
Panel/graphics/Battery@18.pngdeleted
Binary file not shown.
Panel/graphics/Bluetooth@18.pngdeleted
Binary file not shown.
Panel/graphics/Clock@18.pngdeleted
Binary file not shown.
Panel/graphics/Location@18.pngdeleted
Binary file not shown.
Panel/graphics/Messages@18.pngdeleted
Binary file not shown.
Panel/graphics/Network@18.pngdeleted
Binary file not shown.
Panel/graphics/Sound@18.pngdeleted
Binary file not shown.
Panel/graphics/Sync@18.pngdeleted
Binary file not shown.
Panel/graphics/System@18.pngdeleted
Binary file not shown.
Panel/graphics/Time@18.pngdeleted
Binary file not shown.
Panel/graphics/VerticalDivider@18.pngdeleted
Binary file not shown.
Panel/graphics/handle@12.pngdeleted
Binary file not shown.
Panel/graphics/handle@12.scideleted−5
@@ -1,5 +0,0 @@
1−border.left: 0
2−border.top: 1
3−border.bottom: 0
4−border.right: 0
5−source: handle@12.png
Panel/graphics/rectangular_dropshadow@30.pngdeleted
Binary file not shown.
Panel/graphics/search@12.pngdeleted
Binary file not shown.
Panel/graphics/time_and_date@18.pngdeleted
Binary file not shown.
README.mdnew file+31
@@ -0,0 +1,31 @@
1+# Lomiri
2+
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.
4+
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
6+
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`.
8+
9+## Where to report issues
10+
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.
12+
13+## Developing Lomiri on Ubuntu Touch
14+
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
16+
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.
18+
19+Before you start, [install Clickable](https://clickable-ut.dev/en/latest/install.html).
20+
21+Now, clone this repository to your computer: `git clone https://github.com/ubports/unity8.git`
22+
23+Move into this directory: `cd unity8`
24+
25+Now you can use the full suite of tools provided by this repository's [clickable.yaml](clickable.yaml). For example:
26+
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.
Shell.qmldeleted−809
@@ -1,809 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import AccountsService 0.1
19−import GSettings 1.0
20−import Unity.Application 0.1
21−import Ubuntu.Components 0.1
22−import Ubuntu.Gestures 0.1
23−import Unity.Launcher 0.1
24−import LightDM 0.1 as LightDM
25−import Powerd 0.1
26−import SessionBroadcast 0.1
27−import "Dash"
28−import "Greeter"
29−import "Launcher"
30−import "Panel"
31−import "Hud"
32−import "Components"
33−import "Bottombar"
34−import "SideStage"
35−import "Notifications"
36−import Unity.Notifications 1.0 as NotificationBackend
37−
38−FocusScope {
39− id: shell
40−
41− // this is only here to select the width / height of the window if not running fullscreen
42− property bool tablet: false
43− width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
44− height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
45−
46− property real edgeSize: units.gu(2)
47− property url defaultBackground: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
48− property url background
49− readonly property real panelHeight: panel.panelHeight
50−
51− property bool dashShown: dash.shown
52− property bool stageScreenshotsReady: {
53− if (sideStage.shown) {
54− if (mainStage.applications.count > 0) {
55− return mainStage.usingScreenshots && sideStage.usingScreenshots;
56− } else {
57− return sideStage.usingScreenshots;
58− }
59− } else {
60− return mainStage.usingScreenshots;
61− }
62− }
63−
64− property var applicationManager: ApplicationManagerWrapper {}
65−
66− Binding {
67− target: LauncherModel
68− property: "applicationManager"
69− value: ApplicationManager
70− }
71−
72− Component.onCompleted: {
73− Theme.name = "Ubuntu.Components.Themes.SuruGradient"
74−
75− applicationManager.sideStageEnabled = Qt.binding(function() { return sideStage.enabled })
76−
77− // FIXME: if application focused before shell starts, shell draws on top of it only.
78− // We should detect already running applications on shell start and bring them to the front.
79− applicationManager.unfocusCurrentApplication();
80− }
81−
82− readonly property bool applicationFocused: !!applicationManager.mainStageFocusedApplication
83− || !!applicationManager.sideStageFocusedApplication
84− // Used for autopilot testing.
85− readonly property string currentFocusedAppId: ApplicationManager.focusedApplicationId
86−
87− readonly property bool fullscreenMode: {
88− if (greeter.shown || lockscreen.shown) {
89− return false;
90− } else if (mainStage.usingScreenshots) { // Window Manager animating so want to re-evaluate fullscreen mode
91− return mainStage.switchingFromFullscreenToFullscreen;
92− } else if (applicationManager.mainStageFocusedApplication) {
93− return applicationManager.mainStageFocusedApplication.fullscreen;
94− } else {
95− return false;
96− }
97− }
98−
99− function activateApplication(appId, 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(appId);
104−
105− var application;
106− application = applicationManager.activateApplication(appId, argument);
107− if (application == null) {
108− return;
109− }
110− if (application.stage == ApplicationInfo.MainStage || !sideStage.enabled) {
111− mainStage.activateApplication(appId, addDelay);
112− } else {
113− sideStage.activateApplication(appId, addDelay);
114− }
115− stages.show();
116− }
117− }
118−
119− GSettings {
120− id: backgroundSettings
121− schema.id: "org.gnome.desktop.background"
122− }
123− property url gSettingsPicture: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground
124− onGSettingsPictureChanged: {
125− shell.background = gSettingsPicture
126− }
127−
128− // This is a dummy image that is needed to determine if the picture url
129− // in backgroundSettings points to a valid picture file.
130− // We can't do this with the real background image because setting a
131− // new source in onStatusChanged triggers a binding loop detection
132− // inside Image, which causes it not to render even though a valid source
133− // would be set. We don't mind about this image staying black and just
134− // use it for verification to populate the source for the real
135− // background image.
136− Image {
137− source: shell.background
138− height: 0
139− width: 0
140− sourceSize.height: 0
141− sourceSize.width: 0
142− onStatusChanged: {
143− if (status == Image.Error && source != shell.defaultBackground) {
144− shell.background = defaultBackground
145− }
146− }
147− }
148−
149− VolumeControl {
150− id: volumeControl
151− }
152−
153− Keys.onVolumeUpPressed: volumeControl.volumeUp()
154− Keys.onVolumeDownPressed: volumeControl.volumeDown()
155−
156− Item {
157− id: underlay
158− objectName: "underlay"
159− anchors.fill: parent
160−
161− // Whether the underlay is fully covered by opaque UI elements.
162− property bool fullyCovered: panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth
163−
164− readonly property bool applicationRunning: ((mainStage.applications && mainStage.applications.count > 0)
165− || (sideStage.applications && sideStage.applications.count > 0))
166−
167− // Whether the user should see the topmost application surface (if there's one at all).
168− readonly property bool applicationSurfaceShouldBeSeen: applicationRunning && !stages.fullyHidden
169− && !mainStage.usingScreenshots // but want sideStage animating over app surface
170−
171−
172−
173− // NB! Application surfaces are stacked behing the shell one. So they can only be seen by the user
174− // through the translucent parts of the shell surface.
175− visible: !fullyCovered && !applicationSurfaceShouldBeSeen
176−
177− CrossFadeImage {
178− id: backgroundImage
179− objectName: "backgroundImage"
180−
181− anchors.fill: parent
182− source: shell.background
183− fillMode: Image.PreserveAspectCrop
184− }
185−
186− Rectangle {
187− anchors.fill: parent
188− color: "black"
189− opacity: dash.disappearingAnimationProgress
190− }
191−
192− Dash {
193− id: dash
194− objectName: "dash"
195−
196− available: !greeter.shown && !lockscreen.shown
197− hides: [stages, launcher, panel.indicators]
198− shown: disappearingAnimationProgress !== 1.0
199− enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
200− // FIXME: unfocus all applications when going back to the dash
201− onEnabledChanged: {
202− if (enabled) {
203− shell.applicationManager.unfocusCurrentApplication()
204− }
205− }
206−
207− anchors {
208− fill: parent
209− topMargin: panel.panelHeight
210− }
211−
212− contentScale: 1.0 - 0.2 * disappearingAnimationProgress
213− opacity: 1.0 - disappearingAnimationProgress
214− property real disappearingAnimationProgress: {
215− if (greeter.shown) {
216− return greeter.showProgress;
217− } else {
218− return stagesOuterContainer.showProgress;
219− }
220− }
221−
222− // FIXME: only necessary because stagesOuterContainer.showProgress and
223− // greeterRevealer.animatedProgress are not animated
224− Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
225− }
226− }
227−
228− Item {
229− id: stagesOuterContainer
230−
231− width: parent.width
232− height: parent.height
233− x: launcher.progress
234− Behavior on x {SmoothedAnimation{velocity: 600}}
235−
236− property real showProgress:
237− MathUtils.clamp(1 - (x + stages.x) / shell.width, 0, 1)
238−
239− Showable {
240− id: stages
241− objectName: "stages"
242−
243− x: width
244−
245− property bool fullyShown: shown && x == 0 && parent.x == 0
246− property bool fullyHidden: !shown && x == width
247− available: !greeter.shown
248− hides: [panel.indicators]
249− shown: false
250− opacity: 1.0
251− showAnimation: StandardAnimation { property: "x"; duration: 350; to: 0; easing.type: Easing.OutCubic }
252− hideAnimation: StandardAnimation { property: "x"; duration: 350; to: width; easing.type: Easing.OutCubic }
253−
254− width: parent.width
255− height: parent.height
256−
257− // close the stages when no focused application remains
258− Connections {
259− target: shell.applicationManager
260− onMainStageFocusedApplicationChanged: stages.closeIfNoApplications()
261− onSideStageFocusedApplicationChanged: stages.closeIfNoApplications()
262− ignoreUnknownSignals: true
263− }
264−
265− function closeIfNoApplications() {
266− if (!shell.applicationManager.mainStageFocusedApplication
267− && !shell.applicationManager.sideStageFocusedApplication
268− && shell.applicationManager.mainStageApplications.count == 0
269− && shell.applicationManager.sideStageApplications.count == 0) {
270− stages.hide();
271− }
272− }
273−
274− // show the stages when an application gets the focus
275− Connections {
276− target: shell.applicationManager
277− onMainStageFocusedApplicationChanged: {
278− if (shell.applicationManager.mainStageFocusedApplication) {
279− mainStage.show();
280− stages.show();
281− }
282− }
283− onSideStageFocusedApplicationChanged: {
284− if (shell.applicationManager.sideStageFocusedApplication) {
285− sideStage.show();
286− stages.show();
287− }
288− }
289− ignoreUnknownSignals: true
290− }
291−
292− Stage {
293− id: mainStage
294−
295− anchors.fill: parent
296− fullyShown: stages.fullyShown
297− fullyHidden: stages.fullyHidden
298− shouldUseScreenshots: !fullyShown
299− rightEdgeEnabled: !sideStage.enabled
300−
301− applicationManager: shell.applicationManager
302− rightEdgeDraggingAreaWidth: shell.edgeSize
303− normalApplicationY: shell.panelHeight
304−
305− shown: true
306− function show() {
307− stages.show();
308− }
309− function hide() {
310− }
311−
312− // FIXME: workaround the fact that focusing a main stage application
313− // raises its surface on top of all other surfaces including the ones
314− // that belong to side stage applications.
315− onFocusedApplicationChanged: {
316− if (focusedApplication && sideStage.focusedApplication && sideStage.fullyShown) {
317− shell.applicationManager.focusApplication(sideStage.focusedApplication);
318− }
319− }
320− }
321−
322− SideStage {
323− id: sideStage
324−
325− applicationManager: shell.applicationManager
326− rightEdgeDraggingAreaWidth: shell.edgeSize
327− normalApplicationY: shell.panelHeight
328−
329− onShownChanged: {
330− if (!shown && mainStage.applications.count == 0) {
331− stages.hide();
332− }
333− }
334− // FIXME: when hiding the side stage, refocus the main stage
335− // application so that it goes in front of the side stage
336− // application and hides it
337− onFullyShownChanged: {
338− if (!fullyShown && stages.fullyShown && sideStage.focusedApplication != null) {
339− shell.applicationManager.focusApplication(mainStage.focusedApplication);
340− }
341− }
342−
343− enabled: shell.width >= units.gu(60)
344− visible: enabled
345− fullyShown: stages.fullyShown && shown
346− && sideStage[sideStageRevealer.boundProperty] == sideStageRevealer.openedValue
347− shouldUseScreenshots: !fullyShown || mainStage.usingScreenshots || sideStageRevealer.pressed
348−
349− available: !greeter.shown && !lockscreen.shown && enabled
350− hides: [launcher, panel.indicators]
351− shown: false
352− showAnimation: StandardAnimation { property: "x"; duration: 350; to: sideStageRevealer.openedValue; easing.type: Easing.OutQuint }
353− hideAnimation: StandardAnimation { property: "x"; duration: 350; to: sideStageRevealer.closedValue; easing.type: Easing.OutQuint }
354−
355− width: units.gu(40)
356− height: stages.height
357− handleExpanded: sideStageRevealer.pressed
358− }
359−
360− Revealer {
361− id: sideStageRevealer
362−
363− enabled: mainStage.applications.count > 0 && sideStage.applications.count > 0
364− && sideStage.available
365− direction: Qt.RightToLeft
366− openedValue: parent.width - sideStage.width
367− hintDisplacement: units.gu(3)
368− /* The size of the sidestage handle needs to be bigger than the
369− typical size used for edge detection otherwise it is really
370− hard to grab.
371− */
372− handleSize: sideStage.shown ? units.gu(4) : shell.edgeSize
373− closedValue: parent.width + sideStage.handleSizeCollapsed
374− target: sideStage
375− x: parent.width - width
376− width: sideStage.width + handleSize * 0.7
377− height: sideStage.height
378− orientation: Qt.Horizontal
379− }
380−
381− DragHandle {
382− id: stagesDragHandle
383−
384− anchors.top: parent.top
385− anchors.bottom: parent.bottom
386− anchors.right: parent.left
387−
388− width: shell.edgeSize
389− direction: Direction.Leftwards
390− enabled: greeter.showProgress == 0 && edgeDemo.dashEnabled
391− property bool haveApps: mainStage.applications.count > 0 || sideStage.applications.count > 0
392−
393− maxTotalDragDistance: haveApps ? parent.width : parent.width * 0.7
394− // Make autocompletion impossible when !haveApps
395− edgeDragEvaluator.minDragDistance: haveApps ? maxTotalDragDistance * 0.1 : Number.MAX_VALUE
396− }
397− }
398− }
399−
400− Lockscreen {
401− id: lockscreen
402− objectName: "lockscreen"
403−
404− readonly property int backgroundTopMargin: -panel.panelHeight
405−
406− hides: [launcher, panel.indicators, hud]
407− shown: false
408− enabled: true
409− showAnimation: StandardAnimation { property: "opacity"; to: 1 }
410− hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
411− y: panel.panelHeight
412− x: required ? 0 : - width
413− width: parent.width
414− height: parent.height - panel.panelHeight
415− background: shell.background
416−
417− onEntered: LightDM.Greeter.respond(passphrase);
418− onCancel: greeter.show()
419−
420− Component.onCompleted: {
421− if (LightDM.Users.count == 1) {
422− LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
423− greeter.selected(0)
424− }
425− }
426− }
427−
428− Connections {
429− target: LightDM.Greeter
430−
431− onShowPrompt: {
432− if (LightDM.Users.count == 1) {
433− // TODO: There's no better way for now to determine if its a PIN or a passphrase.
434− if (text == "PIN") {
435− lockscreen.alphaNumeric = false
436− } else {
437− lockscreen.alphaNumeric = true
438− }
439− lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
440− lockscreen.show();
441− }
442− }
443−
444− onAuthenticationComplete: {
445− if (LightDM.Greeter.promptless) {
446− return;
447− }
448− if (LightDM.Greeter.authenticated) {
449− lockscreen.hide();
450− } else {
451− lockscreen.clear(true);
452− }
453− }
454− }
455−
456− Greeter {
457− id: greeter
458− objectName: "greeter"
459−
460− available: true
461− hides: [launcher, panel.indicators, hud]
462− shown: true
463−
464− defaultBackground: shell.background
465−
466− y: panel.panelHeight
467− width: parent.width
468− height: parent.height - panel.panelHeight
469−
470− dragHandleWidth: shell.edgeSize
471−
472− property var previousMainApp: null
473− property var previousSideApp: null
474−
475− function removeApplicationFocus() {
476− greeter.previousMainApp = applicationManager.mainStageFocusedApplication;
477− greeter.previousSideApp = applicationManager.sideStageFocusedApplication;
478− applicationManager.unfocusCurrentApplication();
479− }
480−
481− function restoreApplicationFocus() {
482− if (greeter.previousMainApp) {
483− applicationManager.focusApplication(greeter.previousMainApp);
484− greeter.previousMainApp = null;
485− }
486− if (greeter.previousSideApp) {
487− applicationManager.focusApplication(greeter.previousSideApp);
488− greeter.previousSideApp = null;
489− }
490− }
491−
492− onShownChanged: {
493− if (shown) {
494− lockscreen.reset();
495− // If there is only one user, we start authenticating with that one here.
496− // If there are more users, the Greeter will handle that
497− if (LightDM.Users.count == 1) {
498− LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
499− greeter.selected(0);
500− }
501− greeter.forceActiveFocus();
502− removeApplicationFocus();
503− } else {
504− restoreApplicationFocus();
505− }
506− }
507−
508− onUnlocked: greeter.hide()
509− onSelected: {
510− // Update launcher items for new user
511− var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
512− AccountsService.user = user;
513− LauncherModel.setUser(user);
514− }
515−
516− onLeftTeaserPressedChanged: {
517− if (leftTeaserPressed) {
518− launcher.tease();
519− }
520− }
521−
522− Connections {
523− target: applicationManager
524− ignoreUnknownSignals: true
525− // If any app is focused when greeter is open, it's due to a user action
526− // like a snap decision (say, an incoming call).
527− // TODO: these should be protected to only unlock for certain applications / certain usecases
528− // potentially only in connection with a notification.
529− onMainStageFocusedApplicationChanged: {
530− if (greeter.shown && applicationManager.mainStageFocusedApplication) {
531− greeter.previousMainApp = null // make way for new focused app
532− greeter.previousSideApp = null
533− greeter.hide()
534− }
535− }
536− onSideStageFocusedApplicationChanged: {
537− if (greeter.shown && applicationManager.sideStageFocusedApplication) {
538− greeter.previousMainApp = null // make way for new focused app
539− greeter.previousSideApp = null
540− greeter.hide()
541− }
542− }
543− }
544− }
545−
546− InputFilterArea {
547− anchors.fill: parent
548− blockInput: !applicationFocused || greeter.shown || lockscreen.shown || launcher.shown
549− || panel.indicators.shown || hud.shown
550− }
551−
552− Connections {
553− id: powerConnection
554− target: Powerd
555−
556− onDisplayPowerStateChange: {
557− // We ignore any display-off signals when the proximity sensor
558− // is active. This usually indicates something like a phone call.
559− if (status == Powerd.Off && (flags & Powerd.UseProximity) == 0) {
560− greeter.showNow();
561− }
562−
563− // No reason to chew demo CPU when user isn't watching
564− if (status == Powerd.Off) {
565− edgeDemo.paused = true;
566− } else if (status == Powerd.On) {
567− edgeDemo.paused = false;
568− }
569− }
570− }
571−
572− function showHome() {
573− var animate = !greeter.shown && !stages.shown
574− greeter.hide()
575− dash.setCurrentScope("home.scope", animate, false)
576− stages.hide()
577− }
578−
579− function hideIndicatorMenu(delay) {
580− panel.hideIndicatorMenu(delay);
581− }
582−
583− Item {
584− id: overlay
585−
586− anchors.fill: parent
587−
588− Panel {
589− id: panel
590− anchors.fill: parent //because this draws indicator menus
591− indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
592− indicators {
593− hides: [launcher]
594− available: edgeDemo.panelEnabled
595− contentEnabled: edgeDemo.panelContentEnabled
596− }
597− fullscreenMode: shell.fullscreenMode
598− searchVisible: !greeter.shown && !lockscreen.shown && dash.shown
599−
600− InputFilterArea {
601− anchors {
602− top: parent.top
603− left: parent.left
604− right: parent.right
605− }
606− height: (panel.fullscreenMode) ? shell.edgeSize : panel.panelHeight
607− blockInput: true
608− }
609− }
610−
611− Hud {
612− id: hud
613−
614− width: parent.width > units.gu(60) ? units.gu(40) : parent.width
615− height: parent.height
616−
617− available: !greeter.shown && !panel.indicators.shown && !lockscreen.shown && edgeDemo.dashEnabled
618− shown: false
619− showAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: 0; easing.type: Easing.Linear }
620− hideAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: hudRevealer.closedValue; easing.type: Easing.Linear }
621−
622− Connections {
623− target: shell.applicationManager
624− onMainStageFocusedApplicationChanged: hud.hide()
625− onSideStageFocusedApplicationChanged: hud.hide()
626− }
627− }
628−
629− Revealer {
630− id: hudRevealer
631−
632− enabled: hud.shown
633− width: hud.width
634− anchors.left: hud.left
635− height: parent.height
636− target: hud.revealerTarget
637− closedValue: height
638− openedValue: 0
639− direction: Qt.RightToLeft
640− orientation: Qt.Vertical
641− handleSize: hud.handleHeight
642− onCloseClicked: target.hide()
643− }
644−
645− Bottombar {
646− id: bottombar
647− theHud: hud
648− anchors.fill: parent
649− enabled: hud.available
650− applicationIsOnForeground: applicationFocused
651− }
652−
653− InputFilterArea {
654− blockInput: launcher.shown
655− anchors {
656− top: parent.top
657− bottom: parent.bottom
658− left: parent.left
659− }
660− width: launcher.width
661− }
662−
663− Launcher {
664− id: launcher
665−
666− readonly property bool dashSwipe: progress > 0
667−
668− anchors.top: parent.top
669− anchors.bottom: parent.bottom
670− width: parent.width
671− dragAreaWidth: shell.edgeSize
672− available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
673−
674− onShowDashHome: {
675− if (edgeDemo.running)
676− return;
677−
678− showHome()
679− }
680− onDash: {
681− if (stages.shown) {
682− stages.hide();
683− launcher.hide();
684− }
685− }
686− onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("applications.scope", false, true)
687− onLauncherApplicationSelected:{
688− if (edgeDemo.running)
689− return;
690−
691− greeter.hide()
692− shell.activateApplication(appId)
693− }
694− onShownChanged: {
695− if (shown) {
696− panel.indicators.hide()
697− hud.hide()
698− bottombar.hide()
699− }
700− }
701− }
702−
703− Notifications {
704− id: notifications
705−
706− model: NotificationBackend.Model
707− margin: units.gu(1)
708− fullHeight: parent.height - panel.panelHeight
709−
710− anchors {
711− top: parent.top
712− right: parent.right
713− bottom: parent.bottom
714− topMargin: panel.panelHeight
715− }
716− states: [
717− State {
718− name: "narrow"
719− when: overlay.width <= units.gu(60)
720− AnchorChanges { target: notifications; anchors.left: parent.left }
721− },
722− State {
723− name: "wide"
724− when: overlay.width > units.gu(60)
725− AnchorChanges { target: notifications; anchors.left: undefined }
726− PropertyChanges { target: notifications; width: units.gu(38) }
727− }
728− ]
729−
730− InputFilterArea {
731− anchors { left: parent.left; right: parent.right }
732− height: parent.contentHeight
733− blockInput: height > 0
734− }
735− }
736− }
737−
738− focus: true
739− onFocusChanged: if (!focus) forceActiveFocus();
740−
741− InputFilterArea {
742− anchors {
743− top: parent.top
744− bottom: parent.bottom
745− left: parent.left
746− }
747− width: shell.edgeSize
748− blockInput: true
749− }
750−
751− InputFilterArea {
752− anchors {
753− top: parent.top
754− bottom: parent.bottom
755− right: parent.right
756− }
757− width: shell.edgeSize
758− blockInput: true
759− }
760−
761− Binding {
762− target: i18n
763− property: "domain"
764− value: "unity8"
765− }
766−
767− OSKController {
768− anchors.topMargin: panel.panelHeight
769− anchors.fill: parent // as needs to know the geometry of the shell
770− }
771−
772− //FIXME: This should be handled in the input stack, keyboard shouldnt propagate
773− MouseArea {
774− anchors.bottom: parent.bottom
775− anchors.left: parent.left
776− anchors.right: parent.right
777− height: shell.applicationManager ? shell.applicationManager.keyboardHeight : 0
778−
779− enabled: shell.applicationManager && shell.applicationManager.keyboardVisible
780− }
781−
782− Label {
783− anchors.centerIn: parent
784− visible: applicationManager.fake
785− text: "EARLY ALPHA\nNOT READY FOR USE"
786− color: "lightgrey"
787− opacity: 0.2
788− font.weight: Font.Black
789− horizontalAlignment: Text.AlignHCenter
790− verticalAlignment: Text.AlignVCenter
791− fontSizeMode: Text.Fit
792− rotation: -45
793− scale: Math.min(parent.width, parent.height) / width
794− }
795−
796− EdgeDemo {
797− id: edgeDemo
798− greeter: greeter
799− launcher: launcher
800− dash: dash
801− indicators: panel.indicators
802− underlay: underlay
803− }
804−
805− Connections {
806− target: SessionBroadcast
807− onShowHome: showHome()
808− }
809−}
SideStage/SideStage.qmldeleted−68
@@ -1,68 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
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.
7− *
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.
12− *
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/>.
15− */
16−
17−import QtQuick 2.0
18−import Unity.Application 0.1
19−import Ubuntu.Components 0.1
20−import "../Components"
21−
22−Stage {
23− id: stage
24−
25− type: ApplicationInfo.SideStage
26− property real handleSizeCollapsed: units.gu(2.5)
27− property real handleSizeExpanded: units.gu(4)
28− property bool handleExpanded
29−
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.
33− */
34− Rectangle {
35− id: backgroundBeneathPanel
36− anchors {
37− top: parent.top
38− left: parent.left
39− right: parent.right
40− }
41− height: shell.panelHeight
42− color: background.color
43− z: -1
44− }
45−
46− Rectangle {
47− id: background
48− anchors.fill: parent
49− color: "#2c2924"
50− z: -1
51− visible: stage.usingScreenshots
52− }
53−
54− SidestageHandle {
55− id: handle
56− objectName: "sideStageHandle"
57−
58− anchors {
59− top: parent.top
60− bottom: parent.bottom
61− left: parent.left
62− leftMargin: -width
63− }
64− width: handleExpanded ? handleSizeExpanded : handleSizeCollapsed
65− Behavior on width { NumberAnimation { easing.type: Easing.OutQuart} }
66− z: -1
67− }
68−}
SideStage/graphics/sidestage_handle@20.pngdeleted
Binary file not shown.
builddeleted−88
@@ -1,88 +0,0 @@
1−#!/bin/sh
2−
3−SETUP=false
4−CLEAN=false
5−NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
6−CODE_DIR=$( dirname `readlink -f $0` )
7−
8−usage() {
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
11− echo "OPTIONS:" >&2
12− echo " -s, --setup Setup the build environment and branch Unity" >&2
13− echo " -c, --clean Clean the build tree before building" >&2
14− echo >&2
15− exit 1
16−}
17−
18−ARGS=`getopt -n$0 -u -a --longoptions="setup,clean,help" -o "sch" -- "$@"`
19−[ $? -ne 0 ] && usage
20−eval set -- "$ARGS"
21−
22−while [ $# -gt 0 ]
23−do
24− case "$1" in
25− -s|--setup) SETUP=true;;
26− -c|--clean) CLEAN=true;;
27− -h|--help) usage;;
28− --) shift;break;;
29− esac
30− shift
31−done
32−
33−[ $# -gt 1 ] && usage
34−
35−BUILD_TYPE="debug"
36−[ $# -eq 1 ] && BUILD_TYPE="$1"
37−
38−install_dependencies() {
39− sudo apt-get update || exit 4
40− echo "Installing Unity 8 dependencies.."
41− sudo apt-get install devscripts \
42− equivs \
43− gsettings-desktop-schemas \
44− qmenumodel-qml \
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 \
51− unity-scope-home \
52− unity-lens-applications \
53− unity-plugin-scopes \
54− || exit 5
55−}
56−
57−mk_build_deps() {
58− [ ! -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
59−}
60−
61−if [ -f "/usr/bin/ccache" ] ; then
62− if [ "x$CC" = "x" ]; then
63− export CC='ccache gcc'
64− fi
65− if [ "x$CXX" = "x" ] ; then
66− export CXX='ccache g++'
67− fi
68−fi
69−
70−if [ -f "/usr/bin/ninja" ] ; then
71− GENERATOR="-G Ninja"
72− # Ninja does not need -j, it parallelizes automatically.
73− BUILD_COMMAND="ninja"
74−else
75− GENERATOR=
76− BUILD_COMMAND="make -j$NUM_JOBS"
77−fi
78−
79−if $SETUP; then
80− install_dependencies
81−else
82− if $CLEAN; then rm -rf builddir; fi
83− mkdir -p builddir
84− cd builddir
85− mk_build_deps
86− cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
87− ${BUILD_COMMAND} || exit 7
88−fi
build.shnew file+82
@@ -0,0 +1,82 @@
1+#!/bin/sh
2+
3+#
4+# Copyright (C) 2017 Canonical Ltd
5+#
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.
9+#
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.
14+#
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/>.
17+#
18+
19+SETUP=false
20+CLEAN=false
21+NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
22+CODE_DIR=$( dirname `readlink -f $0` )
23+
24+usage() {
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
27+ echo "OPTIONS:" >&2
28+ echo " -c, --clean Clean the build tree before building" >&2
29+ echo >&2
30+ exit 1
31+}
32+
33+ARGS=`getopt -n$0 -u -a --longoptions="setup,clean,help" -o "sch" -- "$@"`
34+[ $? -ne 0 ] && usage
35+eval set -- "$ARGS"
36+
37+while [ $# -gt 0 ]
38+do
39+ case "$1" in
40+ -c|--clean) CLEAN=true;;
41+ -h|--help) usage;;
42+ --) shift;break;;
43+ esac
44+ shift
45+done
46+
47+[ $# -gt 1 ] && usage
48+
49+BUILD_TYPE="debug"
50+[ $# -eq 1 ] && BUILD_TYPE="$1"
51+
52+mk_build_deps() {
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
56+ fi
57+}
58+
59+if [ -f "/usr/bin/ccache" ] ; then
60+ if [ "x$CC" = "x" ]; then
61+ export CC='ccache gcc'
62+ fi
63+ if [ "x$CXX" = "x" ] ; then
64+ export CXX='ccache g++'
65+ fi
66+fi
67+
68+if [ -f "/usr/bin/ninja" ] ; then
69+ GENERATOR="-G Ninja"
70+ # Ninja does not need -j, it parallelizes automatically.
71+ BUILD_COMMAND="ninja"
72+else
73+ GENERATOR=
74+ BUILD_COMMAND="make -j$NUM_JOBS"
75+fi
76+
77+if $CLEAN; then rm -rf builddir; fi
78+mkdir -p builddir
79+cd builddir
80+mk_build_deps
81+cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
82+${BUILD_COMMAND} || exit 7
clickable.yamlnew file+153
@@ -0,0 +1,153 @@
1+clickable_minimum_required: '7'
2+builder: custom
3+build: echo Run \'clickable build --libs --verbose\' to build && false
4+restrict_arch: amd64
5+libraries:
6+ unity8:
7+ builder: cmake
8+ src_dir: "${ROOT}"
9+ test: make xvfballtests -j${NUM_PROCS}
10+ dependencies_host:
11+ - android-headers
12+ - cmake
13+ - cmake-extras
14+ - dbus-test-runner
15+ - debhelper
16+ - dh-apparmor
17+ - doxyqml
18+ - g++:native
19+ - gdb
20+ - graphviz
21+ - gsettings-ubuntu-schemas
22+ - libandroid-properties-dev
23+ - libconnectivity-qt1-dev
24+ - libevdev-dev
25+ - libgeonames-dev
26+ - libgl1-mesa-dev
27+ - libgl1-mesa-dri
28+ - libgles2-mesa-dev
29+ - libglib2.0-dev
30+ - libgnome-desktop-3-12
31+ - libgnome-desktop-3-dev
32+ - libgsettings-qt-dev
33+ - libhardware-dev
34+ - liblightdm-qt5-3-dev
35+ - libpam0g-dev
36+ - libpulse-dev
37+ - libqmenumodel-dev
38+ - libqt5sql5-sqlite
39+ - libqt5svg5-dev
40+ - libqt5xmlpatterns5-dev
41+ - libqtdbusmock1-dev
42+ - libqtdbustest1-dev
43+ - libsystemsettings-dev
44+ - libubuntu-app-launch2-dev
45+ - libubuntu-download-manager-common-dev
46+ - libubuntugestures5-dev
47+ - libubuntugestures5-private-dev
48+ - libudev-dev
49+ - libudm-common-dev
50+ - libunity-api-dev
51+ - libusermetricsoutput1-dev
52+ - libx11-dev
53+ - libxcb1-dev
54+ - libxi-dev
55+ - pkg-config
56+ - python3-all:any
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
66+ - qml-module-qttest
67+ - qml-module-ubuntu-components
68+ - qml-module-ubuntu-layouts
69+ - qml-module-ubuntu-settings-components
70+ - qml-module-ubuntu-test
71+ - qtbase5-dev
72+ - qtbase5-dev-tools
73+ - qtbase5-private-dev
74+ - qtdbustest-runner
75+ - qtdeclarative5-dev
76+ - qtdeclarative5-dev-tools
77+ - qtdeclarative5-private-dev
78+ - qtdeclarative5-ubuntu-content1
79+ - ttf-ubuntu-font-family
80+ - ubports-wallpapers
81+ - xvfb
82+dependencies_target:
83+ - android-headers
84+ - cmake
85+ - cmake-extras
86+ - dbus-test-runner
87+ - debhelper
88+ - dh-apparmor
89+ - doxyqml
90+ - g++:native
91+ - gdb
92+ - graphviz
93+ - gsettings-ubuntu-schemas
94+ - libandroid-properties-dev
95+ - libconnectivity-qt1-dev
96+ - libevdev-dev
97+ - libgeonames-dev
98+ - libgl1-mesa-dev
99+ - libgl1-mesa-dri
100+ - libgles2-mesa-dev
101+ - libglib2.0-dev
102+ - libgnome-desktop-3-12
103+ - libgnome-desktop-3-dev
104+ - libgsettings-qt-dev
105+ - libhardware-dev
106+ - liblightdm-qt5-3-dev
107+ - libpam0g-dev
108+ - libpulse-dev
109+ - libqmenumodel-dev
110+ - libqt5sql5-sqlite
111+ - libqt5svg5-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
120+ - libudev-dev
121+ - libudm-common-dev
122+ - libunity-api-dev
123+ - libusermetricsoutput1-dev
124+ - libx11-dev
125+ - libxcb1-dev
126+ - libxi-dev
127+ - pkg-config
128+ - python3-all:any
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
138+ - qml-module-qttest
139+ - qml-module-ubuntu-components
140+ - qml-module-ubuntu-layouts
141+ - qml-module-ubuntu-settings-components
142+ - qml-module-ubuntu-test
143+ - qtbase5-dev
144+ - qtbase5-dev-tools
145+ - qtbase5-private-dev
146+ - qtdbustest-runner
147+ - qtdeclarative5-dev
148+ - qtdeclarative5-dev-tools
149+ - qtdeclarative5-private-dev
150+ - qtdeclarative5-ubuntu-content1
151+ - ttf-ubuntu-font-family
152+ - ubports-wallpapers
153+ - xvfb
cmake/modules/Plugins.cmakedeleted−67
@@ -1,67 +0,0 @@
1−find_program(qmlplugindump_exe qmlplugindump)
2−
3−if(NOT qmlplugindump_exe)
4− msg(FATAL_ERROR "Could not locate qmlplugindump.")
5−endif()
6−
7−# Creates target for copying and installing qmlfiles
8−#
9−# export_qmlfiles(plugin sub_path)
10−#
11−#
12−# Target to be created:
13−# - plugin-qmlfiles - Copies the qml files (*.qml, *.js, qmldir) into the shadow build folder.
14−
15−macro(export_qmlfiles PLUGIN PLUGIN_SUBPATH)
16−
17− file(GLOB QMLFILES
18− *.qml
19− *.js
20− qmldir
21− )
22−
23− # copy the qmldir file
24− add_custom_target(${PLUGIN}-qmlfiles ALL
25− COMMAND cp ${QMLFILES} ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}
26− DEPENDS ${QMLFILES}
27− )
28−
29− # install the qmlfiles file.
30− install(FILES ${QMLFILES}
31− DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
32− )
33−endmacro(export_qmlfiles)
34−
35−
36−# Creates target for generating the qmltypes file for a plugin and installs plugin files
37−#
38−# export_qmlplugin(plugin version sub_path [TARGETS target1 [target2 ...]])
39−#
40−# TARGETS additional install targets (eg the plugin shared object)
41−#
42−# Target to be created:
43−# - plugin-qmltypes - Generates the qmltypes file in the shadow build folder.
44−
45−macro(export_qmlplugin PLUGIN VERSION PLUGIN_SUBPATH)
46− set(multi_value_keywords TARGETS)
47− cmake_parse_arguments(qmlplugin "" "" "${multi_value_keywords}" ${ARGN})
48−
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
54− )
55− add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
56−
57− # install the qmltypes file.
58− install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
59− DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
60− )
61− endif()
62−
63− # install the additional targets
64− install(TARGETS ${qmlplugin_TARGETS}
65− DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
66− )
67−endmacro(export_qmlplugin)
cmake/modules/QmlTest.cmake+469−101
@@ -1,121 +1,489 @@
1−# add_qml_test(path component_name [NO_ADD_TEST] [NO_TARGETS]
2−# [TARGETS target1 [target2 [...]]]
3−# [IMPORT_PATHS import_path1 [import_path2 [...]]
4−# [PROPERTIES prop1 value1 [prop2 value2 [...]]])
1+# If you need to override the qmlscene or qmltestrunner executables,
2+# create the corresponding executable target.
3+
4+# These functions respect the global STDOUT_LOGGER and ARTIFACTS_DIR variables.
5+
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 "")
11+
12+# import_executables(name1 [name2 [...]]
13+# [OPTIONAL] # continue when not found
14+# )
515#
6−# NO_ADD_TEST will prevent adding the test to the "test" target
7−# NO_TARGETS will prevent adding the test to any targets
8−# TARGETS lists the targets the test should be added to
9−# IMPORT_PATHS will pass those paths to qmltestrunner as "-import" arguments
10−# PROPERTIES will be set on the target and test target. See CMake's set_target_properties()
16+# This will find the named executables and import them
17+# to an imported target of the same name.
18+
19+function(import_executables)
20+ cmake_parse_arguments(QMLTEST "OPTIONAL" "" "" ${ARGN})
21+
22+ foreach(NAME ${QMLTEST_UNPARSED_ARGUMENTS})
23+ if(NOT TARGET ${NAME})
24+ add_executable(${NAME} IMPORTED GLOBAL)
25+ find_program(${NAME}_exe ${NAME})
26+
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.")
31+ else()
32+ set_target_properties(${NAME} PROPERTIES IMPORTED_LOCATION ${${NAME}_exe})
33+ endif()
34+ endif()
35+ endforeach()
36+endfunction()
37+
38+
39+# add_qml_test(path component_name
40+# [...]
41+# )
1142#
12−# Two targets will be created:
13−# - testComponentName - Runs the test with qmltestrunner
14−# - tryComponentName - Runs the test with uqmlscene, for manual interaction
43+# Add test targets for ${component_name} under ${path}. It's assumed
44+# that the test file is named ${path}/tst_${component_name}.qml.
45+#
46+# This function wraps add_manual_qml_test and add_qml_unittest,
47+# see below for available arguments.
48+
49+function(add_qml_test PATH COMPONENT_NAME)
50+ cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
51+ mangle_arguments()
52+
53+ add_qml_unittest(${ARGV})
54+ add_manual_qml_test(${ARGV})
55+endfunction()
56+
57+
58+# add_qml_test_data(path component_name
59+# [...]
60+# )
61+#
62+# Install file called ${component_name} (or ${component_name}.qml) under
63+# ${path}.
64+
65+function(add_qml_test_data PATH COMPONENT_NAME)
66+ cmake_parse_arguments(TEST "" "DESTINATION" "" ${ARGN})
67+
68+ set(filename "${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/${COMPONENT_NAME}")
69+
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}")
77+ endforeach()
78+ return()
79+ endif()
80+
81+ if (NOT EXISTS "${filename}")
82+ set(filename "${filename}.qml")
83+ set(COMPONENT_NAME "${COMPONENT_NAME}.qml")
84+ endif()
85+
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}")
94+ endif()
95+
96+ if (TEST_DESTINATION)
97+ set(DESTINATION "${TEST_DESTINATION}")
98+ else()
99+ file(RELATIVE_PATH relcurpath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
100+ set(DESTINATION "${SHELL_APP_DIR}/${relcurpath}/${PATH}")
101+ endif()
102+
103+ install(FILES "${filename}" DESTINATION "${DESTINATION}")
104+endfunction()
105+
106+
107+# add_qml_unittest(path component_name
108+# [...]
109+# )
110+#
111+# Add test targets for ${component_name} under ${path}. It's assumed
112+# that the test file is named ${path}/tst_${component_name}.qml.
15113#
16−# To change/set a default value for the whole test suite, prior to calling add_qml_test, set:
17−# qmltest_DEFAULT_NO_ADD_TEST (default: FALSE)
18−# qmltest_DEFAULT_TARGETS
19−# qmltest_DEFAULT_IMPORT_PATHS
20−# qmltest_DEFAULT_PROPERTIES
21−
22−find_program(qmltestrunner_exe qmltestrunner)
23−
24−if(NOT qmltestrunner_exe)
25− msg(FATAL_ERROR "Could not locate qmltestrunner.")
26−endif()
27−
28−set(qmlscene_exe ${CMAKE_BINARY_DIR}/tests/uqmlscene/uqmlscene)
29−
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)
33−
34− cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN})
35−
36− set(qmlscene_TARGET try${COMPONENT_NAME})
37− set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME})
38−
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)
50− endif()
51−
52− set(qmlscene_command
53− env ${qmltest_ENVIRONMENT}
54− ${qmlscene_exe} ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
55− ${qmlscene_imports}
114+# This function wraps add_executable_test, see below for available arguments.
115+
116+function(add_qml_unittest PATH COMPONENT_NAME)
117+ import_executables(qmltestrunner)
118+
119+ add_executable_test(${COMPONENT_NAME} qmltestrunner
120+ ${ARGN}
121+ ARGS -input ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
56122 )
57− add_custom_target(${qmlscene_TARGET} ${qmlscene_command})
58123
59−endmacro(add_manual_qml_test)
124+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml")
125+ add_qml_test_data("${PATH}" "tst_${COMPONENT_NAME}.qml")
126+ endif()
127+endfunction()
128+
60129
61−macro(add_qml_test SUBPATH COMPONENT_NAME)
62− set(options NO_ADD_TEST NO_TARGETS)
63− set(multi_value_keywords IMPORT_PATHS TARGETS PROPERTIES ENVIRONMENT)
130+# add_manual_qml_test(path component_name
131+# [...]
132+# )
133+#
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.
136+#
137+# This function wraps add_manual_test, see below for available arguments.
64138
65− cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN})
139+function(add_manual_qml_test PATH COMPONENT_NAME)
140+ import_executables(qmlscene)
141+ cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
66142
67− set(qmltest_TARGET test${COMPONENT_NAME})
68− set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME})
143+ add_manual_test(${COMPONENT_NAME} qmlscene
144+ ${ARGN}
145+ ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
146+ )
69147
70− set(qmltestrunner_imports "")
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)
148+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml")
149+ add_qml_test_data("${PATH}" "tst_${COMPONENT_NAME}.qml")
81150 endif()
151+endfunction()
152+
153+
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
162+# # of those targets
163+# [ITERATIONS count] # run this test as a benchmark for ${count} iterations
164+# )
165+#
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.
169+#
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
174+
175+function(add_executable_test COMPONENT_NAME TARGET)
176+ import_executables(gdb xvfb-run OPTIONAL)
177+
178+ cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
179+ mangle_arguments()
180+
181+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
182+ set(file_logger -o ${CMAKE_CURRENT_BINARY_DIR}/test${COMPONENT_NAME}.xml,xunitxml)
183+
184+ bake_arguments("${QMLTEST_ARG_PREFIX}" args ${iterations} ${file_logger} ${STDOUT_LOGGER})
82185
83186 set(qmltest_command
84− env ${qmltest_ENVIRONMENT}
85− ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
86− ${qmltestrunner_imports}
87− -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml
88− -o -,txt
187+ $<TARGET_FILE:${TARGET}>
188+ ${QMLTEST_ARGS}
189+ ${args}
89190 )
90− add_custom_target(${qmltest_TARGET} ${qmltest_command})
91191
92− if(NOT "${qmltest_PROPERTIES}" STREQUAL "")
93− set_target_properties(${qmltest_TARGET} PROPERTIES ${qmltest_PROPERTIES})
94− elseif(NOT "${qmltest_DEFAULT_PROPERTIES}" STREQUAL "")
95− set_target_properties(${qmltest_TARGET} PROPERTIES ${qmltest_DEFAULT_PROPERTIES})
192+ add_qmltest_target(test${COMPONENT_NAME} ${TARGET}
193+ COMMAND ${qmltest_command}
194+ ${depends}
195+ ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT}
196+ ${add_test}
197+ ${targets}
198+ )
199+
200+ if(TARGET xvfb-run)
201+ add_qmltest_target(xvfbtest${COMPONENT_NAME} ${TARGET}
202+ COMMAND $<TARGET_FILE:xvfb-run> --server-args "-screen 0 1024x768x24" --auto-servernum ${qmltest_command}
203+ ${depends}
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}
206+ )
207+ endif()
208+
209+ if(TARGET gdb)
210+ add_qmltest_target(gdbtest${COMPONENT_NAME} ${TARGET}
211+ COMMAND $<TARGET_FILE:gdb> -ex run -args ${qmltest_command}
212+ ${depends}
213+ ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT}
214+ )
96215 endif()
216+endfunction()
217+
218+
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
224+# )
225+#
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
97229
98− if("${qmltest_NO_ADD_TEST}" STREQUAL FALSE AND NOT "${qmltest_DEFAULT_NO_ADD_TEST}" STREQUAL "TRUE")
99− add_test(${qmltest_TARGET} ${qmltest_command})
230+function(add_manual_test COMPONENT_NAME TARGET)
231+ import_executables(gdb OPTIONAL)
100232
101− if(NOT "${qmltest_UNPARSED_ARGUMENTS}" STREQUAL "")
102− set_tests_properties(${qmltest_TARGET} PROPERTIES ${qmltest_PROPERTIES})
103− elseif(NOT "${qmltest_DEFAULT_PROPERTIES}" STREQUAL "")
104− set_tests_properties(${qmltest_TARGET} PROPERTIES ${qmltest_DEFAULT_PROPERTIES})
233+ cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
234+ mangle_arguments()
235+
236+ bake_arguments("${QMLTEST_ARG_PREFIX}" args -qmljsdebugger=port:3768,3800)
237+
238+ set(qmltry_command
239+ $<TARGET_FILE:${TARGET}>
240+ ${QMLTEST_ARGS}
241+ ${args}
242+ )
243+
244+ add_qmltest_target(try${COMPONENT_NAME} ${TARGET}
245+ COMMAND ${qmltry_command}
246+ ${depends}
247+ ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT}
248+ )
249+
250+ if(TARGET gdb)
251+ add_qmltest_target(gdbtry${COMPONENT_NAME} ${TARGET}
252+ COMMAND $<TARGET_FILE:gdb> -ex run -args ${qmltry_command}
253+ ${depends}
254+ ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT}
255+ )
256+ endif()
257+endfunction()
258+
259+
260+# add_meta_test(target)
261+#
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
264+# installed system.
265+
266+function(add_meta_test TARGET_NAME)
267+ cmake_parse_arguments(TEST "SERIAL" "" "DEPENDS" ${ARGN})
268+
269+ add_custom_target(${TARGET_NAME})
270+
271+ set(filename "${CMAKE_BINARY_DIR}/tests/scripts/${TARGET_NAME}.sh")
272+ if(TEST_SERIAL)
273+ file(WRITE "${filename}" "#!/bin/sh\n\n")
274+ else()
275+ file(WRITE "${filename}" "#!/usr/bin/parallel --shebang --no-notice\n\n")
276+ endif()
277+
278+ add_meta_dependencies(${TARGET_NAME} DEPENDS ${TEST_DEPENDS})
279+ # else we will write the rest of the script as we add cmake targets
280+
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"
286+ )
287+endfunction()
288+
289+
290+################### INTERNAL ####################
291+
292+function(install_test_script TARGET_NAME)
293+ cmake_parse_arguments(TEST "" "" "COMMAND;ENVIRONMENT" ${ARGN})
294+
295+ # Now write the above test into a shell script that we can run on an
296+ # installed system.
297+ set(script "#!/bin/sh\n\nset -x\n\n")
298+ foreach(ONE_ENV ${TEST_ENVIRONMENT})
299+ set(script "${script}export ${ONE_ENV}\n")
300+ endforeach()
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}' ")
313+ endforeach()
314+ set(script "${script}\"\$@\"") # Allow passing arguments if desired
315+
316+ set(filename "${CMAKE_BINARY_DIR}/tests/scripts/${TARGET_NAME}.sh")
317+
318+ # Generate script to file then read it back to resolve any generator
319+ # expressions before we try to replace paths.
320+ file(GENERATE
321+ OUTPUT "${filename}"
322+ CONTENT "${script}"
323+ )
324+
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.
329+
330+ # START OF CODE BLOCK --------------------------------------------------
331+ install(CODE "
332+ file(READ \"${filename}\" replacestr)
333+
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}\")
356+
357+ file(WRITE \"${filename}\" \"\${replacestr}\")
358+ ")
359+ # END OF CODE BLOCK --------------------------------------------------
360+
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"
366+ )
367+endfunction()
368+
369+function(add_meta_dependencies UPSTREAM_TARGET)
370+ cmake_parse_arguments(TEST "" "" "DEPENDS" ${ARGN})
371+
372+ foreach(depend ${TEST_DEPENDS})
373+ add_dependencies(${UPSTREAM_TARGET} ${depend})
374+
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")
105379 endif()
106− endif("${qmltest_NO_ADD_TEST}" STREQUAL FALSE AND NOT "${qmltest_DEFAULT_NO_ADD_TEST}" STREQUAL "TRUE")
107−
108− if("${qmltest_NO_TARGETS}" STREQUAL "FALSE")
109− if(NOT "${qmltest_TARGETS}" STREQUAL "")
110− foreach(TARGET ${qmltest_TARGETS})
111− add_dependencies(${TARGET} ${qmltest_TARGET})
112− endforeach(TARGET)
113− elseif(NOT "${qmltest_DEFAULT_TARGETS}" STREQUAL "")
114− foreach(TARGET ${qmltest_DEFAULT_TARGETS})
115− add_dependencies(${TARGET} ${qmltest_TARGET})
116− endforeach(TARGET)
380+ endforeach()
381+endfunction()
382+
383+# add_qmltest_target(target_name target
384+# COMMAND test_exe [arg1 [...]] # execute this test with arguments
385+# [...] # see above for available arguments:
386+# # ADD_TEST, ENVIRONMENT, DEPENDS and TARGETS
387+# )
388+
389+function(add_qmltest_target TARGET_NAME TARGET)
390+ cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "COMMAND;${QMLTEST_MULTI}" ${ARGN})
391+ mangle_arguments()
392+
393+ # Additional arguments
394+ string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_lower)
395+ if(cmake_generator_lower STREQUAL "unix makefiles")
396+ set(function "$(FUNCTION)")
397+ endif()
398+
399+ add_custom_target(${TARGET_NAME}
400+ env ${QMLTEST_ENVIRONMENT}
401+ ${QMLTEST_COMMAND} ${function}
402+ DEPENDS ${TARGET} ${QMLTEST_DEPENDS}
403+ )
404+
405+ install_test_script(${TARGET_NAME}
406+ ENVIRONMENT ${QMLTEST_ENVIRONMENT}
407+ COMMAND ${QMLTEST_COMMAND}
408+ )
409+
410+ if(QMLTEST_ADD_TEST)
411+ add_test(
412+ NAME ${TARGET_NAME}
413+ COMMAND ${QMLTEST_COMMAND}
414+ )
415+
416+ foreach(ENV ${QMLTEST_ENVIRONMENT})
417+ set_property(TEST ${TARGET_NAME} APPEND PROPERTY ENVIRONMENT ${ENV})
418+ endforeach()
419+
420+ set_property(TEST ${TARGET_NAME} APPEND PROPERTY DEPENDS ${TARGET})
421+ foreach(DEPEND ${DEPENDS})
422+ set_property(TEST ${TARGET_NAME} APPEND PROPERTY DEPENDS ${DEPEND})
423+ endforeach()
424+ endif()
425+
426+ foreach(UPSTREAM_TARGET ${QMLTEST_TARGETS})
427+ add_meta_dependencies(${UPSTREAM_TARGET} DEPENDS ${TARGET_NAME})
428+ endforeach()
429+endfunction()
430+
431+
432+# mangle_arguments(${ARGN})
433+#
434+# Verify there were no unparsed arguments and
435+# mangle the known ones for further processing.
436+
437+macro(mangle_arguments)
438+ if(QMLTEST_UNPARSED_ARGUMENTS)
439+ message(FATAL_ERROR "Unexpected arguments: ${QMLTEST_UNPARSED_ARGUMENTS}")
440+ endif()
441+
442+ if(QMLTEST_ADD_TEST)
443+ set(add_test ADD_TEST)
444+ endif()
445+
446+ if(QMLTEST_IMPORT_PATHS)
447+ string(REPLACE ";" ":" imports "${QMLTEST_IMPORT_PATHS}")
448+ endif()
449+
450+ if(QMLTEST_ITERATIONS)
451+ set(iterations -iterations ${QMLTEST_ITERATIONS})
452+ endif()
453+
454+ if(QMLTEST_DEPENDS)
455+ set(depends DEPENDS ${QMLTEST_DEPENDS})
456+ endif()
457+
458+ if(QMLTEST_TARGETS)
459+ set(targets TARGETS ${QMLTEST_TARGETS})
460+ endif()
461+
462+ set(xvfb_targets "")
463+ foreach(target ${QMLTEST_TARGETS})
464+ if(TARGET xvfb${target})
465+ list(APPEND xvfb_targets xvfb${target})
117466 endif()
118− endif("${qmltest_NO_TARGETS}" STREQUAL "FALSE")
467+ endforeach()
468+ set(xvfb_targets "${xvfb_targets}" PARENT_SCOPE)
469+endmacro()
470+
119471
120− add_manual_qml_test(${SUBPATH} ${COMPONENT_NAME} ${ARGN})
121−endmacro(add_qml_test)
472+# bake_arguments(prefix output
473+# arg1 [arg2 [...]]
474+# )
475+#
476+# If set, add the argument prefix before every passed
477+# argument and store the result in ${OUTPUT} variable.
478+
479+function(bake_arguments PREFIX OUTPUT)
480+ set(args "${ARGN}")
481+ if(PREFIX)
482+ set(args "")
483+ foreach(arg ${ARGN})
484+ list(APPEND args ${PREFIX})
485+ list(APPEND args ${arg})
486+ endforeach()
487+ endif()
488+ set(${OUTPUT} "${args}" PARENT_SCOPE)
489+endfunction()
cmake/modules/autopilot.cmake+7−2
@@ -2,10 +2,15 @@ add_custom_target(autopilot)
22
33function(declare_autopilot_test TEST_NAME TEST_SUITE WORKING_DIR)
44 add_custom_target(autopilot-${TEST_NAME}
5− COMMAND LANG=C UBUNTU_ICON_THEME=ubuntu-mobile QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks autopilot run ${TEST_SUITE}
5+ COMMAND UNITY_TESTING=1 LANG=C QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks python3 -m autopilot.run run ${TEST_SUITE}
66 WORKING_DIRECTORY ${WORKING_DIR}
7− DEPENDS install
7+ DEPENDS fake_install
8+ )
9+
10+ add_custom_target(fake_install
11+ COMMAND cmake --build ${CMAKE_BINARY_DIR} --target install
812 )
913
1014 add_dependencies(autopilot autopilot-${TEST_NAME})
15+
1116endfunction()
data/51-unity8-greeter.confnew file+2
@@ -0,0 +1,2 @@
1+[Seat:*]
2+greeter-session=unity8-greeter
data/CMakeLists.txt+23−3
@@ -1,7 +1,27 @@
1−# generate desktop file
1+# generate desktop files
22configure_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)
35
4−# install desktop file
5−install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
6+# install desktop files
7+install(FILES
8+ ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
9+ ${CMAKE_CURRENT_BINARY_DIR}/${INDICATORS_CLIENT_APP}.desktop
610 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
711 )
12+
13+install(FILES
14+ ${CMAKE_CURRENT_BINARY_DIR}/${GREETER_APP}.desktop
15+ DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/greeters
16+ )
17+
18+install(FILES
19+ 51-unity8-greeter.conf
20+ DESTINATION ${CMAKE_INSTALL_DATADIR}/lightdm/lightdm.conf.d
21+ )
22+
23+add_custom_target(pkgversion ALL COMMAND dpkg-parsechangelog -l${CMAKE_SOURCE_DIR}/debian/changelog --show-field version > ${CMAKE_CURRENT_BINARY_DIR}/version)
24+
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.xmlnew file+255
@@ -0,0 +1,255 @@
1+<schemalist>
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" />
7+ </enum>
8+ <enum id="home-expanded-enum">
9+ <value nick="Not Expanded" value="0" />
10+ <value nick="Expanded" value="1" />
11+ </enum>
12+ <enum id="launcher-position-enum">
13+ <value nick="Left" value="0" />
14+ <value nick="Bottom" value="1" />
15+ </enum>
16+ <enum id="desktop-type-enum">
17+ <value nick="Ubuntu" value="0" />
18+ <value nick="UbuntuKylin" value="1" />
19+ </enum>
20+
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>
26+ </key>
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>
31+ </key>
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>
36+ </key>
37+ <key type="i" name="minimize-count">
38+ <default>0</default>
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>
41+ </key>
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>
46+ </key>
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>
51+ </key>
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>
56+ </key>
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>
61+ </key>
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>
68+ </key>
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>
75+ </key>
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>
83+ </key>
84+ <key type="as" name="whitelist-repeated-keys">
85+ <default>[
86+ 'XF86KbdBrightnessUp',
87+ 'XF86KbdBrightnessDown',
88+ 'XF86MonBrightnessUp',
89+ 'XF86MonBrightnessDown',
90+ 'XF86AudioRaiseVolume',
91+ 'XF86AudioLowerVolume'
92+ ]</default>
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>
95+ </key>
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>
102+ </key>
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>
107+ </key>
108+ </schema>
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>
116+ </key>
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>
124+ </key>
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>
130+ </key>
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>
137+ </key>
138+ </schema>
139+ <schema path="/com/canonical/unity/launcher/" id="com.canonical.Unity.Launcher" gettext-domain="unity">
140+ <key type="as" name="favorites">
141+ <default>[
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',
153+ 'unity://devices'
154+ ]</default>
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>
157+ </key>
158+ <key type="as" name="items">
159+ <default>[
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'
168+ ]</default>
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>
171+ </key>
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>
176+ </key>
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>
181+ </key>
182+ </schema>
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>
188+ </key>
189+ </schema>
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>
195+ </key>
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>
200+ </key>
201+ </schema>
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>
209+ </key>
210+ </schema>
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>
219+ </key>
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>
228+ </key>
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>
234+ </key>
235+ </schema>
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>
242+ </key>
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>
247+ </key>
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>
253+ </key>
254+ </schema>
255+</schemalist>
data/com.canonical.Unity8.gschema.xmlnew file+75
@@ -0,0 +1,75 @@
1+<schemalist>
2+ <enum id="usage-mode-enum">
3+ <value nick="Staged" value="0" />
4+ <value nick="Windowed" value="1" />
5+ <value nick="Automatic" value="2" />
6+ </enum>
7+
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>
13+ </key>
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>
19+ </key>
20+ <key type="u" name="edge-barrier-min-push">
21+ <default>2</default>
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>
24+ </key>
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>
29+ </key>
30+ <key type="u" name="edge-drag-width">
31+ <default>2</default>
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>
34+ </key>
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>
39+ </key>
40+ <key type="u" name="launcher-width">
41+ <default>8</default>
42+ <range min="6" max="12"/>
43+ <summary>Width of the launcher in grid units.</summary>
44+ <description>Changes the width of the launcher in all usage modes.</description>
45+ </key>
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>
50+ </key>
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>
55+ </key>
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>
60+ </key>
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>
65+ </key>
66+ </schema>
67+
68+ <schema path="/com/canonical/unity8/greeter/" id="com.canonical.Unity8.Greeter" gettext-domain="unity8">
69+ <key type="x" name="locked-out-time">
70+ <default>0</default>
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>
73+ </key>
74+ </schema>
75+</schemalist>
data/devices.confnew file+30
@@ -0,0 +1,30 @@
1+# This file can hold multiple device configs. Devices are separated by sections.
2+#
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.
6+#
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.
10+#
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.
14+#
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
19+# user settings.
20+#
21+# Any options not listed will default to the values of the example below.
22+
23+# [devicename]
24+# SupportedOrientations=Portrait,InvertedPortrait,Landscape,InvertedLandscape
25+# PrimaryOrientation=PrimaryOrienation
26+# PortraitOrientation=Portrait
27+# InvertedPortraitOrientation=InvertedPortrait
28+# LandscapeOrientation=Landscape
29+# InvertedLandscapeOrientation=InvertedLandscape
30+# Category=phone
data/indicators-client.desktop.innew file+9
@@ -0,0 +1,9 @@
1+[Desktop Entry]
2+Type=Application
3+Name=Indicators Client
4+Comment=Application for testing the Indicators system
5+Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/indicators-client
6+Terminal=false
7+Icon=
8+NoDisplay=false
9+X-Ubuntu-Touch=true
data/test.sensorsnew file+12
@@ -0,0 +1,12 @@
1+create light 0 10 1
2+create accel 0 1000 0.1
3+create proximity
4+
5+200 proximity near
6+500 light 5
7+# simulate crash on the ground
8+500 accel 0.2 0.1 10
9+100 accel 0.2 0.2 1000
10+20 accel 0 0 0
11+10 proximity far
12+10 light 10
data/unity-mock-indicator-service.confnew file+7
@@ -0,0 +1,7 @@
1+description "Unity Shell v8 Mock Indicator"
2+author "Nick Dedekind <nick.dedekind@canonical.com>"
3+
4+respawn
5+respawn limit 2 10
6+
7+exec ${BINARY:-unity-mock-indicator-service} $ARGS
data/unity8-filewatcher.confnew file+13
@@ -0,0 +1,13 @@
1+description "File system watcher for unity8"
2+author "Michael Zanetti <michael.zanetti@canonical.com>"
3+
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.
8+
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)
11+
12+exec dbus-send --type=method_call --dest=com.canonical.Unity.Launcher /com/canonical/Unity/Launcher com.canonical.Unity.Launcher.Refresh
13+
data/unity8-greeter-init.confnew file+12
@@ -0,0 +1,12 @@
1+description "Unity 8 Greeter initialization"
2+author "Michael Terry <mterry@ubuntu.com>"
3+
4+start on unity8-greeter-started
5+task
6+emits indicator-services-start
7+
8+script
9+ start --no-wait ofono-setup || true
10+ initctl emit --no-wait indicator-services-start || true
11+ start --no-wait maliit-server || true
12+end script
data/unity8-greeter-logrotate.confnew file+14
@@ -0,0 +1,14 @@
1+description "Unity 8 Greeter logrotate support"
2+author "Michael Terry <mterry@ubuntu.com>"
3+
4+start on unity8-greeter-started
5+task
6+
7+script
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.
12+ sleep 60
13+ initctl emit :sys:rotate-logs
14+end script
data/unity8-greeter-wrappernew file+109
@@ -0,0 +1,109 @@
1+#!/bin/sh
2+# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
3+#
4+# Copyright (C) 2011,2013,2016 Canonical Ltd
5+#
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.
9+#
10+# See http://www.gnu.org/copyleft/gpl.html the full text of the license.
11+
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.
16+
17+trap cleanup TERM EXIT
18+
19+cleanup()
20+{
21+ trap - TERM EXIT
22+ # Kill upstart and indicators
23+ if [ -n "$INIT_PID" ]; then
24+ kill "$INIT_PID"
25+ fi
26+ if [ -n "$CMD_PID" ]; then
27+ kill "$CMD_PID"
28+ fi
29+ exit 0
30+}
31+
32+set_greeter_var()
33+{
34+ export "$1=$2"
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"
38+ fi
39+}
40+
41+SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
42+rm -f $SUB_SOCKET # clear socket in case we were hard shut down
43+
44+echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >"$XDG_RUNTIME_DIR/dbus-session"
45+
46+# If touch session script (which sets up grid units and mir variables) is available, use it
47+TOUCH_WRAPPER=
48+if which ubuntu-touch-session >/dev/null; then
49+ TOUCH_WRAPPER=ubuntu-touch-session
50+fi
51+
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
55+
56+set_greeter_var QT_IM_MODULE maliitphablet
57+set_greeter_var QT_QPA_PLATFORM ubuntumirclient
58+
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
63+
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 &
70+INIT_PID=$!
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
74+
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
80+
81+# Start any pre-greeter tasks if needed (like wizard)
82+initctl emit unity8-greeter-starting
83+
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).
90+#
91+# Do this after unity8-greeter-starting, in case a customization upstart job
92+# changes language.
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"
97+ fi
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"
102+ fi
103+fi
104+
105+# And finally actually start the greeter
106+exec env MIR_SERVER_FILE=$SUB_SOCKET $TOUCH_WRAPPER $@ &
107+CMD_PID=$!
108+wait $CMD_PID
109+CMD_PID=
data/unity8-greeter.desktop.innew file+7
@@ -0,0 +1,7 @@
1+[Desktop Entry]
2+Type=Application
3+Name=Unity 8 Greeter
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
7+X-Ubuntu-Touch=true
data/unity8-greeter.pklanew file+44
@@ -0,0 +1,44 @@
1+# DO NOT EDIT THIS FILE, it will be overwritten on update
2+# Place your local configurations under /etc/polkit-1/localauthority/
3+
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;
7+ResultActive=no
8+ResultInactive=no
9+ResultsAny=no
10+
11+[Disable Sleep and Wake]
12+Identity=unix-user:lightdm
13+Action=org.freedesktop.NetworkManager.sleep-wake
14+ResultActive=no
15+ResultInactive=no
16+ResultsAny=no
17+
18+[Disable WiFi Sharing]
19+Identity=unix-user:lightdm
20+Action=org.freedesktop.NetworkManager.wifi.share.protected;org.freedesktop.NetworkManager.wifi.share.open
21+ResultActive=no
22+ResultInactive=no
23+ResultsAny=no
24+
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
28+ResultActive=no
29+ResultInactive=no
30+ResultsAny=no
31+
32+[Disable User Connections]
33+Identity=unix-user:lightdm
34+Action=org.freedesktop.NetworkManager.use-user-connections
35+ResultActive=no
36+ResultInactive=no
37+ResultsAny=no
38+
39+[Enable Controlling of Network Connections]
40+Identity=unix-user:lightdm
41+Action=org.freedesktop.NetworkManager.network-control
42+ResultActive=yes
43+ResultInactive=no
44+ResultsAny=no
data/unity8.conf+85−16
@@ -1,30 +1,99 @@
11description "Unity Shell v8"
22author "Ricardo Mendoza <ricmm@ubuntu.com>"
33
4−start on ((xsession SESSION=ubuntu-touch) or (xsession SESSION=ubuntu-touch-surfaceflinger)) and started dbus
4+emits indicator-services-start
5+emits indicator-services-end
6+
7+start on ((xsession SESSION=ubuntu-touch) or (xsession SESSION=unity8-mir) or (xsession SESSION=unity8)) and started dbus
58stop on desktop-end
69
10+kill timeout 120
11+
12+#
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).
18+#
19+env QML_NO_TOUCH_COMPRESSION=1
20+
721respawn
822expect stop
923
24+# FIXME Create an autopilot test that makes sure start+stop and restart
25+# work fine at least 2 times
26+
1027pre-start script
11− if [ -n "$MIR_SOCKET" ]; then
12− if [ -z "$UNITY_MIR_SOCKET" ]; then
13− # Save original value of MIR_SOCKET in case we are restarted,
14− # as we modify the variable for future jobs, including ourself.
15− UNITY_MIR_SOCKET=$MIR_SOCKET
16− initctl set-env --global UNITY_MIR_SOCKET=$UNITY_MIR_SOCKET
17− fi
18−
19− # Point unity8 at unity-system-compositor
28+ # Tell unity-mir to raise SIGSTOP after we start
29+ initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
30+
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
34+
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
39+ # there.
40+ MIR_SERVER_FILE=/run/user/$(id -u)/mir_socket
41+ else
2042 MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
21− initctl set-env MIR_SERVER_FILE=$MIR_SERVER_FILE
22− initctl set-env MIR_SERVER_HOST_SOCKET=$UNITY_MIR_SOCKET
43+ fi
44+ initctl set-env MIR_SERVER_FILE=$MIR_SERVER_FILE
45+
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'}"
2350
24− # Point all future jobs in this session to our Mir socket instead of
25− # unity-system-compositor's socket.
26− initctl set-env --global 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"
54+ fi
55+
56+ if [ -S "${MIR_SERVER_FILE}_trusted" ]; then
57+ rm "${MIR_SERVER_FILE}_trusted"
58+ fi
59+
60+ initctl set-env --global MIR_SERVER_PROMPT_FILE=1
61+
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
67+
68+ # Workaround for text not rendering correctly
69+ initctl set-env --global QT_ENABLE_GLYPH_CACHE_WORKAROUND=1
70+
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
77+ else
78+ initctl set-env MODE=full-shell
79+ fi
80+
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
2785 fi
2886end script
2987
30−exec ${BINARY:-unity8} $ARGS
88+exec ${BINARY:-unity8} --mode=$MODE $ARGS
89+
90+post-start script
91+ initctl emit --no-wait indicator-services-start
92+end script
93+
94+post-stop script
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
99+end script
data/unity8.desktop.in+1−2
@@ -1,10 +1,9 @@
11[Desktop Entry]
22Type=Application
33Name=Unity 8
4−GenericName=unity8
54Comment=The converged Unity shell
65Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8
76Terminal=false
8−Icon=unity8
7+Icon=
98NoDisplay=true
109X-Ubuntu-Touch=true
data/unity8.overridedeleted−1
@@ -1 +0,0 @@
1−kill timeout 30
debian/bileto_pre_release_hooknew file+5
@@ -0,0 +1,5 @@
1+#!/bin/sh
2+
3+set -eux
4+
5+sh ./po/update-unity-pot
debian/changelog+5387−16
This diff is too big to show here.
debian/control+240−97
This diff is too big to show here.
debian/copyright+21
This diff is too big to show here.
debian/indicators-client.install+1
This diff is too big to show here.
debian/rules+29−14
This diff is too big to show here.
debian/scopes-recommends-generatordeleted−27
This diff is too big to show here.
debian/shlibs.localnew file+1
This diff is too big to show here.
debian/source/formatdeleted−1
This diff is too big to show here.
debian/tests/autopilot.shnew file+13
This diff is too big to show here.
debian/tests/controlnew file+11
This diff is too big to show here.
debian/tests/qmluitests.shnew file+11
This diff is too big to show here.
debian/unity8-autopilot.install+1−1
This diff is too big to show here.
debian/unity8-common.installnew file+5
This diff is too big to show here.
debian/unity8-common.udevnew file+2
This diff is too big to show here.
debian/unity8-doc.installnew file+2
This diff is too big to show here.
debian/unity8-fake-env.installdeleted−2
This diff is too big to show here.
debian/unity8-greeter.installnew file+5
This diff is too big to show here.
debian/unity8-private.install+9−4
This diff is too big to show here.
debian/unity8-schemas.installnew file+1
This diff is too big to show here.
debian/unity8-tests.installnew file+9
This diff is too big to show here.
debian/unity8-tests.lintian-overridesnew file+1
This diff is too big to show here.
debian/unity8.install+13−9
This diff is too big to show here.
doc/CMakeLists.txtnew file+40
This diff is too big to show here.
doc/Doxyfile.innew file+2317
This diff is too big to show here.
doc/devices.confnew file+45
This diff is too big to show here.
graphics/12_10_background_wide@12.pngdeleted
Binary file not shown.
graphics/applicationIcons/browser@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/calendar@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/camera@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/contacts-app@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/dash@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/evernote@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/facebook@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/gallery@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/gmail@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/map@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/messages-app@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/notepad@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/phone-app@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/pinterest@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/soundcloud@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/system-settings@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/twitter@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/weather@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/wikipedia@18.pngdeleted
Binary file not shown.
graphics/applicationIcons/youtube@18.pngdeleted
Binary file not shown.
graphics/avatars/amanda@12.pngdeleted
Binary file not shown.
graphics/avatars/anna_olsson@12.pngdeleted
Binary file not shown.
graphics/avatars/funky@12.pngdeleted
Binary file not shown.
graphics/clock@18.pngdeleted
Binary file not shown.
graphics/phone_background.jpgdeleted
Binary file not shown.
graphics/tablet_background.jpgdeleted
Binary file not shown.
include/CMakeLists.txtnew file+1
This diff is too big to show here.
include/paths.h.innew file+175
This diff is too big to show here.
main.cppdeleted−189
This diff is too big to show here.
paths.h.indeleted−128
This diff is too big to show here.
plugins/AccountsService/50-com.canonical.unity.AccountsService.pkladeleted−6
This diff is too big to show here.
plugins/AccountsService/AccountsService.cpp+365−47
This diff is too big to show here.
plugins/AccountsService/AccountsService.h+91−12
This diff is too big to show here.
plugins/AccountsService/AccountsServiceDBusAdaptor.cpp+56−30
This diff is too big to show here.
plugins/AccountsService/AccountsServiceDBusAdaptor.h+10−6
This diff is too big to show here.
plugins/AccountsService/CMakeLists.txt+6−15
This diff is too big to show here.
plugins/AccountsService/com.canonical.unity.AccountsService.policydeleted−24
This diff is too big to show here.
plugins/AccountsService/com.canonical.unity.AccountsService.xml+43−6
This diff is too big to show here.
plugins/AccountsService/plugin.cpp+1
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+21−2
This diff is too big to show here.
plugins/Cursor/3rd_party/CMakeLists.txtnew file+1
This diff is too big to show here.
plugins/Cursor/3rd_party/xcursor/CMakeLists.txtnew file+15
This diff is too big to show here.
plugins/Cursor/3rd_party/xcursor/xcursor.cnew file+968
This diff is too big to show here.
plugins/Cursor/3rd_party/xcursor/xcursor.hnew file+65
This diff is too big to show here.
plugins/Cursor/CMakeLists.txtnew file+32
This diff is too big to show here.
plugins/Cursor/Cursor.qmlnew file+62
This diff is too big to show here.
plugins/Cursor/CursorImageInfo.cppnew file+115
This diff is too big to show here.
plugins/Cursor/CursorImageInfo.hnew file+82
This diff is too big to show here.
plugins/Cursor/CursorImageProvider.cppnew file+337
This diff is too big to show here.
plugins/Cursor/CursorImageProvider.hnew file+103
This diff is too big to show here.
plugins/Cursor/MousePointer.cppnew file+235
This diff is too big to show here.
plugins/Cursor/MousePointer.hnew file+92
This diff is too big to show here.
plugins/Cursor/plugin.cppnew file+41
This diff is too big to show here.
plugins/Cursor/plugin.hnew file+33
This diff is too big to show here.
plugins/Cursor/qmldirnew file+3
This diff is too big to show here.
plugins/GlobalShortcut/CMakeLists.txtnew file+10
This diff is too big to show here.
plugins/GlobalShortcut/globalshortcut.cppnew file+91
This diff is too big to show here.
plugins/GlobalShortcut/globalshortcut.hnew file+81
This diff is too big to show here.
plugins/GlobalShortcut/globalshortcutregistry.cppnew file+125
This diff is too big to show here.
plugins/GlobalShortcut/globalshortcutregistry.hnew file+70
This diff is too big to show here.
plugins/GlobalShortcut/plugin.cppnew file+27
This diff is too big to show here.
plugins/GlobalShortcut/plugin.hnew file+32
This diff is too big to show here.
plugins/GlobalShortcut/qmldirnew file+2
This diff is too big to show here.
plugins/Greeter/CMakeLists.txtnew file+6
This diff is too big to show here.
plugins/Greeter/Unity/CMakeLists.txtnew file+1
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/CMakeLists.txtnew file+35
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/launcheritem.cppnew file+218
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/launcheritem.hnew file+84
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/launchermodelas.cppnew file+303
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/launchermodelas.hnew file+77
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/plugin.cppnew file+46
This diff is too big to show here.
tests/mocks/Unity/fake_unity_plugin.h → plugins/Greeter/Unity/Launcher/plugin.hrenamed+6−8
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/qmldirnew file+3
This diff is too big to show here.
plugins/Unity/Launcher/common/quicklistentry.cpp → plugins/Greeter/Unity/Launcher/quicklistentry.cpprenamed+1−4
This diff is too big to show here.
plugins/Unity/Launcher/common/quicklistentry.h → plugins/Greeter/Unity/Launcher/quicklistentry.hrenamed+1−4
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/quicklistmodel.cppnew file+72
This diff is too big to show here.
plugins/Greeter/Unity/Launcher/quicklistmodel.hnew file+55
This diff is too big to show here.
plugins/HudClient/CMakeLists.txtdeleted−43
This diff is too big to show here.
plugins/HudClient/hudclient.cppdeleted−294
This diff is too big to show here.
plugins/HudClient/hudclient.hdeleted−71
This diff is too big to show here.
plugins/HudClient/hudtoolbarmodel.cppdeleted−98
This diff is too big to show here.
plugins/HudClient/qmldirdeleted−3
This diff is too big to show here.
plugins/HudClient/volumepeakdetector.cppdeleted−223
This diff is too big to show here.
plugins/HudClient/volumepeakdetector.hdeleted−78
This diff is too big to show here.
plugins/LightDM/CMakeLists.txt+11−26
This diff is too big to show here.
plugins/LightDM/DBusGreeter.cppnew file+50
This diff is too big to show here.
plugins/LightDM/DBusGreeter.hnew file+52
This diff is too big to show here.
plugins/LightDM/DBusGreeterList.cpp+9−30
This diff is too big to show here.
plugins/LightDM/DBusGreeterList.h+4−8
This diff is too big to show here.
plugins/LightDM/FullLightDM/CMakeLists.txtnew file+32
This diff is too big to show here.
plugins/LightDM/FullLightDM/qmldirnew file+3
This diff is too big to show here.
plugins/LightDM/Greeter.cpp+182−37
This diff is too big to show here.
plugins/LightDM/Greeter.h+30−13
This diff is too big to show here.
plugins/LightDM/GreeterPrivate.hnew file+45
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/CMakeLists.txtnew file+33
This diff is too big to show here.
Panel/PanelBackground.qml → plugins/LightDM/IntegratedLightDM/QLightDM/Greeterrenamed+2−6
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_widget1.qml → plugins/LightDM/IntegratedLightDM/QLightDM/SessionsModelrenamed+2−8
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_widget3.qml → plugins/LightDM/IntegratedLightDM/QLightDM/UsersModelrenamed+2−8
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/CMakeLists.txtnew file+54
This diff is too big to show here.
tests/mocks/LightDM/Greeter.cpp → plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.cpprenamed+29−14
This diff is too big to show here.
tests/mocks/LightDM/Greeter.h → plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.hrenamed+9−6
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/GreeterPrivate.cppnew file+309
This diff is too big to show here.
tests/mocks/LightDM/GreeterPrivate.h → plugins/LightDM/IntegratedLightDM/liblightdm/GreeterPrivate.hrenamed+4−2
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cppnew file+87
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.hnew file+72
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModelPrivate.cppnew file+36
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModelPrivate.hnew file+54
This diff is too big to show here.
tests/mocks/LightDM/UsersModel.cpp → plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpprenamed+14−21
This diff is too big to show here.
tests/mocks/LightDM/UsersModel.h → plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.hrenamed+10−6
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.cppnew file+94
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.hnew file+72
This diff is too big to show here.
plugins/LightDM/IntegratedLightDM/qmldirnew file+3
This diff is too big to show here.
plugins/LightDM/PromptsModel.cppnew file+97
This diff is too big to show here.
plugins/LightDM/PromptsModel.hnew file+70
This diff is too big to show here.
plugins/LightDM/SessionsModel.cppnew file+135
This diff is too big to show here.
plugins/LightDM/SessionsModel.hnew file+66
This diff is too big to show here.
plugins/LightDM/UsersModel.cpp+183−15
This diff is too big to show here.
plugins/LightDM/UsersModel.h+8−10
This diff is too big to show here.
plugins/LightDM/plugin.cpp+41−15
This diff is too big to show here.
plugins/LightDM/plugin.h+4−6
This diff is too big to show here.
plugins/LightDM/qmldir+3−3
This diff is too big to show here.
plugins/Lights/CMakeLists.txtnew file+23
This diff is too big to show here.
plugins/Lights/HfdLights.cppnew file+62
This diff is too big to show here.
plugins/Lights/HfdLights.hnew file+42
This diff is too big to show here.
plugins/Lights/LegacyLights.cppnew file+91
This diff is too big to show here.
plugins/Lights/LegacyLights.hnew file+45
This diff is too big to show here.
plugins/Lights/Lights.cppnew file+101
This diff is too big to show here.
plugins/Lights/Lights.hnew file+71
This diff is too big to show here.
plugins/Lights/android-hardware.hnew file+19
This diff is too big to show here.
plugins/Lights/plugin.cppnew file+54
This diff is too big to show here.
plugins/Lights/plugin.hnew file+34
This diff is too big to show here.
plugins/Lights/qmldirnew file+3
This diff is too big to show here.
plugins/ListViewWithPageHeader/CMakeLists.txtdeleted−42
This diff is too big to show here.
plugins/ListViewWithPageHeader/listviewwithpageheader.cppdeleted−1300
This diff is too big to show here.
plugins/ListViewWithPageHeader/listviewwithpageheader.hdeleted−217
This diff is too big to show here.
plugins/ListViewWithPageHeader/qmldirdeleted−3
This diff is too big to show here.
plugins/Powerd/CMakeLists.txt+8−4
This diff is too big to show here.
plugins/Powerd/Powerd.cpp+67−13
This diff is too big to show here.
plugins/Powerd/Powerd.h+25−9
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.txtnew file+9
This diff is too big to show here.
plugins/ScreenshotDirectory/ScreenGrabber.qmltypesnew file+17
This diff is too big to show here.
plugins/ScreenshotDirectory/ScreenshotDirectory.cppnew file+64
This diff is too big to show here.
plugins/ScreenshotDirectory/ScreenshotDirectory.hnew file+39
This diff is too big to show here.
tests/mocks/LightDM/demo/UsersModelPrivate.cpp → plugins/ScreenshotDirectory/plugin.cpprenamed+7−14
This diff is too big to show here.
plugins/ScreenshotDirectory/plugin.hnew file+31
This diff is too big to show here.
plugins/ScreenshotDirectory/qmldirnew file+2
This diff is too big to show here.
plugins/SessionBroadcast/CMakeLists.txt+6−5
This diff is too big to show here.
plugins/SessionBroadcast/SessionBroadcast.cpp+40−10
This diff is too big to show here.
plugins/SessionBroadcast/SessionBroadcast.h+13−3
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/UInput/CMakeLists.txtnew file+7
This diff is too big to show here.
plugins/UInput/plugin.cppnew file+26
This diff is too big to show here.
plugins/UInput/plugin.hnew file+32
This diff is too big to show here.
plugins/UInput/qmldirnew file+3
This diff is too big to show here.
plugins/UInput/uinput.cppnew file+182
This diff is too big to show here.
plugins/UInput/uinput.hnew file+61
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt+7−9
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp+9−8
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h+3−2
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+82−15
This diff is too big to show here.
plugins/Ubuntu/DownloadDaemonListener/interface/metatypes.h+3−6
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+1−1
This diff is too big to show here.
plugins/Ubuntu/Gestures/AxisVelocityCalculator.h+6−6
This diff is too big to show here.
plugins/Ubuntu/Gestures/CMakeLists.txt+31−11
This diff is too big to show here.
plugins/Ubuntu/Gestures/Damper.hdeleted−87
This diff is too big to show here.
plugins/Ubuntu/Gestures/Direction.cpp+11−4
This diff is too big to show here.
plugins/Ubuntu/Gestures/Direction.h+8−5
This diff is too big to show here.
plugins/Ubuntu/Gestures/DirectionalDragArea.cppdeleted−697
This diff is too big to show here.
plugins/Ubuntu/Gestures/DirectionalDragArea.hdeleted−288
This diff is too big to show here.
plugins/Ubuntu/Gestures/MouseEventGenerator.cppnew file+64
This diff is too big to show here.
plugins/Ubuntu/Gestures/MouseEventGenerator.hnew file+48
This diff is too big to show here.
plugins/Ubuntu/Gestures/PressedOutsideNotifier.h+1−1
This diff is too big to show here.
plugins/Ubuntu/Gestures/TimeSource.cppdeleted−49
This diff is too big to show here.
plugins/Ubuntu/Gestures/TimeSource.hdeleted−54
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchDispatcher.cppnew file+398
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchDispatcher.hnew file+96
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchGate.cppnew file+290
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchGate.hnew file+125
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchGestureArea.cppnew file+879
This diff is too big to show here.
plugins/Ubuntu/Gestures/TouchGestureArea.hnew file+229
This diff is too big to show here.
plugins/Ubuntu/Gestures/UbuntuGesturesGlobal.h → plugins/Ubuntu/Gestures/UbuntuGesturesQmlGlobal.hrenamed+3−3
This diff is too big to show here.
plugins/Ubuntu/Gestures/plugin.cpp+9−4
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.txtnew file+19
This diff is too big to show here.
plugins/Unity/ApplicationMenu/applicationmenuregistry.cppnew file+141
This diff is too big to show here.
plugins/Unity/ApplicationMenu/applicationmenuregistry.hnew file+83
This diff is too big to show here.
plugins/Unity/ApplicationMenu/com.ubuntu.MenuRegistrar.xmlnew file+83
This diff is too big to show here.
plugins/Unity/ApplicationMenu/dbusapplicationmenuregistry.cppnew file+44
This diff is too big to show here.
plugins/Unity/ApplicationMenu/dbusapplicationmenuregistry.hnew file+34
This diff is too big to show here.
plugins/Unity/ApplicationMenu/plugin.cppnew file+42
This diff is too big to show here.
plugins/Unity/ApplicationMenu/plugin.hnew file+32
This diff is too big to show here.
plugins/Unity/ApplicationMenu/qmldirnew file+3
This diff is too big to show here.
plugins/Unity/CMakeLists.txt+5
This diff is too big to show here.
plugins/Unity/Connectivity/CMakeLists.txtnew file+10
This diff is too big to show here.
plugins/Unity/Connectivity/Connectivity.cppnew file+33
This diff is too big to show here.
plugins/Unity/Connectivity/Connectivity.hnew file+34
This diff is too big to show here.
plugins/Unity/Connectivity/plugin.cppnew file+34
This diff is too big to show here.
plugins/Unity/Connectivity/plugin.hnew file+31
This diff is too big to show here.
plugins/Unity/Connectivity/qmldirnew file+3
This diff is too big to show here.
plugins/Unity/Indicators/CMakeLists.txt+14−30
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/CMakeLists.txtdeleted−1
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/ActionTextField.qmldeleted−69
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/CMakeLists.txtdeleted−5
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/GroupedMessage.qmldeleted−91
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/HeroMessage.qmldeleted−123
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/HeroMessageHeader.qmldeleted−161
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qmldeleted−204
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/QuickReply.qmldeleted−165
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/SimpleTextMessage.qmldeleted−107
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/SnapDecision.qmldeleted−167
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/qmldirdeleted−12
This diff is too big to show here.
plugins/Unity/Indicators/Network/CMakeLists.txtdeleted−1
This diff is too big to show here.
plugins/Unity/Indicators/Network/qml/AccessPoint.qmldeleted−117
This diff is too big to show here.
plugins/Unity/Indicators/Network/qml/CMakeLists.txtdeleted−5
This diff is too big to show here.
plugins/Unity/Indicators/Network/qml/qmldirdeleted−3
This diff is too big to show here.
plugins/Unity/Indicators/actionrootstate.cppnew file+97
This diff is too big to show here.
plugins/Unity/Indicators/actionrootstate.hnew file+55
This diff is too big to show here.
plugins/Unity/Indicators/indicator.cpp+27−13
This diff is too big to show here.
plugins/Unity/Indicators/indicator.h+6−2
This diff is too big to show here.
plugins/Unity/Indicators/indicators.h+6−9
This diff is too big to show here.
plugins/Unity/Indicators/indicatorsmanager.cpp+46−55
This diff is too big to show here.
plugins/Unity/Indicators/indicatorsmanager.h+9−4
This diff is too big to show here.
plugins/Unity/Indicators/indicatorsmodel.cpp+50−19
This diff is too big to show here.
plugins/Unity/Indicators/indicatorsmodel.h+20−7
This diff is too big to show here.
plugins/Unity/Indicators/menucontentactivator.cpp+6−7
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.cppnew file+204
This diff is too big to show here.
plugins/Unity/Indicators/modelactionrootstate.hnew file+72
This diff is too big to show here.
plugins/Unity/Indicators/modelprinter.cpp+30−15
This diff is too big to show here.
plugins/Unity/Indicators/modelprinter.h+4−3
This diff is too big to show here.
plugins/Unity/Indicators/plugin.cpp+17−15
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/CMakeLists.txtdeleted−5
This diff is too big to show here.
plugins/Unity/Indicators/qml/CachedUnityMenuModel.qmldeleted−60
This diff is too big to show here.
plugins/Unity/Indicators/qml/FramedMenuItem.qmldeleted−39
This diff is too big to show here.
plugins/Unity/Indicators/qml/IndicatorPage.qmldeleted−219
This diff is too big to show here.
plugins/Unity/Indicators/qml/MenuItemFactory.qmldeleted−301
This diff is too big to show here.
plugins/Unity/Indicators/qml/RemoveBackground.qmldeleted−55
This diff is too big to show here.
plugins/Unity/Indicators/qml/SectionMenuItem.qmldeleted−54
This diff is too big to show here.
plugins/Unity/Indicators/qml/SliderMenuItem.qmldeleted−106
This diff is too big to show here.
plugins/Unity/Indicators/qml/StandardMenuItem.qmldeleted−71
This diff is too big to show here.
plugins/Unity/Indicators/qml/SwitchMenuItem.qmldeleted−53
This diff is too big to show here.
plugins/Unity/Indicators/qml/qmldirdeleted−23
This diff is too big to show here.
plugins/Unity/Indicators/qmldirnew file+3
This diff is too big to show here.
plugins/Unity/Indicators/resources/artwork/messaging/default_app.svgdeleted−42
This diff is too big to show here.
plugins/Unity/Indicators/resources/artwork/messaging/default_contact.pngdeleted
Binary file not shown.
plugins/Unity/Indicators/resources/artwork/messaging/message_sms01_54px.pngdeleted
Binary file not shown.
plugins/Unity/Indicators/resources/artwork/network/secure.svgdeleted−71
This diff is too big to show here.
plugins/Unity/Indicators/resources/indicators.qrcdeleted−8
This diff is too big to show here.
plugins/Unity/Indicators/rootactionstate.cppdeleted−299
This diff is too big to show here.
plugins/Unity/Indicators/rootstateparser.cppnew file+231
This diff is too big to show here.
plugins/Unity/Indicators/rootactionstate.h → plugins/Unity/Indicators/rootstateparser.hrenamed+22−37
This diff is too big to show here.
plugins/Unity/Indicators/sharedunitymenumodel.cppnew file+96
This diff is too big to show here.
plugins/Unity/Indicators/sharedunitymenumodel.hnew file+66
This diff is too big to show here.
plugins/Unity/Indicators/timeformatter.cppdeleted−172
This diff is too big to show here.
plugins/Unity/Indicators/timeformatter.hdeleted−54
This diff is too big to show here.
plugins/Unity/Indicators/unitymenumodelcache.cpp+32−9
This diff is too big to show here.
plugins/Unity/Indicators/unitymenumodelcache.h+12−6
This diff is too big to show here.
plugins/Unity/Indicators/unitymenumodelstack.cpp+8−8
This diff is too big to show here.
plugins/Unity/Indicators/unitymenumodelstack.h+1−1
This diff is too big to show here.
plugins/Unity/Indicators/visibleindicatorsmodel.cppdeleted−92
This diff is too big to show here.
plugins/Unity/Indicators/visibleindicatorsmodel.hdeleted−56
This diff is too big to show here.
plugins/Unity/InputInfo/CMakeLists.txtnew file+38
This diff is too big to show here.
plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux.cppnew file+296
This diff is too big to show here.
plugins/Unity/InputInfo/linux/qinputdeviceinfo_linux_p.hnew file+96
This diff is too big to show here.
plugins/Unity/Indicators/qml/HLine.qml → plugins/Unity/InputInfo/plugin.cpprenamed+15−12
This diff is too big to show here.
tests/mocks/Unity/Indicators/CachedUnityMenuModel.qml → plugins/Unity/InputInfo/plugin.hrenamed+12−12
This diff is too big to show here.
plugins/Unity/InputInfo/qdeclarativeinputdevicemodel.cppnew file+196
This diff is too big to show here.
plugins/Unity/InputInfo/qdeclarativeinputdevicemodel_p.hnew file+102
This diff is too big to show here.
plugins/Unity/InputInfo/qinputinfo.cppnew file+270
This diff is too big to show here.
plugins/Unity/InputInfo/qinputinfo.hnew file+142
This diff is too big to show here.
plugins/Unity/InputInfo/qmldirnew file+3
This diff is too big to show here.
plugins/Unity/Launcher/CMakeLists.txt+29−12
This diff is too big to show here.
plugins/Unity/Launcher/appdrawermodel.cppnew file+192
This diff is too big to show here.
plugins/Unity/Launcher/appdrawermodel.hnew file+64
This diff is too big to show here.
plugins/Unity/Launcher/asadapter.cppnew file+67
This diff is too big to show here.
tests/mocks/Unity/Indicators/IndicatorBase.qml → plugins/Unity/Launcher/asadapter.hrenamed+27−18
This diff is too big to show here.
plugins/Unity/Launcher/backend/launcherbackend.cppdeleted−320
This diff is too big to show here.
plugins/Unity/Launcher/backend/launcherbackend.hdeleted−148
This diff is too big to show here.
plugins/Unity/Launcher/dbusinterface.cppnew file+226
This diff is too big to show here.
plugins/Unity/Launcher/dbusinterface.hnew file+49
This diff is too big to show here.
plugins/Unity/Launcher/gsettings.cppnew file+80
This diff is too big to show here.
plugins/Unity/Indicators/qml/ProgressMenuItem.qml → plugins/Unity/Launcher/gsettings.hrenamed+25−16
This diff is too big to show here.
plugins/Unity/Launcher/launcheritem.cpp+133−6
This diff is too big to show here.
plugins/Unity/Launcher/launcheritem.h+36−22
This diff is too big to show here.
plugins/Unity/Launcher/launchermodel.cpp+365−67
This diff is too big to show here.
plugins/Unity/Launcher/launchermodel.h+41−25
This diff is too big to show here.
plugins/Unity/Launcher/plugin.cpp+7−6
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.cppnew file+85
This diff is too big to show here.
plugins/Unity/Launcher/quicklistentry.hnew file+56
This diff is too big to show here.
plugins/Unity/Launcher/quicklistmodel.cpp+23−1
This diff is too big to show here.
plugins/Unity/Launcher/quicklistmodel.h+7−4
This diff is too big to show here.
plugins/Unity/Launcher/ualwrapper.cppnew file+74
This diff is too big to show here.
plugins/Unity/Launcher/ualwrapper.hnew file+36
This diff is too big to show here.
plugins/Unity/Launcher/xdgwatcher.cppnew file+129
This diff is too big to show here.
plugins/Unity/Launcher/xdgwatcher.hnew file+46
This diff is too big to show here.
plugins/Unity/Platform/CMakeLists.txtnew file+11
This diff is too big to show here.
plugins/Unity/Platform/platform.cppnew file+66
This diff is too big to show here.
plugins/Unity/Platform/platform.hnew file+64
This diff is too big to show here.
tests/mocks/LightDM/single-pin/UsersModelPrivate.cpp → plugins/Unity/Platform/plugin.cpprenamed+7−13
This diff is too big to show here.
tests/mocks/Unity/fake_applications_scope.h → plugins/Unity/Platform/plugin.hrenamed+9−10
This diff is too big to show here.
plugins/Unity/Platform/qmldirnew file+2
This diff is too big to show here.
plugins/Unity/Session/CMakeLists.txtnew file+29
This diff is too big to show here.
plugins/Unity/Session/dbusunitysessionservice.cppnew file+647
This diff is too big to show here.
plugins/Unity/Session/dbusunitysessionservice.hnew file+377
This diff is too big to show here.
plugins/Unity/Session/orientationlock.cppnew file+74
This diff is too big to show here.
plugins/Unity/Session/orientationlock.hnew file+60
This diff is too big to show here.
plugins/Unity/Session/plugin.cppnew file+48
This diff is too big to show here.
plugins/Unity/Session/plugin.hnew file+34
This diff is too big to show here.
plugins/Unity/Session/qmldirnew file+3
This diff is too big to show here.
plugins/Utils/CMakeLists.txt+33−16
This diff is too big to show here.
plugins/Utils/EdgeBarrierSettings.qmlnew file+66
This diff is too big to show here.
plugins/Utils/ElapsedTimer.hnew file+51
This diff is too big to show here.
plugins/Utils/Style.jsnew file+37
This diff is too big to show here.
plugins/Utils/Timer.cppnew file+62
This diff is too big to show here.
plugins/Utils/Timer.hnew file+78
This diff is too big to show here.
plugins/Utils/URLDispatcher.cppnew file+80
This diff is too big to show here.
plugins/Utils/URLDispatcher.hnew file+47
This diff is too big to show here.
plugins/Utils/WindowInputMonitor.cppnew file+126
This diff is too big to show here.
plugins/Utils/WindowInputMonitor.hnew file+97
This diff is too big to show here.
plugins/Utils/activefocuslogger.cppnew file+61
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_Damper.cpp → plugins/Utils/activefocuslogger.hrenamed+15−18
This diff is too big to show here.
plugins/Utils/albumartprovider.cppdeleted−234
This diff is too big to show here.
plugins/Utils/albumartprovider.hdeleted−56
This diff is too big to show here.
plugins/Utils/appdrawerproxymodel.cppnew file+189
This diff is too big to show here.
plugins/Utils/appdrawerproxymodel.hnew file+87
This diff is too big to show here.
plugins/Utils/applicationsfiltermodel.cppnew file+101
This diff is too big to show here.
plugins/Utils/applicationsfiltermodel.hnew file+69
This diff is too big to show here.
plugins/Utils/bottombarvisibilitycommunicatorshell.cppdeleted−49
This diff is too big to show here.
plugins/Utils/bottombarvisibilitycommunicatorshell.hdeleted−59
This diff is too big to show here.
plugins/Utils/constants.cppnew file+32
This diff is too big to show here.
plugins/Utils/constants.hnew file+43
This diff is too big to show here.
plugins/Utils/deviceconfigparser.cppnew file+176
This diff is too big to show here.
plugins/Utils/deviceconfigparser.hnew file+66
This diff is too big to show here.
plugins/Utils/easingcurve.cppnew file+73
This diff is too big to show here.
plugins/Utils/easingcurve.hnew file+69
This diff is too big to show here.
plugins/Utils/expressionfiltermodel.cppnew file+49
This diff is too big to show here.
plugins/Utils/expressionfiltermodel.hnew file+42
This diff is too big to show here.
plugins/Utils/globalfunctions.cppnew file+58
This diff is too big to show here.
plugins/Utils/globalfunctions.hnew file+44
This diff is too big to show here.
plugins/Utils/inputeventgenerator.cppnew file+34
This diff is too big to show here.
plugins/Utils/inputeventgenerator.hnew file+40
This diff is too big to show here.
plugins/Utils/inputwatcher.cppnew file+118
This diff is too big to show here.
plugins/Utils/inputwatcher.hnew file+58
This diff is too big to show here.
plugins/Utils/mediaartcache.cppdeleted−178
This diff is too big to show here.
plugins/Utils/mediaartcache.hdeleted−54
This diff is too big to show here.
plugins/Utils/plugin.cpp+58−34
This diff is too big to show here.
plugins/Utils/plugin.h+1−2
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.
plugins/Utils/qmldir+3−1
This diff is too big to show here.
plugins/Utils/quicklistproxymodel.cppnew file+72
This diff is too big to show here.
plugins/Utils/quicklistproxymodel.hnew file+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.cppnew file+72
This diff is too big to show here.
plugins/Utils/tabfocusfence.hnew file+38
This diff is too big to show here.
plugins/Utils/timezoneFormatter.cppnew file+45
This diff is too big to show here.
plugins/Utils/timezoneFormatter.hnew file+33
This diff is too big to show here.
plugins/Utils/unitysortfilterproxymodelqml.cppnew file+167
This diff is too big to show here.
plugins/Utils/unitysortfilterproxymodelqml.hnew file+68
This diff is too big to show here.
plugins/Utils/windowinputfilter.cppnew file+70
This diff is too big to show here.
plugins/Utils/windowinputfilter.hnew file+58
This diff is too big to show here.
plugins/Utils/windowstatestorage.cppnew file+383
This diff is too big to show here.
plugins/Utils/windowstatestorage.hnew file+74
This diff is too big to show here.
plugins/WindowManager/AvailableDesktopArea.cppnew file+50
This diff is too big to show here.
plugins/WindowManager/AvailableDesktopArea.hnew file+38
This diff is too big to show here.
plugins/WindowManager/CMakeLists.txtnew file+26
This diff is too big to show here.
plugins/WindowManager/InputMethodManager.cppnew file+56
This diff is too big to show here.
plugins/WindowManager/InputMethodManager.hnew file+55
This diff is too big to show here.
plugins/WindowManager/TopLevelWindowModel.cppnew file+782
This diff is too big to show here.
plugins/WindowManager/TopLevelWindowModel.hnew file+308
This diff is too big to show here.
plugins/WindowManager/Window.cppnew file+277
This diff is too big to show here.
plugins/WindowManager/Window.hnew file+176
This diff is too big to show here.
Components/Circle.qml → plugins/WindowManager/WindowManagerGlobal.hrenamed+7−6
This diff is too big to show here.
plugins/WindowManager/WindowManagerPlugin.cppnew file+44
This diff is too big to show here.
plugins/WindowManager/WindowManagerPlugin.hnew file+32
This diff is too big to show here.
plugins/WindowManager/WindowMargins.cppnew file+74
This diff is too big to show here.
plugins/WindowManager/WindowMargins.hnew file+59
This diff is too big to show here.
plugins/WindowManager/qmldirnew file+2
This diff is too big to show here.
plugins/Wizard/50-com.canonical.unity.wizard.pklanew file+6
This diff is too big to show here.
plugins/Wizard/CMakeLists.txtnew file+23
This diff is too big to show here.
plugins/Wizard/Changelog.cppnew file+58
This diff is too big to show here.
plugins/Wizard/Changelog.hnew file+52
This diff is too big to show here.
plugins/Wizard/LocalePlugin.cppnew file+291
This diff is too big to show here.
plugins/Wizard/LocalePlugin.hnew file+58
This diff is too big to show here.
plugins/Wizard/PageList.cppnew file+127
This diff is too big to show here.
plugins/Wizard/PageList.hnew file+53
This diff is too big to show here.
plugins/Wizard/Status.cppnew file+143
This diff is too big to show here.
plugins/Wizard/Status.hnew file+60
This diff is too big to show here.
plugins/Wizard/System.cppnew file+182
This diff is too big to show here.
plugins/Wizard/System.hnew file+75
This diff is too big to show here.
plugins/Wizard/Unity/Application/CMakeLists.txtnew file+3
This diff is too big to show here.
tests/mocks/Unity/Application/OSKController.qml → plugins/Wizard/Unity/Application/OSKController.qmlrenamed
The content is the same.
plugins/Wizard/Unity/Application/qmldirnew file+2
This diff is too big to show here.
plugins/Wizard/Unity/CMakeLists.txtnew file+1
This diff is too big to show here.
plugins/Wizard/Utils/CMakeLists.txtnew file+27
This diff is too big to show here.
plugins/Wizard/Utils/plugin.cppnew file+41
This diff is too big to show here.
plugins/ListViewWithPageHeader/plugin.h → plugins/Wizard/Utils/plugin.hrenamed+4−4
This diff is too big to show here.
plugins/Wizard/Utils/qmldirnew file+2
This diff is too big to show here.
plugins/Utils/qsortfilterproxymodelqml.cpp → plugins/Wizard/Utils/qsortfilterproxymodelqml.cpprenamed+12
This diff is too big to show here.
plugins/Utils/qsortfilterproxymodelqml.h → plugins/Wizard/Utils/qsortfilterproxymodelqml.hrenamed+1
This diff is too big to show here.
plugins/Wizard/keyboardLayoutsModel.cppnew file+163
This diff is too big to show here.
plugins/Wizard/keyboardLayoutsModel.hnew file+66
This diff is too big to show here.
plugins/Wizard/main.cppnew file+93
This diff is too big to show here.
plugins/Wizard/plugin.cppnew file+38
This diff is too big to show here.
plugins/Wizard/plugin.hnew file+31
This diff is too big to show here.
plugins/Wizard/qmldirnew file+2
This diff is too big to show here.
plugins/Wizard/timezonemodel.cppnew file+244
This diff is too big to show here.
plugins/Wizard/timezonemodel.hnew file+80
This diff is too big to show here.
plugins/Wizard/ubuntu-system-settings-wizard-cleanup.confnew file+20
This diff is too big to show here.
plugins/Wizard/ubuntu-system-settings-wizard-set-lang.confnew file+30
This diff is too big to show here.
plugins/Wizard/ubuntu-system-settings-wizard.confnew file+75
This diff is too big to show here.
po/aa.ponew file+880
This diff is too big to show here.
po/am.ponew file+1406
This diff is too big to show here.
po/ar.po+1214−118
This diff is too big to show here.
po/ast.po+1356−110
This diff is too big to show here.
po/az.po+892−82
This diff is too big to show here.
po/be.ponew file+1253
This diff is too big to show here.
po/bg.po+802−79
This diff is too big to show here.
po/bn.ponew file+1062
This diff is too big to show here.
po/br.ponew file+1348
This diff is too big to show here.
po/bs.ponew file+1146
This diff is too big to show here.
po/ca.po+1399−107
This diff is too big to show here.
po/ca@valencia.ponew file+1125
This diff is too big to show here.
po/ce.ponew file+816
This diff is too big to show here.
po/ckb.ponew file+870
This diff is too big to show here.
po/co.ponew file+1061
This diff is too big to show here.
po/cs.po+1279−106
This diff is too big to show here.
po/cy.ponew file+1165
This diff is too big to show here.
po/da.ponew file+1216
This diff is too big to show here.
po/de.po+1398−108
This diff is too big to show here.
po/el.po+1273−98
This diff is too big to show here.
po/en_AU.po+1389−104
This diff is too big to show here.
po/en_GB.po+1339−93
This diff is too big to show here.
po/en_US.ponew file+814
This diff is too big to show here.
po/eo.po+842−76
This diff is too big to show here.
po/es.po+1389−110
This diff is too big to show here.
po/et.ponew file+816
This diff is too big to show here.
po/eu.ponew file+1246
This diff is too big to show here.
po/fa.po+1388−93
This diff is too big to show here.
po/fi.po+1385−108
This diff is too big to show here.
po/fo.po+834−82
This diff is too big to show here.
po/fr.po+1410−96
This diff is too big to show here.
po/ga.ponew file+1109
This diff is too big to show here.
po/gd.po+1406−112
This diff is too big to show here.
po/gl.po+1383−108
This diff is too big to show here.
po/gu.ponew file+814
This diff is too big to show here.
po/gv.ponew file+918
This diff is too big to show here.
po/he.po+1041−111
This diff is too big to show here.
po/hi.ponew file+850
This diff is too big to show here.
po/hr.po+1326−103
This diff is too big to show here.
po/hu.po+1380−102
This diff is too big to show here.
po/hy.po+882−89
This diff is too big to show here.
po/ia.ponew file+1409
This diff is too big to show here.
po/id.po+926−76
This diff is too big to show here.
po/is.po+942−102
This diff is too big to show here.
po/it.po+1394−110
This diff is too big to show here.
po/ja.po+933−79
This diff is too big to show here.
po/kk.ponew file+841
This diff is too big to show here.
po/km.po+1018−109
This diff is too big to show here.
po/kn.po+753−79
This diff is too big to show here.
po/ko.po+1191−104
This diff is too big to show here.
po/ku.ponew file+978
This diff is too big to show here.
po/ky.po+753−79
This diff is too big to show here.
po/lo.po+760−84
This diff is too big to show here.
po/lt.ponew file+1034
This diff is too big to show here.
po/lv.po+1130−87
This diff is too big to show here.
po/ml.po+816−107
This diff is too big to show here.
po/mr.ponew file+864
This diff is too big to show here.
po/ms.ponew file+1376
This diff is too big to show here.
po/my.po+843−96
This diff is too big to show here.
po/nb.po+1370−103
This diff is too big to show here.
po/ne.ponew file+834
This diff is too big to show here.
po/nl.po+1381−102
This diff is too big to show here.
po/nn.ponew file+816
This diff is too big to show here.
po/oc.ponew file+1276
This diff is too big to show here.
po/or.ponew file+816
This diff is too big to show here.
po/pa.ponew file+1153
This diff is too big to show here.
po/pl.po+1376−109
This diff is too big to show here.
po/pt.ponew file+1435
This diff is too big to show here.
po/pt_BR.po+1178−106
This diff is too big to show here.
po/ro.po+1178−84
This diff is too big to show here.
po/ru.po+1385−110
This diff is too big to show here.
po/sc.ponew file+904
This diff is too big to show here.
po/shn.po+733−75
This diff is too big to show here.
po/si.po+803−76
This diff is too big to show here.
po/sk.ponew file+1352
This diff is too big to show here.
po/sl.po+1353−115
This diff is too big to show here.
po/sq.ponew file+1048
This diff is too big to show here.
po/sr.po+1348−94
This diff is too big to show here.
po/sv.po+1378−105
This diff is too big to show here.
po/sw.ponew file+1087
This diff is too big to show here.
po/ta.po+815−107
This diff is too big to show here.
po/te.po+786−75
This diff is too big to show here.
po/th.po+709−112
This diff is too big to show here.
po/tr.po+1376−107
This diff is too big to show here.
po/ug.po+1203−95
This diff is too big to show here.
po/uk.po+1381−112
This diff is too big to show here.
po/unity8.pot+729−72
This diff is too big to show here.
po/update-unity-pot+31−5
This diff is too big to show here.
po/ur.ponew file+819
This diff is too big to show here.
po/uz.ponew file+816
This diff is too big to show here.
po/vi.ponew file+816
This diff is too big to show here.
po/wo.ponew file+1232
This diff is too big to show here.
po/xh.po+731−73
This diff is too big to show here.
po/zh_CN.po+1328−106
This diff is too big to show here.
po/zh_HK.ponew file+897
This diff is too big to show here.
po/zh_TW.po+1276−107
This diff is too big to show here.
qml/ApplicationMenus/ApplicationMenuItemFactory.qmlnew file+135
This diff is too big to show here.
qml/ApplicationMenus/ApplicationMenusLimits.qmlnew file+24
This diff is too big to show here.
qml/ApplicationMenus/MenuBar.qmlnew file+513
This diff is too big to show here.
qml/ApplicationMenus/MenuItem.qmlnew file+146
This diff is too big to show here.
qml/ApplicationMenus/MenuNavigator.qmlnew file+101
This diff is too big to show here.
qml/ApplicationMenus/MenuPopup.qmlnew file+510
This diff is too big to show here.
qml/ApplicationMenus/RegisteredApplicationMenuModel.qmlnew file+56
This diff is too big to show here.
qml/ApplicationMenus/qmldirnew file+1
This diff is too big to show here.
qml/CMakeLists.txtnew file+23
This diff is too big to show here.
qml/Components/Background.qmlnew file+87
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page1.qml → qml/Components/BlurLayer.qmlrenamed+18−15
This diff is too big to show here.
qml/Components/BrightnessControl.qmlnew file+54
This diff is too big to show here.
qml/Components/Dialogs.qmlnew file+328
This diff is too big to show here.
Components/DragHandle.qml → qml/Components/DragHandle.qmlrenamed+71−53
This diff is too big to show here.
Components/DraggingArea.qml → qml/Components/DraggingArea.qmlrenamed+6−2
This diff is too big to show here.
qml/Components/EdgeBarrier.qmlnew file+114
This diff is too big to show here.
qml/Components/EdgeBarrierController.qmlnew file+74
This diff is too big to show here.
Components/EdgeDragEvaluator.qml → qml/Components/EdgeDragEvaluator.qmlrenamed+20−11
This diff is too big to show here.
qml/Components/FadingLabel.qmlnew file+42
This diff is too big to show here.
qml/Components/Flickable.qmlnew file+24
This diff is too big to show here.
qml/Components/FloatingFlickable.qmlnew file+63
This diff is too big to show here.
Components/ListItems/VerticalThinDivider.qml → qml/Components/GridView.qmlrenamed+8−10
This diff is too big to show here.
qml/Components/Handle.qmlnew file+44
This diff is too big to show here.
qml/Components/InputMethod.qmlnew file+58
This diff is too big to show here.
qml/Components/ItemGrabber.qmlnew file+86
This diff is too big to show here.
Components/VolumeControl.qml → qml/Components/ItemSnapshot.qmlrenamed+19−17
This diff is too big to show here.
qml/Components/KeyboardShortcutsOverlay.qmlnew file+336
This diff is too big to show here.
qml/Components/KeymapSwitcher.qmlnew file+102
This diff is too big to show here.
Components/LazyImage.qml → qml/Components/LazyImage.qmlrenamed+32−15
This diff is too big to show here.
qml/Components/ListView.qmlnew file+24
This diff is too big to show here.
qml/Components/ListViewOSKScroller.qmlnew file+53
This diff is too big to show here.
qml/Components/Lockscreen.qmlnew file+256
This diff is too big to show here.
qml/Components/MediaServices/MediaServices.qmlnew file+386
This diff is too big to show here.
qml/Components/MediaServices/MediaServicesControls.qmlnew file+192
This diff is too big to show here.
qml/Components/MediaServices/MediaServicesHeader.qmlnew file+71
This diff is too big to show here.
qml/Components/MediaServices/VideoPlayer.qmlnew file+155
This diff is too big to show here.
qml/Components/MediaServices/VideoPlayerControls.qmlnew file+158
This diff is too big to show here.
qml/Components/ModeSwitchWarningDialog.qmlnew file+101
This diff is too big to show here.
qml/Components/NotificationAudio.qmlnew file+60
This diff is too big to show here.
qml/Components/Orientations.qmlnew file+57
This diff is too big to show here.
qml/Components/PanelState/PanelState.qmlnew file+36
This diff is too big to show here.
qml/Components/PanelState/qmldirnew file+1
This diff is too big to show here.
qml/Components/PassphraseLockscreen.qmlnew file+150
This diff is too big to show here.
qml/Components/PhysicalKeysMapper.qmlnew file+163
This diff is too big to show here.
qml/Components/PinLockscreen.qmlnew file+258
This diff is too big to show here.
qml/Components/PinPadButton.qmlnew file+78
This diff is too big to show here.
qml/Components/Rating.qmlnew file+49
This diff is too big to show here.
qml/Components/RatingStyle.qmlnew file+50
This diff is too big to show here.
qml/Components/ScrollCalculator.qmlnew file+100
This diff is too big to show here.
Components/SearchHistoryModel.qml → qml/Components/SearchHistoryModel/SearchHistoryModel.qmlrenamed+2−1
This diff is too big to show here.
qml/Components/SearchHistoryModel/qmldirnew file+1
This diff is too big to show here.
qml/Components/SharingPicker.qmlnew file+102
This diff is too big to show here.
qml/Components/ShellDialog.qmlnew file+68
This diff is too big to show here.
Components/Showable.qml → qml/Components/Showable.qmlrenamed+37−11
This diff is too big to show here.
Components/StandardAnimation.qml → qml/Components/StandardAnimation.qmlrenamed+1−1
This diff is too big to show here.
qml/Components/VirtualTouchPad.qmlnew file+406
This diff is too big to show here.
qml/Components/VolumeControl.qmlnew file+63
This diff is too big to show here.
qml/Components/Wallpaper.qmlnew file+96
This diff is too big to show here.
qml/Components/WallpaperResolver.qmlnew file+60
This diff is too big to show here.
qml/Components/WindowControlButtons.qmlnew file+121
This diff is too big to show here.
Components/WrongPasswordAnimation.qml → qml/Components/WrongPasswordAnimation.qmlrenamed+1−1
This diff is too big to show here.
qml/Components/ZoomableImage.qmlnew file+157
This diff is too big to show here.
Components/carousel.js → qml/Components/carousel.jsrenamed
The content is the same.
tests/mocks/Unity/Notifications/notification.js → qml/Components/flickableUtils.jsrenamed+11−6
This diff is too big to show here.
qml/Components/graphics/close@20.pngnew file
Binary file not shown.
qml/Components/graphics/icon_star_empty@20.pngnew file
Binary file not shown.
qml/Components/graphics/icon_star_full@20.pngnew file
Binary file not shown.
qml/Components/graphics/icon_star_half@20.pngnew file
Binary file not shown.
qml/Components/graphics/icon_star_off@20.pngnew file
Binary file not shown.
qml/Components/graphics/icon_star_on@20.pngnew file
Binary file not shown.
qml/Components/graphics/non-selected@18.pngnew file
Binary file not shown.
Components/graphics/non-selected@18.sci → qml/Components/graphics/non-selected@18.scirenamed
The content is the same.
qml/Components/graphics/window-close.svgnew file+164
This diff is too big to show here.
qml/Components/graphics/window-maximize.svgnew file+164
This diff is too big to show here.
qml/Components/graphics/window-minimize.svgnew file+164
This diff is too big to show here.
qml/Components/graphics/window-window.svgnew file+41
This diff is too big to show here.
qml/DeviceConfiguration.qmlnew file+161
This diff is too big to show here.
qml/DisabledScreenNotice.qmlnew file+81
This diff is too big to show here.
qml/Greeter/ButtonPrompt.qmlnew file+51
This diff is too big to show here.
qml/Greeter/Circle.qmlnew file+57
This diff is too big to show here.
Greeter/Clock.qml → qml/Greeter/Clock.qmlrenamed+25−19
This diff is too big to show here.
qml/Greeter/CoverPage.qmlnew file+271
This diff is too big to show here.
qml/Greeter/DelayedLockscreen.qmlnew file+86
This diff is too big to show here.
Greeter/Dot.qml → qml/Greeter/Dot.qmlrenamed+1−1
This diff is too big to show here.
qml/Greeter/FullLightDMImpl.qmlnew file+31
This diff is too big to show here.
Greeter/Gradient.js → qml/Greeter/Gradient.jsrenamed
The content is the same.
qml/Greeter/Greeter.qmlnew file+632
This diff is too big to show here.
qml/Greeter/GreeterPrompt.qmlnew file+127
This diff is too big to show here.
qml/Greeter/GreeterView.qmlnew file+534
This diff is too big to show here.
Greeter/Infographics.qml → qml/Greeter/Infographics.qmlrenamed+108−134
This diff is too big to show here.
Dash/Video/VideoCarousel.qml → qml/Greeter/IntegratedLightDMImpl.qmlrenamed+12−16
This diff is too big to show here.
qml/Greeter/LightDMService.qmlnew file+54
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page3.qml → qml/Greeter/LoginAreaContainer.qmlrenamed+18−16
This diff is too big to show here.
qml/Greeter/LoginList.qmlnew file+292
This diff is too big to show here.
Greeter/ObjectPositioner.qml → qml/Greeter/ObjectPositioner.qmlrenamed+2−2
This diff is too big to show here.
qml/Greeter/PinPrompt.qmlnew file+184
This diff is too big to show here.
qml/Greeter/PromptList.qmlnew file+151
This diff is too big to show here.
qml/Greeter/SessionIcon.qmlnew file+47
This diff is too big to show here.
qml/Greeter/SessionsList.qmlnew file+205
This diff is too big to show here.
qml/Greeter/ShimGreeter.qmlnew file+47
This diff is too big to show here.
qml/Greeter/TextPrompt.qmlnew file+198
This diff is too big to show here.
qml/Greeter/graphics/dot_empty.pngnew file
Binary file not shown.
qml/Greeter/graphics/dot_filled.pngnew file
Binary file not shown.
qml/Greeter/graphics/dot_pointer.pngnew file
Binary file not shown.
qml/Greeter/graphics/icon_arrow.pngnew file
Binary file not shown.
qml/Greeter/graphics/session_icons/gnome_badge.pngnew file
Binary file not shown.
qml/Greeter/graphics/session_icons/kde_badge.pngnew file
Binary file not shown.
qml/Greeter/graphics/session_icons/recovery_console_badge.pngnew file
Binary file not shown.
qml/Greeter/graphics/session_icons/ubuntu_badge.pngnew file
Binary file not shown.
qml/Greeter/graphics/session_icons/unknown_badge.pngnew file
Binary file not shown.
qml/Greeter/qmldirnew file+1
This diff is too big to show here.
qml/Launcher/BackgroundBlur.qmlnew file+81
This diff is too big to show here.
qml/Launcher/Drawer.qmlnew file+413
This diff is too big to show here.
qml/Launcher/DrawerGridView.qmlnew file+85
This diff is too big to show here.
Launcher/FoldingLauncherDelegate.qml → qml/Launcher/FoldingLauncherDelegate.qmlrenamed+2−2
This diff is too big to show here.
qml/Launcher/Launcher.qmlnew file+661
This diff is too big to show here.
Launcher/LauncherDelegate.qml → qml/Launcher/LauncherDelegate.qmlrenamed+167−55
This diff is too big to show here.
qml/Launcher/LauncherPanel.qmlnew file+961
This diff is too big to show here.
qml/Launcher/PullToRefreshScopeStyle.qmlnew file+83
This diff is too big to show here.
qml/Launcher/Tooltip.qmlnew file+72
This diff is too big to show here.
qml/Launcher/graphics/divider-line.pngnew file
Binary file not shown.
qml/Launcher/graphics/focused_app_arrow@30.pngnew file
Binary file not shown.
qml/Launcher/graphics/home.svgnew file+243
This diff is too big to show here.
qml/Launcher/graphics/quicklist_tooltip@30.pngnew file
Binary file not shown.
qml/Notifications/Notification.qmlnew file+600
This diff is too big to show here.
qml/Notifications/NotificationButton.qmlnew file+73
This diff is too big to show here.
qml/Notifications/NotificationMenuItemFactory.qmlnew file+230
This diff is too big to show here.
qml/Notifications/Notifications.qmlnew file+115
This diff is too big to show here.
qml/Notifications/OptionToggle.qmlnew file+125
This diff is too big to show here.
Notifications/ShapedIcon.qml → qml/Notifications/ShapedIcon.qmlrenamed+8−5
This diff is too big to show here.
qml/Notifications/SwipeToAct.qmlnew file+275
This diff is too big to show here.
qml/OrientedShell.qmlnew file+336
This diff is too big to show here.
qml/Panel/ActiveCallHint.qmlnew file+211
This diff is too big to show here.
tests/mocks/LightDM/single/InfographicModelPrivate.cpp → qml/Panel/FakePanelMenu.qmlrenamed+8−10
This diff is too big to show here.
plugins/Unity/Indicators/qml/IndicatorBase.qml → qml/Panel/Indicators/IndicatorBase.qmlrenamed+10−13
This diff is too big to show here.
tests/mocks/Unity/Indicators/IndicatorWidget.qml → qml/Panel/Indicators/IndicatorDelegate.qmlrenamed+3−6
This diff is too big to show here.
qml/Panel/Indicators/IndicatorItem.qmlnew file+310
This diff is too big to show here.
qml/Panel/Indicators/IndicatorMenuItemFactory.qmlnew file+1113
This diff is too big to show here.
qml/Panel/Indicators/IndicatorsLight.qmlnew file+234
This diff is too big to show here.
qml/Panel/Indicators/MessageMenuItemFactory.qmlnew file+244
This diff is too big to show here.
qml/Panel/Indicators/client/IndicatorRepresentation.qmlnew file+121
This diff is too big to show here.
Panel/Indicators/client/IndicatorsClient.qml → qml/Panel/Indicators/client/IndicatorsClient.qmlrenamed+15−6
This diff is too big to show here.
Panel/Indicators/client/IndicatorsList.qml → qml/Panel/Indicators/client/IndicatorsList.qmlrenamed+23−19
This diff is too big to show here.
plugins/Unity/Indicators/qml/IndicatorWidget.qml → qml/Panel/Indicators/client/IndicatorsTree.qmlrenamed+18−5
This diff is too big to show here.
qml/Panel/MenuContent.qmlnew file+83
This diff is too big to show here.
qml/Panel/Panel.qmlnew file+522
This diff is too big to show here.
qml/Panel/PanelBar.qmlnew file+330
This diff is too big to show here.
qml/Panel/PanelItemRow.qmlnew file+270
This diff is too big to show here.
qml/Panel/PanelMenu.qmlnew file+414
This diff is too big to show here.
qml/Panel/PanelMenuPage.qmlnew file+226
This diff is too big to show here.
qml/Panel/PanelVelocityCalculator.qmlnew file+54
This diff is too big to show here.
qml/Panel/graphics/rectangular_dropshadow@30.pngnew file
Binary file not shown.
Panel/graphics/rectangular_dropshadow@30.sci → qml/Panel/graphics/rectangular_dropshadow@30.scirenamed
The content is the same.
qml/Rotation/HalfLoopRotationAnimation.qmlnew file+47
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page2.qml → qml/Rotation/ImmediateRotationAction.qmlrenamed+14−16
This diff is too big to show here.
qml/Rotation/NinetyRotationAnimation.qmlnew file+88
This diff is too big to show here.
qml/Rotation/RotationStates.qmlnew file+289
This diff is too big to show here.
qml/Rotation/UpdateShellTransformations.qmlnew file+42
This diff is too big to show here.
qml/Shell.qmlnew file+951
This diff is too big to show here.
qml/Stage/ApplicationWindow.qmlnew file+416
This diff is too big to show here.
qml/Stage/ChildWindow.qmlnew file+203
This diff is too big to show here.
qml/Stage/ChildWindowRepeater.qmlnew file+39
This diff is too big to show here.
qml/Stage/ChildWindowTree.qmlnew file+138
This diff is too big to show here.
qml/Stage/DecoratedWindow.qmlnew file+319
This diff is too big to show here.
qml/Stage/FakeMaximizeDelegate.qmlnew file+233
This diff is too big to show here.
qml/Stage/MainViewStyle.qmlnew file+87
This diff is too big to show here.
qml/Stage/MoveHandler.qmlnew file+201
This diff is too big to show here.
qml/Stage/OrientationChangeAnimation.qmlnew file+265
This diff is too big to show here.
qml/Stage/PromptSurfaceAnimations.qmlnew file+80
This diff is too big to show here.
Dash/Music/CarouselDelegateMusic.qml → qml/Stage/ResizeGrip.qmlrenamed+25−21
This diff is too big to show here.
qml/Stage/SideStage.qmlnew file+121
This diff is too big to show here.
qml/Stage/Splash.qmlnew file+150
This diff is too big to show here.
qml/Stage/Spread/BezierCurve.qmlnew file+45
This diff is too big to show here.
qml/Stage/Spread/KeySpline.jsnew file+66
This diff is too big to show here.
qml/Stage/Spread/MathUtils.jsnew file+95
This diff is too big to show here.
qml/Stage/Spread/OpacityMask.qmlnew file+82
This diff is too big to show here.
qml/Stage/Spread/Spread.qmlnew file+173
This diff is too big to show here.
qml/Stage/Spread/SpreadDelegateInputArea.qmlnew file+189
This diff is too big to show here.
qml/Stage/Spread/SpreadMaths.qmlnew file+78
This diff is too big to show here.
qml/Stage/Spread/StagedRightEdgeMaths.qmlnew file+174
This diff is too big to show here.
qml/Stage/Spread/WindowedRightEdgeMaths.qmlnew file+96
This diff is too big to show here.
qml/Stage/Spread/cubic-bezier.jsnew file+39
This diff is too big to show here.
qml/Stage/Stage.qmlnew file+2241
This diff is too big to show here.
qml/Stage/StageMaths.qmlnew file+93
This diff is too big to show here.
qml/Stage/StagedFullscreenPolicy.qmlnew file+50
This diff is too big to show here.
qml/Stage/SurfaceContainer.qmlnew file+108
This diff is too big to show here.
qml/Stage/TabletSideStageTouchGesture.qmlnew file+157
This diff is too big to show here.
qml/Stage/WindowControlsOverlay.qmlnew file+254
This diff is too big to show here.
qml/Stage/WindowDecoration.qmlnew file+163
This diff is too big to show here.
qml/Stage/WindowInfoItem.qmlnew file+69
This diff is too big to show here.
qml/Stage/WindowResizeArea.qmlnew file+300
This diff is too big to show here.
qml/Stage/WindowStateSaver.qmlnew file+64
This diff is too big to show here.
Dash/ScopeDelegateMapper.qml → qml/Stage/WindowedFullscreenPolicy.qmlrenamed+11−12
This diff is too big to show here.
qml/Stage/graphics/PageHeaderBaseDividerBottom@18.pngnew file
Binary file not shown.
qml/Stage/graphics/PageHeaderBaseDividerLight@18.pngnew file
Binary file not shown.
qml/Stage/graphics/PageHeaderBaseDividerLight@18.scinew file+5
This diff is too big to show here.
qml/Stage/graphics/arrows-centre.pngnew file
Binary file not shown.
qml/Stage/graphics/arrows.pngnew file
Binary file not shown.
qml/Stage/graphics/sidestage_drag.svgnew file+207
This diff is too big to show here.
qml/Stage/graphics/sidestage_handle@20.pngnew file
Binary file not shown.
SideStage/graphics/sidestage_handle@20.sci → qml/Stage/graphics/sidestage_handle@20.scirenamed
The content is the same.
qml/Stage/graphics/sidestage_open.svgnew file+181
This diff is too big to show here.
qml/Stage/graphics/window-close.svgnew file+64
This diff is too big to show here.
qml/Tutorial/InactivityTimer.qmlnew file+78
This diff is too big to show here.
qml/Tutorial/Tutorial.qmlnew file+105
This diff is too big to show here.
qml/Tutorial/TutorialContent.qmlnew file+225
This diff is too big to show here.
qml/Tutorial/TutorialLeft.qmlnew file+54
This diff is too big to show here.
qml/Tutorial/TutorialLeftLong.qmlnew file+56
This diff is too big to show here.
qml/Tutorial/TutorialPage.qmlnew file+121
This diff is too big to show here.
qml/Tutorial/TutorialRight.qmlnew file+61
This diff is too big to show here.
qml/Tutorial/TutorialTop.qmlnew file+60
This diff is too big to show here.
qml/Tutorial/graphics/arrow.svgnew file+19
This diff is too big to show here.
qml/Tutorial/graphics/background1.pngnew file
Binary file not shown.
qml/Tutorial/graphics/background2.pngnew file
Binary file not shown.
qml/Wizard/CheckableSetting.qmlnew file+92
This diff is too big to show here.
qml/Wizard/Components/InputMethod.qmlnew file+113
This diff is too big to show here.
qml/Wizard/Page.qmlnew file+340
This diff is too big to show here.
qml/Wizard/Pages.qmlnew file+269
This diff is too big to show here.
qml/Wizard/Pages/10-welcome-update.qmlnew file+137
This diff is too big to show here.
qml/Wizard/Pages/10-welcome.qmlnew file+197
This diff is too big to show here.
qml/Wizard/Pages/11-changelog.qmlnew file+95
This diff is too big to show here.
qml/Wizard/Pages/20-keyboard.qmlnew file+161
This diff is too big to show here.
qml/Wizard/Pages/30-wifi.qmlnew file+219
This diff is too big to show here.
qml/Wizard/Pages/50-timezone.qmlnew file+278
This diff is too big to show here.
qml/Wizard/Pages/60-account.qmlnew file+76
This diff is too big to show here.
qml/Wizard/Pages/70-passwd-type.qmlnew file+168
This diff is too big to show here.
qml/Wizard/Pages/78-firmware-update.qml.disablednew file+246
This diff is too big to show here.
qml/Wizard/Pages/79-system-update.qmlnew file+148
This diff is too big to show here.
qml/Wizard/Pages/80-finished.qmlnew file+137
This diff is too big to show here.
qml/Wizard/Pages/data/Desktop_header_bkg.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/Desktop_splash_screen_bkg.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/Phone_header_bkg.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/Phone_splash_screen_bkg.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/Tick@30.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/map.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/pin.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-1.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-10.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-11.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-2.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-3.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-3.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-4.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-4.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-6.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-7.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-8.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-9.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_-9.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_0.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_1.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_10.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_10.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_11.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_12.75.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_12.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_13.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_2.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_3.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_3.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_4.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_4.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_5.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_5.75.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_6.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_6.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_7.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_8.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_8.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_9.5.pngnew file
Binary file not shown.
qml/Wizard/Pages/data/timezonemap/timezone_9.pngnew file
Binary file not shown.
qml/Wizard/Pages/passcode-confirm.qmlnew file+69
This diff is too big to show here.
qml/Wizard/Pages/passcode-desktop.qmlnew file+159
This diff is too big to show here.
qml/Wizard/Pages/passcode-set.qmlnew file+78
This diff is too big to show here.
qml/Wizard/Pages/password-set.qmlnew file+158
This diff is too big to show here.
qml/Wizard/Pages/sim.qmlnew file+108
This diff is too big to show here.
qml/Wizard/PasswordMeter.qmlnew file+108
This diff is too big to show here.
Components/Tile.qml → qml/Wizard/StackButton.qmlrenamed+19−16
This diff is too big to show here.
qml/Wizard/Wizard.qmlnew file+58
This diff is too big to show here.
qml/Wizard/WizardItemSelector.qmlnew file+129
This diff is too big to show here.
qml/Wizard/WizardTextField.qmlnew file+25
This diff is too big to show here.
qml/graphics/dropshadow2gu@30.pngnew file
Binary file not shown.
qml/graphics/dropshadow2gu@30.scinew file+5
This diff is too big to show here.
qml/graphics/dropshadow_left@20.pngnew file
Binary file not shown.
qml/graphics/dropshadow_right@20.pngnew file
Binary file not shown.
rundeleted−75
This diff is too big to show here.
run_on_devicedeleted−165
This diff is too big to show here.
runtests.sh+5−14
This diff is too big to show here.
src/ApplicationArguments.cppnew file+22
This diff is too big to show here.
src/ApplicationArguments.hnew file+58
This diff is too big to show here.
src/CMakeLists.txt+64−1
This diff is too big to show here.
src/CachingNetworkManagerFactory.cppnew file+54
This diff is too big to show here.
src/CachingNetworkManagerFactory.hnew file+47
This diff is too big to show here.
src/DebuggingController.cppnew file+92
This diff is too big to show here.
src/DebuggingController.hnew file+57
This diff is too big to show here.
src/MouseTouchAdaptor.cppnew file+419
This diff is too big to show here.
MouseTouchAdaptor.h → src/MouseTouchAdaptor.hrenamed+31−8
This diff is too big to show here.
src/Panel/CMakeLists.txtdeleted−1
This diff is too big to show here.
src/Panel/Indicators/CMakeLists.txtdeleted−1
This diff is too big to show here.
src/SecondaryWindow.cppnew file+40
This diff is too big to show here.
Components/ListItems/ThinDivider.qml → src/SecondaryWindow.hrenamed+13−10
This diff is too big to show here.
src/ShellApplication.cppnew file+231
This diff is too big to show here.
src/ShellApplication.hnew file+61
This diff is too big to show here.
src/ShellView.cppnew file+85
This diff is too big to show here.
src/ShellView.hnew file+34
This diff is too big to show here.
src/UnityCommandLineParser.cppnew file+130
This diff is too big to show here.
src/UnityCommandLineParser.hnew file+60
This diff is too big to show here.
src/UnixSignalHandler.cppnew file+139
This diff is too big to show here.
src/UnixSignalHandler.hnew file+54
This diff is too big to show here.
src/libunity8-private/CMakeLists.txtnew file+27
This diff is too big to show here.
src/libunity8-private/abstractdbusservicemonitor.cppnew file+100
This diff is too big to show here.
src/libunity8-private/abstractdbusservicemonitor.hnew file+70
This diff is too big to show here.
src/libunity8-private/unitydbusobject.cppnew file+86
This diff is too big to show here.
src/libunity8-private/unitydbusobject.hnew file+46
This diff is too big to show here.
src/libunity8-private/unitydbusvirtualobject.cppnew file+83
This diff is too big to show here.
src/libunity8-private/unitydbusvirtualobject.hnew file+47
This diff is too big to show here.
src/main.cppnew file+67
This diff is too big to show here.
Hud/ToolBar.qml → src/qmldebuggerutils.hrenamed+14−14
This diff is too big to show here.
tests/CMakeLists.txt+148−9
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+26−15
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+89−85
This diff is too big to show here.
tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.pynew file+51
This diff is too big to show here.
tests/autopilot/unity8/fixture_setup.pynew file+329
This diff is too big to show here.
tests/autopilot/unity8/greeter/__init__.pynew file+97
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/__init__.py → tests/autopilot/unity8/greeter/tests/__init__.pyrenamed+8−5
This diff is too big to show here.
tests/autopilot/unity8/greeter/tests/test_args.pynew file+49
This diff is too big to show here.
tests/autopilot/unity8/indicators/__init__.pynew file+203
This diff is too big to show here.
tests/autopilot/unity8/indicators/tests/__init__.pynew file+42
This diff is too big to show here.
tests/autopilot/unity8/indicators/tests/test_action_latency.pynew file+237
This diff is too big to show here.
tests/autopilot/unity8/indicators/tests/test_display_indicator.pynew file+52
This diff is too big to show here.
tests/autopilot/unity8/indicators/tests/test_indicators.pynew file+88
This diff is too big to show here.
tests/autopilot/unity8/launcher.pynew file+66
This diff is too big to show here.
tests/autopilot/unity8/process_helpers.py+108−76
This diff is too big to show here.
tests/autopilot/unity8/sensors.pynew file+93
This diff is too big to show here.
tests/autopilot/unity8/shell/__init__.py+230−27
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/create_interactive_notification.py → tests/autopilot/unity8/shell/create_interactive_notification.pyrenamed+3−4
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/launcher.py → tests/autopilot/unity8/shell/emulators.pyrenamed+27−15
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/dash.pydeleted−51
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/greeter.pydeleted−43
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/hud.pydeleted−87
This diff is too big to show here.
tests/autopilot/unity8/shell/emulators/main_window.pydeleted−95
This diff is too big to show here.
tests/autopilot/unity8/shell/fixture_setup.pynew file+65
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/__init__.py+183−202
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_greeter.pydeleted−38
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_helpers.pynew file+44
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_hud.pydeleted−191
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_lock_screen.py+55−88
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_notifications.py+193−208
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_rotation.pynew file+113
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_system_integration.pynew file+48
This diff is too big to show here.
tests/autopilot/unity8/shell/tests/test_upstart.py+58−20
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+35−4
This diff is too big to show here.
tests/data/unity/backgrounds/20x30.pngnew file
Binary file not shown.
tests/data/unity/backgrounds/black.pngnew file
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.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/calendar@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/camera@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/contacts-app@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/dash@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/dialer-app@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/evernote@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/facebook@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/gallery@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/gmail@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/libreoffice@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/map@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/messages-app@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/notepad@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/pinterest@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/soundcloud@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/system-settings@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/twitter@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/weather@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/wikipedia@18.pngnew file
Binary file not shown.
tests/graphics/applicationIcons/youtube@18.pngnew file
Binary file not shown.
tests/graphics/avatars/amanda@12.pngnew file
Binary file not shown.
tests/graphics/avatars/anna_olsson@12.pngnew file
Binary file not shown.
tests/graphics/avatars/funky@12.pngnew file
Binary file not shown.
tests/graphics/clock@18.pngnew file
Binary file not shown.
Dash/graphics/phone/screenshots/gallery@12.png → tests/graphics/screenshots/gallery@12.pngrenamed
Binary file not shown.
tests/imports/CMakeLists.txtnew file+5
This diff is too big to show here.
tests/imports/check_imports.pynew file+183
This diff is too big to show here.
tests/mocks/AccountsService/AccountsService.cpp+156−10
This diff is too big to show here.
tests/mocks/AccountsService/AccountsService.h+86−8
This diff is too big to show here.
tests/mocks/AccountsService/CMakeLists.txt+15−12
This diff is too big to show here.
tests/mocks/AccountsService/plugin.cpp+1
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.txtnew file+14
This diff is too big to show here.
tests/mocks/Biometryd/MockBiometryd.cppnew file+43
This diff is too big to show here.
tests/mocks/Biometryd/MockBiometryd.hnew file+50
This diff is too big to show here.
tests/mocks/Biometryd/MockDevice.cppnew file+29
This diff is too big to show here.
tests/mocks/Biometryd/MockDevice.hnew file+40
This diff is too big to show here.
tests/mocks/Biometryd/MockIdentifier.cppnew file+28
This diff is too big to show here.
tests/mocks/Biometryd/MockIdentifier.hnew file+36
This diff is too big to show here.
tests/mocks/Biometryd/MockObserver.cppnew file+22
This diff is too big to show here.
tests/mocks/Unity/iconutils.h → tests/mocks/Biometryd/MockObserver.hrenamed+17−9
This diff is too big to show here.
tests/mocks/Biometryd/MockOperation.cppnew file+56
This diff is too big to show here.
tests/mocks/Biometryd/MockOperation.hnew file+47
This diff is too big to show here.
tests/mocks/Biometryd/plugin.cppnew file+41
This diff is too big to show here.
tests/mocks/Biometryd/plugin.hnew file+31
This diff is too big to show here.
tests/mocks/Biometryd/qmldirnew file+3
This diff is too big to show here.
tests/mocks/CMakeLists.txt+40−2
This diff is too big to show here.
tests/mocks/Cursor/CMakeLists.txtnew file+1
This diff is too big to show here.
tests/mocks/Cursor/Cursor.qmlnew file+34
This diff is too big to show here.
tests/mocks/Cursor/qmldirnew file+2
This diff is too big to show here.
tests/mocks/GSettings.1.0/CMakeLists.txt+2−6
This diff is too big to show here.
tests/mocks/GSettings.1.0/fake_gsettings.cpp+335−20
This diff is too big to show here.
tests/mocks/GSettings.1.0/fake_gsettings.h+103−13
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.txtdeleted−41
This diff is too big to show here.
tests/mocks/HudClient/fake_hud_plugin.cppdeleted−39
This diff is too big to show here.
tests/mocks/HudClient/fake_libhud_client.cppdeleted−240
This diff is too big to show here.
tests/mocks/HudClient/libhud_client_stub.cppdeleted−93
This diff is too big to show here.
tests/mocks/HudClient/libhud_client_stub.hdeleted−64
This diff is too big to show here.
tests/mocks/HudClient/qmldirdeleted−1
This diff is too big to show here.
tests/mocks/LightDM/CMakeLists.txtdeleted−56
This diff is too big to show here.
tests/mocks/LightDM/QLightDM/Greeterdeleted−1
This diff is too big to show here.
tests/mocks/LightDM/QLightDM/InfographicModeldeleted−1
This diff is too big to show here.
tests/mocks/LightDM/QLightDM/UsersModeldeleted−1
This diff is too big to show here.
tests/mocks/LightDM/demo/InfographicModelPrivate.cppdeleted−91
This diff is too big to show here.
tests/mocks/LightDM/full/CMakeLists.txtdeleted−18
This diff is too big to show here.
tests/mocks/LightDM/full/InfographicModelPrivate.cppdeleted−182
This diff is too big to show here.
tests/mocks/LightDM/full/UsersModelPrivate.cppdeleted−52
This diff is too big to show here.
tests/mocks/LightDM/single-passphrase/CMakeLists.txtdeleted−19
This diff is too big to show here.
tests/mocks/LightDM/single-passphrase/GreeterPrivate.cppdeleted−53
This diff is too big to show here.
tests/mocks/LightDM/single-passphrase/InfographicModelPrivate.cppdeleted−61
This diff is too big to show here.
tests/mocks/LightDM/single-pin/CMakeLists.txtdeleted−19
This diff is too big to show here.
tests/mocks/LightDM/single-pin/GreeterPrivate.cppdeleted−53
This diff is too big to show here.
tests/mocks/LightDM/single-pin/InfographicModelPrivate.cppdeleted−61
This diff is too big to show here.
tests/mocks/LightDM/single/CMakeLists.txtdeleted−18
This diff is too big to show here.
tests/mocks/LightDMController/CMakeLists.txtnew file+14
This diff is too big to show here.
tests/mocks/LightDMController/plugin.cppnew file+35
This diff is too big to show here.
tests/mocks/HudClient/fake_hud_plugin.h → tests/mocks/LightDMController/plugin.hrenamed+6−8
This diff is too big to show here.
tests/mocks/LightDMController/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Lights/CMakeLists.txtnew file+8
This diff is too big to show here.
tests/mocks/Lights/Lights.cppnew file+84
This diff is too big to show here.
tests/mocks/Lights/Lights.hnew file+66
This diff is too big to show here.
plugins/HudClient/plugin.cpp → tests/mocks/Lights/plugin.cpprenamed+12−15
This diff is too big to show here.
tests/mocks/Lights/plugin.hnew file+32
This diff is too big to show here.
tests/mocks/Lights/qmldirnew file+3
This diff is too big to show here.
tests/mocks/MeeGo/CMakeLists.txtnew file+1
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/CMakeLists.txtnew file+11
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockOfonoSimManager.qmlnew file+53
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockQOfono.cppnew file+90
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockQOfono.hnew file+61
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockQOfonoManager.cppnew file+66
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/MockQOfonoManager.hnew file+49
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/plugin.cppnew file+35
This diff is too big to show here.
plugins/HudClient/plugin.h → tests/mocks/MeeGo/QOfono/plugin.hrenamed+7−7
This diff is too big to show here.
tests/mocks/MeeGo/QOfono/qmldirnew file+3
This diff is too big to show here.
tests/mocks/Powerd/CMakeLists.txt+2−13
This diff is too big to show here.
tests/mocks/Powerd/Powerd.cpp+15−1
This diff is too big to show here.
tests/mocks/Powerd/Powerd.h+17−8
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+5−14
This diff is too big to show here.
tests/mocks/QMenuModel/QDBusActionGroup.qml+30−5
This diff is too big to show here.
tests/mocks/QMenuModel/UnityMenuAction.qml+1−1
This diff is too big to show here.
tests/mocks/QMenuModel/actiondata.hnew file+54
This diff is too big to show here.
plugins/Unity/Indicators/Messaging/qml/TextMessage.qml → tests/mocks/QMenuModel/dbus-enums.hrenamed+27−19
This diff is too big to show here.
tests/mocks/QMenuModel/plugin.cpp+13
This diff is too big to show here.
tests/mocks/QMenuModel/plugin.h+1−1
This diff is too big to show here.
tests/mocks/QMenuModel/qmldir+1
This diff is too big to show here.
tests/mocks/QMenuModel/unitymenumodel.cpp+95−24
This diff is too big to show here.
tests/mocks/QMenuModel/unitymenumodel.h+28−9
This diff is too big to show here.
tests/mocks/QtMultimedia/CMakeLists.txt+10−14
This diff is too big to show here.
tests/mocks/QtMultimedia/VideoSurface.qmlnew file+111
This diff is too big to show here.
tests/mocks/QtMultimedia/audio.cppdeleted−107
This diff is too big to show here.
tests/mocks/QtMultimedia/audio.hdeleted−78
This diff is too big to show here.
tests/mocks/QtMultimedia/declarativeplaylist.cppnew file+73
This diff is too big to show here.
tests/mocks/QtMultimedia/declarativeplaylist.hnew file+54
This diff is too big to show here.
tests/mocks/QtMultimedia/mediaplayer.cppnew file+319
This diff is too big to show here.
tests/mocks/QtMultimedia/mediaplayer.hnew file+224
This diff is too big to show here.
tests/mocks/QtMultimedia/plugin.cpp+9−2
This diff is too big to show here.
tests/mocks/QtMultimedia/plugin.h+1−1
This diff is too big to show here.
tests/mocks/QtMultimedia/qmldir+1
This diff is too big to show here.
tests/mocks/QtMultimedia/videooutput.cppnew file+127
This diff is too big to show here.
tests/mocks/QtMultimedia/videooutput.hnew file+52
This diff is too big to show here.
tests/mocks/SessionBroadcast/CMakeLists.txtnew file+8
This diff is too big to show here.
tests/mocks/SessionBroadcast/SessionBroadcast.cppnew file+34
This diff is too big to show here.
tests/mocks/SessionBroadcast/SessionBroadcast.hnew file+39
This diff is too big to show here.
plugins/ListViewWithPageHeader/plugin.cpp → tests/mocks/SessionBroadcast/plugin.cpprenamed+10−8
This diff is too big to show here.
tests/mocks/SessionBroadcast/plugin.hnew file+32
This diff is too big to show here.
tests/mocks/SessionBroadcast/qmldirnew file+2
This diff is too big to show here.
tests/mocks/UInput/CMakeLists.txtnew file+7
This diff is too big to show here.
tests/mocks/UInput/mockuinput.cppnew file+73
This diff is too big to show here.
tests/mocks/UInput/mockuinput.hnew file+63
This diff is too big to show here.
tests/mocks/UInput/plugin.cppnew file+26
This diff is too big to show here.
tests/mocks/UInput/plugin.hnew file+32
This diff is too big to show here.
tests/mocks/UInput/qmldirnew file+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.txtnew file+10
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/networking-status.cppnew file+70
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/networking-status.hnew file+74
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/plugin.cppnew file+47
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/plugin.hnew file+35
This diff is too big to show here.
tests/mocks/Ubuntu/Connectivity/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Ubuntu/DownloadDaemonListener/CMakeLists.txt+2−10
This diff is too big to show here.
tests/mocks/Ubuntu/DownloadDaemonListener/MockDownloadTracker.cpp+3−1
This diff is too big to show here.
tests/mocks/Ubuntu/DownloadDaemonListener/MockDownloadTracker.h+2−1
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.txtnew file+5
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/Diagnostics/CMakeLists.txtnew file+1
This diff is too big to show here.
Dash/DashPreviewPlaceholder.qml → tests/mocks/Ubuntu/SystemSettings/Diagnostics/MockDiagnostics.qmlrenamed+6−7
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/Diagnostics/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/CMakeLists.txtnew file+1
This diff is too big to show here.
tests/mocks/Unity/Application/InputFilterArea.qml → tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockKeyboardPlugin.qmlrenamed+3−3
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qmlnew file+24
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/qmldirnew file+3
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/CMakeLists.txtnew file+10
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.cppnew file+35
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.hnew file+50
This diff is too big to show here.
tests/mocks/LightDM/single/UsersModelPrivate.cpp → tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/plugin.cpprenamed+7−14
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/plugin.hnew file+31
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/TimeDate/CMakeLists.txtnew file+1
This diff is too big to show here.
Dash/DashHome.qml → tests/mocks/Ubuntu/SystemSettings/TimeDate/MockTimeDate.qmlrenamed+14−16
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/TimeDate/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/Update/CMakeLists.txtnew file+1
This diff is too big to show here.
Dash/ScopeListView.qml → tests/mocks/Ubuntu/SystemSettings/Update/MockSystemImage.qmlrenamed+11−9
This diff is too big to show here.
tests/mocks/Ubuntu/SystemSettings/Update/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/CMakeLists.txtnew file+14
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/ContactWatcherData.cppnew file+43
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/ContactWatcherData.hnew file+46
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockCallEntry.cppnew file+91
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockCallEntry.hnew file+65
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockCallManager.cppnew file+80
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockCallManager.hnew file+60
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockContactWatcher.cppnew file+50
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockContactWatcher.hnew file+49
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockTelepathyHelper.cppnew file+62
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/MockTelepathyHelper.hnew file+58
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/plugin.cppnew file+52
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/plugin.hnew file+37
This diff is too big to show here.
tests/mocks/Ubuntu/Telephony/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Ubuntu/Thumbnailer/CMakeLists.txtnew file+1
This diff is too big to show here.
tests/mocks/Ubuntu/Thumbnailer/qmldirnew file+4
This diff is too big to show here.
tests/mocks/Ubuntu/Web/CMakeLists.txtnew file+1
This diff is too big to show here.
Components/BaseCarouselDelegate.qml → tests/mocks/Ubuntu/Web/WebView.qmlrenamed+7−5
This diff is too big to show here.
tests/mocks/Ubuntu/Web/qmldirnew file+4
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationImage.cppdeleted−123
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationImage.hdeleted−79
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationInfo.cpp+362−47
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationInfo.h+123−63
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationManager.cpp+323−239
This diff is too big to show here.
tests/mocks/Unity/Application/ApplicationManager.h+55−66
This diff is too big to show here.
tests/mocks/Unity/Application/CMakeLists.txt+23−24
This diff is too big to show here.
tests/mocks/Unity/Application/MirMock.cppnew file+62
This diff is too big to show here.
tests/mocks/Unity/Application/MirMock.hnew file+43
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurface.cppnew file+559
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurface.hnew file+237
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurfaceItem.cppnew file+415
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurfaceItem.hnew file+138
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurfaceListModel.cppnew file+136
This diff is too big to show here.
tests/mocks/Unity/Application/MirSurfaceListModel.hnew file+54
This diff is too big to show here.
tests/mocks/Unity/Application/ObjectListModel.hnew file+108
This diff is too big to show here.
tests/mocks/Unity/Application/SurfaceManager.cppnew file+281
This diff is too big to show here.
tests/mocks/Unity/Application/SurfaceManager.hnew file+116
This diff is too big to show here.
tests/mocks/Unity/Application/VirtualKeyboard.cppnew file+58
This diff is too big to show here.
tests/mocks/Unity/Application/VirtualKeyboard.hnew file+37
This diff is too big to show here.
tests/mocks/Unity/Application/plugin.cpp+38−9
This diff is too big to show here.
tests/mocks/Unity/Application/plugin.h+2−1
This diff is too big to show here.
tests/mocks/Unity/Application/qmldir+1−2
This diff is too big to show here.
tests/mocks/Unity/Application/resources/Kate.qmlnew file+49
This diff is too big to show here.
tests/mocks/Unity/Application/resources/KateDialog.qmlnew file+48
This diff is too big to show here.
Dash/Video/CarouselDelegateVideo.qml → tests/mocks/Unity/Application/resources/KateMenu.qmlrenamed+20−21
This diff is too big to show here.
tests/mocks/Unity/Application/resources/MirSurfaceItem.qmlnew file+126
This diff is too big to show here.
tests/mocks/Unity/Application/resources/VirtualKeyboard.qmlnew file+41
This diff is too big to show here.
tests/mocks/Unity/Application/resources/screenshots/browser@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/camera@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/dialer@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/facebook@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/gallery@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/gmail-webapp.svgnew file+343
This diff is too big to show here.
tests/mocks/Unity/Application/resources/screenshots/libreoffice@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/map@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/music@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/twitter@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/ubuntu-weather-app.svgnew file+201
This diff is too big to show here.
tests/mocks/Unity/Application/resources/screenshots/unity8-dash@12.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/screenshots/vkb_portrait.pngnew file
Binary file not shown.
tests/mocks/Unity/Application/resources/surfaces.qrcnew file+23
This diff is too big to show here.
tests/mocks/Unity/Application/resources/vkb_portrait.pngnew file
Binary file not shown.
tests/mocks/Unity/ApplicationMenu/CMakeLists.txtnew file+18
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/mockapplicationmenuregistry.cppnew file+47
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/mockapplicationmenuregistry.hnew file+41
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/plugin.cppnew file+42
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/plugin.hnew file+32
This diff is too big to show here.
tests/mocks/Unity/ApplicationMenu/qmldirnew file+3
This diff is too big to show here.
tests/mocks/Unity/CMakeLists.txt+5−41
This diff is too big to show here.
tests/mocks/Unity/Connectivity/CMakeLists.txtnew file+10
This diff is too big to show here.
tests/mocks/Unity/Connectivity/MockConnectivity.cppnew file+27
This diff is too big to show here.
tests/mocks/Unity/Connectivity/MockConnectivity.hnew file+36
This diff is too big to show here.
tests/mocks/Unity/Connectivity/plugin.cppnew file+34
This diff is too big to show here.
tests/mocks/Unity/Connectivity/plugin.hnew file+31
This diff is too big to show here.
tests/mocks/Unity/Connectivity/qmldirnew file+3
This diff is too big to show here.
tests/mocks/Unity/Indicators/RootActionState.qml → tests/mocks/Unity/Indicators/ActionRootState.qmlrenamed+14−9
This diff is too big to show here.
tests/mocks/Unity/Indicators/CMakeLists.txt+13−24
This diff is too big to show here.
tests/mocks/Unity/Indicators/IndicatorsModel.qml+237−41
This diff is too big to show here.
tests/mocks/Unity/Indicators/ModelActionRootState.qmlnew file+81
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeindicatorsmodel.cppnew file+157
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeindicatorsmodel.hnew file+70
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.jsnew file+1328
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeplugin.cpp+24−3
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.cppnew file+59
This diff is too big to show here.
tests/mocks/Unity/Indicators/fakeunitymenumodelcache.hnew file+45
This diff is too big to show here.
tests/mocks/Unity/Indicators/indicators_fake.qrcdeleted−14
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/FakeMenuPage.qmldeleted−37
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page4.qmldeleted−36
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_page5.qmldeleted−36
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_widget4.qmldeleted−23
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_widget5.qmldeleted−23
This diff is too big to show here.
tests/mocks/Unity/Indicators/qmldir+3−5
This diff is too big to show here.
tests/mocks/Unity/InputInfo/CMakeLists.txtnew file+31
This diff is too big to show here.
tests/mocks/Unity/InputInfo/mockcontroller.cppnew file+35
This diff is too big to show here.
plugins/Unity/Indicators/qml/DivMenuItem.qml → tests/mocks/Unity/InputInfo/mockcontroller.hrenamed+18−10
This diff is too big to show here.
tests/mocks/Unity/InputInfo/plugin.cppnew file+46
This diff is too big to show here.
tests/mocks/Unity/InputInfo/plugin.hnew file+30
This diff is too big to show here.
tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cppnew file+56
This diff is too big to show here.
tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock_p.hnew file+58
This diff is too big to show here.
tests/mocks/Unity/InputInfo/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Unity/Launcher/CMakeLists.txt+7−10
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockAppDrawerModel.cppnew file+98
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockAppDrawerModel.hnew file+43
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockLauncherItem.cpp+79−1
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockLauncherItem.h+34−17
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+112−5
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockLauncherModel.h+22−11
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockQuickListModel.cpp+6−2
This diff is too big to show here.
tests/mocks/Unity/Launcher/MockQuickListModel.h+4−2
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+13−8
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockActionModel.cppnew file+74
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockActionModel.hnew file+53
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockNotification.cppnew file+198
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockNotification.hnew file+101
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockNotificationModel.cppnew file+169
This diff is too big to show here.
tests/mocks/Unity/Notifications/MockNotificationModel.hnew file+70
This diff is too big to show here.
plugins/Unity/Indicators/qml/BaseMenuItem.qml → tests/mocks/Unity/Notifications/plugin.cpprenamed+13−18
This diff is too big to show here.
tests/mocks/Unity/Notifications/plugin.hnew file+34
This diff is too big to show here.
tests/mocks/Unity/Notifications/qmldir+3−1
This diff is too big to show here.
tests/mocks/Unity/Platform/CMakeLists.txtnew file+1
This diff is too big to show here.
tests/qmltests/Dash/qml/fake_generic_scopeView.qml → tests/mocks/Unity/Platform/MockPlatform.qmlrenamed+7−6
This diff is too big to show here.
tests/mocks/Unity/Platform/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Unity/Screens/CMakeLists.txtnew file+14
This diff is too big to show here.
tests/mocks/Unity/Screens/plugin.cppnew file+29
This diff is too big to show here.
tests/mocks/Unity/Screens/plugin.hnew file+25
This diff is too big to show here.
tests/mocks/Unity/Screens/qmldirnew file+2
This diff is too big to show here.
tests/mocks/Unity/Screens/screens.cppnew file+71
This diff is too big to show here.
tests/mocks/Unity/Screens/screens.hnew file+82
This diff is too big to show here.
tests/mocks/Unity/categoryresults.cppdeleted−121
This diff is too big to show here.
tests/mocks/Unity/categoryresults.hdeleted−68
This diff is too big to show here.
tests/mocks/Unity/fake_applications_scope.cppdeleted−75
This diff is too big to show here.
tests/mocks/Unity/fake_categories.cppdeleted−259
This diff is too big to show here.
tests/mocks/Unity/fake_categories.hdeleted−75
This diff is too big to show here.
tests/mocks/Unity/fake_preview.cppdeleted−71
This diff is too big to show here.
tests/mocks/Unity/fake_preview.hdeleted−62
This diff is too big to show here.
tests/mocks/Unity/fake_scope.cppdeleted−254
This diff is too big to show here.
tests/mocks/Unity/fake_scope.hdeleted−125
This diff is too big to show here.
tests/mocks/Unity/fake_scopes.cppdeleted−149
This diff is too big to show here.
tests/mocks/Unity/fake_scopes.hdeleted−79
This diff is too big to show here.
tests/mocks/Unity/fake_unity_plugin.cppdeleted−47
This diff is too big to show here.
tests/mocks/Unity/iconutils.cppdeleted−124
This diff is too big to show here.
tests/mocks/Unity/qmldirdeleted−2
This diff is too big to show here.
tests/mocks/Utils/CMakeLists.txtnew file+61
This diff is too big to show here.
tests/mocks/Unity/Indicators/qml/fake_menu_widget2.qml → tests/mocks/Utils/EdgeBarrierSettings.qmlrenamed+5−8
This diff is too big to show here.
tests/mocks/Utils/Style.jsnew file+37
This diff is too big to show here.
Hud/ToolBarIcon.qml → tests/mocks/Utils/URLDispatcher.cpprenamed+18−12
This diff is too big to show here.
tests/mocks/Utils/URLDispatcher.hnew file+47
This diff is too big to show here.
SideStage/SidestageHandle.qml → tests/mocks/Utils/WindowInputMonitor.qmlrenamed+6−5
This diff is too big to show here.
tests/mocks/Utils/constants.cppnew file+24
This diff is too big to show here.
tests/mocks/Utils/constants.hnew file+43
This diff is too big to show here.
tests/mocks/Utils/plugin.cppnew file+93
This diff is too big to show here.
tests/mocks/Utils/plugin.hnew file+32
This diff is too big to show here.
tests/mocks/Utils/qmldirnew file+6
This diff is too big to show here.
tests/mocks/Utils/windowstatestorage.cppnew file+100
This diff is too big to show here.
tests/mocks/Utils/windowstatestorage.hnew file+77
This diff is too big to show here.
tests/mocks/Wizard/CMakeLists.txtnew file+20
This diff is too big to show here.
tests/mocks/Wizard/MockSystem.cppnew file+64
This diff is too big to show here.
tests/mocks/Wizard/MockSystem.hnew file+61
This diff is too big to show here.
tests/mocks/Wizard/mockplugin.cppnew file+38
This diff is too big to show here.
tests/mocks/Wizard/mockplugin.hnew file+32
This diff is too big to show here.
tests/mocks/Wizard/qmldirnew file+3
This diff is too big to show here.
tests/mocks/data/applications/camera-app.desktop → tests/mocks/data/applications/webbrowser-app.desktoprenamed
The content is the same.
tests/mocks/data/unity/indicators/com.canonical.indicator.mocknew file+10
This diff is too big to show here.
tests/mocks/indicator-service/CMakeLists.txtnew file+19
This diff is too big to show here.
tests/mocks/indicator-service/mock-indicator-service.cnew file+325
This diff is too big to show here.
tests/mocks/liblightdm/CMakeLists.txtnew file+18
This diff is too big to show here.
tests/mocks/LightDM/full/GreeterPrivate.cpp → tests/mocks/liblightdm/GreeterPrivate.cpprenamed+44−10
This diff is too big to show here.
tests/mocks/liblightdm/GreeterPrivate.hnew file+54
This diff is too big to show here.
tests/mocks/liblightdm/MockController.cppnew file+192
This diff is too big to show here.
tests/mocks/liblightdm/MockController.hnew file+106
This diff is too big to show here.
tests/mocks/liblightdm/MockGreeter.cppnew file+316
This diff is too big to show here.
tests/mocks/liblightdm/MockGreeter.hnew file+102
This diff is too big to show here.
tests/mocks/liblightdm/MockSessionsModel.cppnew file+118
This diff is too big to show here.
tests/mocks/liblightdm/MockSessionsModel.hnew file+64
This diff is too big to show here.
tests/mocks/liblightdm/MockUsersModel.cppnew file+220
This diff is too big to show here.
tests/mocks/liblightdm/MockUsersModel.hnew file+61
This diff is too big to show here.
tests/mocks/liblightdm/SessionsModelPrivate.cppnew file+83
This diff is too big to show here.
tests/mocks/liblightdm/SessionsModelPrivate.hnew file+63
This diff is too big to show here.
tests/mocks/liblightdm/UsersModelPrivate.cppnew file+124
This diff is too big to show here.
tests/mocks/LightDM/UsersModelPrivate.h → tests/mocks/liblightdm/UsersModelPrivate.hrenamed+8−3
This diff is too big to show here.
tests/mocks/LightDM/demo/CMakeLists.txt → tests/mocks/liblightdm/demo/CMakeLists.txtrenamed+1−1
This diff is too big to show here.
tests/mocks/LightDM/demo/GreeterPrivate.cpp → tests/mocks/liblightdm/demo/GreeterPrivate.cpprenamed+2
This diff is too big to show here.
tests/mocks/LightDM/single-passphrase/UsersModelPrivate.cpp → tests/mocks/liblightdm/demo/UsersModelPrivate.cpprenamed+11−3
This diff is too big to show here.
tests/mocks/LightDM/qmldir → tests/mocks/liblightdm/qmldirrenamed+1
This diff is too big to show here.
tests/mocks/libusermetrics/CMakeLists.txt+6−1
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+2−1
This diff is too big to show here.
tests/mocks/libusermetrics/UserMetrics.cpp+56−26
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.hdeleted−1
This diff is too big to show here.
tests/mocks/libusermetrics/libusermetricsoutput/UserMetrics.hdeleted−1
This diff is too big to show here.
tests/plugins/AccountsService/AccountsServer.cpp+28−6
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+33−12
This diff is too big to show here.
tests/plugins/AccountsService/PropertiesServer.cpp+104−7
This diff is too big to show here.
tests/plugins/AccountsService/PropertiesServer.h+17−3
This diff is too big to show here.
tests/plugins/AccountsService/UscServer.cppnew file+28
This diff is too big to show here.
tests/plugins/AccountsService/UscServer.hnew file+39
This diff is too big to show here.
tests/plugins/AccountsService/client.cpp+303−9
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+17−6
This diff is too big to show here.
tests/plugins/AccountsService/types.hnew file+25
This diff is too big to show here.
tests/plugins/CMakeLists.txt+6−1
This diff is too big to show here.
tests/plugins/Cursor/CMakeLists.txtnew file+8
This diff is too big to show here.
tests/plugins/Cursor/TextEntry.qmlnew file+34
This diff is too big to show here.
tests/plugins/Cursor/tst_Cursor.qmlnew file+151
This diff is too big to show here.
tests/plugins/GlobalShortcut/CMakeLists.txtnew file+19
This diff is too big to show here.
tests/plugins/GlobalShortcut/GlobalShortcutTest.cppnew file+78
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/TestButton.qml → tests/plugins/GlobalShortcut/shortcut.qmlrenamed+17−19
This diff is too big to show here.
tests/plugins/Greeter/CMakeLists.txtnew file+1
This diff is too big to show here.
tests/plugins/Greeter/Unity/CMakeLists.txtnew file+1
This diff is too big to show here.
tests/plugins/Greeter/Unity/Launcher/CMakeLists.txtnew file+42
This diff is too big to show here.
tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cppnew file+240
This diff is too big to show here.
tests/plugins/LightDM/CMakeLists.txt+1−24
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/CMakeLists.txtnew file+157
This diff is too big to show here.
tests/plugins/LightDM/dbus.cpp → tests/plugins/LightDM/IntegratedLightDM/dbus.cpprenamed+69−12
This diff is too big to show here.
tests/plugins/LightDM/greeter.qml → tests/plugins/LightDM/IntegratedLightDM/greeter.qmlrenamed+3−3
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/integrated.cppnew file+88
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/pam.cppnew file+54
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/promptsmodel.cppnew file+175
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/sessionsmodel.cppnew file+134
This diff is too big to show here.
tests/plugins/LightDM/IntegratedLightDM/usersmodel.cppnew file+168
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/CMakeLists.txtdeleted−49
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cppdeleted−1882
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cppdeleted−2172
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsectionexternalmodel.cppdeleted−251
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/test.qmldeleted−96
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/test_section.qmldeleted−106
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/test_sectionexternalmodel.qmldeleted−74
This diff is too big to show here.
tests/plugins/ListViewWithPageHeader/tst_listviewwithpageheaderqml.qmldeleted−138
This diff is too big to show here.
tests/plugins/SessionBroadcast/BroadcastServer.cppnew file+33
This diff is too big to show here.
tests/plugins/SessionBroadcast/BroadcastServer.hnew file+40
This diff is too big to show here.
tests/plugins/SessionBroadcast/CMakeLists.txtnew file+51
This diff is too big to show here.
tests/plugins/SessionBroadcast/interfaces.xmlnew file+18
This diff is too big to show here.
tests/plugins/SessionBroadcast/server.cppnew file+37
This diff is too big to show here.
tests/plugins/SessionBroadcast/sessionbroadcasttest.cppnew file+111
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/CMakeLists.txt+48−36
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/DownwardsLauncher.qmldeleted−79
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/GestureTest.cpp+143−4
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/GestureTest.h+58−2
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/LeftwardsLauncher.qmldeleted−82
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/RightwardsLauncher.qmldeleted−80
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/TestItem.cppnew file+30
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/TestItem.hnew file+33
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/UpwardsLauncher.qmldeleted−82
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/empty.qmlnew file+22
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/touchGateExample.qmlnew file+27
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_AxisVelocityCalculator.cpp+2−2
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.cppdeleted−709
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.qmldeleted−46
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_FloatingFlickable.cppnew file+131
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_FloatingFlickable.qmlnew file+81
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.cpp+6−6
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_PressedOutsideNotifier.qml+2−2
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_TouchDispatcher.cppnew file+148
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_TouchGate.cppnew file+392
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_TouchGestureArea.cppnew file+300
This diff is too big to show here.
tests/plugins/Ubuntu/Gestures/tst_TouchGestureArea.qmlnew file+90
This diff is too big to show here.
tests/plugins/Unity/CMakeLists.txt+2
This diff is too big to show here.
tests/plugins/Unity/Indicators/CMakeLists.txt+20−17
This diff is too big to show here.
tests/plugins/Unity/Indicators/indicatorsmanagertest.cpp → tests/plugins/Unity/Indicators/IndicatorsManagerTest.cpprenamed+54−7
This diff is too big to show here.
tests/plugins/Unity/Indicators/IndicatorsModelTest.cppnew file+141
This diff is too big to show here.
tests/plugins/Unity/Indicators/menucontentactivatortest.cpp → tests/plugins/Unity/Indicators/MenuContentActivatorTest.cpprenamed+4−3
This diff is too big to show here.
tests/plugins/Unity/Indicators/RootActionStateTest.cppnew file+95
This diff is too big to show here.
tests/plugins/Unity/Indicators/SharedUnityMenuModelTest.cppnew file+102
This diff is too big to show here.
tests/plugins/Unity/Indicators/unitymenumodelstacktest.cpp → tests/plugins/Unity/Indicators/UnityMenuModelStackTest.cpprenamed+10−14
This diff is too big to show here.
tests/plugins/Unity/Indicators/indicatorsmodeltest.cppdeleted−94
This diff is too big to show here.
tests/plugins/Unity/Indicators/rootactionstatetest.cppdeleted−58
This diff is too big to show here.
tests/plugins/Unity/Indicators/timeformattertest.cppdeleted−55
This diff is too big to show here.
tests/plugins/Unity/Launcher/CMakeLists.txt+78−44
This diff is too big to show here.
tests/plugins/Unity/Launcher/appdrawermodeltest.cppnew file+68
This diff is too big to show here.
tests/plugins/Unity/Launcher/abs-icon.desktop → tests/plugins/Unity/Launcher/applications/abs-icon.desktoprenamed+1
This diff is too big to show here.
tests/plugins/Unity/Launcher/click-icon.desktop → tests/plugins/Unity/Launcher/applications/click-icon.desktoprenamed+1
This diff is too big to show here.
tests/plugins/Unity/Launcher/click-icon.svg → tests/plugins/Unity/Launcher/applications/click-icon.svgrenamed
The content is the same.
tests/plugins/Unity/Launcher/no-name.desktop → tests/plugins/Unity/Launcher/applications/no-name.desktoprenamed+1
This diff is too big to show here.
tests/plugins/Unity/Launcher/rel-icon.desktop → tests/plugins/Unity/Launcher/applications/rel-icon.desktoprenamed+1
This diff is too big to show here.
tests/plugins/Unity/Launcher/rel-icon.svg → tests/plugins/Unity/Launcher/applications/rel-icon.svgrenamed
The content is the same.
plugins/Unity/Indicators/qml/ButtonMenuItem.qml → tests/plugins/Unity/Launcher/gsettings.cpprenamed+22−21
This diff is too big to show here.
tests/plugins/Unity/Launcher/gsettings.hnew file+47
This diff is too big to show here.
tests/plugins/Unity/Launcher/launcherbackendtest.cppdeleted−72
This diff is too big to show here.
tests/plugins/Unity/Launcher/launchermodeltest.cpp+590−29
This diff is too big to show here.
tests/plugins/Unity/Launcher/no-icon.desktopdeleted−2
This diff is too big to show here.
tests/plugins/Unity/Launcher/ualwrapper.cppnew file+58
This diff is too big to show here.
tests/plugins/Unity/Launcher/ualwrapper.hnew file+55
This diff is too big to show here.
tests/mocks/LightDM/single/GreeterPrivate.cpp → tests/plugins/Unity/Launcher/xdgwatcher.cpprenamed+17−18
This diff is too big to show here.
plugins/HudClient/hudtoolbarmodel.h → tests/plugins/Unity/Launcher/xdgwatcher.hrenamed+17−22
This diff is too big to show here.
tests/plugins/Unity/Platform/CMakeLists.txtnew file+30
This diff is too big to show here.
tests/plugins/Unity/Platform/platformtest.cppnew file+142
This diff is too big to show here.
tests/plugins/Unity/Session/CMakeLists.txtnew file+72
This diff is too big to show here.
tests/plugins/Unity/Session/LightDMServer.cppnew file+29
This diff is too big to show here.
tests/plugins/Unity/Session/LightDMServer.hnew file+38
This diff is too big to show here.
tests/plugins/Unity/Session/LogindServer.cppnew file+43
This diff is too big to show here.
tests/plugins/Unity/Session/LogindServer.hnew file+48
This diff is too big to show here.
tests/plugins/Unity/Session/interfaces.xmlnew file+29
This diff is too big to show here.
tests/plugins/Unity/Session/preload.cnew file+43
This diff is too big to show here.
tests/plugins/Unity/Session/server.cppnew file+50
This diff is too big to show here.
tests/plugins/Unity/Session/sessionbackendtest.cppnew file+289
This diff is too big to show here.
tests/plugins/Utils/CMakeLists.txt+34−19
This diff is too big to show here.
tests/plugins/Utils/DeviceConfigParserTest.cppnew file+76
This diff is too big to show here.
tests/plugins/Utils/modeltest.cpp → tests/plugins/Utils/ModelTest.cpprenamed+25−42
This diff is too big to show here.
tests/plugins/Utils/modeltest.h → tests/plugins/Utils/ModelTest.hrenamed
The content is the same.
tests/plugins/Utils/qlimitproxymodeltest.cpp → tests/plugins/Utils/QLimitProxyModelTest.cpprenamed+31−31
This diff is too big to show here.
tests/plugins/Utils/URLDispatcherTest.cppnew file+78
This diff is too big to show here.
tests/plugins/Utils/qsortfilterproxymodeltest.cpp → tests/plugins/Utils/UnitySortFilterProxyModelTest.cpprenamed+25−25
This diff is too big to show here.
tests/plugins/Utils/WindowInputMonitorTest.cppnew file+461
This diff is too big to show here.
tests/plugins/Utils/WindowStateStorageTest.cppnew file+121
This diff is too big to show here.
tests/plugins/Utils/tst_UtilsStyle.qmlnew file+47
This diff is too big to show here.
tests/plugins/WindowManager/CMakeLists.txtnew file+36
This diff is too big to show here.
tests/plugins/WindowManager/UnityApplicationMocks.hnew file+211
This diff is too big to show here.
tests/plugins/WindowManager/tst_TopLevelWindowModel.cppnew file+193
This diff is too big to show here.
tests/plugins/Wizard/CMakeLists.txtnew file+24
This diff is too big to show here.
tests/plugins/Wizard/tst_pagelist.cppnew file+183
This diff is too big to show here.
tests/plugins/Wizard/tst_system.cppnew file+124
This diff is too big to show here.
tests/qmltests/ApplicationMenuDataLoader.qmlnew file+99
This diff is too big to show here.
tests/qmltests/ApplicationMenus/tst_MenuBar.qmlnew file+437
This diff is too big to show here.
tests/qmltests/ApplicationMenus/tst_MenuPopup.qmlnew file+361
This diff is too big to show here.
tests/qmltests/CMakeLists.txt+71−75
This diff is too big to show here.
tests/qmltests/Components/CMakeLists.txt+41−13
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+172−62
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle.qml+133−57
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/LeftEdgeShowable.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/SimpleButton.qml+36
This diff is too big to show here.
tests/qmltests/Components/tst_DragHandle/TopEdgeShowable.qml+15−15
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_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_EdgeDragEvaluator.qml+9−7
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+39−14
This diff is too big to show here.
tests/qmltests/Components/tst_LazyImage/ImageControls.qml+3−3
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_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−255
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+16−3
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/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_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−276
This diff is too big to show here.
tests/qmltests/Dash/Apps/tst_RunningApplicationsGrid.qml−263
This diff is too big to show here.
tests/qmltests/Dash/Movie/tst_MoviePreview.qml−86
This diff is too big to show here.
tests/qmltests/Dash/Music/tst_MusicPreview.qml−174
This diff is too big to show here.
tests/qmltests/Dash/qml/FakeScopeView.qml−49
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−139
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−294
This diff is too big to show here.
tests/qmltests/Dash/tst_DashPreview.qml−202
This diff is too big to show here.
tests/qmltests/Dash/tst_FilterGrids.qml−143
This diff is too big to show here.
tests/qmltests/Dash/tst_GenericPreview.qml−117
This diff is too big to show here.
tests/qmltests/Dash/tst_GenericScopeView.qml−311
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+53−38
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+82−17
This diff is too big to show here.
tests/qmltests/Greeter/tst_Lockscreen.qml−278
This diff is too big to show here.
tests/qmltests/Greeter/tst_Phone.qml−152
This diff is too big to show here.
tests/qmltests/Greeter/tst_Tablet.qml−339
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+1335−150
This diff is too big to show here.
tests/qmltests/Notifications/Notification.qml+13−6
This diff is too big to show here.
tests/qmltests/Notifications/tst_Notifications.qml+793−383
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_DefaultIndicatorWidget.qml−97
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+37−91
This diff is too big to show here.
tests/qmltests/Panel/tst_Panel.qml+593−176
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+15−16
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_OrientedShell.qml+1705
This diff is too big to show here.
tests/qmltests/tst_Shell.qml+3205−376
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+36−8
This diff is too big to show here.
tests/scripts/README+9
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+21−2
This diff is too big to show here.
tests/uqmlscene/README+3−1
This diff is too big to show here.
tests/uqmlscene/main.cpp+39−12
This diff is too big to show here.
tests/utils/modules/Unity/Test/CMakeLists.txt+27−7
This diff is too big to show here.
tests/utils/modules/Unity/Test/MouseTouchEmulationCheckbox.qml+23−17
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+23−2
This diff is too big to show here.
tests/utils/modules/Unity/Test/TouchEventSequenceWrapper.h+7−2
This diff is too big to show here.
tests/utils/modules/Unity/Test/UnityTestCase.qml+442−133
This diff is too big to show here.
tests/utils/modules/Unity/Test/plugin.cpp+25−2
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+49−6
This diff is too big to show here.
tests/utils/modules/Unity/Test/testutil.h+4−2
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+22−12
This diff is too big to show here.
tools/CMakeLists.txt+4
This diff is too big to show here.
tools/indicatorsclient/CMakeLists.txt+1−7
This diff is too big to show here.
tools/indicatorsclient/indicatorsclient.cpp+22−15
This diff is too big to show here.
tools/indicatorsclient/indicatorsclient.h−2
This diff is too big to show here.
tools/indicatorsclient/main.cpp
This diff is too big to show here.
tools/menutool/CMakeLists.txt+5
This diff is too big to show here.
tools/menutool/README+11
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.
tools/unlock-device+51
This diff is too big to show here.
unity8.qmlproject−25
This diff is too big to show here.