2012/10/3 Marco Martin <[email protected]> > On Wednesday 03 October 2012, Aleix Pol wrote: > > Hi Plasma! > > I've been trying to figure out why buttons had a weirdly big size by > > default, forcing me to set a random width that will be rarely appropriate > > when translating. > > > > I decided to look into the code and that's what I found [1]. There I can > > that code is a bit old btw, i changed it today using implicitsize instead > of > paintedwidth to decide text elide when necessary > > > see that we are getting the max between the size we want and > > theme.defaultFont.mSize.width*12 which looks totally random to me. Maybe > we > > can just remove this part? Or at least leave it to 1 m so that it's never > > 0? >
It think is better having a usable default size policy. Having 1 pixel or not visible buttons doesn't look a good idea for me. > > > > it's a reasonable size espressed in characters (policy i unfortunately > still > didn't make clear enough there is that pixel sizes should be avoided as > much > as possible). > ideally, width and height of buttons or similar elements should never be > specified by the code that uses them, but alwas stay the default, that is > implicitWidth/height. > > 12 characters is a reasonable default width for a button (and the sane > length > a button text should have), what should be done is to gather all those > sizes > in a single private file so they are consistent among different widgets > > In this case it's not straightforward putting in a separated file, because this length needs the Button's font info. Unless we set a different policy. > Cheers, > Marco Martin > _______________________________________________ > Plasma-devel mailing list > [email protected] > https://mail.kde.org/mailman/listinfo/plasma-devel > Br, Daker Fernandes Pinheiro http://codecereal.blogspot.com
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
