kickoff tabbar touch-ups
M. Mehdi Salem Naraghi
momesana at googlemail.com
Thu Mar 27 04:20:41 CET 2008
Sebastian Kuegler schrieb:
> On Wednesday 26 March 2008 11:09:43 you wrote:
>
>> On 2008-03-26 19:30, Sebastian Kuegler wrote:
>>
>>> ... about kickoff changes.
>>>
>> This one is so trivial it's probably not worth a public
>> posting or bug report. A 1 px background color line
>> between the tab and the kickoff menu pane.
>>
>
> Visual changes in kickoff might seem trivial, but I'd go through review
> because other people think differently about this.
>
> In any case, why should there be a line? It looks disconnected this way and
> visually disturbing ...
>
The background pixels becomes visible because the painter is being
translated 0.5,0.5 pixels before the tabs are drawn. The translation is
necessary because otherwise half of the top-border of the painterpath
would fall outside of the visible rect thus making the tabbar look like
this:
stroke outside the visible rect
Top border appears to be much narrower than the rest.
An obvious hack is to draw a line with the fill color to "cover up" the
background. Ugly but simple solution.
The lines would be added to paintEvent() just before the painter is
being translated:
-------------------------------------- Put this right before line 229 in
.../kickoff/ui/tabbar.cpp ----------------------
painter.setPen(QPen(palette().base(), 1));
painter.drawLine(rect().topLeft(), rect().topRight());
---------------------------------------------------------------------------------------------------------------------------------------
The resulting tabbar then will look like this :
top border now looks ok
I've attached the patch to this email.
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Panel-devel mailing list
> Panel-devel at kde.org
> https://mail.kde.org/mailman/listinfo/panel-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/panel-devel/attachments/20080327/c783a697/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabbar-1.png
Type: image/png
Size: 5365 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080327/c783a697/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabbar-2.png
Type: image/png
Size: 4206 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080327/c783a697/attachment-0003.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 8077 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080327/c783a697/attachment-0001.jpe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kickoff-tabbar-1pixel-background.diff
Type: text/x-patch
Size: 479 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080327/c783a697/attachment-0001.bin
More information about the Panel-devel
mailing list