GNOME Bugzilla – Bug 166487
can't create horizontal scrollbars and sliders.
Last modified: 2009-05-14 14:56:07 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.
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.
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.
Even for 1 by 1, the choice of a vertical scrollbar is not straightforward, as a cell is generally wider horizontally than vertically.
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 ;-)
By the way, I recently noticed that one can create horizontal scrollbars and sliders: just drag a longish horizontal region, then undo, redo.
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.
undo-redo and new-view issues fixed for scrollbars.
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.