mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
make non-focused tabs xthickness/ythickness thinner. (#353962)
2006-11-07 Carlos Garnacho <carlosg@gnome.org> * gtk/gtknotebook.c (gtk_notebook_calculate_tabs_allocation): make non-focused tabs xthickness/ythickness thinner. (#353962)
This commit is contained in:
parent
f3a47fc835
commit
d03d8e9e40
@ -1,3 +1,8 @@
|
||||
2006-11-07 Carlos Garnacho <carlosg@gnome.org>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_calculate_tabs_allocation): make
|
||||
non-focused tabs xthickness/ythickness thinner. (#353962)
|
||||
|
||||
2006-11-07 Paolo Borelli <pborelli@katamail.com>
|
||||
|
||||
* gtk/gtktextbtree.c (_gtk_text_btree_delete): avoid memory
|
||||
|
@ -5028,6 +5028,7 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
gboolean allocate_at_bottom;
|
||||
gint tab_overlap, tab_pos, tab_extra_space;
|
||||
gint left_x, right_x, top_y, bottom_y, anchor;
|
||||
gint xthickness, ythickness;
|
||||
gboolean gap_left, packing_changed;
|
||||
GtkAllocation child_allocation = { 0, };
|
||||
gboolean allocation_changed = FALSE;
|
||||
@ -5043,6 +5044,9 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
child_allocation.x = widget->allocation.x + container->border_width;
|
||||
child_allocation.y = widget->allocation.y + container->border_width;
|
||||
|
||||
xthickness = widget->style->xthickness;
|
||||
ythickness = widget->style->ythickness;
|
||||
|
||||
switch (tab_pos)
|
||||
{
|
||||
case GTK_POS_BOTTOM:
|
||||
@ -5222,14 +5226,34 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
|
||||
page->allocation = child_allocation;
|
||||
|
||||
if (page == notebook->cur_page &&
|
||||
(priv->operation == DRAG_OPERATION_REORDER ||
|
||||
priv->operation == DRAG_OPERATION_DETACH))
|
||||
if (page == notebook->cur_page)
|
||||
{
|
||||
/* needs to be allocated at 0,0
|
||||
* to be shown in the drag window */
|
||||
page->allocation.x = 0;
|
||||
page->allocation.y = 0;
|
||||
if (priv->operation == DRAG_OPERATION_REORDER ||
|
||||
priv->operation == DRAG_OPERATION_DETACH)
|
||||
{
|
||||
/* needs to be allocated at 0,0
|
||||
* to be shown in the drag window */
|
||||
page->allocation.x = 0;
|
||||
page->allocation.y = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tab_pos)
|
||||
{
|
||||
case GTK_POS_TOP:
|
||||
page->allocation.y += ythickness;
|
||||
/* fall through */
|
||||
case GTK_POS_BOTTOM:
|
||||
page->allocation.height = MAX (1, page->allocation.height - ythickness);
|
||||
break;
|
||||
case GTK_POS_LEFT:
|
||||
page->allocation.x += xthickness;
|
||||
/* fall through */
|
||||
case GTK_POS_RIGHT:
|
||||
page->allocation.width = MAX (1, page->allocation.width - xthickness);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* calculate whether to leave a gap based on reorder operation or not */
|
||||
|
Loading…
Reference in New Issue
Block a user