Merge lp:~tintou/slingshot/fix_rtl into lp:~elementary-pantheon/slingshot/trunk

Proposed by Corentin Noël
Status: Merged
Approved by: Corentin Noël
Approved revision: 464
Merged at revision: 462
Proposed branch: lp:~tintou/slingshot/fix_rtl
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 33 lines (+9/-1)
1 file modified
src/SlingshotView.vala (+9/-1)
To merge this branch: bzr merge lp:~tintou/slingshot/fix_rtl
Reviewer Review Type Date Requested Status
Tom Beckmann (community) Approve
Review via email: mp+232870@code.launchpad.net

Commit message

Fixes RTL positionning

Description of the change

Fixes RTL positionning

To post a comment you must log in.
lp:~tintou/slingshot/fix_rtl updated
451. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

452. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

I think this may have problems with multimonitor. You should probably grab the width of the monitor and subtract the width of the window to make sure it won't overlap.

review: Needs Fixing
lp:~tintou/slingshot/fix_rtl updated
453. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

454. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

455. By spautz-julien

Centralize and clean up magic numbers of dimensions, padding, spacing, etc. Also fixes bug #1016154.

456. By Djax

Search generic name (lp:1347956)

457. By Cody Garver

No longer whitelist ibus-setup.desktop. It's bloody frightful. Whatever feature is needed from here should be added to lp:switchboard-plug-keyboard or something.

Revision history for this message
Corentin Noël (tintou) wrote :

@Tom: okay, fixed it
The popover arrow is not pointing the "Applications" label anymore in RTL because of this change but the Granite PopOver widget is missing any repointing function. So it's still better than what is in trunk

lp:~tintou/slingshot/fix_rtl updated
458. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

459. By Launchpad Translations on behalf of elementary-pantheon

Launchpad automatic translations update.

460. By Danielle Foré

no ellipsis

461. By Corentin Noël

Fixed mispositionning with RTL languages.

462. By Corentin Noël

Replaced Screen with Monitor.

463. By Corentin Noël

Merge two lines.

464. By Corentin Noël

get existing values.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

Looks great!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/SlingshotView.vala'
2--- src/SlingshotView.vala 2014-10-14 01:30:37 +0000
3+++ src/SlingshotView.vala 2014-10-14 18:28:04 +0000
4@@ -364,6 +364,10 @@
5 reposition (false);
6 });
7
8+ get_style_context ().notify["direction"].connect (() => {
9+ reposition (false);
10+ });
11+
12 // check for change in gala settings
13 Slingshot.settings.gala_settings.changed.connect (gala_settings_changed);
14 gala_settings_changed ();
15@@ -381,7 +385,6 @@
16 }
17
18 private void reposition (bool show=true) {
19-
20 debug("Repositioning");
21
22 Gdk.Rectangle monitor_dimensions, app_launcher_pos;
23@@ -391,6 +394,11 @@
24 width = 100,
25 height = 30
26 };
27+
28+ if (get_style_context ().direction == Gtk.TextDirection.RTL) {
29+ app_launcher_pos.x += monitor_dimensions.width - this.get_window ().get_width ();
30+ }
31+
32 move_to_rect (app_launcher_pos, show);
33 }
34

Subscribers

People subscribed via source and target branches