Adwaita: fix popover buttons.

Unfortunatelly labels doesn't change color wrt states.

See https://bugzilla.gnome.org/show_bug.cgi?id=732494
This commit is contained in:
Lapo Calamandrei
2014-07-02 17:27:12 +02:00
parent f2972f13dd
commit 6e89856cc0
3 changed files with 40 additions and 76 deletions

View File

@ -382,39 +382,18 @@ GtkLabel {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
box-shadow: inset 0 1px transparentize(white,1); box-shadow: inset 0 1px transparentize(white,1);
text-shadow: none;
icon-shadow: none;
} }
/* menu buttons */ /* menu buttons */
.menuitem.button { .menuitem.button.flat {
color: $fg_color; @extend %undecorated_button;
background-color: transparent; outline-offset: -1px;
background-image: none; &:hover { background-color: mix($fg_color,$bg_color,10%); }
border-color: transparent; &:selected { @extend %selected_items; }
border-image: none; &:backdrop, &:backdrop:hover {
border-style: none; @extend %undecorated_button;
box-shadow: none;
&:insensitive,
&:active:insensitive {
@extend .menuitem.button; // override generic .button:*
}
&:active {
color: $selected_fg_color;
text-shadow: none;
icon-shadow: none;
}
&:backdrop,
&:hover:backdrop,
&:insensitive:backdrop,
&:active:insensitive:backdrop,
&:active:backdrop,
&:active:hover:backdrop,
&:active:selected:backdrop {
text-shadow: none;
icon-shadow: none;
color: $insensitive_fg_color;
background-image: linear-gradient(to bottom, $bg_color);
border: none;
box-shadow: none;
} }
} }
@ -1323,6 +1302,9 @@ $asset_suffix: if($variant=='dark', '-dark', '');
&:inconsistent { &:inconsistent {
-gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic'); -gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic');
} }
&:backdrop, &:backdrop:hover {
color: transparentize($backdrop_fg_color,0.9);
}
} }
//treeview & selection mode icon view //treeview & selection mode icon view

View File

