[quadrapassel] Fix the start icon in RTL
- From: Mario Wenzel <mariowenzel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [quadrapassel] Fix the start icon in RTL
- Date: Thu, 16 Jan 2014 09:02:30 +0000 (UTC)
commit b5794f82a8a5231da9cf366988cfaa12a03094a8
Author: Yosef Or Boczko <yoseforb gmail com>
Date: Thu Jan 16 00:33:01 2014 +0200
Fix the start icon in RTL
https://bugzilla.gnome.org/show_bug.cgi?id=722302
src/quadrapassel.vala | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/quadrapassel.vala b/src/quadrapassel.vala
index b23ed45..ef20ac9 100644
--- a/src/quadrapassel.vala
+++ b/src/quadrapassel.vala
@@ -131,8 +131,12 @@ public class Quadrapassel : Gtk.Application
view.game = new Game (20, 14, 1, 20, 10);
view.show ();
+ bool rtl = Gtk.Widget.get_default_direction () == Gtk.TextDirection.RTL;
+
pause_play_button = new Gtk.Button();
- pause_play_button_image = new Gtk.Image.from_icon_name ("media-playback-start-symbolic",
Gtk.IconSize.DIALOG);
+ pause_play_button_image = new Gtk.Image.from_icon_name (rtl ? "media-playback-start-rtl-symbolic" :
+ "media-playback-start-symbolic",
+ Gtk.IconSize.DIALOG);
pause_play_button.add (pause_play_button_image);
pause_play_button.action_name = "app.new-game";
pause_play_button.hexpand = true;
@@ -670,7 +674,10 @@ public class Quadrapassel : Gtk.Application
{
if (game.paused)
{
- pause_play_button_image.set_from_icon_name ("media-playback-start", Gtk.IconSize.DIALOG);
+ bool rtl = Gtk.Widget.get_default_direction () == Gtk.TextDirection.RTL;
+ pause_play_button_image.set_from_icon_name (rtl ? "media-playback-start-rtl" :
+ "media-playback-start",
+ Gtk.IconSize.DIALOG);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]