Property

GtkCssProvider:prefers-contrast

unstable since: 4.20

Declaration

property prefers-contrast: Gtk.InterfaceContrast [ read, write ]

Description [src]

Define the contrast mode to use for the user interface.

When set to GTK_INTERFACE_CONTRAST_MORE or GTK_INTERFACE_CONTRAST_LESS, the UI is rendered in high or low contrast.

When set to GTK_INTERFACE_CONTRAST_NO_PREFERENCE (the default), the user interface will be rendered in default mode.

This setting is be available for media queries in CSS:

@media (prefers-contrast: more) {
  // some style with high contrast
}

Changing this setting will cause a re-render of the style sheet.

Type:GtkInterfaceContrast

Available since: 4.20

Default valueGTK_INTERFACE_CONTRAST_NO_PREFERENCE

Flags

Readableyes
Writableyes
Constructno
Construct onlyno