Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
Gtk-3.22&3.24&4.0: [Nautilus] Polish experimental iconview-mode again…
Browse files Browse the repository at this point in the history
… (4)

* Move all margins from icons/thumbs to label node.
* Revive variant-specific spacing values.
  • Loading branch information
tista500 committed Aug 25, 2018
1 parent d3ee213 commit 9bd15fb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 15 deletions.
15 changes: 10 additions & 5 deletions gtk/sass/3.22/_misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,13 @@ dialog.background.csd > box.dialog-vbox.vertical {
revealer > button.popup.toggle > widget { color: $accent_color; }
}

$child_gap: if($ref_weight < 1.0, 4px, 6px);
$container_padding: $child_gap ($child_gap * 1.5);
$label_margin: ($child_gap / 2) (-$child_gap * 1.5) 0;
$label_padding: if($ref_weight < 1.0,
($child_gap - 1px) $child_gap $child_gap,
($child_gap - 3px) $child_gap ($child_gap - 2px));

flowboxchild { // experimental 'new view' mode
margin: unset; // unset spacing first
padding: unset;
Expand All @@ -534,20 +541,18 @@ dialog.background.csd > box.dialog-vbox.vertical {

box.icon {
&-item-background {
padding: 4px;
padding: $container_padding;
border: 0 none transparent;

label {
margin: 0 -4px; // enlarge to maximum parent width
padding: 3px 4px 4px;
margin: $label_margin;
padding: $label_padding;
border-radius: 2px;
background-color: transparent;
}
}

&-background { // use solid black backgrounds
// gap between images and labels
margin-bottom: 4px;
border: 0 none transparent;
border-radius: 2px;
background-color: black;
Expand Down
15 changes: 10 additions & 5 deletions gtk/sass/3.24/_misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,13 @@ dialog.background.csd > box.dialog-vbox.vertical {
revealer > button.popup.toggle > widget { color: $accent_color; }
}

$child_gap: if($ref_weight < 1.0, 4px, 6px);
$container_padding: $child_gap ($child_gap * 1.5);
$label_margin: ($child_gap / 2) (-$child_gap * 1.5) 0;
$label_padding: if($ref_weight < 1.0,
($child_gap - 1px) $child_gap $child_gap,
($child_gap - 3px) $child_gap ($child_gap - 2px));

flowboxchild { // experimental 'new view' mode
margin: unset; // unset spacing first
padding: unset;
Expand All @@ -562,20 +569,18 @@ dialog.background.csd > box.dialog-vbox.vertical {

box.icon {
&-item-background {
padding: 4px;
padding: $container_padding;
border: 0 none transparent;

label {
margin: 0 -4px; // enlarge to maximum parent width
padding: 3px 4px 4px;
margin: $label_margin;
padding: $label_padding;
border-radius: 2px;
background-color: transparent;
}
}

&-background { // use solid black backgrounds
// gap between images and labels
margin-bottom: 4px;
border: 0 none transparent;
border-radius: 2px;
background-color: black;
Expand Down
15 changes: 10 additions & 5 deletions gtk/sass/4.0/_misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,13 @@ dialog.background.csd > box.dialog-vbox.vertical {
revealer > button.popup.toggle > widget { color: $accent_color; }
}

$child_gap: if($ref_weight < 1.0, 4px, 6px);
$container_padding: $child_gap ($child_gap * 1.5);
$label_margin: ($child_gap / 2) (-$child_gap * 1.5) 0;
$label_padding: if($ref_weight < 1.0,
($child_gap - 1px) $child_gap $child_gap,
($child_gap - 3px) $child_gap ($child_gap - 2px));

flowboxchild { // experimental 'new view' mode
margin: unset; // unset spacing first
padding: unset;
Expand All @@ -547,20 +554,18 @@ dialog.background.csd > box.dialog-vbox.vertical {

box.icon {
&-item-background {
padding: 4px;
padding: $container_padding;
border: 0 none transparent;

label {
margin: 0 -4px; // enlarge to maximum parent width
padding: 3px 4px 4px;
margin: $label_margin;
padding: $label_padding;
border-radius: 2px;
background-color: transparent;
}
}

&-background { // use solid black backgrounds
// gap between images and labels
margin-bottom: 4px;
border: 0 none transparent;
border-radius: 2px;
background-color: black;
Expand Down

0 comments on commit 9bd15fb

Please sign in to comment.