Risu / Tiled-Quicklaunch

Plasma Menu Widget for KDE
https://store.kde.org/p/1319588/
GNU General Public License v2.0
3 stars 3 forks source link

Add just tiled icons #8

Closed msdobrescu closed 2 years ago

msdobrescu commented 2 years ago

Hi, I am looking for something similar to the folders drawer appearance. That was an applet in the early years of Plasma. I try to configure the widget, but can't find a way to:

Currently I get this appearance: image

I would like to be possible to have all the icons centred and no scroll bar at all.

Risu commented 2 years ago

Uncheck the label button in "Edit Tile" panel. Whatever is not there configurable you can edit in Import/Export layout (under "Configure Tiled Quicklaunch"), just replace values (like "tileMargin": X). I am sure you will achieve desired results.

msdobrescu commented 2 years ago

I've tried that. It brings this: image Ideally should be a popup or a tabbed page added to the widget configuration, or to resize temporarily to have all its client visible.

Anyway, for some reason the checkbox is ticked even though the config JSON shows "showLabel": false. Also, there is no label there at all anyway. This option was not in the initial JSON, so it's hard to find it if you re not aware of. Tile margin seems to have no effect. Now it's 0, but looks the same. I'd like to disable the hover outline effect too.

Here is what I have, on a panel positioned on the left edge of the screen:

{
  "fullscreenDefault": false,
  "fullscreen": false,
  "iconDefault": "",
  "icon": "system-file-manager",
  "fixedPanelIconDefault": true,
  "fixedPanelIcon": false,
  "searchResultsMergedDefault": true,
  "searchResultsMerged": true,
  "searchResultsCustomSortDefault": false,
  "searchResultsReversedDefault": false,
  "showRecentAppsDefault": true,
  "showRecentApps": false,
  "recentOrderingDefault": 1,
  "recentOrdering": 0,
  "numRecentAppsDefault": 5,
  "numRecentApps": 0,
  "sidebarShortcutsDefault": [
    "xdg:DOCUMENTS",
    "xdg:PICTURES",
    "org.kde.dolphin.desktop",
    "systemsettings.desktop"
  ],
  "sidebarShortcuts": [
    "xdg:DOCUMENTS",
    "xdg:PICTURES",
    "org.kde.dolphin.desktop",
    "systemsettings.desktop"
  ],
  "defaultAppListViewDefault": "Alphabetical",
  "defaultAppListView": "Alphabetical",
  "tileModelDefault": "",
  "tileModel": [
    {
      "x": 0,
      "y": 0,
      "w": 1,
      "h": 1,
      "url": "org.kde.dolphin.desktop",
      "showLabel": false
    },
    {
      "x": 1,
      "y": 0,
      "w": 1,
      "h": 1,
      "url": "org.kde.krusader.desktop"
    },
    {
      "x": 2,
      "y": 0,
      "w": 1,
      "h": 1,
      "url": "org.kde.krusader-root.desktop",
      "showLabel": false
    }
  ],
  "tileScaleDefault": 0.8,
  "tileMarginDefault": 5,
  "tileMargin": 0,
  "tilesLockedDefault": false,
  "tilesLocked": false,
  "defaultTileColorDefault": "",
  "defaultTileColor": "#00000000",
  "sidebarBackgroundColorDefault": "",
  "sidebarBackgroundColor": "",
  "searchFieldFollowsThemeDefault": false,
  "searchFieldFollowsTheme": false,
  "sidebarFollowsThemeDefault": false,
  "sidebarFollowsTheme": true,
  "tileLabelAlignmentDefault": "left",
  "tileLabelAlignment": "left",
  "appDescriptionDefault": "after",
  "appDescription": "none",
  "menuItemHeightDefault": 36,
  "menuItemHeight": 36,
  "searchFieldHeightDefault": 50,
  "searchFieldHeight": 50,
  "appListWidthDefault": 350,
  "appListWidth": 350,
  "favGridColsDefault": 6,
  "favGridCols": 6,
  "popupHeightDefault": 620,
  "popupHeight": 28.8484251968504,
  "popupWidthDefault": 380,
  "popupWidth": 178.64468503937007,
  "popupDismissOnLeftClickDefault": false,
  "popupDismissOnLeftClick": false
}
Risu commented 2 years ago

