<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Thomas,<br>
<br>
<blockquote cite="mid:200911191906.39363.thomas.luebking@web.de"
type="cite"><br>
<pre wrap="">widgets are rendered properly.
</pre>
<pre wrap="">The proposed patch did not alter the widget painting - they remain
toolbuttons.
</pre>
</blockquote>
By properly I meant: not selectable, hoverable, focusable, etc. Without
affecting the "normal state" painting. <br>
<blockquote cite="mid:200911191906.39363.thomas.luebking@web.de"
type="cite">
<pre wrap=""></pre>
<blockquote type="cite">
<pre wrap="">I should fix the style (this is done locally, I just have to commit), so
that both the "hacked separator" and the current widget are rendered the
same way.
</pre>
</blockquote>
<pre wrap="">There's no hack on the QMenu separators (present, intended or possible ...
mmhhh possible might it be... ;-) - they're currently just collapsed (too)
agressively.
</pre>
</blockquote>
Well, at least in a kstyle point of view there are: sizeForContents
returned by kstyle for separators also ignores whether the item has
text and icon. You have to reimplement that in the derived style if you
want to have it right.<br>
<br>
And in fact (correct me if I am wrong) there is another issue when
calculating menu size in Qt:<br>
Separators are simply ignored when calculating the width. So that if
you have a long title, and small items, well, you're title is shrinked.
Did you have the same issue in bespin ? How did you address ? (I can
check your code but its faster if its on top of your head).<br>
<br>
<blockquote cite="mid:200911191906.39363.thomas.luebking@web.de"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">I would rather not let the style hack the collapse separator style. This
is an application issue...
</pre>
</blockquote>
<pre wrap="">.. and no good idea either, for
a) if there's only unreliable semi-support it's unusable
b) the style needs to care about the position and content relation of
separators when defining the separator height, i.e. the widget.
</pre>
</blockquote>
yes. See above. As far as I understand, you need to handle in the style
the return value for CT_MenuItem. KStyle doesn't do it right. <br>
And even that is not enough, because of QMenu::
<meta name="qrichtext" content="1">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
p, li { white-space: pre-wrap; }</style>updateActionRects<br>
(unless I misread the code)<br>
<br>
<!--EndFragment-->
<blockquote cite="mid:200911191906.39363.thomas.luebking@web.de"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">At some point, (after kde4.4 is out) one could possibly replace the
title widget (internals) to use these hacked separators, or leave the
situation like now (after patch). Not a big deal.
</pre>
</blockquote>
<pre wrap="">I would rather suggest to get this done in Qt - collapsing is in general a
good idea (even for entitled separators) - we just need a better logic behind
it (i.e. check whether the "next element is a separator", the "separator is on
the end" or "on the beginning and has no title" - currently Qt checks inverse,
i.e. keeps the first seperator)
The change is pretty simple, though - you drop the lastVisibleAction pass and
reverse the size calcutaion (++i -> --i), store the last found handled
action(separator or action) check if it's a titleless separator, unset the
size in case and you're done ;-)
If a 4.6 beta change still applies to the current Qt git and someone plays my
merge request monkey, i'll provide a patch =)
Cheers
</pre>
</blockquote>
<br>
</body>
</html>