Commit 86ecdc7a authored by Matthias Clasen's avatar Matthias Clasen

model button: Document iconic layout

Document how the CSS nodes look if iconic is TRUE. Add
a .model style class for this case and use it in Adwaita.
parent 2f544655
......@@ -133,6 +133,16 @@
*
* The subnode is positioned before or after the content nodes and gets the
* .left or .right style class, depending on where it is located.
*
* |[<!-- language="plain" -->
* button.model
* ├── <child>
* ╰── check
* ]|
*
* Iconic model buttons (see #GtkModelButton::iconic) change the name of
* their main node to button and add a .model style class to it. The indicator
* subnode is invisible in this case.
*/
struct _GtkModelButton
......@@ -435,6 +445,7 @@ gtk_model_button_set_iconic (GtkModelButton *button,
if (iconic)
{
gtk_css_node_set_name (widget_node, I_("button"));
gtk_css_gadget_add_class (button->gadget, "model");
gtk_css_gadget_add_class (button->gadget, "image-button");
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NORMAL);
gtk_css_node_set_visible (indicator_node, FALSE);
......@@ -442,6 +453,7 @@ gtk_model_button_set_iconic (GtkModelButton *button,
else
{
gtk_css_node_set_name (widget_node, I_("modelbutton"));
gtk_css_gadget_remove_class (button->gadget, "model");
gtk_css_gadget_remove_class (button->gadget, "image-button");
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_css_node_set_visible (indicator_node,
......
......@@ -1561,7 +1561,7 @@ popover.background {
transition: none;
}
button.image-button {
button.model.image-button {
padding: 0px;
}
......
......@@ -2174,9 +2174,9 @@ popover.background {
.titlebar popover.background button.titlebutton:hover {
text-shadow: none;
transition: none; }
popover.background button.image-button, popover.background headerbar button.titlebutton, headerbar popover.background button.titlebutton,
popover.background .titlebar button.titlebutton,
.titlebar popover.background button.titlebutton {
popover.background button.model.image-button, popover.background headerbar button.model.titlebutton, headerbar popover.background button.model.titlebutton,
popover.background .titlebar button.model.titlebutton,
.titlebar popover.background button.model.titlebutton {
padding: 0px; }
.csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.touch-selection, popover.background.magnifier {
border: 1px solid rgba(255, 255, 255, 0.1); }
......
......@@ -2180,9 +2180,9 @@ popover.background {
.titlebar popover.background button.titlebutton:hover {
text-shadow: none;
transition: none; }
popover.background button.image-button, popover.background headerbar button.titlebutton, headerbar popover.background button.titlebutton,
popover.background .titlebar button.titlebutton,
.titlebar popover.background button.titlebutton {
popover.background button.model.image-button, popover.background headerbar button.model.titlebutton, headerbar popover.background button.model.titlebutton,
popover.background .titlebar button.model.titlebutton,
.titlebar popover.background button.model.titlebutton {
padding: 0px; }
.csd popover.background.touch-selection, .csd popover.background.magnifier, popover.background.touch-selection, popover.background.magnifier {
border: 1px solid rgba(255, 255, 255, 0.1); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment