D12855: Move Widget search field to its own row so it doesn't get compressed

Nathaniel Graham noreply at phabricator.kde.org
Mon May 14 19:29:42 UTC 2018


ngraham added inline comments.

INLINE COMMENTS

> sharvey wrote in WidgetExplorer.qml:235
> Wellll.... from my (albeit limited) comprehension of `units`, they're all derived programatically somehow, either from an icon size, a font size, or at the lowest level, DPI.
> 
> The API page for `Units::gridUnits` reads
> 
> > The fundamental unit of space that should be used for sizes, expressed in pixels.
> > 
> > Given the screen has an accurate DPI settings, it corresponds to a width of the capital letter M
> 
> So if I understand your question correctly, deriving the row size from a font size would be redundant. Wouldn't it?

I mean, could we do something like `newSearchRow.height = searchInput.height + (units.smallSpacing * 2)` or something like that? Would that work?

Now that I think about it, instead of conditionally adjusting the height in this if/else block, could we just have this toggle the `showingSearch` property? Does that not work? In fact, I wonder why we need the `onClicked` as well as `onCheckedChanged` lines at all. Perhaps those could be simplified into just one.

REPOSITORY
  R119 Plasma Desktop

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

To: sharvey, ngraham, davidedmundson
Cc: abetts, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180514/7743259c/attachment.html>


More information about the Plasma-devel mailing list