Minimalistic Window Decoration

There are already a few alternatives to the Oxygen window decoration available for KDE 4: Some ship with KWin, some are available on kde-look.org. Common to all these decorations is that they have some rendering code, either using painting calls, or by combining PNG picture tiles in deKorator.

For Skulpture, I tried something different. As Qt supports MDI windows, the Skulpture window decoration client simply uses the Qt style to paint the window title bar decoration. This has the advantage that the code is shared between the two window types.

Using the Skulpture window decoration, you can make the borders as small as 0 pixels. You can also change the size of the title bar, because the glyphs for the buttons and the icon are scalable. See this image for an extreme example.

Now if you do not like the look of Skulpture, but prefer a different style, you might be interested in the experimental “QtStyle” option of the window decoration. This option can be used to select a different Qt style in Skulpture. To try it, edit the file .kde/share/config/kwinskulpturerc and add the following:

[General]
QtStyle=Oxygen

In theory, it should work with any Qt style. For example, this feature can also be used to get a Float style window decoration. If you like this feature, please tell me, so that I can improve it.

Skulpture window decoration using the Qt style Oxygen

Do not try this on KDE 4.0, though, as you hit the famous “green window title bar bug” 🙂

Advertisements

10 thoughts on “Minimalistic Window Decoration”

  1. I added the note in remembrance for the long time Skulpture users, that had to struggle with this bug in the early Skulpture 0.1.x times 🙂

  2. This is very cool.
    However, one of the general things with Oxygen, the horizontal gradient, does not work with this window decoration.
    It does work in the Qt MDI-windows…

  3. I love skulpture!!!! Great work! As far as I am concerned there is nothing that it is missing. Thank you for this great theme!!

  4. This is great. Any chance the other buttons will be visible too? 🙂 Right now it only shows the close button, while the maximized button is only shown if window is maximized.

  5. That’s a nice option, indeed. For me, it leaves the corners with an extra 90 degree bit on top of the shadow, so it looks ugly, but it’s definitely worth getting this to work properly, in my opinion.

  6. If I remember correctly Sculpture isn’t present as a choice in a default KDE install. Will it get into KDE 4.3? It’s really nice!
    It’s really a pain to choose between:
    – Oxygen 🙂
    – Redmond 😦
    – Motif :((
    – some other bad looking styles from the past millennium :(((((

  7. @Znurre, I guess the gradient isn’t drawn by the style’s painting methods then, but is setup on the widget with polish() and an event handler.

    @Killerfox, thanks, but there is still much to do 🙂

    @Rasi, this should be filed as a bugreport against Oxygen, as with other styles at least the Qt standard buttons (min, max, help, close, shade) are all visible.

    @parena, this is also a bug in Oxygen. The style should return the window’s mask in styleHint(), instead of setting it up in polish().

    @Diego, definitely not for 4.3, probably not for 4.4, maybe for 4.5… well, I don’t know, at it’s current state the code will simply be rejected, but I am too lazy to clean it up just to please code monkeys 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s