dash: Resolve padding and alignment issues with dash items

- revert a change to y-expand on dash items
- clean up the manual padding on dash items in stylesheet
- fix an issue with the running dot being misaligned

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7322
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3119>
This commit is contained in:
Sam Hewitt 2024-01-15 11:49:40 -03:30 committed by Marge Bot
parent 38944e1c8f
commit b14623c664
2 changed files with 12 additions and 5 deletions

View File

@ -7,6 +7,7 @@ $dash_placeholder_size: 32px;
$dash_padding: $base_padding * 2; $dash_padding: $base_padding * 2;
$dash_edge_offset: $base_margin * 3; $dash_edge_offset: $base_margin * 3;
$dash_border_radius: $modal_radius + $dash_padding; $dash_border_radius: $modal_radius + $dash_padding;
$dash_spacing: $base_margin * 0.5;
// container for the dash // container for the dash
#dash { #dash {
@ -18,8 +19,8 @@ $dash_border_radius: $modal_radius + $dash_padding;
border-radius: $dash_border_radius; border-radius: $dash_border_radius;
padding-top: $dash_padding; padding-top: $dash_padding;
padding-bottom: $dash_padding; padding-bottom: $dash_padding;
padding-left: $dash_padding - $base_margin; // subtract the margins added to .overview-tile below as padding padding-left: $dash_padding - $dash_spacing; // subtract the margins added to .overview-tile below
padding-right: $dash_padding - $base_margin; padding-right: $dash_padding - $dash_spacing;
@if $contrast == 'high' { @if $contrast == 'high' {
@include draw_hc_inset($width: 2px); @include draw_hc_inset($width: 2px);
@ -48,8 +49,8 @@ $dash_border_radius: $modal_radius + $dash_padding;
// remove styles // remove styles
@extend %reset; @extend %reset;
padding: $dash_padding $base_margin; margin: 0 $dash_spacing;
padding-bottom: $dash_padding + $dash_edge_offset; padding-bottom: $dash_edge_offset; // align with other items
$fg:$system_fg_color; $fg:$system_fg_color;
$bg:$dash_background_color; $bg:$dash_background_color;
@ -68,6 +69,12 @@ $dash_border_radius: $modal_radius + $dash_padding;
&:active .overview-icon { @include button(active, $tc:$fg, $c:$bg, $style: flat, $always_dark: true);} &:active .overview-icon { @include button(active, $tc:$fg, $c:$bg, $style: flat, $always_dark: true);}
&:checked .overview-icon { @include button(checked, $tc:$fg, $c:$bg, $style: flat, $always_dark: true);} &:checked .overview-icon { @include button(checked, $tc:$fg, $c:$bg, $style: flat, $always_dark: true);}
} }
// running app dot
.app-grid-running-dot {
// manually position the dot within the dash item
margin-bottom: $dash_padding + $dash_edge_offset - 3px; // 3px = size of dot (5px) subtracted from its translationY from appDisplay.js
}
} }
// separator between pinned and running apps // separator between pinned and running apps

View File

@ -153,7 +153,7 @@ class DashItemContainer extends St.Widget {
this.destroy_all_children(); this.destroy_all_children();
this.child = actor; this.child = actor;
this.child.y_expand = false; this.child.y_expand = true;
this.add_child(this.child); this.add_child(this.child);
} }