theme: Fixes for oversights in :rtl
- fix padding issue uncovered in #5123 - fix RTL padding and margin quirks in popovers - fix incorrect padding in RTL in message list notifications Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2212>
This commit is contained in:
parent
919039e266
commit
96df498450
@ -123,7 +123,9 @@ $bubble_buttons_color: if($variant == 'light', darken($bg_color, 12%), lighten($
|
|||||||
%bubble_button {
|
%bubble_button {
|
||||||
padding: $base_padding * 2;
|
padding: $base_padding * 2;
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
margin-right: 1px;
|
|
||||||
|
&:ltr {margin-right: 1px;}
|
||||||
|
&:rtl {margin-left: 1px;}
|
||||||
|
|
||||||
@include button(normal, $c:$bubble_buttons_color);
|
@include button(normal, $c:$bubble_buttons_color);
|
||||||
&:insensitive { @include button(insensitive, $c:$bubble_buttons_color);}
|
&:insensitive { @include button(insensitive, $c:$bubble_buttons_color);}
|
||||||
@ -147,11 +149,12 @@ $bubble_buttons_color: if($variant == 'light', darken($bg_color, 12%), lighten($
|
|||||||
|
|
||||||
&:last-child:rtl {
|
&:last-child:rtl {
|
||||||
border-radius: 0 0 0 $bubble_button_radius;
|
border-radius: 0 0 0 $bubble_button_radius;
|
||||||
margin-right: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child:last-child {
|
&:first-child:last-child {
|
||||||
border-radius: 0 0 $bubble_button_radius $bubble_button_radius !important;
|
border-radius: 0 0 $bubble_button_radius $bubble_button_radius !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
margin-right: 0 !important;
|
margin-right: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,11 +67,9 @@
|
|||||||
// icon container
|
// icon container
|
||||||
.message-icon-bin {
|
.message-icon-bin {
|
||||||
padding: ($base_padding * 3);
|
padding: ($base_padding * 3);
|
||||||
padding-right:$base_padding;
|
|
||||||
|
|
||||||
&:rtl {
|
&:ltr {padding-right:$base_padding;}
|
||||||
padding-right:$base_padding;
|
&:rtl {padding-left:$base_padding;}
|
||||||
}
|
|
||||||
|
|
||||||
// icon size and color
|
// icon size and color
|
||||||
> StIcon {
|
> StIcon {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// the popover itself
|
// the popover itself
|
||||||
.popup-menu-boxpointer {
|
.popup-menu-boxpointer {
|
||||||
margin: $base_margin; // used as distance from the screen edge
|
-arrow-rise: $base_margin+2px; // distance from the panel & screen edge
|
||||||
}
|
}
|
||||||
|
|
||||||
// container of the popover menu
|
// container of the popover menu
|
||||||
@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
//.popup-status-menu-item {font-weight: normal; color: pink;} //dunno what that is
|
//.popup-status-menu-item {font-weight: normal; color: pink;} //dunno what that is
|
||||||
&.panel-menu {
|
&.panel-menu {
|
||||||
-boxpointer-gap: $base_margin+2px; // distance from the panel
|
|
||||||
margin-bottom: 1.75em; // so it doesn't touch the bottom of the screen
|
margin-bottom: 1.75em; // so it doesn't touch the bottom of the screen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -20,7 +19,6 @@
|
|||||||
// popover content
|
// popover content
|
||||||
.popup-menu-content {
|
.popup-menu-content {
|
||||||
padding: $base_padding;
|
padding: $base_padding;
|
||||||
// account for margin oddities
|
|
||||||
border-radius: $modal_radius - 2px;
|
border-radius: $modal_radius - 2px;
|
||||||
border: 1px solid $borders_edge;
|
border: 1px solid $borders_edge;
|
||||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.1);
|
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.1);
|
||||||
@ -31,9 +29,13 @@
|
|||||||
.popup-menu-item {
|
.popup-menu-item {
|
||||||
padding: $base_padding*1.5 $base_padding*2;
|
padding: $base_padding*1.5 $base_padding*2;
|
||||||
border-radius: $base_border_radius;
|
border-radius: $base_border_radius;
|
||||||
|
spacing: $base_padding;
|
||||||
transition: 0.2s all ease;
|
transition: 0.2s all ease;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
|
&:ltr {padding-left: $base_padding;}
|
||||||
|
&:rtl {padding-right: $base_padding;}
|
||||||
|
|
||||||
&:focus, &:hover {
|
&:focus, &:hover {
|
||||||
background-color: $hover_bg_color !important;
|
background-color: $hover_bg_color !important;
|
||||||
&:active { background-color: $active_bg_color !important;}
|
&:active { background-color: $active_bg_color !important;}
|
||||||
@ -55,6 +57,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:insensitive {color: transparentize($fg_color,0.5);}
|
&:insensitive {color: transparentize($fg_color,0.5);}
|
||||||
|
|
||||||
|
// add margin to switches in menu items
|
||||||
|
.toggle-switch {
|
||||||
|
&:ltr { margin-left: $base_margin;}
|
||||||
|
&:rtl { margin-right: $base_margin;}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -71,8 +79,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.popup-menu-arrow {
|
.popup-menu-arrow {
|
||||||
&:ltr {margin-right: $base_margin;}
|
|
||||||
&:rtl {margin-left: $base_margin;}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +110,7 @@
|
|||||||
|
|
||||||
.popup-menu-section {
|
.popup-menu-section {
|
||||||
.popup-menu-item:last-child {
|
.popup-menu-item:last-child {
|
||||||
&:hover,&:focus {border-radius: 0;}
|
&:hover,&:focus { border-radius: 0;}
|
||||||
}
|
}
|
||||||
&:last-child .popup-menu-item:last-child {
|
&:last-child .popup-menu-item:last-child {
|
||||||
border-radius: 0 0 $base_border_radius $base_border_radius;
|
border-radius: 0 0 $base_border_radius $base_border_radius;
|
||||||
@ -118,14 +124,16 @@
|
|||||||
width: 1.2em;
|
width: 1.2em;
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
|
|
||||||
&:ltr {text-align: right;};
|
&:ltr { text-align: right;}
|
||||||
&:rtl {text-align: left;};
|
&:rtl { text-align: left;}
|
||||||
}
|
}
|
||||||
|
|
||||||
// separator
|
// separator
|
||||||
.popup-separator-menu-item {
|
.popup-separator-menu-item {
|
||||||
padding:0;
|
|
||||||
margin: 6px 0;
|
margin: 6px 0;
|
||||||
|
padding:0 !important;
|
||||||
|
&:ltr { margin-right: $base_margin;}
|
||||||
|
&:rtl { margin-left: $base_margin;}
|
||||||
|
|
||||||
.popup-separator-menu-item-separator {
|
.popup-separator-menu-item-separator {
|
||||||
height: 1px; //not really the whole box
|
height: 1px; //not really the whole box
|
||||||
@ -136,11 +144,14 @@
|
|||||||
width: 0 !important;
|
width: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// separators in submenus
|
||||||
.popup-sub-menu & {
|
.popup-sub-menu & {
|
||||||
padding: 0;
|
|
||||||
margin-right: 2.5em !important; // account for ornament
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
|
// account for ornament
|
||||||
|
&:ltr { margin-right: 2.5em;}
|
||||||
|
&:rtl { margin-left: 2.5em;}
|
||||||
|
|
||||||
.popup-separator-menu-item-separator {
|
.popup-separator-menu-item-separator {
|
||||||
background-color: lighten($borders_color, 7%);
|
background-color: lighten($borders_color, 7%);
|
||||||
}
|
}
|
||||||
@ -149,7 +160,7 @@
|
|||||||
|
|
||||||
// desktop background menu
|
// desktop background menu
|
||||||
.background-menu {
|
.background-menu {
|
||||||
-boxpointer-gap: $base_margin;
|
-boxpointer-gap: 0px;
|
||||||
-arrow-rise: 0px; // hide the beak on the menu
|
-arrow-rise: 0px; // hide the beak on the menu
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,19 +181,14 @@
|
|||||||
// account for ornaments in submenus with padding
|
// account for ornaments in submenus with padding
|
||||||
.popup-sub-menu .popup-menu-item > :first-child {
|
.popup-sub-menu .popup-menu-item > :first-child {
|
||||||
// this value is hardcoded for visual effect
|
// this value is hardcoded for visual effect
|
||||||
&:ltr { margin-left: $base_margin*2;}
|
&:ltr { margin-left: 1em;}
|
||||||
&:rtl { margin-right: $base_margin*2;}
|
&:rtl { margin-right: 1em;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// right-click (and panel) app menu
|
// right-click (and panel) app menu
|
||||||
.app-menu {
|
.app-menu {
|
||||||
max-width: 27.25em;
|
max-width: 27.25em;
|
||||||
.popup-menu-content { margin: $base_margin;}
|
|
||||||
|
|
||||||
&.panel-menu {
|
|
||||||
.popup-menu-content { margin: 0;} // avoid doubling up margin
|
|
||||||
}
|
|
||||||
|
|
||||||
// this is unneeded at the top-level in this menu, hide it
|
// this is unneeded at the top-level in this menu, hide it
|
||||||
.popup-menu-ornament { width: 0 !important; }
|
.popup-menu-ornament { width: 0 !important; }
|
||||||
|
Loading…
Reference in New Issue
Block a user