Merge lp:~aacid/unity8/spacier_drawer into lp:unity8
- spacier_drawer
- Merge into trunk
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 |
Related bugs: |
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?
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"
- 2915. By Albert Astals Cid
-
Make longer so that tryDrawer has one elided item
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.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2914
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2915
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2915
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 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
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2916
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2917
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
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
Preview Diff
1 | === modified file 'qml/Launcher/Drawer.qml' |
2 | --- qml/Launcher/Drawer.qml 2017-03-24 11:51:31 +0000 |
3 | +++ qml/Launcher/Drawer.qml 2017-04-04 11:14:47 +0000 |
4 | @@ -28,6 +28,7 @@ |
5 | property int panelWidth: 0 |
6 | readonly property bool moving: listLoader.item && listLoader.item.moving |
7 | readonly property Item searchTextField: searchField |
8 | + readonly property real delegateWidth: units.gu(10) |
9 | |
10 | signal applicationSelected(string appId) |
11 | |
12 | @@ -272,7 +273,7 @@ |
13 | |
14 | model: sortProxyModel |
15 | |
16 | - delegateWidth: units.gu(8) |
17 | + delegateWidth: root.delegateWidth |
18 | delegateHeight: units.gu(10) |
19 | delegate: drawerDelegateComponent |
20 | } |
21 | @@ -332,7 +333,7 @@ |
22 | filterLetter: model.letter |
23 | dynamicSortFilter: false |
24 | } |
25 | - delegateWidth: units.gu(8) |
26 | + delegateWidth: root.delegateWidth |
27 | delegateHeight: units.gu(10) |
28 | delegate: drawerDelegateComponent |
29 | } |
30 | @@ -352,6 +353,7 @@ |
31 | readonly property bool focused: index === GridView.view.currentIndex && GridView.view.activeFocus |
32 | |
33 | onClicked: root.applicationSelected(model.appId) |
34 | + z: loader.active ? 1 : 0 |
35 | |
36 | Column { |
37 | width: units.gu(8) |
38 | @@ -384,11 +386,50 @@ |
39 | } |
40 | |
41 | Label { |
42 | + id: label |
43 | text: model.name |
44 | width: parent.width |
45 | horizontalAlignment: Text.AlignHCenter |
46 | fontSize: "small" |
47 | elide: Text.ElideRight |
48 | + |
49 | + Loader { |
50 | + id: loader |
51 | + x: { |
52 | + var aux = 0; |
53 | + if (item) { |
54 | + aux = label.width / 2 - item.width / 2; |
55 | + var containerXMap = mapToItem(contentContainer, aux, 0).x |
56 | + if (containerXMap < 0) { |
57 | + aux = aux - containerXMap; |
58 | + containerXMap = 0; |
59 | + } |
60 | + if (containerXMap + item.width > contentContainer.width) { |
61 | + aux = aux - (containerXMap + item.width - contentContainer.width); |
62 | + } |
63 | + } |
64 | + return aux; |
65 | + } |
66 | + y: -units.gu(0.5) |
67 | + active: label.truncated && (drawerDelegate.hovered || drawerDelegate.focused) |
68 | + sourceComponent: Rectangle { |
69 | + color: UbuntuColors.jet |
70 | + width: fullLabel.contentWidth + units.gu(1) |
71 | + height: fullLabel.height + units.gu(1) |
72 | + radius: units.dp(4) |
73 | + Label { |
74 | + id: fullLabel |
75 | + width: Math.min(root.delegateWidth * 2, implicitWidth) |
76 | + wrapMode: Text.Wrap |
77 | + horizontalAlignment: Text.AlignHCenter |
78 | + maximumLineCount: 3 |
79 | + elide: Text.ElideRight |
80 | + anchors.centerIn: parent |
81 | + text: model.name |
82 | + fontSize: "small" |
83 | + } |
84 | + } |
85 | + } |
86 | } |
87 | } |
88 | } |
89 | |
90 | === modified file 'tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp' |
91 | --- tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2017-01-16 11:12:00 +0000 |
92 | +++ tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2017-04-04 11:14:47 +0000 |
93 | @@ -46,7 +46,7 @@ |
94 | m_list.append(item); |
95 | item = new MockLauncherItem("calendar-app", "/usr/share/applications/calendar-app.desktop","Calendar", "calendar", this); |
96 | m_list.append(item); |
97 | - item = new MockLauncherItem("libreoffice", "/usr/share/applications/libreoffice.desktop","Libre Office", "libreoffice", this); |
98 | + item = new MockLauncherItem("libreoffice", "/usr/share/applications/libreoffice.desktop","Libre Office Writer", "libreoffice", this); |
99 | m_list.append(item); |
100 | |
101 | qsrand(QDateTime::currentMSecsSinceEpoch() / 1000); |
Code looks good but could you get rid of the hardcoded colors?
color: UbuntuColors.jet
border.color: UbuntuColors.blue