Handle RTL in special pages (errors)

This commit is contained in:
Christian Dywan 2012-07-14 00:26:23 +02:00
parent 81543161df
commit 49957c95d1
3 changed files with 18 additions and 3 deletions

View file

@ -24,6 +24,11 @@ body {
padding-top: 1%;
}
html[dir="rtl"] #icon {
float: right;
padding-right: 1%;
}
#main {
float: right;
width: 75%;
@ -38,10 +43,18 @@ h1 {
}
#logo {
position: absolute; right: 15px; bottom: 15px;
position: absolute; bottom: 15px;
z-index: -1;
}
html[dir="ltr"] #logo {
right: 15px;
}
html[dir="rtl"] #logo {
left: 15px;
}
button span,
button img {
vertical-align: middle;

View file

@ -2,7 +2,7 @@
Error page template for Midori.
This file is licensed under the terms of the expat license, see the file EXPAT.
-->
<html>
<html dir="{dir}">
<head>
<title>{title}</title>
<link rel="shortcut icon" href="{icon}" />

View file

@ -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,