Merge lp:~aacid/unity-2d/tooltip_mm_rtl into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 1072
Merged at revision: 1074
Proposed branch: lp:~aacid/unity-2d/tooltip_mm_rtl
Merge into: lp:unity-2d
Diff against target: 50 lines (+16/-2)
3 files modified
libunity-2d-private/src/launchermenu.cpp (+1/-1)
shell/launcher/LauncherList.qml (+9/-1)
tests/manual-tests/launcher.txt (+6/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/tooltip_mm_rtl
Reviewer Review Type Date Requested Status
Gerry Boland Pending
Review via email: mp+102338@code.launchpad.net

Commit message

[Launcher] Fix tile tooltip position on RTL MM setups

Description of the change

Fix launcher tile tooltip position on RTL MM setups
UNBLOCK

To post a comment you must log in.
Revision history for this message
Unity Merger (unity-merger) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Unity Merger (unity-merger) wrote :

Attempt to merge into lp:unity-2d failed due to conflicts:

text conflict in tests/manual-tests/launcher.txt

lp:~aacid/unity-2d/tooltip_mm_rtl updated
1072. By Albert Astals Cid

Merge lp:unity-2d

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libunity-2d-private/src/launchermenu.cpp'
2--- libunity-2d-private/src/launchermenu.cpp 2012-03-08 19:10:11 +0000
3+++ libunity-2d-private/src/launchermenu.cpp 2012-04-19 11:55:24 +0000
4@@ -175,7 +175,7 @@
5 m_arrowY = 6;
6
7 if (QApplication::isRightToLeft()) {
8- x = QApplication::desktop()->width() - x - sizeHint().width();
9+ x -= sizeHint().width();
10 }
11
12 move(x, y - sizeHint().height() / 2 );
13
14=== modified file 'shell/launcher/LauncherList.qml'
15--- shell/launcher/LauncherList.qml 2012-04-16 15:26:55 +0000
16+++ shell/launcher/LauncherList.qml 2012-04-19 11:55:24 +0000
17@@ -163,7 +163,15 @@
18 list.visibleMenu.hide()
19 }
20 list.visibleMenu = item.menu
21- item.menu.show(declarativeView.globalPosition.x + width, declarativeView.globalPosition.y + list.y - list.contentY +
22+
23+ var xPos
24+ if (Utils.isLeftToRight()) {
25+ xPos = declarativeView.globalPosition.x + width
26+ } else {
27+ // We need to substract the menu width too, that's done inside show() itself
28+ xPos = declarativeView.globalPosition.x + declarativeView.width - width
29+ }
30+ item.menu.show(xPos, declarativeView.globalPosition.y + list.y - list.contentY +
31 y + height - selectionOutlineSize / 2)
32 }
33
34
35=== modified file 'tests/manual-tests/launcher.txt'
36--- tests/manual-tests/launcher.txt 2012-04-19 11:17:53 +0000
37+++ tests/manual-tests/launcher.txt 2012-04-19 11:55:24 +0000
38@@ -131,6 +131,12 @@
39 Verify that the tile that appears in the launcher has the app icon and not the questionmark icon
40 ----
41
42+ * Have a multimonitor setup
43+ * Run unity-2d-shell in RTL
44+ * Have launchers in both screens
45+
46+Verify that the tile tooltips appear in the correct screen
47+----
48 * Alt+f1 to show launcher
49 * move down with arrow key
50 * press enter to start/focus a program (firefox works particulary well due to its red background)

Subscribers

People subscribed via source and target branches