Button component width

Aurélien Gâteau agateau at kde.org
Thu Oct 4 07:33:14 UTC 2012


Le mercredi 3 octobre 2012 22:44:20 Mark a écrit :

> Also, setting a minimal size in characters.. Is there any other
> toolkit out there that's doing that?

I personally think setting a size in characters makes more sense than setting 
it in pixels when the toolkit is expected to cover a wide range of devices: 
setting a size in pixels is going to break when the code run on a device with 
a very different DPI value.

> Again, i can imagine this to work
> wonderful for plasma active, but it just doesn't work on the desktop.
> The default width should be calculated based on the string that's put
> into it. Then devs can decide to ignore that "suggestion" and just set
> a width of their liking.

David Edmundson review request provides something close to what you describe: 
let the button us a standard width by default, but offer a way to developers to 
override this width if need be. I did some research lately on what other UI 
guidelines recommend. Interestingly, both Windows and OS X guidelines 
recommend a default width, Windows guidelines going as far as saying if a 
button's width is less than the default width, it will look "unprofessionnal".

Command Buttons in Windows:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa511453.aspx#general

OS X, no explicit mention of size but look at the button screenshots in the 
"Push Button" section:
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Controls/Controls.html#//apple_ref/doc/uid/TP30000359-
TP6

Aurélien


More information about the Plasma-devel mailing list