aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorRichard Hult <rhult@codefactory.se>2001-07-02 16:40:24 +0800
committerRichard Hult <rhult@src.gnome.org>2001-07-02 16:40:24 +0800
commitc5dd7f11856134dd0ba1d32bbffb203daf939867 (patch)
tree43745caa49e9e412a4bb7bfc1631260fd7727d5e /widgets/table
parent2fcf9a7fdd06ad57ea8c1d7c6534f03cd60b91b0 (diff)
downloadgsoc2013-evolution-c5dd7f11856134dd0ba1d32bbffb203daf939867.tar
gsoc2013-evolution-c5dd7f11856134dd0ba1d32bbffb203daf939867.tar.gz
gsoc2013-evolution-c5dd7f11856134dd0ba1d32bbffb203daf939867.tar.bz2
gsoc2013-evolution-c5dd7f11856134dd0ba1d32bbffb203daf939867.tar.lz
gsoc2013-evolution-c5dd7f11856134dd0ba1d32bbffb203daf939867.tar.xz
gsoc2013-evolution-c5dd7f11856134dd0ba1d32bbffb203daf939867.tar.zst
gsoc2013-evolution-c5dd7f11856134dd0ba1d32bbffb203daf939867.zip
Calculate the popup position using window coordinates instead of world
2001-07-02 Richard Hult <rhult@codefactory.se> * e-cell-combo.c (e_cell_combo_get_popup_pos): Calculate the popup position using window coordinates instead of world coordinates. This fixes bug #2613 in ximian's bugzilla, combo box pops up with offset if the table is scrolled. svn path=/trunk/; revision=10671
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-combo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 07a14340b9..407420e14b 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -340,6 +340,7 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
gint avail_height, avail_width, min_height, work_height, screen_width;
gint column_width, row_height, scrollbar_width;
double x1, y1;
+ double wx, wy;
/* This code is practically copied from GtkCombo. */
popup = GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window);
@@ -355,6 +356,14 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
eti->editing_row + 1);
gnome_canvas_item_i2w (GNOME_CANVAS_ITEM (eti), &x1, &y1);
+ gnome_canvas_world_to_window (GNOME_CANVAS (canvas),
+ x1,
+ y1,
+ &wx,
+ &wy);
+ x1 = wx;
+ y1 = wy;
+
*x += x1;
/* The ETable positions don't include the grid lines, I think, so we
add 1. */