mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-29 02:27:53 +00:00
tool button: Add element names for tool item subclasses
Add the obvious names to the CSS nodes of GtkRadioToolButton, GtkToggleToolButton and GtkSeparatorToolItem.
This commit is contained in:
parent
ec60bd889c
commit
948e077f1c
@ -35,10 +35,13 @@
|
||||
* that is, a button that is part of a group of toggle buttons where only
|
||||
* one button can be active at a time.
|
||||
*
|
||||
* Use gtk_radio_tool_button_new() to create a new
|
||||
* #GtkRadioToolButton. Use gtk_radio_tool_button_new_from_widget() to
|
||||
* create a new #GtkRadioToolButton that is part of the same group as an
|
||||
* existing #GtkRadioToolButton.
|
||||
* Use gtk_radio_tool_button_new() to create a new GtkRadioToolButton. Use
|
||||
* gtk_radio_tool_button_new_from_widget() to create a new GtkRadioToolButton
|
||||
* that is part of the same group as an existing GtkRadioToolButton.
|
||||
*
|
||||
* # CSS nodes
|
||||
*
|
||||
* GtkRadioToolButton has a single CSS node with name toolbutton.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -40,6 +40,10 @@
|
||||
* a “spring” that forces other items to the ends of the toolbar.
|
||||
*
|
||||
* Use gtk_separator_tool_item_new() to create a new #GtkSeparatorToolItem.
|
||||
*
|
||||
* # CSS nodes
|
||||
*
|
||||
* GtkSeparatorToolItem has a single CSS node with name separator.
|
||||
*/
|
||||
|
||||
#define MENU_ID "gtk-separator-tool-item-menu-id"
|
||||
@ -145,20 +149,17 @@ gtk_separator_tool_item_class_init (GtkSeparatorToolItemClass *class)
|
||||
P_("Whether the separator is drawn, or just blank"),
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
gtk_widget_class_set_css_name (widget_class, "separator");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_separator_tool_item_init (GtkSeparatorToolItem *separator_item)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
|
||||
separator_item->priv = gtk_separator_tool_item_get_instance_private (separator_item);
|
||||
separator_item->priv->draw = TRUE;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (separator_item), FALSE);
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (separator_item));
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -173,7 +174,7 @@ gtk_separator_tool_item_create_menu_proxy (GtkToolItem *item)
|
||||
{
|
||||
GtkWidget *menu_item = NULL;
|
||||
|
||||
menu_item = gtk_separator_menu_item_new();
|
||||
menu_item = gtk_separator_menu_item_new ();
|
||||
|
||||
gtk_tool_item_set_proxy_menu_item (item, MENU_ID, menu_item);
|
||||
|
||||
|
@ -39,8 +39,11 @@
|
||||
* A #GtkToggleToolButton is a #GtkToolItem that contains a toggle
|
||||
* button.
|
||||
*
|
||||
* Use gtk_toggle_tool_button_new() to create a new
|
||||
* #GtkToggleToolButton.
|
||||
* Use gtk_toggle_tool_button_new() to create a new GtkToggleToolButton.
|
||||
*
|
||||
* # CSS nodes
|
||||
*
|
||||
* GtkToggleToolButton has a single CSS node with name togglebutton.
|
||||
*/
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user