Review Request: Add a generic mechanism to render solid backgrounds behind plasma frames

David Nolden zwabel+reviewboard at gmail.com
Fri Apr 17 16:06:17 CEST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/591/
-----------------------------------------------------------

(Updated 2009-04-17 07:06:16.774391)


Review request for Plasma.


Changes
-------

Allow a background color + alpha, and a background pattern + alpha.
For the background pattern, put into the plasmarc [Theme] section:
frameBackgroundPattern=/patch/to/background/pattern.jpg
frameBackgroundPatternAlpha=255

The color is rendered on top of the pattern.


Summary
-------

This allows making transparent themes "solid" in a relatively nice-looking way. My idea is that there would at least a few configurable background-providers: User-chosen solid color(with alpha value), user-chosen pattern(tinted by solid color with alpha-value), solid color autodetected from the background image(to make the colors match).

In this initial implementation, there is one background-provider for a color with an alpha-value. This might also be a nice way to customize themes even if composition is enabled, because it can be used to just reduce the transparency, and tint the theme into a user-chosen direction.

This isn't ready and doesn't have a user-interface, I'm mainly posting this for review to check whether the general approach is accepted.

To try it out, add something like:
frameBackgroundColor=#ff0000
frameBackgroundColorAlpha=255
Into the [Theme] section of the ~/.kde4/share/apps/plasmarc file.

About the implementation:
The main problem is identifying the specific frames that are intended to run as separate windows. I've done that using some simple string-matching, and it worked well in all my tries.


Diffs (updated)
-----

  trunk/KDE/kdelibs/plasma/CMakeLists.txt 953288 
  trunk/KDE/kdelibs/plasma/framebackgroundprovider.h PRE-CREATION 
  trunk/KDE/kdelibs/plasma/framebackgroundprovider.cpp PRE-CREATION 
  trunk/KDE/kdelibs/plasma/framesvg.cpp 953288 
  trunk/KDE/kdelibs/plasma/private/framesvg_p.h 953288 
  trunk/KDE/kdelibs/plasma/theme.h 953288 
  trunk/KDE/kdelibs/plasma/theme.cpp 953288 

Diff: http://reviewboard.kde.org/r/591/diff


Testing
-------


Thanks,

David



More information about the Plasma-devel mailing list