2012/10/3 Marco Martin <span dir="ltr"><<a href="mailto:notmart@gmail.com" target="_blank">notmart@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Wednesday 03 October 2012, Aleix Pol wrote:<br>
> Hi Plasma!<br>
> I've been trying to figure out why buttons had a weirdly big size by<br>
> default, forcing me to set a random width that will be rarely appropriate<br>
> when translating.<br>
><br>
> I decided to look into the code and that's what I found [1]. There I can<br>
<br>
</div>that code is a bit old btw, i changed it today using implicitsize instead of<br>
paintedwidth to decide text elide when necessary<br>
<div class="im"><br>
> see that we are getting the max between the size we want and<br>
> theme.defaultFont.mSize.width*12 which looks totally random to me. Maybe we<br>
> can just remove this part? Or at least leave it to 1 m so that it's never<br>
> 0?<br></div></blockquote><div><br></div><div>It think is better having a usable default size policy.</div><div>Having 1 pixel or not visible buttons doesn't look a good idea for me.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">
><br>
<br>
</div>it's a reasonable size espressed in characters (policy i unfortunately still<br>
didn't make clear enough there is that pixel sizes should be avoided as much<br>
as possible).<br>
ideally, width and height of buttons or similar elements should never be<br>
specified by the code that uses them, but alwas stay the default, that is<br>
implicitWidth/height.<br>
<br>
12 characters is a reasonable default width for a button (and the sane length<br>
a button text should have), what should be done is to gather all those sizes<br>
in a single private file so they are consistent among different widgets<br>
<br></blockquote><div><br></div><div>In this case it's not straightforward putting in a separated file, because this length</div><div>needs the Button's font info.</div><div>Unless we set a different policy.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers,<br>
Marco Martin<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
</div></div></blockquote></div><div><br></div>Br,<br><div><br clear="all">Daker Fernandes Pinheiro<br><a href="http://codecereal.blogspot.com/" target="_blank">http://codecereal.blogspot.com</a><br></div>