Marker support in GtkScrollbar

I thought I should share a sneak peak on a small patch I've been working on to add support for markers support in GtkScrollbar, the idea is to add support for hints in things like search matching, or where in the backlog someone named you in a chat dialog. Here's a screenshot of the result in the default theme:


This should bring Google Chrome-like search functionality to gEdit and Epiphany! Now if only I had some time to work on a set of standard inline dialogs to avoid windowed ones πŸ™‚

The patch, against Gtk+ master, is pretty much done, waiting for a reviewer to point out any pending details. If everything goes alright it should land for 3.0, subscribe to the bug if you want to track its progress. πŸ™‚


12 thoughts on “Marker support in GtkScrollbar

  1. That is really great to see!
    Is it implemented so someone could have the Scale widgets use those same markers, too, by chance? (There is, after all, a GSoC student adding chapters / markers to Totem :b)
    On inline dialogs, they do have to be tasteful. I, for one, am frightened of the idea of interfaces where massive widgets suddenly appear out of nowhere, pushing other widgets away. Especially without animations. If widgets could overlay other widgets (with shadows, fading and other tricks added for free), or if the window manager handled oversized / growing windows better, I would be totally thrilled by the idea.
    Then again, your work has done nothing but make me happy. I’m looking forward to your next bit of wondrous magic! πŸ™‚


  2. @Dylan:
    The API will be very similar to the one used in GtkScale, but the markers are just gdouble numbers, so there isn’t really much to share here πŸ™‚
    I do agree that an animation should be in place for the inline dialog, not sure how to do that in Gtk+ since there’s actually no animation support. However, with offscreen rendering support, it is actually quite easy to do some fancy stuff.
    I agree with you, Chrome is full of nice little things that make a huge difference.


  3. Hmm, needs some work. Looks kind of ugly, and it’s not obvious which part of the scrollbar slider you need to line up with the marker… the top? The middle? And is there any magnetism/snapping to help you line up?


  4. Oh, and is there any way using mouse and/or keyboard (both required, for a11y) to scroll directly from marker to marker, rather than having to do it manually?


  5. @Torchy:
    Looks ugly because that’s the standard theme, every theme/engine can actually customize its looks in the future.
    It’ll be nice to add those a11y concerns to the bug report instead of my blog post πŸ™‚


  6. Sorry, don’t have a bugzilla account and not going to create one just for this πŸ™‚
    I really don’t buy the ‘looks ugly because it’s the standard theme’ argument though. The standard theme should be setting a *great* example, not just doing the bare minimum so that everyone *has* to override it just to get something that doesn’t look like Windows 95.


  7. It looks cool, but if you choose a marker by placing the center of the slider top of the marker, then the top and bottom markers on the vertical slidebar are impossible to choose.
    Perhaps the positions of the markers should somehow depend on the width of the slider.


  8. Hey Alberto,
    if you think on making a search dialog like the chrome talk with me that I’ve already started this issue.
    BTW nice job, I’m looking forward to see this mark thingie in gedit.


  9. @Zed:
    They are not clickable, no, they’re just hints, and usually too small to be a clickable area.
    If the slider goes up top then you can see what’s there. However it is a good point that they shouldn’t be next to the stepper. I’m going to fix that.
    Not ccolours, the API and theming would become too much of an issue, Gtk+ is not the place for such a specialized widget.
    Great! I’ll get in touch with you.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s