Granite
Description:
Content:
Namespaces:
- DateTime - The DateTime namespace contains useful functions for getting the default translated format for either date and time.
- Services
- Application - Utilities for Applications
- SettingsUri - Deep links to specific Settings pages.
- Widgets
- Utils - This namespace contains functions to apply CSS stylesheets to widgets.
Classes:
- AccelLabel - AccelLabel is meant to be used as
a
Gtk.MenuItem
child for displaying a GLib.Action's accelerator alongside the Menu Item label. - DatePicker - This class allows users to pick dates from a calendar.
- Dialog - Granite.Dialog is a styled Gtk.Dialog that uses an empty title area and action widgets in the bottom/end position.
- HeaderLabel - HeaderLabel is a start-aligned Gtk.Label with the Granite H4 style class
- HyperTextView - This class enables navigatable URLs in Gtk.TextView
- MessageDialog - MessageDialog is an elementary OS styled dialog used to display a message to the user.
- ModeSwitch - ModeSwitch is a selection control for choosing between two options that can be described with an icon.
- OverlayBar - A floating status bar that displays a single line of text.
- Placeholder - Placeholder is used to provide further information in an empty view such as a Gtk.ListBox or when onboarding.
- Settings - Granite.Settings provides a way to share Pantheon desktop settings with applications.
- SettingsPage - AbstractSettingsPage is a Gtk.ScrolledWindow subclass with properties used by other Granite settings widgets.
- SettingsSidebar - SettingsSidebar acts as a controller for a Gtk.Stack; it shows a row of buttons to switch between the various pages of the associated stack widget.
- SimpleSettingsPage - SimpleSettingsPage is a widget divided into three sections: a predefined header, a content area, and an action area.
- SwitchModelButton - SwitchModelButton is a Gtk.ToggleButton containing a Gtk.Label and a Gtk.Switch and using the menuitem css name. It can optionally show description text when activated.
- TimePicker - This widget allows users to easily pick a time.
- Toast - Toasts are small in-app notifications that provide feedback about an operation in a small popup. They only fill the space required to show the message and do not block the UI.
- ValidatedEntry - ValidatedEntry is a Gtk.Entry subclass that is meant to be used in forms where input must be validated before the form can be submitted. It provides feedback to users about the state of input validation and keeps track of its own validation state. By default, input is considered invalid.
Constants:
- public const string STYLE_CLASS_ACCENT
Style class to give accent color to a Gtk.Label or symbolic icon
- public const string STYLE_CLASS_BACKGROUND
Style class to match the window background
- public const string STYLE_CLASS_BACK_BUTTON
Style class for shaping a Gtk.Button
- public const string STYLE_CLASS_BADGE
Style class for numbered badges
- public const string STYLE_CLASS_CARD
Style class for adding a small shadow to a container such as for image thumbnails
- public const string STYLE_CLASS_CHECKERBOARD
Style class for checkered backgrounds to represent transparency in images
- public const string STYLE_CLASS_CIRCULAR
Style class for a circular Gtk.Button
- public const string STYLE_CLASS_COLOR_BUTTON
Style class for color chooser buttons to be applied to Gtk.CheckButton or
Gtk.RadioButton
- public const string STYLE_CLASS_DEFAULT_DECORATION
Style class for slim headerbars, like in Terminal
- public const string STYLE_CLASS_DESTRUCTIVE_ACTION
Style class for Gtk.Button with a destructive action
- public const string STYLE_CLASS_DIALOG_CONTENT_AREA
Style class for the content area in dialogs.
- public const string STYLE_CLASS_DIM_LABEL
Style class for dimmed labels.
- public const string STYLE_CLASS_ERROR
Style class for widgets in error state.
- public const string STYLE_CLASS_FLAT
Style class for flattened widgets, such as buttons,
- public const string STYLE_CLASS_FRAME
Style class for adding a border to Gtk.ListBox, Gtk.InfoBar, and others
- public const string STYLE_CLASS_H1_LABEL
Style class for large primary text as seen in
Granite.Widgets.Welcome
- public const string STYLE_CLASS_H2_LABEL
Style class for large seondary text as seen in
Granite.Widgets.Welcome
- public const string STYLE_CLASS_H3_LABEL
Style class for small primary text
- public const string STYLE_CLASS_H4_LABEL
Style class for a Granite.HeaderLabel
- public const string STYLE_CLASS_KEYCAP
Style class for a Gtk.Label to be displayed as a keyboard key cap
- public const string STYLE_CLASS_LARGE_ICONS
Style class for a Gtk.Image used to set a context-aware large icon size. By default this is 32px, but in certain contexts it could be larger or smaller depending on the default assumed icon size.
- public const string STYLE_CLASS_LINKED
Style class for linked widgets, such as a box containing buttons belonging to the same control.
- public const string STYLE_CLASS_MENU
Style class for Gtk.Popover which is used as a menu.
- public const string STYLE_CLASS_MENUITEM
Style class for Gtk.Popover children which are used as menu items.
- public const string STYLE_CLASS_MESSAGE_DIALOG
Style class for message dialogs.
- public const string STYLE_CLASS_MODE_SWITCH
Style class for a Gtk.Switch used to change between two modes rather than active and inactive states
- public const string STYLE_CLASS_OSD
Style class for "on-screen display" widgets such as Granite.Toast and Granite.OverlayBar
- public const string STYLE_CLASS_RICH_LIST
Style class for setting standard row padding and row height in a Gtk.ListBox
- public const string STYLE_CLASS_ROUNDED
Style class for rounded corners, i.e. on a Gtk.Window or Granite.STYLE_CLASS_CARD
- public const string STYLE_CLASS_SIDEBAR
Style class defining a sidebar, such as the left side in a file chooser
- public const string STYLE_CLASS_SMALL_LABEL
Style class for a Gtk.Label to emulate Pango's "<small>" and "size='smaller'"
- public const string STYLE_CLASS_SUGGESTED_ACTION
Style class for when an action (usually a button) is the primary suggested action in a specific context.
- public const string STYLE_CLASS_TEMPERATURE
Style class for a temperature scale, a Gtk.Scale with a "cold" to "hot" color gradient
- public const string STYLE_CLASS_TERMINAL
Style class for Gtk.Label or Gtk.TextView to emulate the appearance of Terminal. This includes text color, background color, selection highlighting, and selecting the system monospace font.
- public const string STYLE_CLASS_TITLE_LABEL
Style class for title label text in a Granite.MessageDialog
- public const string STYLE_CLASS_VIEW
Style class for widgets which should use base color as their background
- public const string STYLE_CLASS_WARMTH
Style class for a warmth scale, a Gtk.Scale with a "less warm" to "more warm" color gradient
- public const string STYLE_CLASS_WARNING
Style class for widgets in warning state.
- public const string TOOLTIP_SECONDARY_TEXT_MARKUP
Pango markup to use for secondary text in a Gtk.Tooltip, such as for accelerators, extended descriptions, etc.
- public const int TRANSITION_DURATION_CLOSE
Transition duration when a widget closes, hides a portion of its content, or exits the screen
- public const int TRANSITION_DURATION_IN_PLACE
Transition duration when a widget transforms in-place, like when filtering content with a view switcher
- public const int TRANSITION_DURATION_OPEN
Transition duration when a widget opens, reveals more content, or enters the screen
Functions:
- public string accel_to_string (string? accel)
Converts a Gtk.accelerator_parse style accel string to a human-readable string.
- public RGBA contrasting_foreground_color (RGBA bg_color)
Takes a Gdk.RGBA background color and returns a suitably-contrasting foreground color, i.e. for determining text color on a colored background. There is a slight bias toward returning white, as white generally looks better on a wider range of colored backgrounds than black.
- public void init ()
- public string markup_accel_tooltip (string[]? accels, string? description = null)
Takes a description and an array of accels and returns Pango markup for use in a Gtk.Tooltip. This method uses Granite.accel_to_string.