forked from AuroraMiddleware/gtk
Revert move of .flat from frame > border to frame
Changing code to agree with docs, which said frame.flat, was backwards. Mea culpa. Theme authors ran with the actual behaviour, not the docs. As stability is more important, let’s go back to frame > border.flat, and fix the docs to reflect what the code does and how to set .flat in code. N.B. This retains the change in HighContrast of "frame border" to "frame > border". Not using the direct child selector contradicted Adwaita & could conceivably have unwanted results on nested nodes named border. https://bugzilla.gnome.org/show_bug.cgi?id=778905
This commit is contained in:
parent
06cf2c84a4
commit
31832f8648
@ -81,9 +81,11 @@
|
||||
*
|
||||
* GtkFrame has a main CSS node with name frame and a subnode with
|
||||
* name border. The border node is used to render the visible border.
|
||||
* The main frame node can be given the style class .flat, which disables
|
||||
* drawing of the border, equivalent to calling gtk_frame_set_shadow_type() with
|
||||
* GTK_SHADOW_NONE.
|
||||
*
|
||||
* The border node can be given the style class .flat, which is used by themes
|
||||
* to disable drawing of the border. To do this from code, call
|
||||
* gtk_frame_set_shadow_type() with GTK_SHADOW_NONE to add the .flat class or
|
||||
* any other shadow type to remove it.
|
||||
*/
|
||||
|
||||
|
||||
@ -684,9 +686,9 @@ gtk_frame_set_shadow_type (GtkFrame *frame,
|
||||
priv->shadow_type = type;
|
||||
|
||||
if (type == GTK_SHADOW_NONE)
|
||||
gtk_css_gadget_add_class (priv->gadget, GTK_STYLE_CLASS_FLAT);
|
||||
gtk_css_gadget_add_class (priv->border_gadget, GTK_STYLE_CLASS_FLAT);
|
||||
else
|
||||
gtk_css_gadget_remove_class (priv->gadget, GTK_STYLE_CLASS_FLAT);
|
||||
gtk_css_gadget_remove_class (priv->border_gadget, GTK_STYLE_CLASS_FLAT);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (frame), frame_props[PROP_SHADOW_TYPE]);
|
||||
}
|
||||
|
@ -3388,12 +3388,9 @@ frame > border,
|
||||
border-radius: 0;
|
||||
border: 1px solid $borders_color;
|
||||
|
||||
&:backdrop { border-color: $backdrop_borders_color; }
|
||||
}
|
||||
&.flat { border-style: none; }
|
||||
|
||||
frame.flat > border,
|
||||
.frame.flat {
|
||||
border-style: none;
|
||||
&:backdrop { border-color: $backdrop_borders_color; }
|
||||
}
|
||||
|
||||
actionbar > revealer > box {
|
||||
|
@ -3848,14 +3848,13 @@ frame > border,
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
border: 1px solid #1b1f20; }
|
||||
frame > border.flat,
|
||||
.frame.flat {
|
||||
border-style: none; }
|
||||
frame > border:backdrop,
|
||||
.frame:backdrop {
|
||||
border-color: #202425; }
|
||||
|
||||
frame.flat > border,
|
||||
.frame.flat {
|
||||
border-style: none; }
|
||||
|
||||
actionbar > revealer > box {
|
||||
padding: 6px;
|
||||
border-top: 1px solid #1b1f20; }
|
||||
|
@ -3879,14 +3879,13 @@ frame > border,
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
border: 1px solid #b6b6b3; }
|
||||
frame > border.flat,
|
||||
.frame.flat {
|
||||
border-style: none; }
|
||||
frame > border:backdrop,
|
||||
.frame:backdrop {
|
||||
border-color: #c0c0bd; }
|
||||
|
||||
frame.flat > border,
|
||||
.frame.flat {
|
||||
border-style: none; }
|
||||
|
||||
actionbar > revealer > box {
|
||||
padding: 6px;
|
||||
border-top: 1px solid #b6b6b3; }
|
||||
|
@ -2579,15 +2579,11 @@ levelbar {
|
||||
frame > border,
|
||||
.frame {
|
||||
border: 1px solid $borders_color;
|
||||
&.flat { border-style: none; }
|
||||
&:backdrop { border-color: $backdrop_borders_color; }
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
frame.flat > border,
|
||||
.frame.flat {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
actionbar > revealer > box {
|
||||
padding: 6px;
|
||||
border-width: 1px 0 0;
|
||||
|
@ -2616,14 +2616,13 @@ frame > border,
|
||||
.frame {
|
||||
border: 1px solid gray;
|
||||
padding: 0; }
|
||||
frame > border.flat,
|
||||
.frame.flat {
|
||||
border-style: none; }
|
||||
frame > border:backdrop,
|
||||
.frame:backdrop {
|
||||
border-color: #737373; }
|
||||
|
||||
frame.flat > border,
|
||||
.frame.flat {
|
||||
border-style: none; }
|
||||
|
||||
actionbar > revealer > box {
|
||||
padding: 6px;
|
||||
border-width: 1px 0 0;
|
||||
|
@ -2623,14 +2623,13 @@ frame > border,
|
||||
.frame {
|
||||
border: 1px solid gray;
|
||||
padding: 0; }
|
||||
frame > border.flat,
|
||||
.frame.flat {
|
||||
border-style: none; }
|
||||
frame > border:backdrop,
|
||||
.frame:backdrop {
|
||||
border-color: #8d8d8d; }
|
||||
|
||||
frame.flat > border,
|
||||
.frame.flat {
|
||||
border-style: none; }
|
||||
|
||||
actionbar > revealer > box {
|
||||
padding: 6px;
|
||||
border-width: 1px 0 0;
|
||||
|
Loading…
Reference in New Issue
Block a user