|
From: Joe E. <jen...@fl...> - 2004-10-29 00:01:18
|
George Petasis wrote: > I have made some first steps into building a new tile theme > (see http://www.iit.demokritos.gr/~petasis/screenshot.png [...] Once again: wow! > but I am having some problems on how > to implement some widget elements. > > First of all, for changing the background of the text label > of a labelframe, I have to reimplement the Labelframe.text > element. And of course I don't want to mess up with text at all. > But why this widget element has a special background? > I have implemented a generic "background" element, and seems > to be used by all widgets, except from the labelframe with its > text. Is there a solution for this? The "Labelframe.text" element defined in tkElements.c is exactly the same as the default "text" element except that it erases the background area first. If you can find some way to extract KDE's background color and get that into a Tcl script, you should be able to use the built-in Labelframe.text element and do something like: style default Labelframe -background [kde::backgroundColor] in the theme definition. > The second important problem that I have is theming the scrollbar > widget. In my theme, I take the current unix KDE/Qt theme that the > desktop uses, and draw the widgets. But at this point, I don't know > what the organisation of the scrollbar will be. I.e. in the above > screenshot the scrollbar seems fine (visually), but the elements that > comprise it are not in place, as I use the default layout for scrollbars. > On the other hand, Qt has 6 (!) scrollbar elements, but no layout > information > at all. Any theme that has override the style.drawComplexControl() > may have placed the various pieces in various places. The Aqua theme on Mac OSX has the exact same problem -- instead of entry points to draw each piece of a scrollbar, there's a DrawThemeTrack() function that draws the whole thing. I don't know how to solve the problem there, either :-(. It will almost certainly require a change to the theme engine and scrollbar widget internals to handle this correctly; we need to add another level of indirection (somewhere) to support this sort of thing. Is your source code available? --Joe English jen...@fl... |