fixed bug 6338, folder moves to the right when highlighted, by tweaking

* icons/i-directory-12.png:
	* icons/i-directory-accept-12.png:
	fixed bug 6338, folder moves to the right when highlighted,
	by tweaking the associated images

	* src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_hit_test):
	consider the tab for hit-testing even if invisible
	* src/nautilus-sidebar.c: (nautilus_sidebar_release_event):
	fixed 3538, easier way to minimize active sidebar view, by
	making it close the active view when you click on the space
	its tab formerly occupied.
This commit is contained in:
Andy Hertzfeld 2001-02-09 23:38:55 +00:00
parent 5102ba1206
commit e8ae5c0a62
6 changed files with 34 additions and 11 deletions

View file

@ -1,3 +1,17 @@
2001-02-09 Andy Hertzfeld <andy@eazel.com>
* icons/i-directory-12.png:
* icons/i-directory-accept-12.png:
fixed bug 6338, folder moves to the right when highlighted,
by tweaking the associated images
* src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_hit_test):
consider the tab for hit-testing even if invisible
* src/nautilus-sidebar.c: (nautilus_sidebar_release_event):
fixed 3538, easier way to minimize active sidebar view, by
making it close the active view when you click on the space
its tab formerly occupied.
2001-02-09 Arlo Rose <arlo@eazel.com>
* icons/Makefile.am:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 476 B

View file

@ -1024,9 +1024,13 @@ nautilus_sidebar_release_event (GtkWidget *widget, GdkEventButton *event)
if (rounded_y >= GTK_WIDGET (sidebar->details->sidebar_tabs)->allocation.y) {
which_tab = nautilus_sidebar_tabs_hit_test (sidebar_tabs, event->x, event->y);
if (which_tab >= 0) {
nautilus_sidebar_tabs_select_tab (sidebar_tabs, which_tab);
nautilus_sidebar_activate_panel (sidebar, which_tab);
gtk_widget_queue_draw (widget);
if (which_tab == sidebar->details->selected_index) {
nautilus_sidebar_deactivate_panel (sidebar);
} else {
nautilus_sidebar_tabs_select_tab (sidebar_tabs, which_tab);
nautilus_sidebar_activate_panel (sidebar, which_tab);
gtk_widget_queue_draw (widget);
}
}
}

View file

@ -423,11 +423,12 @@ int nautilus_sidebar_tabs_hit_test (NautilusSidebarTabs *sidebar_tabs, int x, in
tab_item = (TabItem*) current_item->data;
rect_ptr = &tab_item->tab_rect;
if (tab_item->visible) {
if ((x >= rect_ptr->x) && (x < rect_ptr->x + rect_ptr->width) &&
(y >= rect_ptr->y) && (y< rect_ptr->y + rect_ptr->height))
result = tab_item->notebook_page;
}
/* hit test even when invisible to provide an easy way to
* toggle visibility
*/
if ((x >= rect_ptr->x) && (x < rect_ptr->x + rect_ptr->width) &&
(y >= rect_ptr->y) && (y< rect_ptr->y + rect_ptr->height))
result = tab_item->notebook_page;
current_item = current_item->next;
}

View file

@ -1024,9 +1024,13 @@ nautilus_sidebar_release_event (GtkWidget *widget, GdkEventButton *event)
if (rounded_y >= GTK_WIDGET (sidebar->details->sidebar_tabs)->allocation.y) {
which_tab = nautilus_sidebar_tabs_hit_test (sidebar_tabs, event->x, event->y);
if (which_tab >= 0) {
nautilus_sidebar_tabs_select_tab (sidebar_tabs, which_tab);
nautilus_sidebar_activate_panel (sidebar, which_tab);
gtk_widget_queue_draw (widget);
if (which_tab == sidebar->details->selected_index) {
nautilus_sidebar_deactivate_panel (sidebar);
} else {
nautilus_sidebar_tabs_select_tab (sidebar_tabs, which_tab);
nautilus_sidebar_activate_panel (sidebar, which_tab);
gtk_widget_queue_draw (widget);
}
}
}