From 49957c95d1677671a27eb2172ba9071116009f6a Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 14 Jul 2012 00:26:23 +0200 Subject: [PATCH] Handle RTL in special pages (errors) --- data/about.css | 17 +++++++++++++++-- data/error.html | 2 +- midori/midori-view.c | 2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/data/about.css b/data/about.css index 42df9b58..66cb3345 100644 --- a/data/about.css +++ b/data/about.css @@ -24,6 +24,11 @@ body { padding-top: 1%; } +html[dir="rtl"] #icon { + float: right; + padding-right: 1%; +} + #main { float: right; width: 75%; @@ -38,8 +43,16 @@ h1 { } #logo { - position: absolute; right: 15px; bottom: 15px; - z-index: -1; + position: absolute; bottom: 15px; + z-index: -1; +} + +html[dir="ltr"] #logo { + right: 15px; +} + +html[dir="rtl"] #logo { + left: 15px; } button span, diff --git a/data/error.html b/data/error.html index 6bc9698e..b6264944 100644 --- a/data/error.html +++ b/data/error.html @@ -2,7 +2,7 @@ Error page template for Midori. This file is licensed under the terms of the expat license, see the file EXPAT. --> - + {title} diff --git a/midori/midori-view.c b/midori/midori-view.c index a4757633..9d8eb063 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1439,6 +1439,8 @@ midori_view_display_error (MidoriView* view, title_escaped = g_markup_escape_text (title, -1); icon = katze_item_get_icon (view->item); result = sokoke_replace_variables (template, + "{dir}", gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL ? + "rtl" : "ltr", "{title}", title_escaped, "{icon}", icon ? icon : "", "{message}", message,