mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-02 17:00:19 +00:00
Merge branch 'activatable-colorswatch-style' into 'master'
Adwaita: Limit color swatch's hover effect to .activatable See merge request GNOME/gtk!2411
This commit is contained in:
commit
0c0ced1374
@ -272,6 +272,7 @@ gtk_color_button_init (GtkColorButton *button)
|
|||||||
|
|
||||||
button->swatch = gtk_color_swatch_new ();
|
button->swatch = gtk_color_swatch_new ();
|
||||||
gtk_widget_set_can_focus (button->swatch, FALSE);
|
gtk_widget_set_can_focus (button->swatch, FALSE);
|
||||||
|
gtk_widget_remove_css_class (button->swatch, "activatable");
|
||||||
g_object_set (button->swatch, "has-menu", FALSE, NULL);
|
g_object_set (button->swatch, "has-menu", FALSE, NULL);
|
||||||
layout = gtk_widget_create_pango_layout (GTK_WIDGET (button), "Black");
|
layout = gtk_widget_create_pango_layout (GTK_WIDGET (button), "Black");
|
||||||
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
||||||
|
@ -3641,24 +3641,22 @@ colorswatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.dark {
|
&.dark {
|
||||||
|
|
||||||
|
|
||||||
> overlay {
|
> overlay {
|
||||||
color: white;
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover { border-color: if($variant == 'light', transparentize(black, 0.2), $borders_color); }
|
&.activatable:hover > overlay {
|
||||||
|
border-color: if($variant == 'light', transparentize(black, 0.2), $borders_color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.light {
|
&.light {
|
||||||
|
|
||||||
|
|
||||||
> overlay {
|
> overlay {
|
||||||
color: black;
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover { border-color: if($variant == 'light', transparentize(black, 0.5), $borders_color); }
|
&.activatable:hover > overlay {
|
||||||
|
border-color: if($variant == 'light', transparentize(black, 0.5), $borders_color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3680,11 +3678,11 @@ colorswatch {
|
|||||||
|
|
||||||
> overlay {
|
> overlay {
|
||||||
border: 1px solid if($variant == 'light', transparentize(black, 0.7), $borders_color);
|
border: 1px solid if($variant == 'light', transparentize(black, 0.7), $borders_color);
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&.activatable:hover > overlay {
|
||||||
box-shadow: inset 0 1px transparentize(white, 0.6),
|
box-shadow: inset 0 1px transparentize(white, 0.6),
|
||||||
inset 0 -1px transparentize(black, 0.8);
|
inset 0 -1px transparentize(black, 0.8);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&#add-color-button {
|
&#add-color-button {
|
||||||
@ -3694,8 +3692,10 @@ colorswatch {
|
|||||||
|
|
||||||
> overlay {
|
> overlay {
|
||||||
@include button(normal);
|
@include button(normal);
|
||||||
|
}
|
||||||
|
|
||||||
&:hover { @include button(hover); }
|
&.activatable:hover > overlay {
|
||||||
|
@include button(hover);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user