RFC: Better Simplified-IDEAL tab drawing
Matthew Woehlke
mw_triad at users.sourceforge.net
Fri Nov 10 20:25:32 UTC 2006
Andreas Pakulat wrote:
> On 10.11.06 12:30:36, Matthew Woehlke wrote:
>> Ok, since I'm not familiar with QT4... does it provide the sort of
>> 'collapsible tabs' that KDevelop uses? (I looked but didn't see that it
>> did). If so, forget the rest of this message.
>
> It does, though not completely the same type. The Qt4 QDockWidgets can
> be collapsed into a button.
Ok, well then the obvious question is 'does KDevelop4 use these'? Based
on your follow-up I am guessing 'no'?
>> If not, has anyone considered offering a way to let styles draw
>> KDevelop's collapsible tabs more like tabs and less like buttons?
>
> That is already happening, AFAIK. KDevelop allows the style to define
> how the "buttons" look like, so all you have to do is use a proper
> style.
I'm not sure I understand this. Right now I don't see any way to
distinguish a 'KDevelop tab button' from any other button (not without
pulling in KDevelop headers, anyway!), except maybe 'inherits("Button")'
which is not very re-usable. Am I missing something? What I want is for
my style to draw a "button" differently depending on if it is a normal
button, or one of KDevelop's "tabs". A technique that could be used by
other apps implementing such tab bars would be nice, which is why I
though of overloading the style flags.
>> Specifically, I had an idea to set the Style_Top/Style_Bottom and
>> Style_Horizontal flags to indicate that a button is in fact a tab, so
>> that styles could use this information and change how they draw these
>> widgets appropriately.
>
> I'm not 100% (I don't know the simple-ideal code, it is adymo's code)
> but I think this would mean you'd have to change Qt code.
Well... yes and no. It means you would have to change the style plug-in.
If you are using a Qt-built-in style, then yes, technically, you would
have to change Qt. In my case, this would be a plug-in I wrote, so doing
this is trivial. Otherwise the change would just have no effect (except
in the very unlikely event some style is anal about what style flags are
set).
--
Matthew
"You're older than you've ever been / And now you're even older"
-- They Might Be Giants
More information about the KDevelop-devel
mailing list