Skip to content

Commit

Permalink
gtk3: Apply primary-toolbar styling to its child toolbars
Browse files Browse the repository at this point in the history
Some applications (at least recent versions of Synaptic Package
Manager) have a toolbar widget inside a .primary-toolbar box.

This didn't work properly with the Arc-Darker variant, which has
light toolbar and dark .primary-toolbar, but resulted in mismatching
foreground and background colors, and possibly other oddities.

Fixes: #51
  • Loading branch information
jnsh committed Jul 23, 2020
1 parent adb8ece commit da66201
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 27 deletions.
20 changes: 11 additions & 9 deletions common/gtk-3.0/3.20/sass/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -975,17 +975,19 @@ toolbar {
}

.primary-toolbar:not(.libreoffice-toolbar) { // LO messes up the toolbar styling, so exclude LO toolbars
color: $header_fg;
background-color: opacify($header_bg, 1);
box-shadow: none;
border-width: 0 0 1px 0;
border-style: solid;
border-image: linear-gradient(to bottom, opacify($header_bg, 1),
darken($header_bg, 7%)) 1 0 1 0; //temporary hack for rhythmbox 3.1
&, & toolbar {
color: $header_fg;
background-color: opacify($header_bg, 1);
box-shadow: none;
border-width: 0 0 1px 0;
border-style: solid;
border-image: linear-gradient(to bottom, opacify($header_bg, 1),
darken($header_bg, 7%)) 1 0 1 0; //temporary hack for rhythmbox 3.1

//&:backdrop { background-color: opacify($header_bg_backdrop, 1); }
//&:backdrop { background-color: opacify($header_bg_backdrop, 1); }

separator { @extend %header_separator; }
separator { @extend %header_separator; }
}
}

.primary-toolbar { @extend %header_widgets; }
Expand Down
20 changes: 11 additions & 9 deletions common/gtk-3.0/3.22/sass/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1001,17 +1001,19 @@ toolbar {
}

.primary-toolbar:not(.libreoffice-toolbar) { // LO messes up the toolbar styling, so exclude LO toolbars
color: $header_fg;
background-color: opacify($header_bg, 1);
box-shadow: none;
border-width: 0 0 1px 0;
border-style: solid;
border-image: linear-gradient(to bottom, opacify($header_bg, 1),
darken($header_bg, 7%)) 1 0 1 0; //temporary hack for rhythmbox 3.1
&, & toolbar {
color: $header_fg;
background-color: opacify($header_bg, 1);
box-shadow: none;
border-width: 0 0 1px 0;
border-style: solid;
border-image: linear-gradient(to bottom, opacify($header_bg, 1),
darken($header_bg, 7%)) 1 0 1 0; //temporary hack for rhythmbox 3.1

//&:backdrop { background-color: opacify($header_bg_backdrop, 1); }
//&:backdrop { background-color: opacify($header_bg_backdrop, 1); }

separator { @extend %header_separator; }
separator { @extend %header_separator; }
}
}

.primary-toolbar { @extend %header_widgets; }
Expand Down
20 changes: 11 additions & 9 deletions common/gtk-3.0/3.24/sass/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1001,17 +1001,19 @@ toolbar {
}

.primary-toolbar:not(.libreoffice-toolbar) { // LO messes up the toolbar styling, so exclude LO toolbars
color: $header_fg;
background-color: opacify($header_bg, 1);
box-shadow: none;
border-width: 0 0 1px 0;
border-style: solid;
border-image: linear-gradient(to bottom, opacify($header_bg, 1),
darken($header_bg, 7%)) 1 0 1 0; //temporary hack for rhythmbox 3.1
&, & toolbar {
color: $header_fg;
background-color: opacify($header_bg, 1);
box-shadow: none;
border-width: 0 0 1px 0;
border-style: solid;
border-image: linear-gradient(to bottom, opacify($header_bg, 1),
darken($header_bg, 7%)) 1 0 1 0; //temporary hack for rhythmbox 3.1

//&:backdrop { background-color: opacify($header_bg_backdrop, 1); }
//&:backdrop { background-color: opacify($header_bg_backdrop, 1); }

separator { @extend %header_separator; }
separator { @extend %header_separator; }
}
}

.primary-toolbar { @extend %header_widgets; }
Expand Down

0 comments on commit da66201

Please sign in to comment.