D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-15 Thread Piotr Kosinski
pgkos added a comment. Things look bad when a bitmap icon appears in the tray... (e.g. Remmina) It seems `roundToIconSize` is necessary for bitmap icons. I think I am going to abandon this patch, as the necessary changes are simply too big: - all references to `marginHints` in the

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-15 Thread Piotr Kosinski
pgkos added a comment. With this new version the tray icons scale exactly like the application icons on the left (the "jumps" between icon sizes happen at exactly the same time). INLINE COMMENTS > anthonyfieroni wrote in main.qml:42 > I see it has configuration for icon size ? What about to

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-15 Thread Piotr Kosinski
pgkos updated this revision to Diff 27248. pgkos added a comment. Cancel out the enlargement of AbstractItem by the tasksRow's marginHints. REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10487?vs=27139=27248 BRANCH tray-icon-size-fix REVISION

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-14 Thread Piotr Kosinski
pgkos added a comment. It seems the problem is not with SVG icons, but with the systemtray code. If I make the systemtray's Flow's marginHints zero, the padding is preserved correctly! No magic constant is needed anymore: //Do spacing with margins, to correctly compute the number of

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-14 Thread Piotr Kosinski
pgkos added a comment. There is something wrong and inconstent about SVG icon scaling. For example, if I put this line in systemtray ui main QML code instead: `property int itemSize: Math.min(width, height)` then the KDE Connect icon completely fills the height of the panel.

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-14 Thread Piotr Kosinski
pgkos added a comment. I have returned to the previous version, as the version which used units.smallSpacing looked awful. Yes, it uses magic constant 0.85, but it really looks much better. I have patched the digital clock height too, so it perfectly matches the height of the tray

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-14 Thread Piotr Kosinski
pgkos updated this revision to Diff 27139. pgkos added a comment. Fix the previous commit REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10487?vs=27138=27139 BRANCH tray-icon-size-fix REVISION DETAIL https://phabricator.kde.org/D10487

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-14 Thread Piotr Kosinski
pgkos updated this revision to Diff 27138. pgkos added a comment. Return to previous version, which was better. REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10487?vs=27114=27138 BRANCH tray-icon-size-fix REVISION DETAIL

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos updated this revision to Diff 27114. pgkos added a comment. Use units.smallSpacing for padding instead of magic numbers. REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10487?vs=27105=27114 BRANCH tray-icon-size-fix REVISION DETAIL

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos added a comment. I have tried and tested this diff without any padding, and trust me, it looks very bad - **I would rather have this patch not accepted** - than not to add any padding. Particularly, the tray icons look extremely bad when there is no padding - I suppose this is

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos added a comment. I could argue that the numbers come from Material Design guidelines - it recommends between 10% to 20% of padding around icons. But with your attitude it will be difficult to justify anything.

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos added a comment. So maybe you tell me where this comes from? https://cgit.kde.org/plasma-workspace.git/commit/applets/digital-clock/package/contents/ui/DigitalClock.qml?id=90ea27f49c84f0dffbbf79b29eaa14c57f31a24d REPOSITORY R120 Plasma Workspace REVISION DETAIL

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos added a comment. I have tested it with the panel in both horizontal and vertical orientations, and 0.85 looks optimal for me. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D10487 To: pgkos, #plasma_workspaces, davidedmundson Cc: ngraham,

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos updated this revision to Diff 27105. pgkos added a comment. Squashed the commits REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10487?vs=27103=27105 BRANCH tray-icon-size-fix REVISION DETAIL https://phabricator.kde.org/D10487 AFFECTED

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos updated this revision to Diff 27103. pgkos added a comment. Make the padding of all the panel icons the same CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10487?vs=27095=27103 BRANCH tray-icon-size-fix REVISION DETAIL https://phabricator.kde.org/D10487 AFFECTED FILES

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos added a comment. This patch also enables the user to configure the tray icon's size limit using System Settings -> Icons -> Advanced -> Panel REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D10487 To: pgkos, #plasma_workspaces Cc: ngraham,

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos added a comment. The 0.8 is used to create a small padding, so the icons never touch the panel's borders. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D10487 To: pgkos, #plasma_workspaces Cc: ngraham, davidedmundson, plasma-devel, ZrenBot,

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos edited the summary of this revision. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D10487 To: pgkos, #plasma_workspaces Cc: ngraham, davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos updated this revision to Diff 27095. pgkos added a comment. Fix tray icon scaling REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D10487?vs=27089=27095 BRANCH tray-icon-size-fix REVISION DETAIL https://phabricator.kde.org/D10487

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos edited the test plan for this revision. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D10487 To: pgkos, #plasma_workspaces Cc: ngraham, davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

