talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 8c759a1032bb331c39257366ede1ee3cfdac6d2a
parent 448407a8fd1505742ca52daf3b477388b417df7e
Author: Colin Leroy <colin@colino.net>
Date:   Fri, 12 Oct 2012 12:47:27 +0000

2012-10-12 [colin]	3.8.1cvs96

	* src/gtk/gtkcmctree.c
	* src/gtk/gtksctree.c
		Fix bug #2581, "expander arrows are too tiny to hit with the
		mouse". Patch mostly by Tom Horsley

Diffstat:
MChangeLog | 7+++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/gtk/gtkcmctree.c | 13+++++++++----
Msrc/gtk/gtksctree.c | 23++++++++++++++---------
5 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +2012-10-12 [colin] 3.8.1cvs96 + + * src/gtk/gtkcmctree.c + * src/gtk/gtksctree.c + Fix bug #2581, "expander arrows are too tiny to hit with the + mouse". Patch mostly by Tom Horsley + 2012-10-12 [iwkse] 3.8.1cvs95 * src/common/utils.c diff --git a/PATCHSETS b/PATCHSETS @@ -4470,3 +4470,4 @@ ( cvs diff -u -r 1.382.2.615 -r 1.382.2.616 src/compose.c; cvs diff -u -r 1.105.2.177 -r 1.105.2.178 src/prefs_account.c; cvs diff -u -r 1.36.2.203 -r 1.36.2.204 src/common/utils.c; cvs diff -u -r 1.20.2.80 -r 1.20.2.81 src/common/utils.h; ) > 3.8.1cvs93.patchset ( cvs diff -u -r 1.36.2.204 -r 1.36.2.205 src/common/utils.c; ) > 3.8.1cvs94.patchset ( cvs diff -u -r 1.36.2.205 -r 1.36.2.206 src/common/utils.c; ) > 3.8.1cvs95.patchset +( cvs diff -u -r 1.1.2.31 -r 1.1.2.32 src/gtk/gtkcmctree.c; cvs diff -u -r 1.1.4.64 -r 1.1.4.65 src/gtk/gtksctree.c; ) > 3.8.1cvs96.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=95 +EXTRA_VERSION=96 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/gtk/gtkcmctree.c b/src/gtk/gtkcmctree.c @@ -2910,7 +2910,8 @@ ctree_is_hot_spot (GtkCMCTree *ctree, GtkCMCList *clist; gint xl; gint yu; - + gint hotspot_size; + cm_return_val_if_fail (GTK_IS_CMCTREE (ctree), FALSE); cm_return_val_if_fail (node != NULL, FALSE); @@ -2922,18 +2923,22 @@ ctree_is_hot_spot (GtkCMCTree *ctree, tree_row = GTK_CMCTREE_ROW (node); - yu = (ROW_TOP_YPIXEL (clist, row) + (clist->row_height - PM_SIZE) / 2 - + hotspot_size = clist->row_height-2; + if (hotspot_size > clist->column[ctree->tree_column].area.width - 2) + hotspot_size = clist->column[ctree->tree_column].area.width - 2; + + yu = (ROW_TOP_YPIXEL (clist, row) + (clist->row_height - hotspot_size) / 2 - (clist->row_height - 1) % 2); if (clist->column[ctree->tree_column].justification == GTK_JUSTIFY_RIGHT) xl = (clist->column[ctree->tree_column].area.x + clist->column[ctree->tree_column].area.width - 1 + clist->hoffset - - (tree_row->level - 1) * ctree->tree_indent - PM_SIZE); + (tree_row->level - 1) * ctree->tree_indent - hotspot_size); else xl = (clist->column[ctree->tree_column].area.x + clist->hoffset + (tree_row->level - 1) * ctree->tree_indent); - return (x >= xl && x <= xl + PM_SIZE && y >= yu && y <= yu + PM_SIZE); + return (x >= xl && x <= xl + hotspot_size && y >= yu && y <= yu + hotspot_size); } /*********************************************************** diff --git a/src/gtk/gtksctree.c b/src/gtk/gtksctree.c @@ -418,6 +418,7 @@ sctree_is_hot_spot (GtkSCTree *sctree, GtkCMCTree *ctree; gint xl, xmax; gint yu; + gint hotspot_size; cm_return_val_if_fail (GTK_IS_SCTREE (sctree), FALSE); cm_return_val_if_fail (node != NULL, FALSE); @@ -431,41 +432,45 @@ sctree_is_hot_spot (GtkSCTree *sctree, tree_row = GTK_CMCTREE_ROW (node); + hotspot_size = clist->row_height-2; + if (hotspot_size > clist->column[ctree->tree_column].area.width - 2) + hotspot_size = clist->column[ctree->tree_column].area.width - 2; + if (!GTK_CMCLIST_ROW_HEIGHT_SET(GTK_CMCLIST(clist))) - yu = (ROW_TOP_YPIXEL (clist, row) + (clist->row_height - PM_SIZE) / 2 - + yu = (ROW_TOP_YPIXEL (clist, row) + (clist->row_height - hotspot_size) / 2 - (clist->row_height - 1) % 2); else - yu = (ROW_TOP_YPIXEL (clist, row) + (clist->row_height/2 - PM_SIZE) / 2 - + yu = (ROW_TOP_YPIXEL (clist, row) + (clist->row_height/2 - hotspot_size) / 2 - (clist->row_height/2 - 1) % 2); #ifndef GENERIC_UMPC if (clist->column[ctree->tree_column].justification == GTK_JUSTIFY_RIGHT) xl = clist->column[ctree->tree_column].area.x + clist->column[ctree->tree_column].area.width - 1 + clist->hoffset - - (tree_row->level - 1) * ctree->tree_indent - PM_SIZE; + (tree_row->level - 1) * ctree->tree_indent - hotspot_size; else xl = clist->column[ctree->tree_column].area.x + clist->hoffset + (tree_row->level - 1) * ctree->tree_indent; - xmax = xl + PM_SIZE; + xmax = xl + hotspot_size; #else if (clist->column[ctree->tree_column].justification == GTK_JUSTIFY_RIGHT) { xl = clist->column[ctree->tree_column].area.x + clist->column[ctree->tree_column].area.width - 1 + clist->hoffset - - (tree_row->level - 1) * ctree->tree_indent - PM_SIZE; - xmax = xl + PM_SIZE; + (tree_row->level - 1) * ctree->tree_indent - hotspot_size; + xmax = xl + hotspot_size; } else if (ctree->tree_column == 0) { xl = clist->column[ctree->tree_column].area.x + clist->hoffset; xmax = clist->column[ctree->tree_column].area.x + clist->hoffset + (tree_row->level - 1) * ctree->tree_indent + - PM_SIZE; + hotspot_size; } else { xl = clist->column[ctree->tree_column].area.x + clist->hoffset + (tree_row->level - 1) * ctree->tree_indent; - xmax = xl + PM_SIZE; + xmax = xl + hotspot_size; } #endif - return (x >= xl && x <= xmax && y >= yu && y <= yu + PM_SIZE); + return (x >= xl && x <= xmax && y >= yu && y <= yu + hotspot_size); } gboolean