--===============0409117246== Content-Type: multipart/alternative; boundary="===============6799807710604830843==" --===============6799807710604830843== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On 2010-09-30 13:10:03, Marco Martin wrote: > > still not completely happy having to keep a separate xml dom, however, = there are probably not going to be other ways for a while and the implement= ation seems pretty good, so modulo those little things it could go in If QXmlStreamReader::parse() would be virtual, we could create a stream rea= der, that replaces this on the fly. But for now I see no other way of doing= this. The only idea that could work is: Create a QIODevice that reads from= another QIODevice with help of QXmlStreamReader and writes the data again = with QXmlStreamWriter... But this would be much more code and I don't think= that this would be faster at all. > On 2010-09-30 13:10:03, Marco Martin wrote: > > /trunk/KDE/kdelibs/plasma/svg.cpp, line 107 > > > > > > a check elements with the same id aren't existing should be done You are right. But this would add more clutter. Maybe it is better to just = leave the id as is. So no hint-uses-color-scheme but only current-color-sch= eme. > On 2010-09-30 13:10:03, Marco Martin wrote: > > /trunk/KDE/kdelibs/plasma/svg.cpp, line 441 > > > > > > so the coloring of the pixmap is still kept as retrocompatibility? I don't want to break existing themes ;) > On 2010-09-30 13:10:03, Marco Martin wrote: > > /trunk/KDE/kdelibs/plasma/theme.cpp, line 320 > > > > > > i wonder how much is the benefit vs cost of caching this? Both is quite low. ;) But as this stylesheet has to be generated for every = Plasma::Svg object, which is 259 times for a start of plasma with the defau= lt setup + analog clock + calculator, it feels wrong to regenerate it that = often. > On 2010-09-30 13:10:03, Marco Martin wrote: > > /trunk/KDE/kdelibs/plasma/theme.cpp, line 790 > > > > > > the button widget should be modified if this will start to be used For what reason? - Manuel ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://svn.reviewboard.kde.org/r/5495/#review7905 ----------------------------------------------------------- On 2010-09-30 11:41:09, Manuel Mommertz wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://svn.reviewboard.kde.org/r/5495/ > ----------------------------------------------------------- > = > (Updated 2010-09-30 11:41:09) > = > = > Review request for Plasma. > = > = > Summary > ------- > = > With this patch applied SVGs can put a style-element with id 'current-sys= tem-colors' in it, which gets replaced by a style with the current systemco= lors. This allows SVGs to use colors like background color and text color f= rom the system palette. Giving themes much more possibilitys then just colo= ring the resulting pixmap. > = > = > Diffs > ----- > = > /trunk/KDE/kdelibs/plasma/theme.h 1180314 = > /trunk/KDE/kdelibs/plasma/theme.cpp 1180314 = > /trunk/KDE/kdelibs/plasma/svg.cpp 1180314 = > = > Diff: http://svn.reviewboard.kde.org/r/5495/diff > = > = > Testing > ------- > = > Changing theme, changing colorscheme > = > = > Thanks, > = > Manuel > = > --===============6799807710604830843== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://svn.reviewb= oard.kde.org/r/5495/

On September 30th, 2010, 1:10 p.m., Marco M= artin wrote:

still not=
 completely happy having to keep a separate xml dom, however, there are pro=
bably not going to be other ways for a while and the implementation seems p=
retty good, so modulo those little things it could go in
If QXmlStre=
amReader::parse() would be virtual, we could create a stream reader, that r=
eplaces this on the fly. But for now I see no other way of doing this. The =
only idea that could work is: Create a QIODevice that reads from another QI=
ODevice with help of QXmlStreamReader and writes the data again with QXmlSt=
reamWriter... But this would be much more code and I don't think that t=
his would be faster at all.

On September 30th, 2010, 1:10 p.m., Marco M= artin wrote:

= = =
/trunk/KDE/kdelib= s/plasma/svg.cpp (Diff revision 1)
bool SharedSvgRenderer::load(const QByteArray &contents, const =
QString &styleSheet)
103
        QDomElement <=
span class=3D"n">colorScheme =3D svg.createElement=
("style"=
);
a check e=
lements with the same id aren't existing should be done
You are right. But this would add more clutter. Maybe it is better t=
o just leave the id as is. So no hint-uses-color-scheme but only current-co=
lor-scheme.

On September 30th, 2010, 1:10 p.m., Marco M= artin wrote:

= = =
/trunk/KDE/kdelib= s/plasma/svg.cpp (Diff revision 1)
class SvgPrivate
385
            applyColors =3D elementRect("hin=
t-apply-color-scheme").isValid();
437
            if (elementRect("hint-apply-color-scheme").isValid()<=
span class=3D"hl">) {
so the co=
loring of the pixmap is still kept as retrocompatibility?
I don't want to break existing themes ;)

On September 30th, 2010, 1:10 p.m., Marco M= artin wrote:

= = =
/trunk/KDE/kdelib= s/plasma/theme.cpp (Diff revision 1)
void ThemePrivate::colorsChanged()
320
        if(stylesheet.isEmpty()) {
i wonder =
how much is the benefit vs cost of caching this?
Both is quite low. ;) But as this stylesheet has to be generated for=
 every Plasma::Svg object, which is 259 times for a start of plasma with th=
e default setup + analog clock + calculator, it feels wrong to regenerate i=
t that often.

On September 30th, 2010, 1:10 p.m., Marco M= artin wrote:

= = =
/trunk/KDE/kdelib= s/plasma/theme.cpp (Diff revision 1)
KSharedConfigPtr Theme::colorScheme() const
785
        case ButtonHoverColor:
the butto=
n widget should be modified if this will start to be used
For what reason?

- Manuel


On September 30th, 2010, 11:41 a.m., Manuel Mommertz wrote:

Review request for Plasma.
By Manuel Mommertz.

Updated 2010-09-30 11:41:09

Descripti= on

With this patch applied SVGs can put a style-element with id=
 'current-system-colors' in it, which gets replaced by a style with=
 the current systemcolors. This allows SVGs to use colors like background c=
olor and text color from the system palette. Giving themes much more possib=
ilitys then just coloring the resulting pixmap.

Testing <= /h1>
Changing theme, changing colorscheme

Diffs=

  • /trunk/KDE/kdelibs/plasma/theme.h (1180314= )
  • /trunk/KDE/kdelibs/plasma/theme.cpp (11803= 14)
  • /trunk/KDE/kdelibs/plasma/svg.cpp (1180314= )

View Diff

--===============6799807710604830843==-- --===============0409117246== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============0409117246==--