-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102345/#review5753
-----------------------------------------------------------



kfile/kurlnavigatorbutton.cpp
<http://git.reviewboard.kde.org/r/102345/#comment5108>

    The problem with using CE_PushButtonLabel is that the text is painted 
against the background color suited for buttons, i.e. QPalette::Button.
    
    The setPen stuff above the call has been added to make sure the text is 
visible on the background the navigator uses, which is QPalette::Window.
    
    There are several ways to resolve that:
    
    a. Keep using drawText, and add the correct Qt flag for accelerator drawing
    
    b. Use QStyle::drawItemText
    
    c. Adjust the palette, as is done some lines above (or reuse that palette 
by code refactoring).
    
    I would use "b" if you ask me. Note that you can remove the setPen stuff if 
you no longer use drawText.


- Christoph


On Aug. 16, 2011, 6:24 p.m., José Millán Soto wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102345/
> -----------------------------------------------------------
> 
> (Updated Aug. 16, 2011, 6:24 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> This patch makes KUrlNavigator focusable.
> Also, QStyle::drawControl is used instead of QPainter::drawText in 
> KUrlNavigatorButton, because accelerators are set in the buttons and drawText 
> did not display them correctly.
> 
> 
> Diffs
> -----
> 
>   kfile/kurlnavigator.cpp e71c979 
>   kfile/kurlnavigatorbutton.cpp 5d38e56 
>   kfile/kurlnavigatorbuttonbase.cpp 45f8eee 
>   kfile/kurlnavigatorbuttonbase_p.h 70aacb3 
> 
> Diff: http://git.reviewboard.kde.org/r/102345/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> José
> 
>

Reply via email to