[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Transparency -- take 2
From: Mosfet <mosfet () jorsm ! com>
Date: 1999-10-04 10:51:21
[Download RAW message or body]
On Mon, 04 Oct 1999, Antonio Larrosa wrote:
> Geert Jansen wrote:
> >
> > Antonio Larrosa wrote:
> >
> > > Currently you just have to use the class RootPixmap (defined in
> > > rootBg.h)
> > > and set a call to RootPixmap::setBackgroundPixmap(yourwidget); not much
> > > more.
> > > You just have to change the function loadWallpaper to load it from
> > > the root propierties instead of from disk.
> >
> > Well, if you strip all the rendering code from RootPixmap, you end up with
> > about 20 lines (in my version) of C++ for copying the shared pixmap :) So
>
> Not just 20, but there are only a few more, you're right :-)
>
> > the duplication effort is not that big :) And I did a general pixmap sharing
> > class which is IMO preferable over your desktop-background-only version.
> > It has a similar API. Something like:
> >
> > QPixmap background = KSharedPixmap::copy("kde_desktop_1", aRect);
> >
>
> Looks good, but that's not a similar API, the api of RootPixmap is
> something like:
>
> rootxpm=new RootPixmap;
> rootxpm->prepareBackground(redting,greentint,bluetint); // if desired
> rootxpm->setBackgroundPixmap(mywidget);
>
> the solution would be just to substitute the calls to generateBackground
> in RootPixmap with a call to KSharedPixmap. As I see it, your
> class is much more abstract and generic, but RootPixmap has an easy api
> for use of transparent widgets. Anyway, I tought I read something very
> similar to it in your original proposal.
>
> With RootPixmap, you just have to take care to call setBackgroundPixmap
> again when you resize the widget, move it, or change desktop (and also,I
> suppose kdesktop should emit a signal telling when it has changed the
> desktop background, and send signals each few seconds when using
> something like xearth). In the future RootPixmap will (if I or someone
> else find the time :-) ) automatically set an event handler for those
> events and set the transparent backgrounds as necessary without the
> developer having to call it specifically.
>
> > will get you a copy of the desired piece of the desktop background.
> > If you want to take a look at the code, I'll mail it to you, it's already
> > done.
> >
>
> If it works so well, you should put it on the libs I think, I'll have
> a look then. If you don't think so, just send it to me (if it isn't too
> big)
>
Definitely put it in the libs. I want to use it for other things like styles.
> > > The major changes should be done to kdesktop, which is a thing I won't
> > > talk about as there are others who know much more than me about it.
> >
> > Yes, I was primarily talking about kdesktop. If the changes are done there,
> > the client implementation is easy.
> >
>
> Exactly,
>
> > > Reuse what's already written :-)
> >
> > Hey, that's my slogan! (really) :)
> >
>
> :-)
>
> Greetings,
>
> --
> Antonio Larrosa Jimenez
> Student of Mathematics
> antlarr@arrakis.es larrosa@kde.org
> http://www.arrakis.es/~rlarrosa
> Klein bottles for rent -- inquire within.
--
Daniel M. Duley - Unix developer & sys admin.
mosfet@mandrakesoft.com
mosfet@kde.org
mosfet@jorsm.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic