Skip to content

Commit

Permalink
Swap text-align in RTL locales
Browse files Browse the repository at this point in the history
  • Loading branch information
lassekongo83 committed Aug 5, 2020
1 parent 78c00b5 commit 4cee0e8
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 18 deletions.
24 changes: 18 additions & 6 deletions gnome-shell/src/gnome-shell-high-contrast.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { backg

.popup-sub-menu { background-color: black; box-shadow: none; border-top: 1px solid rgba(0, 0, 0, 0.8); border-bottom: 1px solid rgba(0, 0, 0, 0.8); }

.popup-menu-ornament { text-align: right; width: 1.2em; }
.popup-menu-ornament { width: 1.2em; }

.popup-menu-ornament:ltr { text-align: right; }

.popup-menu-ornament:rtl { text-align: left; }

.popup-separator-menu-item { padding: 0; }

Expand Down Expand Up @@ -254,7 +258,11 @@ StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { backg

.world-clocks-button .world-clocks-city { color: #fff; font-size: 11pt; font-weight: normal; }

.world-clocks-button .world-clocks-time { font-weight: bold; color: #fff; font-feature-settings: "tnum"; font-size: 11pt; text-align: right; }
.world-clocks-button .world-clocks-time { font-weight: bold; color: #fff; font-feature-settings: "tnum"; font-size: 11pt; }

.world-clocks-button .world-clocks-time:ltr { text-align: right; }

.world-clocks-button .world-clocks-time:rtl { text-align: left; }

.world-clocks-button .world-clocks-timezone { color: #cccccc; font-feature-settings: "tnum"; font-size: 10pt; }

Expand Down Expand Up @@ -316,7 +324,11 @@ StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { backg

.message .message-secondary-bin { padding: 0 8px; }

.message .message-secondary-bin > .event-time { color: rgba(255, 255, 255, 0.5); font-size: 9pt; text-align: right; /* HACK: the label should be baseline-aligned with a 1em label, fake this with some bottom padding */ padding-bottom: 0.13em; }
.message .message-secondary-bin > .event-time { color: rgba(255, 255, 255, 0.5); font-size: 9pt; /* HACK: the label should be baseline-aligned with a 1em label, fake this with some bottom padding */ padding-bottom: 0.13em; }

.message .message-secondary-bin > .event-time:ltr { text-align: right; }

.message .message-secondary-bin > .event-time:rtl { text-align: left; }

.message .message-close-button { color: white; }

Expand Down Expand Up @@ -980,11 +992,11 @@ StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { backg

.user-widget-label { color: #eeeeec; }

.user-widget.horizontal .user-widget-label { font-size: 13pt; font-weight: bold; text-align: left; padding-left: 15px; }
.user-widget.horizontal .user-widget-label { font-size: 13pt; font-weight: bold; padding-left: 15px; }

.user-widget.horizontal .user-widget-label:ltr { padding-left: 14px; }
.user-widget.horizontal .user-widget-label:ltr { padding-left: 14px; text-align: left; }

.user-widget.horizontal .user-widget-label:rtl { padding-right: 14px; }
.user-widget.horizontal .user-widget-label:rtl { padding-right: 14px; text-align: right; }

.user-widget.vertical .user-widget-label { font-size: 16pt; text-align: center; font-weight: normal; padding-top: 16px; }

Expand Down
4 changes: 3 additions & 1 deletion gnome-shell/src/gnome-shell-sass/widgets/_calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@
color: $fg_color;
font-feature-settings: "tnum";
@include fontsize($base_font_size);
text-align: right;

&:ltr { text-align: right; }
&:rtl { text-align: left; }
}

// timezone offset label
Expand Down
5 changes: 2 additions & 3 deletions gnome-shell/src/gnome-shell-sass/widgets/_login-dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,10 @@
.user-widget.horizontal .user-widget-label {
@include fontsize($base_font_size + 2);
font-weight: bold;
text-align: left;
padding-left: 15px;

&:ltr { padding-left: 14px; }
&:rtl { padding-right: 14px; }
&:ltr { padding-left: 14px; text-align: left; }
&:rtl { padding-right: 14px; text-align: right; }
}

.user-widget.vertical .user-widget-label {
Expand Down
4 changes: 3 additions & 1 deletion gnome-shell/src/gnome-shell-sass/widgets/_message-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@
> .event-time {
color: transparentize($fg_color, 0.5);
@include fontsize($base_font_size - 2);
text-align: right;
/* HACK: the label should be baseline-aligned with a 1em label, fake this with some bottom padding */
padding-bottom: 0.13em;

&:ltr { text-align: right };
&:rtl { text-align: left };
}
}

Expand Down
4 changes: 3 additions & 1 deletion gnome-shell/src/gnome-shell-sass/widgets/_popovers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ $popover_arrow_height: 12px;

// container for radio and check boxes
.popup-menu-ornament {
text-align: right;
width: 1.2em;

&:ltr { text-align: right };
&:rtl { text-align: left };
}

// separator
Expand Down
24 changes: 18 additions & 6 deletions gnome-shell/src/gnome-shell.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { backg

.popup-sub-menu { background-color: #242628; box-shadow: none; border-top: 1px solid rgba(24, 25, 26, 0.8); border-bottom: 1px solid rgba(24, 25, 26, 0.8); }

.popup-menu-ornament { text-align: right; width: 1.2em; }
.popup-menu-ornament { width: 1.2em; }

.popup-menu-ornament:ltr { text-align: right; }

.popup-menu-ornament:rtl { text-align: left; }

.popup-separator-menu-item { padding: 0; }

Expand Down Expand Up @@ -254,7 +258,11 @@ StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { backg

.world-clocks-button .world-clocks-city { color: #f6f6f7; font-size: 11pt; font-weight: normal; }

.world-clocks-button .world-clocks-time { font-weight: bold; color: #f6f6f7; font-feature-settings: "tnum"; font-size: 11pt; text-align: right; }
.world-clocks-button .world-clocks-time { font-weight: bold; color: #f6f6f7; font-feature-settings: "tnum"; font-size: 11pt; }

.world-clocks-button .world-clocks-time:ltr { text-align: right; }

.world-clocks-button .world-clocks-time:rtl { text-align: left; }

.world-clocks-button .world-clocks-timezone { color: #c0c0c7; font-feature-settings: "tnum"; font-size: 10pt; }

Expand Down Expand Up @@ -316,7 +324,11 @@ StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { backg

.message .message-secondary-bin { padding: 0 8px; }

.message .message-secondary-bin > .event-time { color: rgba(246, 246, 247, 0.5); font-size: 9pt; text-align: right; /* HACK: the label should be baseline-aligned with a 1em label, fake this with some bottom padding */ padding-bottom: 0.13em; }
.message .message-secondary-bin > .event-time { color: rgba(246, 246, 247, 0.5); font-size: 9pt; /* HACK: the label should be baseline-aligned with a 1em label, fake this with some bottom padding */ padding-bottom: 0.13em; }

.message .message-secondary-bin > .event-time:ltr { text-align: right; }

.message .message-secondary-bin > .event-time:rtl { text-align: left; }

.message .message-close-button { color: white; }

Expand Down Expand Up @@ -980,11 +992,11 @@ StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active { backg

.user-widget-label { color: #eeeeec; }

.user-widget.horizontal .user-widget-label { font-size: 13pt; font-weight: bold; text-align: left; padding-left: 15px; }
.user-widget.horizontal .user-widget-label { font-size: 13pt; font-weight: bold; padding-left: 15px; }

.user-widget.horizontal .user-widget-label:ltr { padding-left: 14px; }
.user-widget.horizontal .user-widget-label:ltr { padding-left: 14px; text-align: left; }

.user-widget.horizontal .user-widget-label:rtl { padding-right: 14px; }
.user-widget.horizontal .user-widget-label:rtl { padding-right: 14px; text-align: right; }

.user-widget.vertical .user-widget-label { font-size: 16pt; text-align: center; font-weight: normal; padding-top: 16px; }

Expand Down

0 comments on commit 4cee0e8

Please sign in to comment.