mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 09:00:34 +00:00
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:
parent
28eebcf383
commit
1fed87720e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 *
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user