Commit f2c224a8 authored by Nikita Churaev's avatar Nikita Churaev

theme: Use a more generic method for laying out path bar buttons

The fix for Nautilus path bar changing its size due to width differences
between bold and regular text involves packing a bold label and a
regular label into a GtkStack and switching between them. This means
that the "label:first-child" and the "label:last-child" selectors are no
longer reliable since they now reflect the order of the labels in the
GtkStack and not whether the label comes before or after the image.
parent a0f27346
Pipeline #7496 passed with stage
in 39 minutes and 26 seconds
......@@ -1721,30 +1721,27 @@ headerbar { // headerbar border rounding
* Pathbars *
************/
.path-bar button {
&.text-button, &.image-button, & {
padding-left: 4px;
padding-right: 4px;
}
&.text-button.image-button label {
padding-left: 0;
padding-right: 0;
}
&.text-button.image-button, & {
label:last-child { padding-right: 8px; }
label:first-child { padding-left: 8px; }
&,
&.text-button {
padding-left: 10px;
padding-right: 10px;
}
image {
&.slider-button,
&.image-button {
padding-left: 4px;
padding-right: 4px;
}
&.slider-button {
& label,
&.image-button label {
padding-left: 0;
padding-right: 0;
}
& > box > *:not(:first-child) {
margin-left: 4px;
}
}
/**************
......
......@@ -679,17 +679,13 @@ window.csd > .titlebar:not(headerbar) { padding: 0; background-color: transparen
.titlebar:not(headerbar) > separator { background-color: #1b1f20; }
/************ Pathbars * */
.path-bar button.text-button, .path-bar button.image-button, .path-bar button { padding-left: 4px; padding-right: 4px; }
.path-bar button, .path-bar button.text-button { padding-left: 10px; padding-right: 10px; }
.path-bar button.text-button.image-button label { padding-left: 0; padding-right: 0; }
.path-bar button.slider-button, .path-bar button.image-button { padding-left: 4px; padding-right: 4px; }
.path-bar button.text-button.image-button label:last-child, .path-bar button label:last-child { padding-right: 8px; }
.path-bar button label, .path-bar button.image-button label { padding-left: 0; padding-right: 0; }
.path-bar button.text-button.image-button label:first-child, .path-bar button label:first-child { padding-left: 8px; }
.path-bar button image { padding-left: 4px; padding-right: 4px; }
.path-bar button.slider-button { padding-left: 0; padding-right: 0; }
.path-bar button > box > *:not(:first-child) { margin-left: 4px; }
/************** Tree Views * */
treeview.view { border-left-color: #898b8b; border-top-color: #33393b; }
......
......@@ -687,17 +687,13 @@ window.csd > .titlebar:not(headerbar) { padding: 0; background-color: transparen
.titlebar:not(headerbar) > separator { background-color: #b6b6b3; }
/************ Pathbars * */
.path-bar button.text-button, .path-bar button.image-button, .path-bar button { padding-left: 4px; padding-right: 4px; }
.path-bar button, .path-bar button.text-button { padding-left: 10px; padding-right: 10px; }
.path-bar button.text-button.image-button label { padding-left: 0; padding-right: 0; }
.path-bar button.slider-button, .path-bar button.image-button { padding-left: 4px; padding-right: 4px; }
.path-bar button.text-button.image-button label:last-child, .path-bar button label:last-child { padding-right: 8px; }
.path-bar button label, .path-bar button.image-button label { padding-left: 0; padding-right: 0; }
.path-bar button.text-button.image-button label:first-child, .path-bar button label:first-child { padding-left: 8px; }
.path-bar button image { padding-left: 4px; padding-right: 4px; }
.path-bar button.slider-button { padding-left: 0; padding-right: 0; }
.path-bar button > box > *:not(:first-child) { margin-left: 4px; }
/************** Tree Views * */
treeview.view { border-left-color: #979a9b; border-top-color: #e8e8e7; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment