Plastique Surgery

Responding to Florian's blog from some days back about some missing features in Plastique, thing's aren't all that bad anymore. The menu styling is now more complete, and we are still working to make it better. There are some challenges for the Plastique style in the months to come, but I'll come back to that at the end of this post.

First of all, exclusive menu entries from 4.0.1 looked kind of like regular check buttons ;-). That's fixed now. Instead, we draw radio buttons like we should. And a nice other detail is that separators actions can also have text on them. The buttons also respect the sunken state now, which makes them more responsive and "life-like" than in 4.0.1. Screenshots:

Plastique, Qt 4.0.1 Plastique, Qt 4.1.0
Exclusive actions in 4.0.1 Exclusive actions in 4.1.0

We also touched up the Motif and CDE styles' checkable menu actions to make them less ugly. :-) In 4.0.1, the checkmarks were only drawn
when pressed, and they were jammed into 4x4 pixels. Now, we draw both on and off states, and also the sunken state, and we fixed the size of the checkmarks. Motif style looks a more and more like a true Motif app does. Or some of them, anyway... Screenshots:

Motif, Qt 4.0.1 Motif, Qt 4.1.0
Motif exclusive actions in 4.0.1 Motif exclusive actions in 4.1.0

I hope this makes up for the frustration that Florian was sharing ;-).

On a different note, lots of other things have also improved in Plastique since 4.0.1. For example, spinboxes and comboboxes now provide more contrast, and the hovering and focus highlighting looks much better. In 4.0.1, we basically drew only two enabled states for these widgets: with and without input focus, and no mouse-over effect. Without input focus, the spin box was a bit behind on the contrast, and with input focus, it just looked a bit wrong. This has been cleaned up now, so both combo boxes and spin boxes look great! As you can see below, with input focus, only the editable part of the spin box has the focus frame in it, and some pixeling has been done to make the frame nicer. Also, hovering is implemented for the individual spinbox buttons and the editable combobox button. This is different from Plastik, which draws a mouse-over effect for both spinbox buttons at once. Screenshots:

QSpinBox, Qt 4.0.1 QSpinBox, Qt 4.1.0
Spin boxes in 4.0.1 Spin boxes in 4.1.0

The main thing left for Plastique for 4.1 is to make it work properly with some of the new painting paradigms that 4.1 introduces. Plastique has been written as a color-only palette style, and it doesn't use any alpha blending (it's all fake!). Which is good, because it looks good even on X-servers without XRender, and that means we've got a modern style for all our peripheral platforms.

The problem is, these older unices generally run the CDE WM, and not KDE, and so they prefer Motif and CDE style over Plastique for consistency. So the next chapter in Plastique style history is to gradually convert it into an alphamapped style. I've done some initial work on it, but probably won't finish it until 4.2 (Developer Days 2005 San Jose coming up and all). The base idea is that Plastique will work both with color palettes, gradient palettes (that is - QGradient brushes in the palette), and with textures.

Plastique, Qt 4.0.1 Plastique, Qt 4.x.x
Push button in 4.0.1 Comboboxes in 4.1.0

So look forward to it! :-). And when you find issues in Plastique that need some love and care, please let us know. These things do get fixed :-).

Blog Topics: