Merge lp:~aacid/unity8/spacier_drawer into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2917
Merged at revision: 2920
Proposed branch: lp:~aacid/unity8/spacier_drawer
Merge into: lp:unity8
Diff against target: 101 lines (+44/-3)
2 files modified
qml/Launcher/Drawer.qml (+43/-2)
tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp (+1/-1)
To merge this branch: bzr merge lp:~aacid/unity8/spacier_drawer
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+321720@code.launchpad.net

Commit message

Tweak app drawer a bit

Make delegates a bit wider to have more breath space

Add a "tooltip" on hover for delegates whose text is truncated

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the UI, has there been a design review?
No, needs one?

To post a comment you must log in.
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Code looks good but could you get rid of the hardcoded colors?

color: UbuntuColors.jet
border.color: UbuntuColors.blue

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

> Code looks good but could you get rid of the hardcoded colors?
>
> color: UbuntuColors.jet
> border.color: UbuntuColors.blue

I can if you suggest me something better.

FWIW the file is already a bit meh using "#BF000000" and "#20ffffff"

lp:~aacid/unity8/spacier_drawer updated
2915. By Albert Astals Cid

Make longer so that tryDrawer has one elided item

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

OK, looks and works good enough for me; the "blue" color stands out a bit too much but I don't want to block on that.

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2914
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3647/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4840
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2964
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2964
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4868
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4679/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4679
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4679/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3647/rebuild

review: Approve (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2915
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3652/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4846
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2970
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2970
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4874
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4685
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4685/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4685
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4685/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4685
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4685/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4685
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4685/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4685
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4685/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4685
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4685/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3652/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2915
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3656/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4850
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2972
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2972
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4878
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4689
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4689/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4689
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4689/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4689
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4689/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4689
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4689/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4689
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4689/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4689
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4689/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3656/rebuild

review: Approve (continuous-integration)
lp:~aacid/unity8/spacier_drawer updated
2916. By Albert Astals Cid

Limit fullLabel width and height

Also remove blue outline

2917. By Albert Astals Cid

also show the fulllabel if focused

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2916
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3660/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4858
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2975
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2975
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4886
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4697/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4697
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4697/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3660/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2917
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3662/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4863
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2980
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2980
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4891
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4702
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4702/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4702
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4702/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4702
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4702/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4702
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4702/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4702
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4702/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4702
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4702/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3662/rebuild

review: Approve (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Yes, looks nice and works as expected

* Did you perform an exploratory manual test run of the code change and any related functionality?

Yes

* Did CI run pass? If not, please explain why.

Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Launcher/Drawer.qml'
--- qml/Launcher/Drawer.qml 2017-03-24 11:51:31 +0000
+++ qml/Launcher/Drawer.qml 2017-04-04 11:14:47 +0000
@@ -28,6 +28,7 @@
28 property int panelWidth: 028 property int panelWidth: 0
29 readonly property bool moving: listLoader.item && listLoader.item.moving29 readonly property bool moving: listLoader.item && listLoader.item.moving
30 readonly property Item searchTextField: searchField30 readonly property Item searchTextField: searchField
31 readonly property real delegateWidth: units.gu(10)
3132
32 signal applicationSelected(string appId)33 signal applicationSelected(string appId)
3334
@@ -272,7 +273,7 @@
272273
273 model: sortProxyModel274 model: sortProxyModel
274275
275 delegateWidth: units.gu(8)276 delegateWidth: root.delegateWidth
276 delegateHeight: units.gu(10)277 delegateHeight: units.gu(10)
277 delegate: drawerDelegateComponent278 delegate: drawerDelegateComponent
278 }279 }
@@ -332,7 +333,7 @@
332 filterLetter: model.letter333 filterLetter: model.letter
333 dynamicSortFilter: false334 dynamicSortFilter: false
334 }335 }
335 delegateWidth: units.gu(8)336 delegateWidth: root.delegateWidth
336 delegateHeight: units.gu(10)337 delegateHeight: units.gu(10)
337 delegate: drawerDelegateComponent338 delegate: drawerDelegateComponent
338 }339 }
@@ -352,6 +353,7 @@
352 readonly property bool focused: index === GridView.view.currentIndex && GridView.view.activeFocus353 readonly property bool focused: index === GridView.view.currentIndex && GridView.view.activeFocus
353354
354 onClicked: root.applicationSelected(model.appId)355 onClicked: root.applicationSelected(model.appId)
356 z: loader.active ? 1 : 0
355357
356 Column {358 Column {
357 width: units.gu(8)359 width: units.gu(8)
@@ -384,11 +386,50 @@
384 }386 }
385387
386 Label {388 Label {
389 id: label
387 text: model.name390 text: model.name
388 width: parent.width391 width: parent.width
389 horizontalAlignment: Text.AlignHCenter392 horizontalAlignment: Text.AlignHCenter
390 fontSize: "small"393 fontSize: "small"
391 elide: Text.ElideRight394 elide: Text.ElideRight
395
396 Loader {
397 id: loader
398 x: {
399 var aux = 0;
400 if (item) {
401 aux = label.width / 2 - item.width / 2;
402 var containerXMap = mapToItem(contentContainer, aux, 0).x
403 if (containerXMap < 0) {
404 aux = aux - containerXMap;
405 containerXMap = 0;
406 }
407 if (containerXMap + item.width > contentContainer.width) {
408 aux = aux - (containerXMap + item.width - contentContainer.width);
409 }
410 }
411 return aux;
412 }
413 y: -units.gu(0.5)
414 active: label.truncated && (drawerDelegate.hovered || drawerDelegate.focused)
415 sourceComponent: Rectangle {
416 color: UbuntuColors.jet
417 width: fullLabel.contentWidth + units.gu(1)
418 height: fullLabel.height + units.gu(1)
419 radius: units.dp(4)
420 Label {
421 id: fullLabel
422 width: Math.min(root.delegateWidth * 2, implicitWidth)
423 wrapMode: Text.Wrap
424 horizontalAlignment: Text.AlignHCenter
425 maximumLineCount: 3
426 elide: Text.ElideRight
427 anchors.centerIn: parent
428 text: model.name
429 fontSize: "small"
430 }
431 }
432 }
392 }433 }
393 }434 }
394 }435 }
395436
=== modified file 'tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp'
--- tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2017-01-16 11:12:00 +0000
+++ tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2017-04-04 11:14:47 +0000
@@ -46,7 +46,7 @@
46 m_list.append(item);46 m_list.append(item);
47 item = new MockLauncherItem("calendar-app", "/usr/share/applications/calendar-app.desktop","Calendar", "calendar", this);47 item = new MockLauncherItem("calendar-app", "/usr/share/applications/calendar-app.desktop","Calendar", "calendar", this);
48 m_list.append(item);48 m_list.append(item);
49 item = new MockLauncherItem("libreoffice", "/usr/share/applications/libreoffice.desktop","Libre Office", "libreoffice", this);49 item = new MockLauncherItem("libreoffice", "/usr/share/applications/libreoffice.desktop","Libre Office Writer", "libreoffice", this);
50 m_list.append(item);50 m_list.append(item);
5151
52 qsrand(QDateTime::currentMSecsSinceEpoch() / 1000);52 qsrand(QDateTime::currentMSecsSinceEpoch() / 1000);

Subscribers

People subscribed via source and target branches