From 0b1bf5f6424ffa5c1ce1034e9888a3099db76b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 4 Mar 2011 00:48:17 +0100 Subject: [PATCH] theme: Adjust CSS for RTL locales Use :ltr/:rtl pseudo selectors where the CSS depends on the locale's text direction. https://bugzilla.gnome.org/show_bug.cgi?id=643835 --- data/Makefile.am | 3 +- ...r-selected.svg => filter-selected-ltr.svg} | 0 data/theme/filter-selected-rtl.svg | 81 ++++++++++ data/theme/gnome-shell.css | 143 ++++++++++++++++-- 4 files changed, 214 insertions(+), 13 deletions(-) rename data/theme/{filter-selected.svg => filter-selected-ltr.svg} (100%) create mode 100644 data/theme/filter-selected-rtl.svg diff --git a/data/Makefile.am b/data/Makefile.am index 1f207ef78..58c746438 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -26,7 +26,8 @@ dist_theme_DATA = \ theme/close.svg \ theme/corner-ripple.png \ theme/dash-placeholder.svg \ - theme/filter-selected.svg \ + theme/filter-selected-ltr.svg \ + theme/filter-selected-rtl.svg \ theme/gnome-shell.css \ theme/mosaic-view-active.svg \ theme/mosaic-view.svg \ diff --git a/data/theme/filter-selected.svg b/data/theme/filter-selected-ltr.svg similarity index 100% rename from data/theme/filter-selected.svg rename to data/theme/filter-selected-ltr.svg diff --git a/data/theme/filter-selected-rtl.svg b/data/theme/filter-selected-rtl.svg new file mode 100644 index 000000000..94af6bb8f --- /dev/null +++ b/data/theme/filter-selected-rtl.svg @@ -0,0 +1,81 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index da21721e7..56e7496bd 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -195,21 +195,19 @@ StTooltip StLabel { font-weight: bold; } -#panelLeft { +#panelLeft:ltr { padding-right: 4px; } #panelLeft:rtl { - padding-right: 0px; padding-left: 4px; } -#panelRight { +#panelRight:ltr { padding-left: 4px; } #panelRight:rtl { - padding-left: 0px; padding-right: 4px; } @@ -297,6 +295,11 @@ StTooltip StLabel { padding-left: 14px; } +#legacyTray:rtl { + padding-left: 0px; + padding-right: 14px; +} + #legacyTray:compact { spacing: 8px; } @@ -360,6 +363,10 @@ StTooltip StLabel { -shell-close-overlap: 16px; } +.window-close:rtl { + -st-background-image-shadow: 2px 2px 6px rgba(0,0,0,0.5); +} + /* Dash */ #dash { @@ -473,10 +480,15 @@ StTooltip StLabel { } #searchResultsContent { - padding: 0 20px 0 0; + padding-right: 20px; spacing: 36px; } +#searchResultsContent:rtl { + padding-right: 0px; + padding-left: 20px; +} + .search-statustext, .search-section-header { padding: 4px 12px; @@ -541,6 +553,11 @@ StTooltip StLabel { spacing: 20px; } +.all-app:rtl { + padding-right: 16px; + padding-left: 25px; +} + .app-filter { font-size: 14px; font-weight: bold; @@ -551,10 +568,15 @@ StTooltip StLabel { .app-filter:selected { color: #ffffff; - background-image: url("filter-selected.svg"); + background-image: url("filter-selected-ltr.svg"); background-position: 190px 10px; } +.app-filter:selected:rtl { + background-image: url("filter-selected-rtl.svg"); + background-position: 10px 10px; +} + .dash-item-container > .app-well-app { padding: 4px 8px; } @@ -765,6 +787,11 @@ StTooltip StLabel { background-image: url("calendar-arrow-left.svg"); border-radius: 4px; } + +.calendar-change-month-back:rtl { + background-image: url("calendar-arrow-right.svg"); +} + .calendar-change-month-back:hover { background-color: #999999; } @@ -778,6 +805,11 @@ StTooltip StLabel { background-image: url("calendar-arrow-right.svg"); border-radius: 4px; } + +.calendar-change-month-forward:rtl { + background-image: url("calendar-arrow-left.svg"); +} + .calendar-change-month-forward:hover { background-color: #999999; } @@ -872,18 +904,31 @@ StTooltip StLabel { padding-left: 0.3em; } +.events-day-header:rtl { + padding-left: 0em; + padding-right: 0.3em; +} + .events-day-dayname { font-size: 12px; color: rgba(153, 153, 153, 1.0); text-align: left; } +.events-day-dayname:rtl { + text-align: right; +} + .events-day-time { font-size: 12px; color: #fff; text-align: right; } +.events-day-time:rtl { + text-align: left; +} + .events-day-task { font-size: 12px; color: rgba(153, 153, 153, 1.0); @@ -898,6 +943,11 @@ StTooltip StLabel { padding-right: 8px; } +.events-time-box:rtl { + padding-right: 0px; + padding-left: 8px; +} + .events-event-box { } @@ -951,10 +1001,14 @@ StTooltip StLabel { height: 1em; } -#notification-scrollview > StScrollBar { +#notification-scrollview:ltr > StScrollBar { padding-left: 6px; } +#notification-scrollview:rtl > StScrollBar { + padding-right: 6px; +} + #notification-body { spacing: 5px; } @@ -1014,6 +1068,11 @@ StTooltip StLabel { border-radius: 4px; } +.chat-received:rtl { + padding-left: 0px; + padding-right: 4px; +} + .chat-sent { background-gradient-direction: horizontal; background-gradient-start: rgba(255, 255, 255, 0); @@ -1023,6 +1082,11 @@ StTooltip StLabel { border-radius: 4px; } +.chat-sent:rtl { + padding-left: 0px; + padding-right: 4px; +} + .chat-meta-message { padding-left: 4px; border-radius: 4px; @@ -1030,6 +1094,11 @@ StTooltip StLabel { color: #bbbbbb; } +.chat-meta-message:rtl { + padding-left: 0px; + padding-right: 4px; +} + #notification StEntry { padding: 4px; border-radius: 4px; @@ -1066,21 +1135,39 @@ StTooltip StLabel { height: 36px; } -.summary-source-button { +#summary-mode:rtl { + padding: 2px 4px 0px 0px; +} + +.summary-source-button:ltr { padding-left: 4px; padding-right: 16px; } -.summary-source-button:last-child { +.summary-source-button:rtl { + padding-right: 4px; + padding-left: 16px; +} + +.summary-source-button:last-child:ltr { padding-right: 12px; } +.summary-source-button:last-child:rtl { + padding-left: 12px; +} + .source-title { font-size: 12px; font-weight: bold; padding-left: 4px; } +.source-title:rtl { + padding-left: 0px; + padding-right: 4px; +} + /* App Switcher */ #altTabPopup { padding: 8px; @@ -1302,6 +1389,11 @@ StTooltip StLabel { padding-bottom: 30px; } +.end-session-dialog-subject:rtl { + padding-left: 0px; + padding-right: 17px; +} + .end-session-dialog-description { font-size: 10pt; color: white; @@ -1310,6 +1402,11 @@ StTooltip StLabel { width: 16em; } +.end-session-dialog-description:rtl { + padding-right: 17px; + padding-left: 40px; +} + .end-session-dialog-logout-icon { border: 2px solid #8b8b8b; border-radius: 5px; @@ -1331,14 +1428,27 @@ StTooltip StLabel { padding-right: 32px; } -.end-session-dialog-app-list-item { +.end-session-dialog-app-list:rtl { + padding-right: 17px; + padding-left: 32px; +} + +.end-session-dialog-app-list-item:ltr { padding-right: 1em; } -.end-session-dialog-app-list-item-icon { +.end-session-dialog-app-list-item:rtl { + padding-left: 1em; +} + +.end-session-dialog-app-list-item-icon:ltr { padding-right: 17px; } +.end-session-dialog-app-list-item-icon:rtl { + padding-left: 17px; +} + .end-session-dialog-app-list-item-name { font-size: 10pt; } @@ -1379,10 +1489,19 @@ StTooltip StLabel { spacing: 10px; } -.polkit-dialog-password-label { +.polkit-dialog-user-layout:rtl { + padding-left: 0px; + padding-right: 10px; +} + +.polkit-dialog-password-label:ltr { padding-right: 0.5em; } +.polkit-dialog-password-label:rtl { + padding-left: 0.5em; +} + .polkit-dialog-password-entry { background-color: white; color: black;