D6188: [Desktop] Pad cellWidth/cellHeight with the extra space

Chris Holland noreply at phabricator.kde.org
Mon Jun 12 02:45:51 UTC 2017


Zren created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  This is an initial attempt. There's a few edge cases I need to deal with, but I just want to be sure I'm on the right track first.
  This turned into something way more complicated than I originally thought.
  
  The right/bottom corners will have an empty area where icons should be touching.
  https://bugs.kde.org/show_bug.cgi?id=380424
  
  F3781575: 2017-06-07___11-49-07.png <https://phabricator.kde.org/F3781575>
  
  F3781590: 2017-06-11___22-11-47.png <https://phabricator.kde.org/F3781590>
  
  F3781591: 2017-06-11___22-11-57.png <https://phabricator.kde.org/F3781591>
  
  F3781592: 2017-06-11___22-12-25.png <https://phabricator.kde.org/F3781592>
  
  This creates a real/floating point cellWidth/cellHeight if the column count isn't divisible. If we floor the extraWidth/extraHeight, we'll still have a margin in the below and to the right. If we ceiled it, it would probably cause a scrollbar. I honestly don't trust floating points to not cause a scrollbar anyways though, but we can't set a cellSize for individual cells, so we can't use integers to solve this.

TEST PLAN
  - Does **not** work with icons arranged in row if there's a panel on the bottom. The panel covers the last row.
  - Does **not** work with icons arranged in columns if there's a panel on the right. The panel covers the last column.
  - Works fine if the panel is on the top or left.
  - When arranged in columns, dropping an icon with the center past the edge of the screen causes a horizontal scrollbar, since it creates an empty column, but places the icon on the column before it. Yo fix it, you have to drop the icon on the new column, then drop on a regularly visible column (trigger a columnCount change?).
  - If changing icon size in the config to a larger size and it causes a horizontal scrollbar, the viewport is too thin. The scrollbar cannot reveal the further column on the right.
  
  TODO:
  
  - Test other screen resolutions
  - Test if text labels are at a floating point coordinate, causing uglyness.
  - Test spring loaded folder views
  - Test folder view widgets

REPOSITORY
  R119 Plasma Desktop

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

AFFECTED FILES
  containments/desktop/package/contents/ui/FolderView.qml

To: Zren, hein
Cc: plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170612/c350132b/attachment-0001.html>


More information about the Plasma-devel mailing list