diff options
author | Alexander Larsson <alexl@redhat.com> | 2002-12-12 15:17:42 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2002-12-12 15:17:42 +0000 |
commit | d6af09b81dcfdbbc1ca682730ac0875fbb4a8c08 (patch) | |
tree | 666e3a78443e54ab7a8d7dd578b2542492a6822a /libnautilus-private/nautilus-icon-container.c | |
parent | 5f0edb842ac7e833dc643763b94cf5f90b0bab3b (diff) | |
download | nautilus-d6af09b81dcfdbbc1ca682730ac0875fbb4a8c08.tar.gz |
Correctly do w2c transformations. Fixes struts.
2002-12-12 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-icon-container.c:
* libnautilus-private/nautilus-icon-canvas-item.c:
Correctly do w2c transformations. Fixes struts.
Diffstat (limited to 'libnautilus-private/nautilus-icon-container.c')
-rw-r--r-- | libnautilus-private/nautilus-icon-container.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index 020b56085..f5e0c7fba 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -4981,8 +4981,7 @@ nautilus_icon_container_start_renaming_selected_item (NautilusIconContainer *con NautilusIcon *icon; ArtDRect icon_rect; const char *editable_text; - double pixels_per_unit; - int x, width; + int x, y, width; /* Check if it already in renaming mode. */ details = container->details; @@ -5035,12 +5034,14 @@ nautilus_icon_container_start_renaming_selected_item (NautilusIconContainer *con width = nautilus_icon_canvas_item_get_max_text_width (icon->item); - pixels_per_unit = EEL_CANVAS_ITEM (icon->item)->canvas->pixels_per_unit; - x = eel_round((icon_rect.x0 + icon_rect.x1) * pixels_per_unit / 2) - width / 2; + eel_canvas_w2c (EEL_CANVAS_ITEM (icon->item)->canvas, + (icon_rect.x0 + icon_rect.x1) / 2, + icon_rect.y1, + &x, &y); gtk_layout_move (GTK_LAYOUT (container), details->rename_widget, - x, eel_round (icon_rect.y1 * pixels_per_unit)); + x - width/2, y); gtk_widget_set_size_request (details->rename_widget, width, -1); gtk_widget_show (details->rename_widget); |