Commit a2b72c59 authored by Sam Thursfield's avatar Sam Thursfield Committed by Matthias Clasen

Add missing accessors for notebook details

The ms-windows theme engine needs to access the tab-{h,v}border,
so add accessors. Bug 625655.
parent 4047d052
......@@ -2236,6 +2236,8 @@ gtk_notebook_get_tab_label_text
gtk_notebook_get_tab_pos
gtk_notebook_get_tab_reorderable
gtk_notebook_get_tab_detachable
gtk_notebook_get_tab_hborder
gtk_notebook_get_tab_vborder
gtk_notebook_set_current_page
gtk_notebook_set_group
gtk_notebook_get_group
......
......@@ -2175,6 +2175,8 @@ gtk_notebook_set_show_tabs
gtk_notebook_set_tab_label
gtk_notebook_set_tab_label_text
gtk_notebook_set_tab_pos
gtk_notebook_get_tab_hborder
gtk_notebook_get_tab_vborder
gtk_notebook_set_window_creation_hook
gtk_notebook_get_group
gtk_notebook_set_group
......
......@@ -6770,13 +6770,15 @@ gtk_notebook_prev_page (GtkNotebook *notebook)
/* Public GtkNotebook/Tab Style Functions
*
* gtk_notebook_set_show_border
* gtk_notebook_get_show_border
* gtk_notebook_set_show_tabs
* gtk_notebook_get_show_tabs
* gtk_notebook_set_tab_pos
* gtk_notebook_set_homogeneous_tabs
* gtk_notebook_set_tab_border
* gtk_notebook_set_tab_hborder
* gtk_notebook_set_tab_vborder
* gtk_notebook_get_tab_pos
* gtk_notebook_set_scrollable
* gtk_notebook_get_scrollable
* gtk_notebook_get_tab_hborder
* gtk_notebook_get_tab_vborder
*/
/**
* gtk_notebook_set_show_border:
......@@ -6997,6 +6999,43 @@ gtk_notebook_get_scrollable (GtkNotebook *notebook)
return notebook->priv->scrollable;
}
/**
* gtk_notebook_get_tab_hborder:
* @notebook: a #GtkNotebook
*
* Returns the horizontal width of a tab border.
*
* Return value: horizontal width of a tab border
*
* Since: 2.22
*/
guint16
gtk_notebook_get_tab_hborder (GtkNotebook *notebook)
{
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
return notebook->priv->tab_hborder;
}
/**
* gtk_notebook_get_tab_vborder:
* @notebook: a #GtkNotebook
*
* Returns the vertical width of a tab border.
*
* Return value: vertical width of a tab border
*
* Since: 2.22
*/
guint16
gtk_notebook_get_tab_vborder (GtkNotebook *notebook)
{
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
return notebook->priv->tab_vborder;
}
/* Public GtkNotebook Popup Menu Methods:
*
* gtk_notebook_popup_enable
......
......@@ -182,6 +182,8 @@ GtkPositionType gtk_notebook_get_tab_pos (GtkNotebook *notebook);
void gtk_notebook_set_scrollable (GtkNotebook *notebook,
gboolean scrollable);
gboolean gtk_notebook_get_scrollable (GtkNotebook *notebook);
guint16 gtk_notebook_get_tab_hborder (GtkNotebook *notebook);
guint16 gtk_notebook_get_tab_vborder (GtkNotebook *notebook);
/***********************************************************
* enable/disable PopupMenu *
......
......@@ -2817,29 +2817,29 @@ draw_box_gap (GtkStyle *style, GdkWindow *window, GtkStateType state_type,
if (side == GTK_POS_TOP)
{
x2 = x;
y2 = y - notebook->tab_vborder;
y2 = y - gtk_notebook_get_tab_vborder (notebook);
w2 = width;
h2 = height + notebook->tab_vborder * 2;
h2 = height + gtk_notebook_get_tab_vborder (notebook) * 2;
}
else if (side == GTK_POS_BOTTOM)
{
x2 = x;
y2 = y;
w2 = width;
h2 = height + notebook->tab_vborder * 2;
h2 = height + gtk_notebook_get_tab_vborder (notebook) * 2;
}
else if (side == GTK_POS_LEFT)
{
x2 = x - notebook->tab_hborder;
x2 = x - gtk_notebook_get_tab_hborder (notebook);
y2 = y;
w2 = width + notebook->tab_hborder;
w2 = width + gtk_notebook_get_tab_hborder (notebook);
h2 = height;
}
else if (side == GTK_POS_RIGHT)
{
x2 = x;
y2 = y;
w2 = width + notebook->tab_hborder * 2;
w2 = width + gtk_notebook_get_tab_hborder (notebook) * 2;
h2 = height;
}
......
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