Object Hierarchy:

Granite.OverlayBar Granite.OverlayBar Granite.OverlayBar Gtk.Widget Gtk.Widget Gtk.Widget->Granite.OverlayBar GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Gtk.Widget


public class OverlayBar : Widget

A floating status bar that displays a single line of text.

This widget is intended to be used as an overlay for a Gtk.Overlay and is placed in the bottom-right corner by default. You can change its position like you would do for any overlay widget used in a Gtk.Overlay.

The Overlay Bar displays a single line of text that can be changed using the "status" property.

This widget tries to avoid getting in front of the content being displayed inside the Gtk.Overlay by moving itself horizontally to the opposite side from the current one when the mouse pointer enters the widget.

For this widget to function correctly, the event Gdk.EventMask.ENTER_NOTIFY_MASK must be set for the parent Gtk.Overlay. Overlay Bar's constructor takes care of this automatically, if the parent is supplied as a parameter, but you have to be careful not to unset the event for the Gtk.Overlay at a later stage.


public class OverlayBarView : Gtk.Overlay {
construct {
var button = new Gtk.ToggleButton.with_label ("Show Spinner");

var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) {
halign = Gtk.Align.CENTER,
valign = Gtk.Align.CENTER
grid.append (button);

var overlaybar = new Granite.OverlayBar (this) {
label = "Hover the OverlayBar to change its position"

child = box;

button.toggled.connect (() => {
overlaybar.active = button.active;

See also:


Namespace: Granite
Package: granite-7



Creation methods:

Inherited Members:

All known members inherited from class Gtk.Widget