Commit 734a1afc authored by Jean Bréfort's avatar Jean Bréfort

Fixed autofilter (and other) combos position. [#621817]

parent 249a4fab
Gnumeric 1.10.7
Jean:
* Fixed autofilter (and other) combos position. [#621817]
--------------------------------------------------------------------------
Gnumeric 1.10.6
......
2010-06-17 Jean Brefort <jean.brefort@normalesup.org>
* gnm-filter-combo-view.c (filter_view_set_bounds): fixed item position
when zoom is not 100% upon creation. [#621817]
* gnm-sheet-slicer-combo-view.c (sscombo_set_bounds): ditto.
* gnm-validation-combo-view.c (vcombo_set_bounds): ditto.
2010-06-17 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gnumeric-expr-entry.c (gee_check_tooltip): don't create tooltip
......
......@@ -324,13 +324,15 @@ filter_view_set_bounds (SheetObjectView *sov, double const *coords, gboolean vis
GocGroup *view = GOC_GROUP (sov);
if (visible) {
double scale = goc_canvas_get_pixels_per_unit (GOC_ITEM (view)->canvas);
double h = (coords[3] - coords[1]) + 1.;
if (h > 20.) /* clip vertically */
h = 20.;
h /= scale;
goc_item_set (GOC_ITEM (view->children->data),
/* put it inside the cell */
"x", ((coords[2] >= 0.) ? (coords[2]-h+1) : coords[0]),
"y", coords [3] - h + 1.,
"x", ((coords[2] >= 0.) ? (coords[2] / scale - h + 1) : coords[0] / scale),
"y", coords [3] / scale - h + 1.,
"width", h, /* force a square, use h for width too */
"height", h,
NULL);
......
......@@ -163,13 +163,15 @@ sscombo_set_bounds (SheetObjectView *sov, double const *coords, gboolean visible
GocGroup *view = GOC_GROUP (sov);
if (visible) {
double scale = goc_canvas_get_pixels_per_unit (GOC_ITEM (view)->canvas);
double h = (coords[3] - coords[1]) + 1.;
if (h > 20.) /* clip vertically */
h = 20.;
h /= scale;
goc_item_set (GOC_ITEM (view->children->data),
/* put it outside the cell */
"x", ((coords[2] >= 0.) ? coords[2] : (coords[0]-h+1.)),
"y", coords [3] - h + 1.,
"x", ((coords[2] >= 0.) ? coords[2] / scale : (coords[0] / scale - h + 1.)),
"y", coords [3] / scale - h + 1.,
"width", h, /* force a square, use h for width too */
"height", h,
NULL);
......
......@@ -189,13 +189,15 @@ vcombo_set_bounds (SheetObjectView *sov, double const *coords, gboolean visible)
GocGroup *view = GOC_GROUP (sov);
if (visible) {
double scale = goc_canvas_get_pixels_per_unit (GOC_ITEM (view)->canvas);
double h = (coords[3] - coords[1]) + 1.;
if (h > 20.) /* clip vertically */
h = 20.;
h /= scale;
goc_item_set (GOC_ITEM (view->children->data),
/* put it outside the cell */
"x", ((coords[2] >= 0.) ? coords[2] : (coords[0]-h+1.)),
"y", coords [3] - h + 1.,
"x", ((coords[2] >= 0.)? coords[2] / scale: (coords[0] / scale - h + 1.)),
"y", coords [3] / scale - h + 1.,
"width", h, /* force a square, use h for width too */
"height", h,
NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment