[gtk+] notebook: Use gtk_widget_measure
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: Use gtk_widget_measure
- Date: Sat, 18 Feb 2017 18:10:21 +0000 (UTC)
commit e1f8d5a647836d639bc52f5487493a2ab238f7c5
Author: Timm Bäder <mail baedert org>
Date: Sat Feb 18 11:12:24 2017 +0100
notebook: Use gtk_widget_measure
gtk/gtknotebook.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index db1cd67..b97b26d 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -4544,10 +4544,8 @@ allocate_tab (GtkCssGadget *gadget,
{
if (priv->tab_pos == GTK_POS_TOP || priv->tab_pos == GTK_POS_BOTTOM)
{
- gtk_widget_get_preferred_width_for_height (page->tab_label,
- allocation->height,
- NULL,
- &child_allocation.width);
+ gtk_widget_measure (page->tab_label, GTK_ORIENTATION_HORIZONTAL, allocation->height,
+ NULL, &child_allocation.width, NULL, NULL);
if (child_allocation.width > allocation->width)
child_allocation.width = allocation->width;
else
@@ -4556,10 +4554,9 @@ allocate_tab (GtkCssGadget *gadget,
}
else
{
- gtk_widget_get_preferred_height_for_width (page->tab_label,
- allocation->width,
- NULL,
- &child_allocation.height);
+ gtk_widget_measure (page->tab_label, GTK_ORIENTATION_VERTICAL, allocation->width,
+ NULL, &child_allocation.height, NULL, NULL);
+
if (child_allocation.height > allocation->height)
child_allocation.height = allocation->height;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]