Package: gtk

Class gtk-scale-button

Superclasses

Documented Subclasses

Direct Slots

adjustment
The adjustment property of type gtk-adjustment (Read / Write)
The adjustment that contains the current value of the scale button.
icons
The icons property of type g-strv (Read / Write)
The names of the icons to be used by the scale button. The first item in the list will be used in the button when the current value is the lowest value, the second item for the highest value. All the subsequent icons will be used for all the other values, spread evenly over the range of values. If there is only one icon name in the icons list, it will be used for all the values. If only two icon names are in the icons array, the first one will be used for the bottom 50% of the scale, and the second one for the top 50%. It is recommended to use at least 3 icons so that the scale button reflects the current value of the scale better for the users.
size
The size property of type gtk-icon-size (Read / Write)
The icon size.
Default value: :small-toolbar
value
The value property of type :double (Read / Write)
The value of the scale.
Default value: 0

Details

The gtk-scale-button widget provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and GTK provides a gtk-volume-button subclass that is tailored for this use case.

CSS nodes

The gtk-scale-button implementation has a single CSS node with name button. To differentiate it from a plain gtk-button widget, it gets the .scale style class. The popup widget that contains the scale has a .scale-popup style class.

Signal Details

The "popdown" signal
 lambda (button)    :action      
The signal is a keybinding signal which gets emitted to popdown the scale widget. The default binding for this signal is the Escape key.
button
The gtk-scale-button widget which received the signal.
The "popup" signal
 lambda (button)    :action      
The signal is a keybinding signal which gets emitted to popup the scale widget. The default bindings for this signal are the Space, Enter and Return keys.
button
The gtk-scale-button widget which received the signal.
The "value-changed" signal
 lambda (button value)    :run-last      
The signal is emitted when the value field has changed.
button
The gtk-scale-button widget which received the signal.
value
A double float with the new value.
 

Slot Access Functions

Inherited Slot Access Functions

See also

*2021-12-23