[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde
Subject:    Re: Roberto's themes
From:       mosfet <mosfet () jorsm ! com>
Date:       1998-08-27 16:22:58
[Download RAW message or body]

I thought about this too. Essentially what one can do to get full theme support
would be to do the following:

Create a new library, possibly libktheme, that contains children of each QT
widget that you want to add theme capability to. These children would have
the following methods: 	
A) A constructor that reads a KConfig entry for a pixmap and possibly a 
foreground and background color entry. We would want to extend color schemes
somewhat. Also, we would need to incorparate a check for the parent class.
People would probably want different pixmaps/colors for a QButton sitting in a
toolbar verses a regular one. Enabling that pixmap in many cases would be
simply calling setBackgroundPixmap. In order to be effecient, we would
probably want to incorparate inital loading of pixmaps into KApplication (or a
theme capable child of it). 	
B) The constructor could have three additional arguments: bool enablepixmap,
bool enablecolor, bool scale. These would respectively enable the pixmaps,
enable the additional color entries, and scale (xForm) the pixmap to the widget
size. During testing, all three would default to false. Thus applications can
move to using the new widgets before the theming is totally tested, only
enabling it for ones known to work. Once the library becomes widely accepted
and seems to work well, we could change the default args to true, true, and
false.
C) We could throw in a few (possibly inline) methods for getting the pixmap,

Using this method, it would be fairly easy to add theme support to KDE. Since
the additional constructor parameters all take default values, developers would
only need to replace the class names in their code. A sed script could do it.
And of course, they would need to link to a new library.

I need to complete a few KDE projects already in progress, but once that is
done I would be glad to help.


Wed, 26 Aug 1998, Kevin Forge wrote: >Martin Konold wrote:
 >> 
>> On Wed, 26 Aug 1998, Roberto Alsina wrote:
>> 
>> > > Are these scrollbars "home made" or it's something new in Qt ?
>> >
>> > Those scrollbars are a hack on top of Qt's scrollbars.
>> > Not pretty code, but pretty widget, IMHO :-)
>> 
>> And the nicest thing about this "study" was that Roberto did not change a
>> single line of Qt.
>
>They are cute.  how many people wold want to use those instead ?  
>Perhaps we culd have "KScrollbar" or "RScrolbar" in adition to
>"QScrollbar" ?
>-- 
>"So let me get this straight," one IBM lawyer said. 
>"We're doing a deal with . . . a Web site?"
>http://www.forbes.com/forbes/98/0810/6209094a.htm  For context.
>mailto:forgeltd@usa.net  http://www.independence.seul.org
>-- 
>Send posts to:  kde@lists.netcentral.net
> Send all commands to:  kde-request@lists.netcentral.net
>  Put your command in the SUBJECT of the message:
>   "subscribe", "unsubscribe", "set digest on", or "set digest off"
>**********************************************************************
>This list is from your pals at NetCentral <http://www.netcentral.net/>
-- 
Send posts to:  kde@lists.netcentral.net
 Send all commands to:  kde-request@lists.netcentral.net
  Put your command in the SUBJECT of the message:
   "subscribe", "unsubscribe", "set digest on", or "set digest off"
**********************************************************************
This list is from your pals at NetCentral <http://www.netcentral.net/>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic