kwin default window button order.

Aaron J. Seigo aseigo at kde.org
Wed Nov 14 23:04:35 GMT 2007


hi all ...

something that i've been wanting to see happen for a while is our window 
button order modified a bit. in particular, the defaults would be changed 
to "maximize, minimize, sticky, spacer*2, help, menu" on the left and "close" 
on the right.

the reasons for this layout are:

* close is a destructive action and should therefore be kept away from other 
buttons. we do this in our menus as well.

* the two most important buttons are close and either maximize or minimize 
depending on the user. so they should each have corner positions for easy 
mouse access. i put maximize as the left corner item because it benefits the 
most from this position between maximize and minimize: when maximized the 
window is guaranteed to have a corner position (well, barring panels, etc in 
the way) so maximize is probably the more likely action to benefit.

* in our dialogs we put "go away" buttons on the right (e.g. Ok, Cancel) and 
action buttons to the left (Help, Defaults, etc). we usually put our clear 
buttons on the right in line edits, etc ... this brings the window 
decorations into line with this concept.

attached is a patch that accomplishes this. the patch does four things:

* it changes the defaults to the above

* it introduces two new static methods to KDecorationOptions that return the 
defaults, removing a lot of duplication in the code where the defaults were 
hard coded

* makes the left/right buton default methods in KCommonDecoration 
non-pure-virtual and provides an implementation that returns the defaults as 
defined in KDecorationOptions. this allows window decorations to use the KDE 
defaults, even if they change over time. decos that have good reason for 
different defaults can still override the methods, of course. this change is 
BIC, but SC.

* modifies the karmik, plastik and oxygen decos to use the new defaults. i've 
left the rest as is out of respect for their authors and provenance (e.g. i 
assume the redmond deco should continue to have the typical MS Windows 
ordering)

this is a small thing, but small things make life better. i believe this would 
be worthwhile add to kde4. it was also a nice 15 minute break from plasma 
code ;)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: window_button_order.diff
Type: text/x-diff
Size: 10717 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071114/206869a5/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071114/206869a5/attachment.sig>


More information about the kde-core-devel mailing list