Tuesday, November 28, 2006

KateMDI: sidebar and focus...

Since KDE 3.5.5 Kate has its own MDI implementation. It is similar to KMDI but ships with a lot less bugs (yes, and features). One thing bothering me is the focus issue: Which sidebar has the focus? If you do not know, you have to have sharp eyes to find out. In KDE4 I just hacked in such a feature (here is the patch). On the screenshot you can see that every sidebar now has an additional pane on the top. Unfocused sidebars have a gray pane (default window background color), a focused sidebar has a blue pane with white text (just like selected text). Which sidebar has focus? - Right, it's the Documents sidebar :) It work's pretty well, so is it worth committing (a cleaner version of) the patch? I initially hoped that QDockWidgets would provide this functionality by default. Similar discussions take place on kde-core-devel as well (about KTabBar & friends)...

2 comments:

dhaumann said...

Yes, it takes too much space, I agree. I didn't tune it that much, but I initially wanted the focus panes to have a smaller height, but the close icon (=16 pixel) + 2*4 pixel padding on top and bottom makes it 24 pixel. A height of 18 pixel would be better I believe.

We maybe could also only highlight the sidebar buttons, right. In fact, that should be pretty easy.

What I was wondering several times is: Do we need the sidebar-tabs at all? If we remove those tabs, we can use Qt's QDockWidgets. I'm not sure right now whether they support saving the exact positions which we need for session switching. QDockWidgets can be detached, btw :)

Thomas said...

I agree that it is too tall, but I like it anyways. Maybe we really can remove the sidebar, I didn't like it too much anyway. Just right-clicking on a titlebar of a QDockWidget should instead give sth. like a Dock-List where you can select the Dock-Widgets you want to have. Or maybe, in larger applications, it would even be wise to create a dialog to select the dock widgets you want to have. That dialog should work just like the toolbar modification dialog in Opera does.