Add missing accessors for notebook details

The ms-windows theme engine needs to access the tab-{h,v}border,
so add accessors. Bug 625655.
(cherry picked from commit a2b72c5953)
This commit is contained in:
Sam Thursfield 2010-08-09 21:20:07 -04:00 committed by Matthias Clasen
parent 28eebcf383
commit 1fed87720e
5 changed files with 55 additions and 10 deletions

View File

@ -2737,6 +2737,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_id
gtk_notebook_get_group_id

View File

@ -2681,6 +2681,8 @@ gtk_notebook_set_tab_label_packing
#endif
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
#ifndef GTK_DISABLE_DEPRECATED
gtk_notebook_get_group_id

View File

@ -6831,13 +6831,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:
@ -7113,6 +7115,43 @@ gtk_notebook_get_scrollable (GtkNotebook *notebook)
return notebook->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

View File

@ -239,6 +239,8 @@ void gtk_notebook_set_tab_vborder (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 *

View File

@ -2855,29 +2855,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;
}