D10489: Fix the tray icon scaling

2018-02-13 Thread Piotr Kosinski
pgkos created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. pgkos requested review of this revision. REPOSITORY R120 Plasma Workspace BRANCH tray-icon-size-fix REVISION DETAIL https://phabricator.kde.org/D10489

D10487: Fix tray icon size scaling when changing the panel size (fix bug 360333)

2018-02-13 Thread Piotr Kosinski
pgkos created this revision. pgkos added a reviewer: Plasma: Workspaces. pgkos added a project: Plasma: Workspaces. Restricted Application edited projects, added Plasma; removed Plasma: Workspaces. Restricted Application added a subscriber: plasma-devel. pgkos requested review of this revision.

D7849: Fix the tray icon scaling on HiDPI screens

2018-02-10 Thread Piotr Kosinski
pgkos added a comment. In my opinion, roundToIconSize should operate on scaled units - it is used multiple times in a few plasmoids - all calls from them to roundToIconSize assume it will operate on scaled units. The method, as it is now, is useless, because QML code has no access to

D7849: Fix the tray icon scaling on HiDPI screens

2018-02-10 Thread Piotr Kosinski
pgkos updated this revision to Diff 26878. pgkos added a comment. This is a simpler implementation - the diff changes roundToIconSize so it uses scaled units. REPOSITORY R242 Plasma Framework (Library) CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7849?vs=19612=26878 REVISION

D7849: Fix the tray icon scaling on HiDPI screens

2017-09-17 Thread Piotr Kosinski
pgkos added a comment. @anthonyfieroni my first version of the diff changed only the tray icon QML file, but I think that it is better to fix it in the plasma framework, as that function is used in multiple other places and there is the same problem with wrongly sized icons on hidpi

D7849: Fix the tray icon scaling on HiDPI screens

2017-09-17 Thread Piotr Kosinski
pgkos added a comment. @broulik consider this case: The tray icons' size is defined by default in `org.kde.plasma.private.systemtray/contents/config/main.xml` to `smallMedium`, which means 22 pixels on a 96-dpi screen. On a 192-dpi screen, the icons' real size is 44 pixels. Now, in

D7849: Fix the tray icon scaling on HiDPI screens

2017-09-17 Thread Piotr Kosinski
pgkos updated this revision to Diff 19612. pgkos added a comment. Fixed the previous diff. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7849?vs=19592=19612 REVISION DETAIL https://phabricator.kde.org/D7849 AFFECTED FILES src/declarativeimports/core/units.cpp

D7849: Fix the tray icon scaling on HiDPI screens

2017-09-16 Thread Piotr Kosinski
pgkos updated this revision to Diff 19592. pgkos changed the repository for this revision from R120 Plasma Workspace to R242 Plasma Framework (Library). pgkos added a comment. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. Edited the

D7849: Fix the tray icon scaling on HiDPI screens

2017-09-16 Thread Piotr Kosinski
pgkos added a reviewer: Plasma. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D7849 To: pgkos, #plasma Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

D7849: Fix the tray icon scaling on HiDPI screens

2017-09-16 Thread Piotr Kosinski
pgkos created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. REVISION SUMMARY This patch fixes the problem with tray icon scaling on HiDPI screens - the icons are too small. The function `Units::roundToIconSize`