Package: gtk

Class gtk-scrollbar

Superclasses

gtk-range, gtk-widget, gtk-buildable, gtk-orientable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

None

Details

The gtk-scrollbar widget is a horizontal or vertical scrollbar, depending on the value of the orientation property.



The position of the thumb in a scrollbar is controlled by the scroll adjustments. See the gtk-adjustment object for the properties in an adjustment - for the gtk-scrollbar widget, the value property represents the position of the scrollbar, which must be between the lower value and the (upper - page-size) difference. The page-size property represents the size of the visible scrollable area. The step-increment and page-increment properties are used when the user asks to step down, using the small stepper arrows, or page down, using for example the PageDown key.

CSS nodes

 scrollbar[.fine-tune]
 ╰── contents
     ├── [button.up]
     ├── [button.down]
     ├── trough
     │   ╰── slider
     ├── [button.up]
     ╰── [button.down]    
The gtk-scrollbar implementation has a main CSS node with name scrollbar and a subnode for its contents, with subnodes named trough and slider.

The main node gets the .fine-tune style class added when the scrollbar is in "fine-tuning" mode.

If steppers are enabled, they are represented by up to four additional subnodes with name button. These get the .up and .down style classes to indicate in which direction they are moving.

Other style classes that may be added to scrollbars inside the gtk-scrolled-window implmentation include the .left, .right, .top, .bottom positional classes and style classes related to overlay scrolling .overlay-indicator, .dragging, .hovering.

Style Property Details

fixed-slider-length
The fixed-slider-length style property of type :boolean (Read)
Do not change slider size, just lock it to the minimum length.
Default value: false
has-backward-stepper
The has-backward-stepper style property of type :boolean (Read)
Display the standard backward arrow button.
Default value: true
has-forward-stepper
The has-forward-stepper style property of type :boolean (Read)
Display the standard forward arrow button.
Default value: true
has-secondary-backward-stepper
The has-secondary-backward-stepper style property of type :boolean (Read)
Display a second backward arrow button on the opposite end of the scrollbar.
Default value: false
has-secondary-forward-stepper
The has-secondary-forward-stepper style property of type :boolean (Read)
Display a second forward arrow button on the opposite end of the scrollbar.
Default value: false
min-slider-length
The min-slider-length style property of type :int (Read)
Minimum length of scrollbar slider.
Warning: The min-slider-length style property has been deprecated since version 3.20 and should not be used in newly written code. Use min-height/min-width CSS properties on the slider element instead. The value of this style property is ignored.
Allowed values: >= 0
Default value: 21
 

Inherited Slot Access Functions

See also

2021-12-27