mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
widget, themes: Highlight selected device in GimpDeviceStatus
Gives GimpDeviceStatus a CSS class so we can apply custom styling to the selected device, similar to GIMP 2.10's style.
This commit is contained in:
parent
d3645edfdf
commit
befc8ed444
2 changed files with 12 additions and 1 deletions
|
@ -133,6 +133,7 @@ static void
|
||||||
gimp_device_status_class_init (GimpDeviceStatusClass *klass)
|
gimp_device_status_class_init (GimpDeviceStatusClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
|
|
||||||
object_class->constructed = gimp_device_status_constructed;
|
object_class->constructed = gimp_device_status_constructed;
|
||||||
object_class->dispose = gimp_device_status_dispose;
|
object_class->dispose = gimp_device_status_dispose;
|
||||||
|
@ -143,6 +144,8 @@ gimp_device_status_class_init (GimpDeviceStatusClass *klass)
|
||||||
GIMP_TYPE_GIMP,
|
GIMP_TYPE_GIMP,
|
||||||
GIMP_PARAM_WRITABLE |
|
GIMP_PARAM_WRITABLE |
|
||||||
G_PARAM_CONSTRUCT_ONLY));
|
G_PARAM_CONSTRUCT_ONLY));
|
||||||
|
|
||||||
|
gtk_widget_class_set_css_name (widget_class, "GimpDeviceStatus");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -310,6 +310,14 @@ GimpDock frame:first-child label {
|
||||||
color: @fg-color;
|
color: @fg-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Assign the highlight color for the active GimpDeviceStatus option */
|
||||||
|
GimpDeviceStatus widget:selected, GimpDeviceStatus widget:selected box {
|
||||||
|
background-color: @selected-color;
|
||||||
|
padding: 4px;
|
||||||
|
margin: -4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Defining slider scale border and trough */
|
/* Defining slider scale border and trough */
|
||||||
scale contents trough
|
scale contents trough
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue