This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Reducing space between desktop icons. [SOLVED]

Tags: None
(comma "," separated)
kayman
Registered Member
Posts
17
Karma
0
KDE 5.6.5 on Linux Mint 18 64-bit
I request guidance on how to reduce the space between desktop icons.

Last edited by kayman on Mon Oct 03, 2016 2:12 am, edited 1 time in total.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
kayman wrote:KDE 5.6.5 on Linux Mint 18 64-bit
I request guidance on how to reduce the space between desktop icons.

[url]file:///home/karl/Pictures/Screenshot1%20space%20between%20desktop%20icons1.png[/url]
[url]file:///home/karl/Pictures/Screenshot1a%20space%20between%20desktop%20icons.png[/url]
[url]file:///home/karl/Pictures/Screenshot2%20space%20between%20desktop%20icons.png/url]
[url]file:///home/karl/Pictures/Screenshot2a%20space%20between%20desktop%20icons.png[/url]



Screenshots can be added by uploading the picture to the image host and tagging the url by the image tag - more: viewtopic.php?f=17&t=136191#p364343


Plasma 5 is using qml scripts. Both the folder view widget and the folder view layout are using the FolderView.qml. At here the FolderView.qml is located:
Code: Select all
$ locate FolderView.qml
/usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderView.qml


The cell width and the cell height are calculated from the icon size, font size, number of text lines, etc...

If you reduce the cell size then your space between the icons is smaller. One way is to subtract the cell width and the cell height:
Image

Result:
Image

Note !
Plasma upgrades are overwriting the edited FolderView.qml
kayman
Registered Member
Posts
17
Karma
0
Wow, spot-on - this worked out exactly the way I was hoping for! My populated desktop looks so much better now; Thanks a bunch!

I'll keep this useful editing information in my 'How to...' file for future reference.

I've got another issue, albeit small, in relation to sizing of icons.

Right-click desktop; In Folder View Settings - Plasma under Icons the size can easily be adjusted by using the Appearance slider, this is working flawlessly.

However in System Settings-->Icons Advanced-tab, selecting an icon size using the the drop-down menu is not working at all i.e., there is no response to whichever size of icon one selects.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
kayman wrote:I've got another issue, albeit small, in relation to sizing of icons.

Right-click desktop; In Folder View Settings - Plasma under Icons the size can easily be adjusted by using the Appearance slider, this is working flawlessly.

However in System Settings-->Icons Advanced-tab, selecting an icon size using the the drop-down menu is not working at all i.e., there is no response to whichever size of icon one selects.


When you drop a file to the plasma desktop ( Layout: Desktop) you have an option to 'widgetize' it. The initial plasma widget icon size is controlled by the System Settings-->Icons Advanced-tab. At this dropping text file to the desktop with desktop icon size 16 and 256:

Image

As a widget the icon has the widgets own settings:

Image
User avatar
Rog131
Registered Member
Posts
828
Karma
10
...and maybe later - Bring back properties dialog - https://phabricator.kde.org/D2687
kayman
Registered Member
Posts
17
Karma
0
Thanks again for the informative and useful information/instruction on setting of widgets.

One last request please;
Going back to your first instruction on 'Reducing space between desktop icons', can the the FolderView.qml be used to edit (reduce) the space between folder (or file) and its name (folder or file name)?

(I am unable posting an desktop screenshot, the Img, URL and thumb buttons don't seem nonfunctional).
User avatar
Rog131
Registered Member
Posts
828
Karma
10
kayman wrote:Going back to your first instruction on 'Reducing space between desktop icons', can the the FolderView.qml be used to edit (reduce) the space between folder (or file) and its name (folder or file name)?


Icon's label position is controlled at FolderItemDelegate.qml:
Code: Select all
                    PlasmaComponents.Label {
                        id: label

                        states: [
                            State { // icon view
                                when: !root.useListViewMode

                                AnchorChanges {
                                    target: label
                                    anchors.top: icon.bottom
                                    anchors.horizontalCenter: parent.horizontalCenter
                                }
                                PropertyChanges {
                                    target: label
                                    anchors.topMargin: 2 * units.smallSpacing


Smaller top margin:
Code: Select all
anchors.topMargin: 2 * units.smallSpacing - 10


=>

Image
kayman
Registered Member
Posts
17
Karma
0
This worked out also!
Many thanks for clear and illustrative instructions for solving spacing issues.
Cheers...
User avatar
alex-l
Registered Member
Posts
37
Karma
0
OS
Rog131 wrote:
kayman wrote:Image


Hi, how did you remove the text label shadow?
User avatar
Rog131
Registered Member
Posts
828
Karma
10
alex-l wrote:
Hi, how did you remove the text label shadow?


With the plasma 4 there was an option to set icon shadow etc:

Image

With the plasma 5 this is not (yet ?) implemented. With the plasma 5 a workaround:

Usually the KDE is using user settings and scripts before the system. So copying the /usr/share/plasma/plasmoids/org.kde.desktopcontainment/ to the ~/.local/share/plasma/plasmoids/org.kde.desktopcontainment/.

Image

... and editing the FolderItemDelegate.qml. From black shadow to transparent:
Code: Select all
                    DropShadow {
                        id: textShadow

                        anchors.fill: label

                        visible: (root.isContainment && main.GridView.view.isRootView)

                        horizontalOffset: 2
                        verticalOffset: 2

                        radius: 9.0
                        samples: 18
                        spread: 0.15

                        //color: "black"
                        color: "transparent"

                        source: label
                    }


The text color is set by line:
Code: Select all
color: textShadow.visible ? "white" : PlasmaCore.ColorScope.textColor

Changing this simply:
Code: Select all
color: "green"


Result - original white text with shadow - white text without shadow - green text without shadow:

Image
anutosho
Registered Member
Posts
23
Karma
0
So Do I understand right that we all are asked to fiddle around in some source files every time the Plasma packages are updated, just to get a user friendly desktop?
I would not call this a solution but a confession of failure :(

The continuous degradation of kde since V 3.5 is really hard to take.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
Bug 359077 - icons frame size is too wide: https://bugs.kde.org/show_bug.cgi?id=359077
=> https://bugs.kde.org/show_bug.cgi?id=359077#c15
=> https://bugs.kde.org/show_bug.cgi?id=359077#c18

Eike Hein 2017-03-27 07:22:27 UTC

The spacing has been greatly reduced in Plasma 5.10.
.
.
.
Eike Hein 2017-03-28 08:32:53 UTC

...in git master (what will become 5.10) we've significantly reworked the delegates, making the resulting icon grid much tighter (along with changes to mouse interaction code to make it still feel good).


Schedules/Plasma 5: https://community.kde.org/Schedules/Plasma_5
5.10.0 Release Tue 2017-05-30
kokoko3k
Registered Member
Posts
9
Karma
0
Rog131 wrote:
alex-l wrote:
Hi, how did you remove the text label shadow?


With the plasma 4 there was an option to set icon shadow etc:

Image

With the plasma 5 this is not (yet ?) implemented. With the plasma 5 a workaround:
[..]

Sorry to hijack the thread further, but since it is already solved...
Do you know if is there a way/workaround to HAVE shadows in the folderview plasmoid too?
Thanks!

-EDIT-
Got it!
Still in FolderItemDelegate.qml:
Replace:
Code: Select all
            Component.onCompleted: {
                if (root.isContainment && main.GridView.view.isRootView) {
                    frameLoader.textShadow = textShadowComponent.createObject(frameLoader);
                }

...with:
Code: Select all
            Component.onCompleted: {
                //if (root.isContainment && main.GridView.view.isRootView) {
                    frameLoader.textShadow = textShadowComponent.createObject(frameLoader);
                //}
dfrandin
Registered Member
Posts
4
Karma
0
If we've gotta edit a damn qml file every time Plasma updates to get desktop icon spacing tolerable, then this is MOST DEFINATELY NOT [SOLVED]!!!!
airdrik
Registered Member
Posts
1854
Karma
5
OS
Well, there is a solution, even if it is just a workaround.
However, for a more permanent solution submit a request to get the change applied in plasma itself. Or if this can be done as part of a plasma theme, then copy the default theme and apply these changes to it (and upload it to store.kde.org)


airdrik, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]