Commit 57ec5705 authored by Andy Hertzfeld's avatar Andy Hertzfeld

improved index tab resize code by not considering the last one if it's


        improved index tab resize code by not considering the last one if it's
	invisible, also, call resize after select
parent aeea62d2
2000-02-15 Andy Hertzfeld <andy@eazel.com>
* src/nautilus-index-tabs/c:
improved tab-resizing code by not the last one if it's invisible,
also, invoked resize code after a tab is selected
2000-02-14 Andy Hertzfeld <andy@eazel.com>
* components/notes/ntl-notes.c:
......
......@@ -356,16 +356,18 @@ draw_or_hit_test_all_tabs(NautilusIndexTabs *index_tabs, gboolean draw_flag, gin
}
next_tab = next_tab->next;
if (next_tab != NULL)
this_item = (tabItem*) next_tab->data;
/* bump the x-position, and see if it fits */
x_pos += tab_width - 10;
if (x_pos > (widget->allocation.x + widget->allocation.width - 32))
if (x_pos > (widget->allocation.x + widget->allocation.width - 48))
{
/* wrap to the next line */
x_pos = widget->allocation.x - 3;
y_pos -= tab_height;
if (next_tab != NULL)
if ((next_tab != NULL) && ((next_tab->next != NULL) || this_item->visible))
total_height += tab_height;
}
}
......@@ -509,6 +511,7 @@ nautilus_index_tabs_select_tab(NautilusIndexTabs *index_tabs, gint which_tab)
item->visible = (item->notebook_page != which_tab);
}
recalculate_size(index_tabs);
gtk_widget_queue_draw(GTK_WIDGET(index_tabs));
}
......
......@@ -356,16 +356,18 @@ draw_or_hit_test_all_tabs(NautilusIndexTabs *index_tabs, gboolean draw_flag, gin
}
next_tab = next_tab->next;
if (next_tab != NULL)
this_item = (tabItem*) next_tab->data;
/* bump the x-position, and see if it fits */
x_pos += tab_width - 10;
if (x_pos > (widget->allocation.x + widget->allocation.width - 32))
if (x_pos > (widget->allocation.x + widget->allocation.width - 48))
{
/* wrap to the next line */
x_pos = widget->allocation.x - 3;
y_pos -= tab_height;
if (next_tab != NULL)
if ((next_tab != NULL) && ((next_tab->next != NULL) || this_item->visible))
total_height += tab_height;
}
}
......@@ -509,6 +511,7 @@ nautilus_index_tabs_select_tab(NautilusIndexTabs *index_tabs, gint which_tab)
item->visible = (item->notebook_page != which_tab);
}
recalculate_size(index_tabs);
gtk_widget_queue_draw(GTK_WIDGET(index_tabs));
}
......
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