mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
notebook: Drop unneeded code
We no longer need to set the position classes on the main css node, since they are already set on the per-tab subnodes.
This commit is contained in:
parent
9f738da11b
commit
8917ee5373
@ -1941,29 +1941,6 @@ gtk_notebook_unrealize (GtkWidget *widget)
|
||||
GTK_WIDGET_CLASS (gtk_notebook_parent_class)->unrealize (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
add_tab_position_style_class (GtkStyleContext *context,
|
||||
gint tab_pos)
|
||||
{
|
||||
switch (tab_pos)
|
||||
{
|
||||
case GTK_POS_TOP:
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
|
||||
break;
|
||||
case GTK_POS_BOTTOM:
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
break;
|
||||
case GTK_POS_LEFT:
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
break;
|
||||
case GTK_POS_RIGHT:
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook,
|
||||
GtkRequisition *requisition)
|
||||
@ -5216,7 +5193,6 @@ gtk_notebook_paint (GtkWidget *widget,
|
||||
header_height = height;
|
||||
|
||||
gtk_style_context_save (context);
|
||||
add_tab_position_style_class (context, tab_pos);
|
||||
|
||||
switch (tab_pos)
|
||||
{
|
||||
@ -5335,9 +5311,6 @@ gtk_notebook_paint (GtkWidget *widget,
|
||||
"has-tab-gap", &has_tab_gap,
|
||||
NULL);
|
||||
|
||||
if (priv->show_tabs)
|
||||
add_tab_position_style_class (context, tab_pos);
|
||||
|
||||
if (priv->show_border)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user