summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-03-18 16:52:46 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-03-18 16:52:46 +0000
commita205e76fb108c51a57f35a8cd3dff8751c1cee07 (patch)
tree4984a161b18a846a8b9fd9f5d8cd601609516f0a
parent26526d1a66b60234fa5aea218cfa0534d7234812 (diff)
downloadcontrol-center-a205e76fb108c51a57f35a8cd3dff8751c1cee07.tar
control-center-a205e76fb108c51a57f35a8cd3dff8751c1cee07.tar.gz
control-center-a205e76fb108c51a57f35a8cd3dff8751c1cee07.tar.bz2
control-center-a205e76fb108c51a57f35a8cd3dff8751c1cee07.tar.xz
control-center-a205e76fb108c51a57f35a8cd3dff8751c1cee07.zip
fix RTL rendering (#14517):
- align RTL texts to right - pack text & icon from righ to left for RTL languages
-rwxr-xr-xcontrol-center19
1 files changed, 13 insertions, 6 deletions
diff --git a/control-center b/control-center
index 98e7f1da..bc34e7c6 100755
--- a/control-center
+++ b/control-center
@@ -1281,6 +1281,9 @@ sub request_url {
$stream->close;
}
+my $align = lang::text_direction_rtl() ? "right" : "justify";
+my $align2 = lang::text_direction_rtl() ? "right" : "left";
+
sub refresh_tree {
my ($mode) = @_;
if ($mode && $page_count) {
@@ -1314,9 +1317,9 @@ foreach (@tree) {
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
- p {text-align: justify}
- td {text-align: justify}
- tr {text-align: justify}),
+ p {text-align: $align}
+ td {text-align: $align}
+ tr {text-align: $align}),
if_(lang::text_direction_rtl(), " a { direction: rtl; unicode-bidi: embed }"), qq(
a:link {color:black; text-decoration:none }
a:visited {color:black; text-decoration:none }
@@ -1365,10 +1368,14 @@ foreach (@tree) {
# FIX ME: DO THIS AGAIN:
$tool_feedback{$label} = sub { }; #sub { $event_box->window && $event_box->window->set_cursor($hand_cursor) };
my $file = ugtk2::_find_imgfile($icon);
+ my @widgets = (
+ qq(<TD><A HREF="$label"><IMG SRC="$file"></A></TD>),
+ qq(<TD ALIGN="justify" style="text-align: $align"><A HREF="$label">$programs{$label}{long_description}</A></TD>)
+ );
+ @widgets = reverse @widgets if lang::text_direction_rtl();
qq(<TD WIDTH="40%">
-<TABLE cellspacing="5"><TR>
-<TD><A HREF="$label"><IMG SRC="$file"></A></TD>
-<TD ALIGN="justify" style="text-align: justify"><A HREF="$label">$programs{$label}{long_description}</A></TD>
+<TABLE cellspacing="5" align="$align2"><TR>
+@widgets
</TR></TABLE>
);
} @subtree)