D10480: align checkable widgets in menu items

Vlad Zagorodniy noreply at phabricator.kde.org
Tue Feb 13 20:52:56 UTC 2018


zzag added a comment.


  > In principle it should not be needed. Right ?
  
  Yes.
  
  > Ifcheckboxes have a fixed size, and if margins would be equal to spacing, and if the math are correct, having something laied out as: margin + checkbox + spacing + icon + spacing + text would be automatically centered, no ?
  
  Well, in theory, yes, it would be centered. But, humans often perceive something to be centered when it's not actually centered, for example, in typography, letters like "O" or "S" are often put below a baseline. So, maybe, checkboxes should be even a little bit closer to icons/text.
  
  At a given moment, here's how things laid out:
  
    margin + checkbox_size + spacing + 1 + [2 + PM_SmallIconSize + 2] + spacing + 1 + text
  
  Also, why is there the number 1?
  
  > The reason why I would rather fix the current code than introducing some centering, is because centering would automatically hide deeper problems, and because it makes the metrics (margin, icon width, spacing), not reflect what the code do. Which then introduces confusion and make the code not maintainable.
  
  Agreed.

REPOSITORY
  R31 Breeze

REVISION DETAIL
  https://phabricator.kde.org/D10480

To: zzag, #breeze, #vdg, hpereiradacosta
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180213/baa62173/attachment.html>


More information about the Plasma-devel mailing list