After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166487 - can't create horizontal scrollbars and sliders.
can't create horizontal scrollbars and sliders.
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Sheet Objects
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-02-06 20:35 UTC by Jean Bréfort
Modified: 2009-05-14 14:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jean Bréfort 2005-02-06 20:35:51 UTC
I could not find out how it is possible to create such sheet objects. In the
code, we have:

gboolean is_horizontal = range_width (&so->anchor.cell_bound) > range_height
(&so->anchor.cell_bound);

Tests I made lead to the conclusion that the test is invariably 1 > 1, so always
false.

I propose to use a modifier key instead to create horizontal scrollbars and
sliders. The test could be:

GdkModifierType state;
gboolean is_horizontal = (gtk_get_current_event_state (&state))?
				state & GDK_SHIFT_MASK: FALSE;

Of course control or alt key could be used instead. It should of course be
documented. I tested this code and it works.
Comment 1 Andreas J. Guelzow 2005-02-07 02:17:13 UTC
THe intended behaviour seems to make sense: If the selection is wider than high
one creates a horizontal scrollbar otherwise a vertical one. Clearly this does
not work correctly but it seems to be more natural tahn adding a modifier key.
Comment 2 Andreas J. Guelzow 2005-02-07 19:22:01 UTC
I gather the problem is that this code is used when the widget is created. At
that time the range is invariably just 1 by 1, or to be exact the start and end
points are the same.

What we really need is to handle resizes as indicated in teh code.
Comment 3 Jean Bréfort 2005-02-15 20:45:04 UTC
Even for 1 by 1, the choice of a vertical scrollbar is not straightforward, as a
cell is generally wider horizontally than vertically.
Comment 4 Andreas J. Guelzow 2005-02-16 19:46:23 UTC
I believe this 1 by 1 is a pixel range not a cell range, so a 1 by 1 range here
is  pretty much square ;-)
Comment 5 Andreas J. Guelzow 2009-05-13 06:09:40 UTC
By the way, I recently noticed that one can create horizontal scrollbars and sliders: just drag a longish horizontal region, then undo, redo.
Comment 6 Morten Welinder 2009-05-14 02:22:15 UTC
Yeah, that fun, but not as fun as this:

1. Create longish scrollbar.  It'll show as a vscrollbar.
2. New->View.

Guess what happens...

We clearly need to record the horizontal/vertical decision the first
time around.
Comment 7 Morten Welinder 2009-05-14 02:47:01 UTC
undo-redo and new-view issues fixed for scrollbars.
Comment 8 Morten Welinder 2009-05-14 14:56:07 UTC
Direction can now be configured.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.