The values of "popupHeight" and "popupWidth" are clearly wrong in your config (so it didn't load correctly). and

Anyway, for some reason the checkbox is ticked even though the config JSON shows "showLabel": false

Indicate that config is not working too.

Seems like this widget is completely out of whack on your system. Please provide information about your operating system, plasma/kde framework version, qt version.

msdobrescu commented 2 years ago

Hi, the config is made by me in order to achieve a bar with the icons of the apps I intend to launch. I don't want something large, but rather compact.

Operating System: Gentoo Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.10.49-mocaccino (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7 CPU 920 @ 2.67GHz
Memory: 23.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
Risu commented 2 years ago

I would kike to be possible to have all the icons centred and no scroll bar at all.

To get all tiles centered:

  1. Add new widget.
  2. Go to "Configure Tiled Quicklaunch.."
  3. Click on "Import/Export layout"
  4. Change:
    "tileMarginDefault": 5,
    "tileMargin": 5,

    to

    "tileMarginDefault": 1,
    "tileMargin": 1,
  5. Click Ok button.

Scrollbar appears on scroll event when tiles exceed visible space.

display icons only

This is tiled quicklaunch, no icons without tiles.

control the icons size reduce the border/margin around the icons

  1. On your system drive go to file "/home/USERNAME/.local/share/plasma/plasmoids/risu.tiled.quicklaunch/contents/ui/TileItemView.qml"
  2. Change lines number 71 and 70
    
    width: appObj.showIcon ? size : 0
    height: appObj.showIcon ? size : 0
to

width: appObj.showIcon ? size2 : 0 height: appObj.showIcon ? size2 : 0


3. Restart plasma or system.

Tip: Use square tiles like 1x1, 2x2, 3x3, 4x4.

Your version of Plasma/Frameworks/Qt libraries are all right.
msdobrescu commented 2 years ago

This must be a misunderstanding. I don't need to make the icons bigger, au contraire, I want to shrink their area around, the padding or margin (the space between the icons and their dedicated area). The margin had no effect at all so far.

Indeed, I would like to have 1x1 tiles by default, now it is 2x2, but I've found that code. A setting would be nice.

Also, a rescan command from from the DE would be needed, it's so annoying to restart it each time!

Risu commented 2 years ago

It seems all your problems come from the fact that you shrinking popup size and you don't see relevant options under "Edit title" which are out of bounds.

msdobrescu commented 2 years ago

Not necessarily, I have resized it to see the page, but, should be a different way to setup that. My only issue is that I can't set a specific size of the square where the icons lay while controlling the size of the area around those icons. Starting from a default, can you set, lets say, icons of 24 x 24, and a margin of 1?

Basically, need to reduce the tile size, by shrinking it to the icon size + some small value (like 1px or 2px): image So I want to remove/reduce/set the area around the icon, not to change the icon size.

As a side question, what determines the icons to resize on their panel? image At the top, the icon resized like that at some point, which is actually as I want it. The one at the bottom does not. What is the magic setting to make it resize as the others?

msdobrescu commented 2 years ago

I've been looking at the code, but I don't know the framework. Anyway, I've come upon here: https://github.com/Risu/Tiled-Quicklaunch/blob/63abdf5669650e3a719151654296ed965fe5b4ee/contents/ui/TileGrid.qml#L19 I would expect to compute the cell size there.

But something is happening and I don't understand: if I set cellBoxSize to some vlue, like 24, it's effective. If I reduce cellSize and cellMargin has no effect, even though the sum should be 24. Why is that? I'd say that those values are ignored/overridden by this and goes here.

msdobrescu commented 2 years ago

@Risu, here is what I did to make it work for me. How much would you agree to integrate? custom.diff.txt

Here is my setup, on a panel on the left edge of the screen.


  "fullscreenDefault": false,
  "fullscreen": false,
  "iconDefault": "",
  "icon": "system-file-manager",
  "fixedPanelIconDefault": true,
  "fixedPanelIcon": false,
  "searchResultsMergedDefault": true,
  "searchResultsMerged": true,
  "searchResultsCustomSortDefault": false,
  "searchResultsReversedDefault": false,
  "showRecentAppsDefault": true,
  "showRecentApps": false,
  "recentOrderingDefault": 1,
  "recentOrdering": 0,
  "numRecentAppsDefault": 5,
  "numRecentApps": 0,
  "sidebarShortcutsDefault": [
    "xdg:DOCUMENTS",
    "xdg:PICTURES",
    "org.kde.dolphin.desktop",
    "systemsettings.desktop"
  ],
  "sidebarShortcuts": [
    "xdg:DOCUMENTS",
    "xdg:PICTURES",
    "org.kde.dolphin.desktop",
    "systemsettings.desktop"
  ],
  "defaultAppListViewDefault": "Alphabetical",
  "defaultAppListView": "Alphabetical",
  "tileModelDefault": "",
  "tileModel": [
    {
      "x": 0,
      "y": 0,
      "w": 1,
      "h": 1,
      "url": "org.kde.dolphin.desktop",
      "showLabel": false
    },
    {
      "x": 1,
      "y": 0,
      "w": 1,
      "h": 1,
      "url": "org.kde.krusader.desktop",
      "showLabel": false
    },
    {
      "x": 2,
      "y": 0,
      "w": 1,
      "h": 1,
      "url": "org.kde.krusader-root.desktop",
      "showLabel": false
    }
  ],
  "tileScaleDefault": 0.8,
  "tileScale": 0.6,
  "tileMarginDefault": 5,
  "tileMargin": 1,
  "hoverOutlineSizeDefault": 2,
  "hoverOutlineSize": 0,
  "tilesLockedDefault": false,
  "tilesLocked": false,
  "defaultTileColorDefault": "",
  "defaultTileColor": "#00000000",
  "sidebarBackgroundColorDefault": "",
  "sidebarBackgroundColor": "",
  "searchFieldFollowsThemeDefault": false,
  "searchFieldFollowsTheme": false,
  "sidebarFollowsThemeDefault": false,
  "sidebarFollowsTheme": true,
  "tileLabelAlignmentDefault": "left",
  "tileLabelAlignment": "left",
  "appDescriptionDefault": "after",
  "appDescription": "none",
  "menuItemHeightDefault": 36,
  "menuItemHeight": 36,
  "searchFieldHeightDefault": 50,
  "searchFieldHeight": 50,
  "appListWidthDefault": 350,
  "appListWidth": 350,
  "favGridColsDefault": 6,
  "favGridCols": 6,
  "popupHeightDefault": 620,
  "popupHeight": 47.99409448818898,
  "popupWidthDefault": 380,
  "popupWidth": 178.64468503937007,
  "popupDismissOnLeftClickDefault": false,
  "popupDismissOnLeftClick": false
}```

I'm shooting flies with a cannon, but it's the only cannon I have...
Risu commented 2 years ago

Make a pull request with short description so that any user who want a similar idea would easily incorporate it. Better idea is to do changes to Zren's Tiled Menu, which is regularly patched. I am only maintaining this widget to not become broken for new plasma releases.