gimp r26416 - in branches/soc-2008-tagging: . app/widgets
- From: aurisj svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26416 - in branches/soc-2008-tagging: . app/widgets
- Date: Thu, 7 Aug 2008 11:53:33 +0000 (UTC)
Author: aurisj
Date: Thu Aug 7 11:53:33 2008
New Revision: 26416
URL: http://svn.gnome.org/viewvc/gimp?rev=26416&view=rev
Log:
2008-08-07 Aurimas JuÅka <aurisj svn gnome org>
* app/widgets/gimptagpopup.c (gimp_tag_popup_layout_tags): improved
handling of clicking empty area in popup makes it close.
Modified:
branches/soc-2008-tagging/ChangeLog
branches/soc-2008-tagging/app/widgets/gimptagpopup.c
Modified: branches/soc-2008-tagging/app/widgets/gimptagpopup.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimptagpopup.c (original)
+++ branches/soc-2008-tagging/app/widgets/gimptagpopup.c Thu Aug 7 11:53:33 2008
@@ -396,9 +396,9 @@
if (tag_popup->tag_data[i].bounds.width + line_height + GIMP_TAG_POPUP_MARGIN < width)
{
GdkRectangle *close_rect = g_malloc (sizeof (GdkRectangle));
- close_rect->x = x;
+ close_rect->x = x - space_width - 5;
close_rect->y = y;
- close_rect->width = width - (tag_popup->tag_data[i].bounds.width + line_height + GIMP_TAG_POPUP_MARGIN);
+ close_rect->width = width - close_rect->x;
close_rect->height = line_height + 2;
tag_popup->close_rectangles = g_list_append (tag_popup->close_rectangles,
close_rect);
@@ -412,6 +412,19 @@
x += tag_popup->tag_data[i].bounds.width + space_width + 5;
}
+
+ if (tag_popup->tag_count > 0
+ && (width - x) > line_height + GIMP_TAG_POPUP_MARGIN)
+ {
+ GdkRectangle *close_rect = g_malloc (sizeof (GdkRectangle));
+ close_rect->x = x - space_width - 5;
+ close_rect->y = y;
+ close_rect->width = width - close_rect->x;
+ close_rect->height = line_height + 2;
+ tag_popup->close_rectangles = g_list_append (tag_popup->close_rectangles,
+ close_rect);
+ }
+
if (gtk_widget_get_direction (GTK_WIDGET (tag_popup)) == GTK_TEXT_DIR_RTL)
{
GList *iterator;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]