@ -537,32 +537,19 @@
border-radius: 3px; border-radius: 3px;
border-style: solid; } border-style: solid; }
.button.flat, .button.flat:backdrop, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover { .button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover {
border-color: transparent; border-color: transparent;
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0); } box-shadow: inset 0 1px rgba(255, 255, 255, 0);
text-shadow: none;
icon-shadow: none; }
/* menu buttons */ /* menu buttons */
.menuitem.button, .menuitem.button:insensitive, .menuitem.button:active:insensitive { .menuitem.button.flat {
color: #eeeeec; outline-offset: -1px; }
background-color: transparent; .menuitem.button.flat:hover {
background-image: none; background-color: #4b5050; }
border-color: transparent;
border-image: none;
border-style: none;
box-shadow: none; }
.menuitem.button:active {
color: white;
text-shadow: none;
icon-shadow: none; }
.menuitem.button:backdrop, .menuitem.button:backdrop:active:insensitive, .menuitem.button:hover:backdrop, .menuitem.button:insensitive:backdrop, .menuitem.button:active:insensitive:backdrop, .menuitem.button:active:backdrop, .menuitem.button:active:hover:backdrop, .menuitem.button:active:selected:backdrop {
text-shadow: none;
icon-shadow: none;
color: #939695;
background-image: linear-gradient(to bottom, #393f3f);
border: none;
box-shadow: none; }
GtkColorButton.button { GtkColorButton.button {
padding: 4px; } padding: 4px; }
@ -1597,6 +1584,8 @@ GtkSwitch {
color: transparent; } color: transparent; }
.menuitem.check:inconsistent { .menuitem.check:inconsistent {
-gtk-icon-source: -gtk-icontheme("checkbox-mixed-symbolic"); } -gtk-icon-source: -gtk-icontheme("checkbox-mixed-symbolic"); }
.menuitem.check:backdrop, .menuitem.check:backdrop:hover {
color: rgba(201, 203, 201, 0.1); }
.view.check { .view.check {
color: rgba(238, 238, 236, 0.1); color: rgba(238, 238, 236, 0.1);
@ -1749,6 +1738,8 @@ GtkSwitch {
color: transparent; } color: transparent; }
.menuitem.radio:inconsistent { .menuitem.radio:inconsistent {
-gtk-icon-source: -gtk-icontheme("radio-mixed-symbolic"); } -gtk-icon-source: -gtk-icontheme("radio-mixed-symbolic"); }
.menuitem.radio:backdrop, .menuitem.radio:backdrop:hover {
color: rgba(201, 203, 201, 0.1); }
.view.radio { .view.radio {
color: rgba(238, 238, 236, 0.1); color: rgba(238, 238, 236, 0.1);
@ -2251,11 +2242,11 @@ GtkLevelBar.vertical {
.level-bar.fill-block.empty-fill-block:backdrop { .level-bar.fill-block.empty-fill-block:backdrop {
border-color: rgba(201, 203, 201, 0.15); } border-color: rgba(201, 203, 201, 0.15); }
.view:selected, .view:selected:focus, .view:selected:hover, GtkLabel:selected, GtkLabel:selected:focus, GtkLabel:selected:hover, GtkLabel:backdrop:selected, .entry:selected, .entry:selected:focus { .view:selected, .view:selected:focus, .view:selected:hover, GtkLabel:selected, GtkLabel:selected:focus, GtkLabel:selected:hover, GtkLabel:backdrop:selected, .entry:selected, .entry:selected:focus, .menuitem.button.flat:selected {
background-color: #215d9c; background-color: #215d9c;
color: white; color: white;
outline-color: rgba(255, 255, 255, 0.3); } outline-color: rgba(255, 255, 255, 0.3); }
.view:backdrop:selected, GtkLabel:backdrop:selected, .entry:backdrop:selected { .view:backdrop:selected, GtkLabel:backdrop:selected, .entry:backdrop:selected, .menuitem.button.flat:backdrop:selected {
color: #2c2c2c; } color: #2c2c2c; }
/********** /**********

View File

@ -537,32 +537,19 @@
border-radius: 3px; border-radius: 3px;
border-style: solid; } border-style: solid; }
.button.flat, .button.flat:backdrop, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover { .button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover {
border-color: transparent; border-color: transparent;
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
box-shadow: inset 0 1px rgba(255, 255, 255, 0); } box-shadow: inset 0 1px rgba(255, 255, 255, 0);
text-shadow: none;
icon-shadow: none; }
/* menu buttons */ /* menu buttons */
.menuitem.button, .menuitem.button:insensitive, .menuitem.button:active:insensitive { .menuitem.button.flat {
color: #2e3436; outline-offset: -1px; }
background-color: transparent; .menuitem.button.flat:hover {
background-image: none; background-color: #d9dada; }
border-color: transparent;
border-image: none;
border-style: none;
box-shadow: none; }
.menuitem.button:active {
color: white;
text-shadow: none;
icon-shadow: none; }
.menuitem.button:backdrop, .menuitem.button:backdrop:active:insensitive, .menuitem.button:hover:backdrop, .menuitem.button:insensitive:backdrop, .menuitem.button:active:insensitive:backdrop, .menuitem.button:active:backdrop, .menuitem.button:active:hover:backdrop, .menuitem.button:active:selected:backdrop {
text-shadow: none;
icon-shadow: none;
color: #8d9091;
background-image: linear-gradient(to bottom, #ededed);
border: none;
box-shadow: none; }
GtkColorButton.button { GtkColorButton.button {
padding: 4px; } padding: 4px; }
@ -1596,6 +1583,8 @@ GtkSwitch {
color: transparent; } color: transparent; }
.menuitem.check:inconsistent { .menuitem.check:inconsistent {
-gtk-icon-source: -gtk-icontheme("checkbox-mixed-symbolic"); } -gtk-icon-source: -gtk-icontheme("checkbox-mixed-symbolic"); }
.menuitem.check:backdrop, .menuitem.check:backdrop:hover {
color: rgba(84, 89, 90, 0.1); }
.view.check { .view.check {
color: rgba(46, 52, 54, 0.1); color: rgba(46, 52, 54, 0.1);
@ -1748,6 +1737,8 @@ GtkSwitch {
color: transparent; } color: transparent; }
.menuitem.radio:inconsistent { .menuitem.radio:inconsistent {
-gtk-icon-source: -gtk-icontheme("radio-mixed-symbolic"); } -gtk-icon-source: -gtk-icontheme("radio-mixed-symbolic"); }
.menuitem.radio:backdrop, .menuitem.radio:backdrop:hover {
color: rgba(84, 89, 90, 0.1); }
.view.radio { .view.radio {
color: rgba(46, 52, 54, 0.1); color: rgba(46, 52, 54, 0.1);
@ -2249,11 +2240,11 @@ GtkLevelBar.vertical {
.level-bar.fill-block.empty-fill-block:backdrop { .level-bar.fill-block.empty-fill-block:backdrop {
border-color: rgba(84, 89, 90, 0.15); } border-color: rgba(84, 89, 90, 0.15); }
.view:selected, .view:selected:focus, .view:selected:hover, GtkLabel:selected, GtkLabel:selected:focus, GtkLabel:selected:hover, GtkLabel:backdrop:selected, .entry:selected, .entry:selected:focus { .view:selected, .view:selected:focus, .view:selected:hover, GtkLabel:selected, GtkLabel:selected:focus, GtkLabel:selected:hover, GtkLabel:backdrop:selected, .entry:selected, .entry:selected:focus, .menuitem.button.flat:selected {
background-color: #4a90d9; background-color: #4a90d9;
color: white; color: white;
outline-color: rgba(255, 255, 255, 0.3); } outline-color: rgba(255, 255, 255, 0.3); }
.view:backdrop:selected, GtkLabel:backdrop:selected, .entry:backdrop:selected { .view:backdrop:selected, GtkLabel:backdrop:selected, .entry:backdrop:selected, .menuitem.button.flat:backdrop:selected {
color: #fcfcfc; } color: #fcfcfc; }
/********** /**********