qt-copy patch: fix alternate rows in Q{List,Tree}Widget

Matt Rogers mattr at kde.org
Wed Sep 19 00:38:31 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Sep 18, 2007, at 5:33 PM, Matthew Woehlke wrote:

> I'd like to add the following patch to qt-copy. Can I update the  
> existing patch 0191 or do I need to create a new patch?
>
> Index: src/gui/itemviews/qitemdelegate.cpp
> ===================================================================
> --- src/gui/itemviews/qitemdelegate.cpp (revision 713489)
> +++ src/gui/itemviews/qitemdelegate.cpp (working copy)
> @@ -635,10 +635,10 @@
>
>      QPen pen = painter->pen();
>      QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
> -                              ? QPalette::Normal :  
> QPalette::Disabled;
> -    if (cg == QPalette::Normal
> -          && !(option.state & QStyle::State_Active))
> -        cg = QPalette::Inactive;
> +                              ? option.palette.currentColorGroup()
> +                              : QPalette::Disabled;
>      if (option.state & QStyle::State_Selected) {
> +       if (cg == QPalette::Normal
> +             && !(option.state & QStyle::State_Active))
> +           cg = QPalette::Inactive;
>          painter->fillRect(rect, option.palette.brush(cg,
>                            QPalette::Highlight));
>          painter->setPen(option.palette.color(cg,
>                          QPalette::HighlightedText));
>      } else {
> ===================================================================
>
> (Yes, I have already sent this to qt-bugs.)
>

IMO, if you sent this to qt-bugs as a separate issue, then it should  
be a separate patch in qt-copy as well.
- --
Matt


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFG8GF3A6Vv5rghv0cRAh3HAJ97qhb/tClvu6P0xka5wuu6afVhJwCfaf6U
1OM4edbXoOi3eyAkHMQ+UnA=
=t4nA
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list