on xenial help sign in
Merge lp:unity8 trunk
commit7176e3e80c17a6d973a5bb556bc6d8e459dedfb2 authorGerry Boland <gerry.boland@canonical.com> dateThu 3 Jul 2014, 18:09 (12 years ago) parent81b28c02ef2b55
13 files changed+41−97
cmake/modules/autopilot.cmake+2−2 debian/changelog+16 debian/control+5−5 include/paths.h.in−8 plugins/Unity/Indicators/qml/MenuItemFactory.qml+1−1 qml/Launcher/LauncherDelegate.qml+1 qml/Panel/Indicators/DefaultIndicatorWidget.qml+13−29 qml/Panel/Panel.qml+1−1 run.sh−6 src/Panel/Indicators/client/indicatorsclient.cpp−1 src/main.cpp−2 tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml+2−40 tools/scopetool.cpp−2
cmake/modules/autopilot.cmake+2−2
@@ -2,7 +2,7 @@ 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 python3 -m autopilot.run run ${TEST_SUITE}
5+ COMMAND LANG=C QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks python3 -m autopilot.run run ${TEST_SUITE}
66 WORKING_DIRECTORY ${WORKING_DIR}
77 DEPENDS fake_install
88 )
@@ -14,7 +14,7 @@ function(declare_autopilot_test TEST_NAME TEST_SUITE WORKING_DIR)
1414 add_dependencies(autopilot autopilot-${TEST_NAME})
1515
1616 add_custom_target(autopilot2-${TEST_NAME}
17− COMMAND LANG=C UBUNTU_ICON_THEME=ubuntu-mobile QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks python2 -m autopilot.run run ${TEST_SUITE}
17+ COMMAND LANG=C QML2_IMPORT_PATH=${SHELL_INSTALL_QML}/mocks python2 -m autopilot.run run ${TEST_SUITE}
1818 WORKING_DIRECTORY ${WORKING_DIR}
1919 DEPENDS fake_install
2020 )
debian/changelog+16
@@ -1,3 +1,19 @@
1+unity8 (7.90+14.10.20140701.2-0ubuntu2) utopic; urgency=medium
2+
3+ * debian/control:
4+ list qtdeclarative5-ubuntu-ui-toolkit-plugin-gles as an alternative
5+ choice, since provides are not versionned, should restore installability
6+ on amd64 and i386
7+
8+ -- Sebastien Bacher <seb128@ubuntu.com> Thu, 03 Jul 2014 13:26:38 +0200
9+
10+unity8 (7.90+14.10.20140701.2-0ubuntu1) utopic; urgency=medium
11+
12+ [ Michał Sawicz ]
13+ * Adapt to suru theme.
14+
15+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 01 Jul 2014 15:10:35 +0000
16+
117unity8 (7.89+14.10.20140627-0ubuntu1) utopic; urgency=low
218
319 [ Michael Terry ]
debian/control+5−5
@@ -36,8 +36,8 @@ Build-Depends: cmake,
3636 qtdeclarative5-dev-tools,
3737 qtdeclarative5-private-dev (>= 5.2.1),
3838 qtdeclarative5-qtmultimedia-plugin,
39− qtdeclarative5-ubuntu-settings-components,
40− qtdeclarative5-ubuntu-ui-toolkit-plugin,
39+ qtdeclarative5-ubuntu-settings-components (>= 0.2),
40+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48),
4141 ttf-ubuntu-font-family,
4242Standards-Version: 3.9.4
4343Homepage: http://launchpad.net/unity
@@ -50,7 +50,7 @@ Vcs-Browser: https://bazaar.launchpad.net/~unity-team/unity8/trunk
5050Package: indicators-client
5151Architecture: amd64 armhf i386
5252Depends: qmenumodel-qml (>= 0.2.7),
53− qtdeclarative5-ubuntu-ui-toolkit-plugin,
53+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48),
5454 unity8 (= ${binary:Version}),
5555 ${misc:Depends},
5656 ${shlibs:Depends},
@@ -77,7 +77,7 @@ Depends: gsettings-desktop-schemas,
7777 qmenumodel-qml (>= 0.2.7),
7878 qml-module-qtquick-xmllistmodel,
7979 qtdeclarative5-gsettings1.0,
80− qtdeclarative5-ubuntu-settings-components,
80+ qtdeclarative5-ubuntu-settings-components (>= 0.2),
8181 unity-launcher-impl-3,
8282 unity8-common (= ${source:Version}),
8383 unity8-private (= ${binary:Version}),
@@ -98,7 +98,7 @@ Description: Unity 8 shell
9898Package: unity8-common
9999Architecture: all
100100Depends: qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
101− qtdeclarative5-ubuntu-ui-toolkit-plugin,
101+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48),
102102 qtdeclarative5-unity-notifications-plugin | unity-notifications-impl,
103103 ubuntu-thumbnailer-impl-0,
104104 unity-application-impl-2,
include/paths.h.in−8
@@ -127,12 +127,4 @@ inline void appendImportPaths(QQmlEngine *engine, const QStringList &paths)
127127 engine->setImportPathList(importPathList);
128128}
129129
130−inline void resolveIconTheme() {
131− const char *ubuntuIconTheme = getenv("UBUNTU_ICON_THEME");
132− if (ubuntuIconTheme == NULL) {
133− ubuntuIconTheme = "ubuntu-mobile";
134− }
135− QIcon::setThemeName(ubuntuIconTheme);
136−}
137−
138130#endif
plugins/Unity/Indicators/qml/MenuItemFactory.qml+1−1
@@ -165,7 +165,7 @@ Item {
165165
166166 Component {
167167 id: standardMenu;
168− ListItems.Standard {
168+ Menus.StandardMenu {
169169 objectName: "standardMenu"
170170 property QtObject menuData: null
171171 property int menuIndex: -1
qml/Launcher/LauncherDelegate.qml+1
@@ -63,6 +63,7 @@ Item {
6363 id: iconImage
6464 sourceSize.width: iconShape.width
6565 sourceSize.height: iconShape.height
66+ fillMode: Image.PreserveAspectCrop
6667 source: root.iconName
6768 }
6869 }
qml/Panel/Indicators/DefaultIndicatorWidget.qml+13−29
@@ -19,12 +19,13 @@
1919
2020import QtQuick 2.0
2121import Ubuntu.Components 0.1
22+import Ubuntu.Settings.Components 0.1
2223import Unity.Indicators 0.1 as Indicators
2324
2425Indicators.IndicatorBase {
2526 id: indicatorWidget
2627
27− property int iconSize: height
28+ property int iconSize: units.gu(2)
2829 property alias leftLabel: itemLeftLabel.text
2930 property alias rightLabel: itemRightLabel.text
3031 property var icons: undefined
@@ -34,7 +35,6 @@ Indicators.IndicatorBase {
3435
3536 Row {
3637 id: itemRow
37− width: childrenRect.width
3838 objectName: "itemRow"
3939 anchors {
4040 top: parent.top
@@ -44,7 +44,7 @@ Indicators.IndicatorBase {
4444
4545 Label {
4646 id: itemLeftLabel
47− width: guRoundUp(implicitWidth)
47+ width: contentWidth + units.gu(1)
4848 objectName: "leftLabel"
4949 color: Theme.palette.selected.backgroundText
5050 opacity: 0.8
@@ -52,10 +52,10 @@ Indicators.IndicatorBase {
5252 fontSize: "medium"
5353 anchors.verticalCenter: parent.verticalCenter
5454 visible: text != ""
55+ horizontalAlignment: Text.AlignHCenter
5556 }
5657
5758 Row {
58− width: childrenRect.width
5959 anchors {
6060 top: parent.top
6161 bottom: parent.bottom
@@ -65,22 +65,16 @@ Indicators.IndicatorBase {
6565 model: indicatorWidget.icons
6666
6767 Item {
68− width: guRoundUp(itemImage.width)
69− height: indicatorWidget.iconSize
68+ width: itemImage.width + units.gu(1)
69+ anchors { top: parent.top; bottom: parent.bottom }
7070
71− Image {
71+ StatusIcon {
7272 id: itemImage
73− objectName: "itemImage"
74− visible: source != ""
73+ height: indicatorWidget.iconSize
74+ anchors.centerIn: parent
7575 source: modelData
76− height: parent.height
77− anchors.horizontalCenter: parent.horizontalCenter
78− fillMode: Image.PreserveAspectFit
79−
80− sourceSize {
81− width: indicatorWidget.iconSize
82− height: indicatorWidget.iconSize
83− }
76+ sets: ["status", "actions"]
77+ color: "#CCCCCC"
8478 }
8579 }
8680 }
@@ -88,7 +82,7 @@ Indicators.IndicatorBase {
8882
8983 Label {
9084 id: itemRightLabel
91− width: guRoundUp(implicitWidth)
85+ width: contentWidth + units.gu(1)
9286 objectName: "rightLabel"
9387 color: Theme.palette.selected.backgroundText
9488 opacity: 0.8
@@ -96,20 +90,10 @@ Indicators.IndicatorBase {
9690 fontSize: "medium"
9791 anchors.verticalCenter: parent.verticalCenter
9892 visible: text != ""
93+ horizontalAlignment: Text.AlignHCenter
9994 }
10095 }
10196
102− // TODO: Use toolkit function https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1242575
103− function guRoundUp(width) {
104− if (width == 0) {
105− return 0;
106− }
107− var gu1 = units.gu(1.0);
108− var mod = (width % gu1);
109−
110− return mod == 0 ? width : width + (gu1 - mod);
111− }
112−
11397 onRootActionStateChanged: {
11498 if (rootActionState == undefined) {
11599 leftLabel = "";
qml/Panel/Panel.qml+1−1
@@ -21,7 +21,7 @@ import "../Components"
2121Item {
2222 id: root
2323 readonly property real panelHeight: units.gu(3) + units.dp(2)
24− property real indicatorsMenuWidth: (shell.width > units.gu(60)) ? units.gu(40) : shell.width
24+ property real indicatorsMenuWidth: width
2525 property alias indicators: indicatorsMenu
2626 property bool fullscreenMode: false
2727 property bool searchVisible: true
run.sh−6
@@ -57,12 +57,6 @@ if $KEYLOCK; then
5757 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single-passphrase
5858fi
5959
60−# Force icon theme if running on the desktop, otherwise gnome theme (if running
61−# on Ubuntu Desktop) will be used and icons won't be found
62−if [ -n "$DESKTOP_SESSION" ]; then
63− export UBUNTU_ICON_THEME=ubuntu-mobile
64−fi
65−
6660QML_PHONE_SHELL_ARGS=""
6761if $MOUSE_TOUCH; then
6862 QML_PHONE_SHELL_ARGS="$QML_PHONE_SHELL_ARGS -mousetouch"
src/Panel/Indicators/client/indicatorsclient.cpp−1
@@ -32,7 +32,6 @@ IndicatorsClient::IndicatorsClient(int &argc, char **argv)
3232 m_view(0)
3333{
3434 m_application = new QApplication(argc, argv);
35− resolveIconTheme();
3635
3736 QStringList args = m_application->arguments();
3837
src/main.cpp−2
@@ -79,8 +79,6 @@ Load the testability driver");
7979 indicatorProfile = "phone";
8080 }
8181
82− resolveIconTheme();
83−
8482 ApplicationArguments qmlArgs;
8583 if (parser.isSet(windowGeometryOption) &&
8684 parser.value(windowGeometryOption).split('x').size() == 2)
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml+2−40
@@ -41,12 +41,6 @@ Item {
4141
4242 iconSize: units.gu(3.2)
4343 height: units.gu(3)
44−
45− rootActionState {
46− icons: [ "image://theme/audio-volume-high", "image://theme/audio-volume-low" ]
47− leftLabel: "left"
48− rightLabel: "right"
49− }
5044 }
5145
5246 UT.UnityTestCase {
@@ -57,41 +51,9 @@ Item {
5751 widget.rootActionState.icons = [];
5852 widget.rootActionState.leftLabel = "";
5953 widget.rootActionState.rightLabel = "";
60− wait(50);
61− }
62−
63− function test_guRoundedWidth_data() {
64− return [
65− { tag: "empty", icons: [], leftLabel: "", rightLabel: "" },
66− { tag: "1-icon-no-label", icons: [ "image://theme/audio-volume-high" ], leftLabel: "", rightLabel: "" },
67− { tag: "2-icon-no-label", icons: [ "image://theme/audio-volume-high", "image://theme/audio-volume-low" ], leftLabel: "", rightLabel: "" },
68− { tag: "no-icon-l-label", icons: [], leftLabel: "left", rightLabel: "" },
69− { tag: "no-icon-lr-label", icons: [], leftLabel: "left", rightLabel: "right" },
70− { tag: "1-icon-l-label", icons: [ "image://theme/audio-volume-high" ], leftLabel: "left", rightLabel: "" },
71− { tag: "1-icon-lr-label", icons: [ "image://theme/audio-volume-high" ], leftLabel: "left", rightLabel: "right" },
72− { tag: "2-icon-l-label", icons: [ "image://theme/audio-volume-high", "image://theme/audio-volume-low" ], leftLabel: "left", rightLabel: "" },
73− { tag: "2-icon-lr-label", icons: [ "image://theme/audio-volume-high", "image://theme/audio-volume-low" ], leftLabel: "left", rightLabel: "right" }
74− ];
75− }
76−
77− function test_guRoundedWidth(data) {
78− widget.rootActionState.icons = data.icons
79− widget.rootActionState.leftLabel = data.leftLabel;
80− widget.rootActionState.rightLabel = data.rightLabel;
81− wait(50);
82−
83− compare(widget.width, guRoundUp(widget.width));
84− }
85− }
86−
87− // TODO: Use toolkit function https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1242575
88− function guRoundUp(width) {
89− if (width == 0) {
90− return 0;
54+ waitForRendering(widget)
9155 }
92− var gu1 = units.gu(1.0);
93− var mod = (width % gu1);
9456
95− return mod == 0 ? width : width + (gu1 - mod);
57+ // FIXME: add tests
9658 }
9759}
tools/scopetool.cpp−2
@@ -77,8 +77,6 @@ int main(int argc, char *argv[])
7777 tracker.reset(new RegistryTracker(extraScopes, systemScopes, serverScopes));
7878 }
7979
80− resolveIconTheme();
81−
8280 bindtextdomain("unity8", translationDirectory().toUtf8().data());
8381
8482 QQuickView* view = new QQuickView();