Instantly share code, notes, and snippets.
Last active
July 21, 2019 16:43
-
Star
(0)
0
You must be signed in to star a gist -
Fork
(0)
0
You must be signed in to fork a gist
-
Save Zren/691df69a45b78c45515b1973be77baec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Changelog.md b/Changelog.md | |
index 8a92600c..139251cf 100644 | |
--- a/Changelog.md | |
+++ b/Changelog.md | |
@@ -1,231 +1,4 @@ | |
-## v30 - April 4 2019 | |
+## v1 - July 21 2019 | |
-* Fix sidebar menus not resizing to fix translated text (Issue #37). | |
-* Add support for a 2x1 Lutris game tile preset. | |
-* Don't "download" the linked file associated with a tile when opening the tile editor unless it's a `*.desktop` file. | |
-* Fix weird drag origins when moving tiles. | |
+* First release. | |
-## v29 - February 28 2019 | |
- | |
-* Make sure the AppList area (and TileEditor) is visible when opened from TilesOnly view, and return to TilesOnly view when TileEditor is closed. | |
-* Fix the "desktop theme" search view being slightly visible in TilesOnly view (Issue #40) | |
-* Fix double "Keyboard Shortcut" tab in Plasma 5.15 | |
- | |
-## v28 - January 28 2019 | |
- | |
-* Add Indonesian translations by @ardumpl (Issue #34) | |
-* Updated Dutch translations by @Vistaus (Pull Request #36) | |
-* You can now easily import/export a tile layout (Issue #19). | |
-* Can be configured to start in "Tiles Only" mode, revealing the app list after a search. | |
-* The "menu" button showing all the labels has been removed, since you can now hover a button and instantly see the tooltip. | |
-* The "Apps" sidebar tooltip now shows "Alphabetically". | |
-* Sorting Apps Alphabetically and Categorically now have use a bundled icon that better represents them. The icons (including Tiles Only) are highlighted when they are "selected". | |
-* Failed attempt at cancelling a drag event that starts after an app is launched. | |
- | |
-## v27 - January 5 2019 | |
- | |
-* Add Korean translations by @crazyraven (Pull Request #31) | |
-* Updated Dutch translations by @Vistaus (Pull Request #32) | |
-* Add ability to set the number of recent apps (Max=15). | |
-* Show the sidebar item label in a tooltip when hovering it. | |
- | |
-## v26 - December 10 2018 | |
- | |
-* Default to "Most Used" apps instead of "Most Recent" which can be changed back in the config. | |
-* Add ability to move all tiles below a group label when a label is moved. | |
-* Add ability to sort all tiles by name in a tile group. | |
-* Add a tile preset selector for steam game launchers. | |
-* Add a grid column spinbox in the config just in case the user does not notice they can resize with Alt+RightClick. | |
-* Hide the default Global Shortcut config tab, and replace it with a tab mentioning you need `Alt+F1` set for just pressing the `Meta` key to work. | |
- | |
-## v25 - November 16 2018 | |
- | |
-* Update Dutch translations by @Vistaus (Pull Request #23) | |
-* Add Russian translations by @Niksn404 (Pull Request #25) | |
-* Add European Portuguese translations by @nyxerys (Pull Request #26) | |
-* Scale config section rectangles by the dpi. | |
-* Hide tooltip when hovering the panel icon. | |
-* Add 4px spacing between sidebar and app list. | |
-* Hardcode Oxygen theme tile color to 12.5% transparent white. | |
- | |
-## v24 - September 22 2018 | |
- | |
-* Hide the solid sidebar background color. "Desktop theme" styled sidebars remain the same. | |
-* Add Jump to Letter/Category views when clicking the section header. | |
-* Add ability to start in Jump To Letter/Category view when menu opens. | |
-* Fix a binding loop when drawing tile labels which caused a line of text to overflow the bottom of the tile (Issue #11). | |
-* Group apps starting with symbols/punctuation under '&'. | |
- | |
-## v23 - August 2 2018 | |
- | |
-* Added Dutch translation by @Vistaus (Pull Request #15) | |
-* Fix non-default font size causing issues in app list (Issue #7) | |
-* Fix a number of deprecation warnings logged in Qt 5.11. | |
-* Make sure the panel icon should be smooth. | |
-* Focus on searchField when a sidebar menu closes. | |
-* Fix icon sizes in the search filter view. | |
- | |
-## v22 - May 15 2018 | |
- | |
-* Fix error when loading in Kubuntu 18.04 LiveCD. We now lazy load qml-module-qt-labs-platform which was used to retrieve the translated xdg folder names. | |
-* Merge updated Chinese translations by https://github.com/lm789632 | |
- | |
-## v21 - May 10 2018 | |
- | |
-* Fix error when opening the config with Qt 5.9 / Kubuntu 18.04. | |
- | |
-## v20 - May 9 2018 | |
- | |
-* Add ability to edit the sidebar shortcuts in the config. By default, only System Settings, Dolphin, ~/Pictures, and ~/Documents is visible. You can drop apps/folders onto the sidebar to add it, though you'll need to open the config to delete it. | |
-* Use a "hover outline" effect for the app list, utilizing several lazy loading tricks to load the list faster. An option to use the Desktop Theme buttons will return in a later version. | |
-* Add option to set the default app list order to "Categories" for when you first login. | |
-* Remember tile drag offset. When you click the bottom right of a tile and drag, the cursor will drop the bottom right of the tile instead of the top left. | |
-* Don't allow creating new groups when tiles are locked. | |
-* Hide "Pin to Menu" and "Edit Tile" items when tiles are locked. | |
-* Add a "Alt+RightClick" to resize hint to the bottom right when widget is in a top panel. | |
-* Add drop shadow to the "power" and "switch user" sidebar submenues. | |
- | |
-## v19 - April 1 2018 | |
- | |
-* Disable push effect when right clicking a tile. | |
-* Add a radial hover effect similar to fluent design. | |
-* Add "group" tile to quickly label a group of tiles. No other features are implmented yet (like moving all tiles in the group or "folders"). Right click the empty grid to add a "group" label. | |
-* Support locking tiles so you don't accidentally drag them. Right click the empty grid > (un)lock tiles. | |
-* Fix tileLabelAlignment, it never got reimplemented after the refactor. | |
- | |
-## v18 - September 25 2017 | |
- | |
-* Fix tiles not launching unless we open and close the tile editor. | |
- | |
-## v17 - September 13 2017 | |
- | |
-* Various fixes to make the menu faster to open (from a cold start). | |
-* Lazy load the tile editor GUI for performance reasons. | |
-* Add button to open the icon selector dialog to the tile editor. | |
-* Configurable search field height. | |
-* Spanish translations by Zipristin. | |
-* Used a fixed panel icon by default, using the same icon size as the other icons in the panel. | |
-* Support reseting a tile bg color to default by deleting the hex color text. | |
- | |
-## v16 - June 5 2017 | |
- | |
-* Can now set a background image on a tile. | |
-* Can edit the margins around the tiles. | |
-* Apps in search now show their description instead the filepath to the shortcut. | |
-* Hide the description if it's the same as the app name. | |
-* Fix a few tile drag glitches when the drag leaves the grid. | |
-* Only remove the right clicked tile when unpining if there are multiple tiles for an app. | |
- | |
-## v15 - May 31 2017 | |
- | |
-* Open the localized version of ~/Music (eg: ~/Musik). | |
- | |
-## v14 - May 31 2017 | |
- | |
-* Resets tiles. There is no migration path. Sorry. | |
-* Tiles can now be placed on an actual grid, rather than a list of tiles that looks like one. | |
-* Can now edit the icon, individual tile color, and set the size to anything. Can toggle the icon/text. | |
-* 1x2, 1x3, 1x4, etc tiles are in a "list" style with the icon to the left of the label. | |
-* Resets the menu width/height of the popup to default. | |
-* You can now set the width of the app list. | |
-* Added option to do a fullscreen popup. | |
-* Rough implementation of filter dropdown menu in the search results. | |
-* Updated zh_CN translations. | |
- | |
-## v13 - February 6 2017 | |
- | |
-* Only support Plasma 5.9+ | |
-* Disable the calculator runner in the search. It crashes plasmashell under a certain condition (opening the context menu then searching for anything). | |
-* Add ability to edit the text in tiles. Changing the size of the tile is still a work in progress. | |
-* Add sidebar buttons to open ~/Documents ~/Downloads ~/Music ~/Pictures ~/Videos have been added depending on how much vertical space there is available. In the future, they will not appear by default and need to be configured in the settings once the UI has been drawn up. | |
-* Replace the sidebar search button (which was fairly useless) with a button to list apps by category. Switching between A-Z and category view is a bit slow atm. | |
-* Follow the default menu widget's (kicker) app list loading pattern. | |
- | |
-## v12 - January 13 2016 | |
- | |
-* Support Plasma 5.9 | |
-* Break compatibility with Plasma 5.8 and below. | |
- | |
-## v11 - January 13 2016 | |
- | |
-* Misc work on locale install scripts. Use kreadconfig5 which should be preinstalled. | |
-* Add german translation by rumangerst. | |
-* Lay groundwork for future features: reversing search results (align to bottom), category view, and moving the searchbox to the top. | |
- | |
-## v10 - December 30 2016 | |
- | |
-* Chinese translations by https://github.com/lm789632 | |
-* Optimize updating the recent app list so it doesn't lag opening the menu. | |
-* Clicking the user icon will now open a submenu with user manager/lock/logout/change user similar to Win10. | |
- | |
-## v9 - December 27 2016 | |
- | |
-* Use the theme's background color for the sidebar instead of black. | |
-* The app list icon size is now configurable. | |
-* Add dictionary and windowsed widgets (eg: Calculator) to search results. | |
- | |
-## v8 - December 21 2016 | |
- | |
-* Misc work for editing tiles. | |
-* Support linking to user created custom .desktop files. Note that the label will be the filename, but the icon will work. | |
-* You can now drag an app anywhere in the app list (not just the icon). | |
-* Implement the context menu (right click menus) actions that are in the default menus (recent apps/actions/pin to taskbar). I filtered out "Add to Panel" and "Add to Desktop" since it isn't obvious that the user will want "Add as Launcher". The user can always drag the app to where they want as well. | |
-* Make the current search filter button highlighted with a simple line instead of a box. | |
-* Fuss with the A-Z header positioning. | |
-* Expanding the sidebar now has a short transition. Pushing a button also has an effect. | |
-* Prepare the utils for translating this and other widgets. | |
- | |
-## v7 - November 26 2016 | |
- | |
-* Fix the white text on white bg in the "white" searchbox when using breeze dark. | |
-* Support dropping on the empty area below the current favourites. | |
-* Dropping a new favourite item will insert at that location instead of adding to the end of the list. | |
-* Changed the search results to use the same ordering as Application Launcher (Merged) by default. You can also choose to use categorized sorting like Application Menu, but the order might not be ideal as the custom full text sorting was disabled. | |
-* The panel icon now scales by default. A toggle was added to make it a fixed size (for thick panels). | |
-* Added shortcuts to the KSysGuard, Dolphin, SystemSettings, Konsole, and System Info in the context menu. | |
-* Added ability to toggle the Recent Apps. | |
- | |
-## v6 - November 23 2016 | |
- | |
-* Add a push down effect when clicking a favourite. | |
-* Bind Esc to close the menu. | |
-* Support closing the menu with Meta. | |
-* Focus on the search box when clicking the menu background (and dismiss the power/sidebar menu). | |
-* Show the app description after the name by default instead of below it. | |
- | |
-## v5 - November 14 2016 | |
- | |
-* Tile text can now be center or right aligned. | |
-* App description can now be after the app name, or hidden altogether. | |
-* Use the system-search-symbolic icon instead of search and system-search. | |
-* Optionally use the "widget/frame.svg" #raised from the desktop theme for the sidebar. The background color is drawn underneath when the power menu is open (since most themes have the svg transparent). | |
-* Fix the sidebar when an icon doesn't exist in the icon theme. | |
- | |
-## v4 - November 12 2016 | |
- | |
-* Fix a number of scaling issues when using a non default DPI. | |
- | |
-## v3 - November 11 2016 | |
- | |
-* Fix tile/sidebar colors reseting to black when configuring. | |
-* Use sidebar color in power menu. | |
-* Changed the color scheme for sidebar icons. | |
-* Padding to the section headings. | |
-* Assign the description color based on the text color. | |
-* Use the icon hover effect from taskmanager instead of a solid rectangle for the panel icon. | |
- | |
-## v2 - November 5 2016 | |
- | |
-* Configurable tile color (for when the desktop theme uses a weird background color). | |
-* Configurable sidebar color (because black isn't always best). | |
-* Configurable panel icon. | |
-* The search box can now be configured to follow the desktop theme (still default to white though). | |
-* Refactor the search results and app list to resuse the same code. | |
-* Ability to drag files/launchers from dolphin to the favourites grid. | |
-* Hovering the panel icon while dragging opens the menu. | |
-* Use custom config style. | |
- | |
-## v1 - October 23 2016 | |
- | |
-* First release posted on reddit (under the name kickstart). | |
-* No configuration. | |
diff --git a/ReadMe.md b/ReadMe.md | |
index 9fd57ccc..36fafc76 100644 | |
--- a/ReadMe.md | |
+++ b/ReadMe.md | |
@@ -1,29 +1,11 @@ | |
-# Tiled Menu | |
- | |
-https://store.kde.org/p/1160672/ | |
+# Simple 10 Menu | |
A menu based on Windows 10's Start Menu. | |
-* Supports: | |
- * Pin/Favourite apps/files through the context menu (or by dragging them from dolphin). | |
- * Resizing (permanently) the size of the menu by Alt + Right Clicking and dragging. | |
- * Any size tile 1x1, 2x2, 4x4, 4x2, 1x3, etc. | |
- * Easily edit the background image of a tile. | |
- * Customizable sidebar shortcuts. | |
- * Jump to Letter/Category (can also default to this view) | |
- * Defaulting to only showing the tiles. | |
- * Labeling Groups of Tiles + Move Groups of Tiles + Sorting items in the group | |
-* Does not support (Win10): | |
- * Tile Groups ("Folders") | |
- | |
-## Screenshots | |
- | |
-![](https://i.imgur.com/rf6dI9Q.png) | |
- | |
-## Theming | |
+## TODOs | |
-Read the [theming guide](Theming.md) to develop Desktop/Icon Themes for this widget. | |
+- [ ] UI for customizing tile colors. | |
-## Translating | |
+## Screenshots | |
-See the [package/translate](package/translate) folder for instructions on translating. | |
+![](https://i.imgur.com/wAu1uDG.png) | |
diff --git a/Theming.md b/Theming.md | |
deleted file mode 100644 | |
index 8b1bfed9..00000000 | |
--- a/Theming.md | |
+++ /dev/null | |
@@ -1,54 +0,0 @@ | |
-Fair warning, I might look for `widgets/tilemenu.svg` in the future for a the tile background (normal/hover) + sidebar (closed/opened) + sidebar buttons (normal/hover/pressed). So don't get toooo comfortable since I'm still developing this widget. | |
- | |
-## Desktop Theme .svgs | |
- | |
-https://techbase.kde.org/Development/Tutorials/Plasma5/ThemeDetails | |
- | |
-* Sidebar / Power Menu | |
- * Background | |
- * Defaults to drawing `theme.backgroundColor` at 50% transparency when closed, and 0% transparency when open. It used to be black (`#000`) in older versions. | |
- * `widgets/frame.svg` prefix: `raised` Background | |
- * Note that `theme.backgroundColor` is drawn undrneath the svg when the sidebar is open since 90% of themes have a transparent image. | |
-* App List | |
- * Items | |
- * `widgets/button.svg` | |
- * Scrollbar | |
- * `widgets/scrollbar.svg` | |
-* Search Box | |
- * `widgets/lineedit.svg` | |
- | |
- | |
-## Color Theme | |
- | |
-* `theme.backgroundColor` | |
- * Drawn under the sidebar background svg when using the desktop theme. | |
-* `theme.buttonBackgroundColor` | |
- * The default tile background color. | |
- | |
- | |
-## Icons | |
- | |
-* Sidebar | |
- * `open-menu-symbolic` Menu | |
- * `view-sort-ascending-symbolic` Apps | |
- * `system-search-symbolic` Search | |
- * `open-menu-symbolic` Menu | |
- * ... | |
- * `folder-open-symbolic` File Manager | |
- * `configure` Settings | |
- * `system-shutdown-symbolic` Power | |
- * `system-lock-screen` Lock | |
- * `system-log-out` Logout | |
- * `system-save-session` Save Session | |
- * `system-switch-user` Switch User | |
- * `system-suspend` Suspend | |
- * `system-suspend-hibernate` Hibernate | |
- * `system-reboot` Reboot | |
- * `system-shutdown` Shutdown | |
-* Search View | |
- * Filter Bar | |
- * `system-search-symbolic` All/Default Filter | |
- * `window` Apps Filter | |
- * `document-new` File Filter | |
- * `globe` Bookmarks Filter | |
- | |
diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml | |
index 3eb87e59..cdd1276e 100644 | |
--- a/package/contents/config/main.xml | |
+++ b/package/contents/config/main.xml | |
@@ -3,9 +3,6 @@ | |
<kcfgfile name=""/> | |
<group name="General"> | |
- <entry name="fullscreen" type="bool"> | |
- <default>false</default> | |
- </entry> | |
<entry name="icon" type="String"> | |
<label>The name of the icon used in the compact representation (e.g. on a small panel).</label> | |
<default>start-here-kde</default> | |
@@ -38,93 +35,17 @@ | |
<default>xdg:DOCUMENTS,xdg:PICTURES,org.kde.dolphin.desktop,systemsettings.desktop</default> | |
</entry> | |
<entry name="defaultAppListView" type="string"> | |
- <!-- enum: Alphabetical, Categories, JumpToLetter, JumpToCategory, TilesOnly --> | |
+ <!-- enum: Alphabetical, Categories, JumpToLetter, JumpToCategory --> | |
<default>Alphabetical</default> | |
</entry> | |
- <!-- Base64 encoded JSON --> | |
- <entry name="tileModel" type="string" stringType="base64json"> | |
- <!-- Schema: [{ url: "konsole.desktop", x: 3, y: 0, w: 2, h: 2, label: "Terminal" }, ...] --> | |
- <!-- For Testing: W3siaCI6MiwidXJsIjoib3JnLmtkZS5hcmsuZGVza3RvcCIsInciOjIsIngiOjQsInkiOjB9LHsiaCI6NCwidXJsIjoib3JnLmtkZS5kaXNjb3Zlci5kZXNrdG9wIiwidyI6NCwieCI6MCwieSI6MH0seyJoIjoyLCJ1cmwiOiJvcmcua2RlLmRvbHBoaW4uZGVza3RvcCIsInciOjIsIngiOjQsInkiOjJ9LHsiaCI6MiwidXJsIjoib3JnLmtkZS5rc3lzZ3VhcmQuZGVza3RvcCIsInciOjQsIngiOjAsInkiOjR9LHsiaCI6MSwidXJsIjoib3JnLmtkZS5rb25zb2xlLmRlc2t0b3AiLCJ3IjoyLCJ4IjowLCJ5Ijo2fSx7ImgiOjEsInVybCI6Im9yZy5rZGUua2F0ZS5kZXNrdG9wIiwidyI6MSwieCI6MywieSI6Nn0seyJoIjozLCJ1cmwiOiJmaXJlZm94LmRlc2t0b3AiLCJ3IjoxLCJ4Ijo0LCJ5Ijo0fV0= --> | |
- <default></default> | |
- </entry> | |
- <entry name="tileScale" type="double"> | |
- <default>0.8</default> | |
- </entry> | |
- <entry name="tileMargin" type="double"> | |
- <default>5</default> | |
- </entry> | |
- <entry name="tilesLocked" type="bool"> | |
- <default>false</default> | |
- </entry> | |
- | |
- <!-- Colors --> | |
- <!-- Use empty string instead of color type so that we can use default colors from the color scheme. --> | |
- <entry name="defaultTileColor" type="string"> | |
- <default></default> | |
- </entry> | |
- <entry name="sidebarBackgroundColor" type="string"> | |
- <default></default> | |
- </entry> | |
- | |
<!-- Style --> | |
- <entry name="searchFieldFollowsTheme" type="bool"> | |
- <default>false</default> | |
- </entry> | |
- <entry name="sidebarFollowsTheme" type="bool"> | |
- <default>false</default> | |
- </entry> | |
- <entry name="tileLabelAlignment" type="string"> | |
- <!-- enum: left, center, right --> | |
- <default>left</default> | |
- </entry> | |
- <entry name="appDescription" type="string"> | |
- <!-- enum: hidden, after, below --> | |
- <default>after</default> | |
- </entry> | |
- <entry name="menuItemHeight" type="int"> | |
- <default>36</default> | |
- </entry> | |
- <entry name="searchFieldHeight" type="int"> | |
- <default>50</default> | |
- </entry> | |
<entry name="appListWidth" type="int"> | |
- <default>350</default> | |
- </entry> | |
- <entry name="favGridCols" type="int"> | |
- <default>6</default> | |
+ <default>300</default> | |
</entry> | |
<entry name="popupHeight" type="int"> | |
<default>620</default> | |
</entry> | |
- | |
- <!-- Removed v28 | |
- <entry name="favoriteApps" type="StringList"> | |
- <label>List of general favorites. Supported values are menu id's (usually .desktop file names), special URLs that expand into default applications (e.g. preferred://browser), document URLs and KPeople contact URIs.</label> | |
- <default>preferred://browser,kontact.desktop,systemsettings.desktop,org.kde.dolphin.desktop,ktp-contactlist.desktop,org.kde.kate.desktop,org.kde.discover</default> | |
- </entry> | |
- <entry name="tileData" type="string" stringType="base64json"> | |
- <label>Schema: { "konsole.desktop": { size: "1x1", x: 3, y: 0, label: "Terminal" }, ...}</label> | |
- <default></default> | |
- </entry> | |
- --> | |
- | |
- <!-- Removed v24 | |
- <entry name="defaultAppListOrder" type="string"> | |
- < enum: alphabetical, categories > | |
- <default>alphabetical</default> | |
- </entry> | |
- --> | |
- | |
- <!-- Removed v14 | |
- Both were serialized in pixels rather than dpi units | |
- <entry name="width" type="int"> | |
- <default>0</default> | |
- </entry> | |
- <entry name="height" type="int"> | |
- <default>0</default> | |
- </entry> | |
- --> | |
</group> | |
</kcfg> | |
diff --git a/package/contents/icons/view-list-alphabetically-selected.svg b/package/contents/icons/view-list-alphabetically-selected.svg | |
deleted file mode 100644 | |
index 3032588e..00000000 | |
--- a/package/contents/icons/view-list-alphabetically-selected.svg | |
+++ /dev/null | |
@@ -1,22 +0,0 @@ | |
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> | |
- <defs id="defs3051"> | |
- <style type="text/css" id="current-color-scheme"> | |
- .ColorScheme-Text { | |
- color:#232629; | |
- } | |
- .ColorScheme-Highlight { | |
- color:#336699; | |
- } | |
- </style> | |
- </defs> | |
- <path | |
- d="M 4.09375,2 C 3.31051,2.0182 2.71841,2.14339 2.28125,2.34375 L 2.53125,3.25 C 2.74072,3.1771 3.53552,2.9375 4,2.9375 H 4.0625 C 4.70913,2.9648 4.75,3.19445 4.75,3.75 V 3.96875 L 4.40625,4.03125 C 2.83976,4.25893 2,4.45406 2,5.65625 2,6.49414 2.61657,7 3.5,7 4.1102,7 4.49642,6.75233 4.90625,6.40625 L 5,7 H 6 V 3.53125 C 6,2.50211 5.2804,2 4.1875,2 Z M 4.75,4.6875 v 1.125 C 4.41303,6.0402 4.15591,6.1875 3.71875,6.1875 3.32713,6.1875 3.125,5.93983 3.125,5.59375 c 0,-0.65574 0.57997,-0.77482 1.28125,-0.875 z M 2,9 v 1 H 4.375 L 2,13.318359 V 14 H 6 V 13 H 4 L 6,10 V 9 Z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
- <path | |
- d="M 7.25,2 V 2.75 H 14 V 2 Z m 0,1.5 v 0.75 h 4.5 V 3.5 Z m 0,3 V 7.25 H 14 V 6.5 Z m 0,1.5 v 0.7499999 h 1.5 V 8 Z m 0,3 v 0.75 H 14 V 11 Z m 0,1.5 v 0.75 h 4.5 V 12.5 Z m 5.25,0.75 V 14 H 14 v -0.75 z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
-</svg> | |
diff --git a/package/contents/icons/view-list-categorically-selected.svg b/package/contents/icons/view-list-categorically-selected.svg | |
deleted file mode 100644 | |
index 78ac1fdd..00000000 | |
--- a/package/contents/icons/view-list-categorically-selected.svg | |
+++ /dev/null | |
@@ -1,32 +0,0 @@ | |
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> | |
- <defs id="defs3051"> | |
- <style type="text/css" id="current-color-scheme"> | |
- .ColorScheme-Text { | |
- color:#232629; | |
- } | |
- .ColorScheme-Highlight { | |
- color:#336699; | |
- } | |
- </style> | |
- </defs> | |
- <path | |
- d="M 6.0000001,1.4e-7 C 2.9624339,1.4e-7 0.50000004,2.4624297 0.50000004,5.5000002 0.50000004,8.5375704 2.9624339,11 6.0000001,11 9.0375657,11 11.5,8.5375704 11.5,5.5000002 11.5,2.4624297 9.0375657,1.4e-7 6.0000001,1.4e-7 Z m 0,0.91666667 c 0.1582065,0 0.304255,0.0129983 0.4583333,0.0286458 0.036978,0.003639 0.077879,-0.00451 0.1145833,0 0.048236,0.006114 0.095473,0.0210457 0.1432292,0.0286458 0.1316812,0.0206983 0.2447732,0.0542886 0.3723958,0.0859375 0.2352136,0.058022 0.4681631,0.1363949 0.6875,0.2291666 0.1209322,0.05115 0.2283866,0.1109035 0.34375,0.171875 0.2005869,0.1147362 0.018086,0.2893216 0.028646,0.4583334 C 8.3456254,1.9042057 8.5766071,1.8550456 8.7213542,1.8333335 8.5506361,1.9957151 8.241229,2.0619644 8.1197917,2.1197918 8.6222653,2.2256933 8.1733462,2.4946733 8.1770834,2.5208335 H 8.1197917 C 7.6787345,2.340912 7.8815537,2.7273061 7.6901042,2.8932293 c 0.062753,0.1687696 0.1455401,0.1455398 0.2578125,0.2578125 0,0.032083 -0.00843,0.083508 -0.028646,0.1145834 -0.040333,0.0605 -0.1141278,0.052938 -0.171875,0.085937 C 7.4750538,3.7134612 7.1245904,3.9631408 7.002604,4.411458 6.946521,4.6175696 6.910137,4.9321896 6.973958,5.1276038 7.1025912,5.521466 7.3944234,5.8384921 7.7473955,5.8437497 c 0.8235013,0.012266 1.1442466,0.1360518 1.4322917,0.5729166 0.03025,0.0385 0.077917,0.07315 0.1145833,0.1145834 0.1215399,0.094528 0.1401134,0.2438267 0.1432292,0.34375 0.00825,0.2634348 -0.1973556,0.4144471 -0.2864584,0.6015625 -0.032285,0.3726011 0.1663347,1.1293535 0.171875,1.1744791 -0.027317,0.028756 -0.057897,0.057897 -0.085937,0.085937 -0.2073555,0.2073555 -0.4436648,0.4081853 -0.6875,0.5729167 -0.4730394,0.3195793 -0.9991746,0.5623273 -1.5755208,0.6875 -0.3149108,0.068393 -0.6385604,0.085938 -0.9739583,0.085938 -0.174472,0 -0.3466237,-0.0092 -0.515625,-0.02865 C 5.3497524,10.039323 5.2141545,10.024165 5.0833334,9.997396 4.8237568,9.9442788 4.5801091,9.8345648 4.3385417,9.7395835 5.2233466,8.8449599 6.3807876,7.8129427 6.3151042,6.8463543 6.274159,6.2438103 5.3212818,6.2250099 4.9401042,5.872396 4.2284017,5.3276507 3.6122939,5.2953936 3.1354167,5.2135418 2.9402589,5.1800447 2.8987633,5.391032 2.7916667,5.4713543 c -0.038518,0 -0.051105,-0.041708 -0.085937,-0.057292 -0.1054066,-0.045833 -0.1707384,0.026813 -0.257813,0.028646 -0.3756603,-0.044855 -0.082125,-0.3695643 -0.1145833,-0.515625 0.00101,-0.056833 -0.1065662,-0.079429 -0.1432292,-0.085937 -0.086162,-0.015583 -0.1883828,0.0385 -0.2864583,0 0.051113,-0.1562536 0.1136831,-0.2652607 0.171875,-0.4010417 0.00353,-0.031167 -0.032587,-0.065771 -0.057292,-0.085937 -0.2275197,0.027746 -0.2980782,0.167669 -0.4583333,0.2578125 -0.016789,0.00917 -0.038482,-0.00183 -0.057292,0 0.00179,-0.00927 -0.00184,-0.019393 0,-0.028646 0.00427,-0.020885 0.024089,-0.036511 0.028646,-0.057292 C 1.5965766,4.2281284 1.6975283,3.9397734 1.817708,3.6666668 H 1.846354 C 2.1926177,3.518262 2.4534845,3.7808905 2.734375,3.9531252 2.6983137,3.4838006 2.9556332,3.3900627 3.3072917,3.1510418 3.3603969,2.8266212 3.6098839,2.8065358 3.9088542,2.6640626 4.2897617,2.3119572 4.2262275,2.4356212 4.6822917,2.3489585 4.8723631,2.044055 5.0854199,2.275671 5.3697917,2.2343751 c -0.064144,-0.290661 0,-0.2695346 0,-0.5442708 C 5.1500001,1.5268102 5.1896109,1.3625028 5.0546876,1.1171876 5.0625713,1.0009589 5.3569482,1.001162 5.5416667,0.94531264 5.6940522,0.92929958 5.84316,0.91666681 6.0000001,0.91666681 Z M 9.2656251,2.5494793 C 9.4901873,2.6310003 9.5382115,2.8640026 9.6380209,2.9791668 9.7978692,3.2845481 9.9999007,3.5203521 9.9531251,3.6093752 9.7866208,3.669605 9.465045,3.4055567 9.2083334,3.294271 9.1982501,3.2603543 9.2924376,3.2370252 9.2942709,3.2083335 9.2663905,3.1598647 9.2753032,3.1134942 9.2656251,3.0651043 8.8967465,2.9303684 8.5828404,3.1008025 8.2630209,3.2083335 8.1437937,3.2484204 7.9610636,3.1443343 8.0052084,3.122396 8.3209368,2.8132701 8.6968902,2.6888432 8.9791667,2.5208335 9.0561851,2.3295061 9.2027362,2.5431901 9.2656251,2.5494793 Z M 1.4739584,4.8697918 c 0.3737914,0.1539771 0.537567,0.3831313 0.8020833,0.6302084 0.015579,0.00917 0.033424,-0.00917 0.057292,0 0.060494,0.018333 0.090982,0.1013375 0.1432291,0.085937 0.021237,-0.2727334 0.1872399,0 0.2005209,0 0.011898,0.031167 0.049074,0.052938 0.057292,0.085937 C 2.8184691,5.9434099 2.5877778,6.0200436 2.5052084,6.216146 2.3607397,6.6542917 2.5925905,7.0015608 2.8776042,7.419271 3.0080099,7.6103905 3.349647,7.5841088 3.4218751,7.7916668 3.6080444,8.3266518 3.5075137,8.8831208 3.5364584,9.3671877 3.5072662,9.3484143 3.4792538,9.329311 3.4505209,9.309896 3.206686,9.1451646 2.9703759,8.9443348 2.7630209,8.7369793 2.7349769,8.7089358 2.7043963,8.6798013 2.6770834,8.6510418 2.5115509,8.4767404 2.3554594,8.2767503 2.21875,8.0781252 2.2063627,8.0601273 2.2022398,8.0390156 2.1901042,8.0208335 2.0314783,7.7831721 1.9016423,7.5422107 1.7890625,7.2760418 1.780945,7.2568499 1.7682791,7.2380747 1.7604167,7.2187502 1.6638208,6.9813345 1.5872342,6.7292671 1.53125,6.4739585 1.5206842,6.4257741 1.5116408,6.3794683 1.5026042,6.3307293 1.4799056,6.2083045 1.4580713,6.0839665 1.4453125,5.9583335 1.429665,5.8042552 1.4166667,5.6582067 1.4166667,5.5000002 c 0,-0.2178384 0.0279,-0.4204715 0.057292,-0.6302084 z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
- <path | |
- d="m 15,10.00008 v 1.00004 h -1 v 1.00004 h 1 v 1.00004 h 1 v -1.00004 h 1 V 11.00012 H 16 V 10.00008 Z M 20.5,9.9000762 A 0.6,0.600024 0 0 0 19.9,10.5001 0.6,0.600024 0 0 0 20.5,11.100124 0.6,0.600024 0 0 0 21.1,10.5001 0.6,0.600024 0 0 0 20.5,9.9000762 Z m -1,1.0000398 a 0.6,0.600024 0 0 0 -0.6,0.600024 0.6,0.600024 0 0 0 0.6,0.600024 0.6,0.600024 0 0 0 0.6,-0.600024 0.6,0.600024 0 0 0 -0.6,-0.600024 z m 2,0 a 0.6,0.600024 0 0 0 -0.6,0.600024 0.6,0.600024 0 0 0 0.6,0.600024 0.6,0.600024 0 0 0 0.6,-0.600024 0.6,0.600024 0 0 0 -0.6,-0.600024 z m -1,1.00004 a 0.6,0.600024 0 0 0 -0.6,0.600024 0.6,0.600024 0 0 0 0.6,0.600024 0.6,0.600024 0 0 0 0.6,-0.600024 0.6,0.600024 0 0 0 -0.6,-0.600024 z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
- <path | |
- d="M 14,8.0000002 A 2,4.00016 0 0 0 12,12.00016 v 2.5001 a 1.5,1.50006 0 0 0 2.56,1.060043 l 0.944,-0.943038 a 1.5,1.50006 0 0 0 0.996,0.383015 1.5,1.50006 0 0 0 1.5,-1.50006 1.5,1.50006 0 0 0 2.498,1.120045 l 0.941,0.940038 A 1.5,1.50006 0 0 0 24,14.50026 v -2.5001 A 2,4.00016 0 0 0 22,8.0000002 Z m 0,1.00004 h 8 a 1,3.00012 0 0 1 1,3.0001198 v 2.5001 a 0.5,0.50002 0 0 1 -0.854,0.354014 L 20.293,13.0002 H 20 v 0.50002 a 0.5,0.50002 0 0 1 -1,0 V 13.0002 h -2 v 0.50002 a 0.5,0.50002 0 0 1 -1,0 V 13.0002 h -0.293 l -1.853,1.854074 A 0.5,0.50002 0 0 1 13,14.50026 v -2.5001 a 1,3.00012 0 0 1 1,-3.0001198 z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
- <path | |
- d="m 2.75,13.000016 v 1.833334 5.752437 C 2.4795925,20.428954 2.169684,20.333337 1.8333343,20.333337 0.8176713,20.333337 0,21.151007 0,22.166668 0,23.182331 0.8176713,24 1.8333343,24 2.8489972,24 3.6666657,23.182331 3.6666657,22.166668 V 16.66667 h 6.4166683 v 2.085776 c -0.270407,-0.156823 -0.580316,-0.25245 -0.916668,-0.25245 -1.0156605,0 -1.8333317,0.817672 -1.8333317,1.833335 0,1.015658 0.8176712,1.833328 1.8333317,1.833328 C 10.182329,22.166659 11,21.348989 11,20.333331 V 13 Z m 0.9166657,1.833334 h 6.4166683 v 0.916666 H 3.6666657 Z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
-</svg> | |
diff --git a/package/contents/icons/view-tilesonly-selected.svg b/package/contents/icons/view-tilesonly-selected.svg | |
deleted file mode 100644 | |
index 641aac98..00000000 | |
--- a/package/contents/icons/view-tilesonly-selected.svg | |
+++ /dev/null | |
@@ -1,32 +0,0 @@ | |
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> | |
- <defs id="defs3051"> | |
- <style type="text/css" id="current-color-scheme"> | |
- .ColorScheme-Text { | |
- color:#232629; | |
- } | |
- .ColorScheme-Highlight { | |
- color:#336699; | |
- } | |
- </style> | |
- </defs> | |
- <path | |
- d="m 1,3 v 4 h 9 V 3 Z M 2,4 H 9 V 6 H 2 Z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
- <path | |
- d="m 11,3 v 4 h 4 V 3 Z m 1,1 h 2 v 2 h -2 z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
- <path | |
- d="M 1,8 1,12 H 5 l 0,-4 z m 1,1 h 2 l 0,2 H 2 Z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
- <path | |
- d="M 6,8 V 12 h 9 V 8 Z m 1,1 h 7 V 11 H 7 Z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Highlight" | |
- /> | |
-</svg> | |
diff --git a/package/contents/icons/view-tilesonly.svg b/package/contents/icons/view-tilesonly.svg | |
deleted file mode 100644 | |
index f355ce07..00000000 | |
--- a/package/contents/icons/view-tilesonly.svg | |
+++ /dev/null | |
@@ -1,32 +0,0 @@ | |
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> | |
- <defs id="defs3051"> | |
- <style type="text/css" id="current-color-scheme"> | |
- .ColorScheme-Text { | |
- color:#232629; | |
- } | |
- .ColorScheme-Highlight { | |
- color:#336699; | |
- } | |
- </style> | |
- </defs> | |
- <path | |
- d="m 1,3 v 4 h 9 V 3 Z M 2,4 H 9 V 6 H 2 Z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Text" | |
- /> | |
- <path | |
- d="m 11,3 v 4 h 4 V 3 Z m 1,1 h 2 v 2 h -2 z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Text" | |
- /> | |
- <path | |
- d="M 1,8 1,12 H 5 l 0,-4 z m 1,1 h 2 l 0,2 H 2 Z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Text" | |
- /> | |
- <path | |
- d="M 6,8 V 12 h 9 V 8 Z m 1,1 h 7 V 11 H 7 Z" | |
- style="fill:currentColor" | |
- class="ColorScheme-Text" | |
- /> | |
-</svg> | |
diff --git a/package/contents/ui/AppContextMenu.qml b/package/contents/ui/AppContextMenu.qml | |
index e1bd29b9..af5a61e3 100644 | |
--- a/package/contents/ui/AppContextMenu.qml | |
+++ b/package/contents/ui/AppContextMenu.qml | |
@@ -8,7 +8,6 @@ Item { | |
property QtObject menu | |
property Item visualParent | |
property bool opened: menu ? (menu.status != PlasmaComponents.DialogStatus.Closed) : false | |
- property int tileIndex: -1 | |
signal closed | |
signal populateMenu(var menu) | |
@@ -62,28 +61,6 @@ Item { | |
function newMenuItem() { | |
return Qt.createQmlObject("import org.kde.plasma.components 2.0 as PlasmaComponents; PlasmaComponents.MenuItem {}", contextMenu); | |
} | |
- | |
- function addPinToMenuAction(favoriteId) { | |
- var menuItem = menu.newMenuItem(); | |
- if (tileGrid.hasAppTile(favoriteId)) { | |
- menuItem.text = i18n("Unpin from Menu") | |
- menuItem.icon = "list-remove" | |
- menuItem.clicked.connect(function() { | |
- if (root.tileIndex >= 0) { | |
- tileGrid.removeIndex(root.tileIndex) | |
- } else { | |
- tileGrid.removeApp(favoriteId) | |
- } | |
- }) | |
- } else { | |
- menuItem.text = i18n("Pin to Menu") | |
- menuItem.icon = "bookmark-new" | |
- menuItem.clicked.connect(function() { | |
- tileGrid.addApp(favoriteId) | |
- }) | |
- } | |
- menu.addMenuItem(menuItem) | |
- } | |
// // https://github.com/KDE/plasma-desktop/blob/master/applets/taskmanager/package/contents/ui/ContextMenu.qml#L75 | |
function addActionList(actionList, listModel, index) { | |
@@ -108,21 +85,6 @@ Item { | |
listModel.triggerIndexAction(index, actionItem.actionId, actionItem.actionArgument) | |
}); | |
- //--- Overrides | |
- if (actionItem.actionId == 'addToDesktop') { | |
- // Remove (user should just drag it) | |
- menu.removeMenuItem(menuItem) | |
- } else if (actionItem.actionId == 'addToPanel') { | |
- // Remove (user should just drag it) | |
- // User usually means to add it to taskmanager anyways. | |
- menu.removeMenuItem(menuItem) | |
- } else if (actionItem.actionId == 'addToTaskManager') { | |
- menuItem.text = i18n("Pin to Taskbar") | |
- menuItem.icon = "bookmark-new" | |
- } else if (actionItem.actionId == 'editApplication') { | |
- // menuItem.text = i18n("Properties") | |
- } | |
- | |
}); | |
} | |
} | |
diff --git a/package/contents/ui/AppObject.qml b/package/contents/ui/AppObject.qml | |
deleted file mode 100644 | |
index 01161037..00000000 | |
--- a/package/contents/ui/AppObject.qml | |
+++ /dev/null | |
@@ -1,50 +0,0 @@ | |
-import QtQuick 2.0 | |
- | |
-QtObject { | |
- property var tile: null | |
- | |
- readonly property bool isGroup: tile && tile.tileType == "group" | |
- readonly property bool isLauncher: !isGroup | |
- | |
- readonly property color defaultBackgroundColor: isGroup ? "transparent" : config.defaultTileColor | |
- readonly property bool defaultShowIcon: isGroup ? false : true | |
- readonly property int defaultTileW: isGroup ? 6 : 2 | |
- readonly property int defaultTileH: isGroup ? 1 : 2 | |
- | |
- readonly property string favoriteId: tile && tile.url || '' | |
- readonly property var app: favoriteId ? appsModel.tileGridModel.getApp(favoriteId) : null | |
- readonly property string appLabel: app ? app.display : "" | |
- readonly property string appUrl: app ? app.url : "" | |
- readonly property var appIcon: app ? app.decoration : null | |
- readonly property string labelText: tile && tile.label || appLabel || appUrl || "" | |
- readonly property var iconSource: tile && tile.icon || appIcon | |
- readonly property bool iconFill: tile && typeof tile.iconFill !== "undefined" ? tile.iconFill : false | |
- readonly property bool showIcon: tile && typeof tile.showIcon !== "undefined" ? tile.showIcon : defaultShowIcon | |
- readonly property bool showLabel: tile && typeof tile.showLabel !== "undefined" ? tile.showLabel : true | |
- readonly property color backgroundColor: tile && typeof tile.backgroundColor !== "undefined" ? tile.backgroundColor : defaultBackgroundColor | |
- readonly property string backgroundImage: tile && typeof tile.backgroundImage !== "undefined" ? tile.backgroundImage : "" | |
- | |
- readonly property int tileX: tile && typeof tile.x !== "undefined" ? tile.x : 0 | |
- readonly property int tileY: tile && typeof tile.y !== "undefined" ? tile.y : 0 | |
- readonly property int tileW: tile && typeof tile.w !== "undefined" ? tile.w : defaultTileW | |
- readonly property int tileH: tile && typeof tile.h !== "undefined" ? tile.h : defaultTileH | |
- | |
- | |
- // onTileChanged: console.log('onTileChanged', JSON.stringify(tile)) | |
- // onAppLabelChanged: console.log('onAppLabelChanged', appLabel) | |
- | |
- function hasActionList() { | |
- return app ? appsModel.tileGridModel.indexHasActionList(app.indexInModel) : false | |
- } | |
- | |
- function getActionList() { | |
- return app ? appsModel.tileGridModel.getActionListAtIndex(app.indexInModel) : [] | |
- } | |
- | |
- function addActionList(menu) { | |
- if (hasActionList()) { | |
- var actionList = getActionList() | |
- menu.addActionList(actionList, appsModel.tileGridModel, appObj.app.indexInModel) | |
- } | |
- } | |
-} | |
diff --git a/package/contents/ui/AppToolButton.qml b/package/contents/ui/AppToolButton.qml | |
index a793a888..4024fd0d 100644 | |
--- a/package/contents/ui/AppToolButton.qml | |
+++ b/package/contents/ui/AppToolButton.qml | |
@@ -8,40 +8,18 @@ MouseArea { | |
id: control | |
hoverEnabled: true | |
- property alias hovered: control.containsMouse | |
property string iconName: "" | |
property var iconSource: null | |
property string text: "" | |
property string tooltip: "" | |
- | |
property font font: theme.defaultFont | |
property real minimumWidth: 0 | |
property real minimumHeight: 0 | |
- property bool flat: true | |
- | |
- Loader { | |
- id: styleLoader | |
- anchors.fill: parent | |
- asynchronous: true | |
- // source: "AppToolButtonStyle.qml" | |
- source: "HoverOutlineButtonStyle.qml" | |
- property var control: control | |
- | |
- readonly property int paddingTop: item ? item.paddingTop : 0 | |
- readonly property int paddingLeft: item ? item.paddingLeft : 0 | |
- readonly property int paddingRight: item ? item.paddingRight : 0 | |
- readonly property int paddingBottom: item ? item.paddingBottom : 0 | |
- } | |
Item { | |
// id: buttonArea | |
anchors.fill: parent | |
- anchors.topMargin: styleLoader.paddingTop | |
- anchors.leftMargin: styleLoader.paddingLeft | |
- anchors.rightMargin: styleLoader.paddingRight | |
- anchors.bottomMargin: styleLoader.paddingBottom | |
- | |
opacity: control.enabled ? 1 : 0.5 | |
RowLayout { | |
@@ -58,11 +36,7 @@ MouseArea { | |
implicitHeight: label.implicitHeight | |
implicitWidth: implicitHeight | |
- Layout.minimumWidth: valid ? parent.height: 0 | |
- Layout.maximumWidth: Layout.minimumWidth | |
visible: valid | |
- Layout.minimumHeight: Layout.minimumWidth | |
- Layout.maximumHeight: Layout.minimumWidth | |
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | |
active: control.containsMouse | |
colorGroup: control.containsMouse ? PlasmaCore.Theme.ButtonColorGroup : PlasmaCore.ColorScope.colorGroup | |
diff --git a/package/contents/ui/AppletConfig.qml b/package/contents/ui/AppletConfig.qml | |
index 0a8b9298..cdda5769 100644 | |
--- a/package/contents/ui/AppletConfig.qml | |
+++ b/package/contents/ui/AppletConfig.qml | |
@@ -10,8 +10,8 @@ Item { | |
//--- Sizes | |
readonly property int panelIconSize: 24 * units.devicePixelRatio | |
- readonly property int flatButtonSize: 60 * units.devicePixelRatio | |
- readonly property int flatButtonIconSize: 30 * units.devicePixelRatio | |
+ readonly property int flatButtonSize: 48 * units.devicePixelRatio | |
+ readonly property int flatButtonIconSize: 20 * units.devicePixelRatio | |
readonly property int sidebarWidth: flatButtonSize | |
readonly property int sidebarMinOpenWidth: 200 * units.devicePixelRatio | |
readonly property int sidebarRightMargin: 4 * units.devicePixelRatio | |
@@ -21,122 +21,48 @@ Item { | |
readonly property int appAreaWidth: (showSearch ? appListWidth : 0) | |
readonly property int leftSectionWidth: sidebarWidth + sidebarRightMargin + appAreaWidth | |
- readonly property real tileScale: plasmoid.configuration.tileScale | |
- readonly property int cellBoxUnits: 80 | |
- readonly property int cellMarginUnits: plasmoid.configuration.tileMargin | |
- readonly property int cellSizeUnits: cellBoxUnits - cellMarginUnits*2 | |
- readonly property int cellSize: cellSizeUnits * tileScale * units.devicePixelRatio | |
- readonly property real cellMargin: cellMarginUnits * tileScale * units.devicePixelRatio | |
- readonly property real cellPushedMargin: cellMargin * 2 | |
- readonly property int cellBoxSize: cellMargin + cellSize + cellMargin | |
- readonly property int tileGridWidth: plasmoid.configuration.favGridCols * cellBoxSize | |
+ readonly property int searchFieldHeight: 32 * units.devicePixelRatio | |
- readonly property int favCellWidth: 60 * units.devicePixelRatio | |
- readonly property int favCellPushedMargin: 5 * units.devicePixelRatio | |
- readonly property int favCellPadding: 3 * units.devicePixelRatio | |
- readonly property int favColWidth: ((favCellWidth + favCellPadding * 2) * 2) // = 132 (Medium Size) | |
- readonly property int favViewDefaultWidth: (favColWidth * 3) * units.devicePixelRatio | |
- readonly property int favSmallIconSize: 32 * units.devicePixelRatio | |
- readonly property int favMediumIconSize: 72 * units.devicePixelRatio | |
- readonly property int favGridWidth: (plasmoid.configuration.favGridCols/2) * favColWidth | |
- | |
- readonly property int searchFieldHeight: plasmoid.configuration.searchFieldHeight * units.devicePixelRatio | |
- | |
- readonly property int popupWidth: { | |
- if (plasmoid.configuration.fullscreen) { | |
- return Screen.desktopAvailableWidth | |
- } else { | |
- return leftSectionWidth + tileGridWidth | |
- } | |
- } | |
- readonly property int popupHeight: { | |
- if (plasmoid.configuration.fullscreen) { | |
- return Screen.desktopAvailableHeight | |
- } else { | |
- return plasmoid.configuration.popupHeight * units.devicePixelRatio | |
- } | |
- } | |
+ readonly property int popupWidth: leftSectionWidth | |
+ readonly property int popupHeight: plasmoid.configuration.popupHeight * units.devicePixelRatio | |
- readonly property int menuItemHeight: plasmoid.configuration.menuItemHeight * units.devicePixelRatio | |
+ readonly property int menuItemHeight: 32 * units.devicePixelRatio | |
+ readonly property int menuIconSize: 22 * units.devicePixelRatio | |
- readonly property int searchFilterRowHeight: { | |
- if (plasmoid.configuration.appListWidth >= 310) { | |
- return flatButtonSize // 60px | |
- } else if (plasmoid.configuration.appListWidth >= 250) { | |
- return flatButtonSize*3/4 // 45px | |
- } else { | |
- return flatButtonSize/2 // 30px | |
- } | |
- } | |
+ readonly property int searchFilterRowHeight: 40 * units.devicePixelRatio | |
//--- Colors | |
- readonly property color themeButtonBgColor: { | |
- if (theme.themeName == "oxygen") { | |
- return "#20FFFFFF" | |
- } else { | |
- return theme.buttonBackgroundColor | |
- } | |
- } | |
- readonly property color defaultTileColor: plasmoid.configuration.defaultTileColor || themeButtonBgColor | |
- readonly property color sidebarBackgroundColor: plasmoid.configuration.sidebarBackgroundColor || theme.backgroundColor | |
+ readonly property color themeButtonBgColor: theme.highlightColor | |
readonly property color menuItemTextColor2: setAlpha(theme.textColor, 0.6) | |
- readonly property color favHoverOutlineColor: setAlpha(theme.textColor, 0.8) | |
- readonly property color flatButtonBgHoverColor: themeButtonBgColor | |
+ readonly property color flatButtonBgHoverColor: Qt.rgba(themeButtonBgColor.r, themeButtonBgColor.g, themeButtonBgColor.b, 0.5) | |
readonly property color flatButtonBgColor: Qt.rgba(flatButtonBgHoverColor.r, flatButtonBgHoverColor.g, flatButtonBgHoverColor.b, 0) | |
readonly property color flatButtonBgPressedColor: theme.highlightColor | |
readonly property color flatButtonCheckedColor: theme.highlightColor | |
- //--- Style | |
- // Tiles | |
- readonly property int tileLabelAlignment: { | |
- var val = plasmoid.configuration.tileLabelAlignment | |
- if (val === 'center') { | |
- return Text.AlignHCenter | |
- } else if (val === 'right') { | |
- return Text.AlignRight | |
- } else { // left | |
- return Text.AlignLeft | |
- } | |
- } | |
- // App Description Enum (hidden, after, below) | |
- readonly property bool appDescriptionVisible: plasmoid.configuration.appDescription !== 'hidden' | |
- readonly property bool appDescriptionBelow: plasmoid.configuration.appDescription == 'below' | |
- | |
//--- Settings | |
// Search | |
readonly property bool searchResultsMerged: plasmoid.configuration.searchResultsMerged | |
readonly property bool searchResultsCustomSort: plasmoid.configuration.searchResultsCustomSort | |
readonly property int searchResultsDirection: plasmoid.configuration.searchResultsReversed ? ListView.BottomToTop : ListView.TopToBottom | |
- | |
- //--- Tile Data | |
- property var tileModel: Base64JsonString { | |
- configKey: 'tileModel' | |
- defaultValue: [] | |
- // defaultValue: [ | |
- // { | |
- // "x": 0, | |
- // "y": 0, | |
- // "w": 2, | |
- // "h": 2, | |
- // "url": "org.kde.dolphin.desktop", | |
- // "label": "Files", | |
- // }, | |
- // { | |
- // "x": 2, | |
- // "y": 1, | |
- // "w": 1, | |
- // "h": 1, | |
- // "url": "virtualbox.desktop", | |
- // "iconFill": true, | |
- // }, | |
- // { | |
- // "x": 2, | |
- // "y": 0, | |
- // "w": 1, | |
- // "h": 1, | |
- // "url": "org.kde.ark.desktop", | |
- // }, | |
- // ] | |
+ property var tileColors: { | |
+ "brave-fiombgjlkfpdpkbhfioofeeinbehmajg-Default.desktop": "#103f91", | |
+ "brave-iljnkagajgfdmfnnidjijobijlfjfgnb-Default.desktop": "#185c37", | |
+ "wine-Programs-Access 2016.desktop": "#ae4d50", | |
+ "wine-Programs-Excel 2016.desktop": "#39825a", | |
+ "wine-Programs-OneNote 2016.desktop": "#8e4f89", | |
+ "wine-Programs-Outlook 2016.desktop": "#007acc", | |
+ "wine-Programs-PowerPoint 2016.desktop": "#dc6141", | |
+ "wine-Programs-Publisher 2016.desktop": "#228479", | |
+ "wine-Programs-Word 2016.desktop": "#4269a5", | |
+ "brave-browser.desktop": "#5F6368", | |
+ "firefox.desktop": "#000f40", | |
+ "jetbrains-studio.desktop": "#4a662a", | |
+ "libreoffice-startcenter.desktop": "#00A500", | |
+ "libreoffice-calc.desktop": "#185c37", | |
+ "libreoffice-math.desktop": "#00A500", | |
+ "libreoffice-writer.desktop": "#103f91", | |
+ "whatsapp-desktop.desktop": "#25d366", | |
+ "code.desktop": "#2d2d30", | |
} | |
} | |
diff --git a/package/contents/ui/AppsModel.qml b/package/contents/ui/AppsModel.qml | |
index d6d82b25..48b1870e 100644 | |
--- a/package/contents/ui/AppsModel.qml | |
+++ b/package/contents/ui/AppsModel.qml | |
@@ -13,11 +13,9 @@ Item { | |
property alias rootModel: rootModel | |
property alias allAppsModel: allAppsModel | |
property alias powerActionsModel: powerActionsModel | |
- property alias favoritesModel: favoritesModel | |
- property alias tileGridModel: tileGridModel | |
property alias sidebarModel: sidebarModel | |
- property string order: plasmoid.configuration.defaultAppListOrder | |
+ property string order: "alphabetical" | |
onOrderChanged: allAppsModel.refresh() | |
signal refreshing() | |
@@ -107,26 +105,6 @@ Item { | |
debouncedRefresh.restart() | |
} | |
- // KickerAppModel is a wrapper of Kicker.FavoritesModel | |
- // Kicker.FavoritesModel must be a child object of RootModel. | |
- // appEntry.actions() looks at the parent object for parent.appletInterface and will crash plasma if it can't find it. | |
- // https://github.com/KDE/plasma-desktop/blob/master/applets/kicker/plugin/appentry.cpp#L151 | |
- favoritesModel: KickerAppModel { | |
- id: favoritesModel | |
- | |
- Component.onCompleted: { | |
- // TODO: | |
- // Populate this model with all the 'tileModel' urls so that the Search Runner | |
- // will prioritize the "favorited" apps. | |
- | |
- // favorites = 'systemsettings.desktop,sublime-text.desktop'.split(',') | |
- } | |
- } | |
- | |
- property var tileGridModel: KickerAppModel { | |
- id: tileGridModel | |
- } | |
- | |
property var sidebarModel: KickerAppModel { | |
id: sidebarModel | |
diff --git a/package/contents/ui/AppsView.qml b/package/contents/ui/AppsView.qml | |
index 0ecce571..997278d6 100644 | |
--- a/package/contents/ui/AppsView.qml | |
+++ b/package/contents/ui/AppsView.qml | |
@@ -23,11 +23,10 @@ ScrollView { | |
} | |
delegate: MenuListItem { | |
- secondRowVisible: config.appDescriptionBelow | |
- description: config.appDescriptionVisible ? modelDescription : '' | |
+ secondRowVisible: false | |
+ description: '' | |
} | |
- iconSize: config.menuItemHeight | |
showItemUrl: false | |
} | |
diff --git a/package/contents/ui/FlatButton.qml b/package/contents/ui/FlatButton.qml | |
index 89f7093c..89272e2f 100644 | |
--- a/package/contents/ui/FlatButton.qml | |
+++ b/package/contents/ui/FlatButton.qml | |
@@ -22,7 +22,6 @@ PlasmaComponents.ToolButton { | |
property color backgroundHoverColor: config.flatButtonBgHoverColor | |
property color backgroundPressedColor: config.flatButtonBgPressedColor | |
property color checkedColor: config.flatButtonCheckedColor | |
- property bool zoomOnPush: true | |
// http://doc.qt.io/qt-5/qt.html#Edge-enum | |
property int checkedEdge: 0 // 0 = all edges | |
@@ -33,8 +32,6 @@ PlasmaComponents.ToolButton { | |
id: labelRowLayout | |
// spacing: units.smallSpacing | |
spacing: 0 | |
- scale: control.zoomOnPush && control.pressed ? (height-5) / height : 1 | |
- Behavior on scale { NumberAnimation { duration: 200 } } | |
Item { | |
id: iconContainer | |
@@ -79,10 +76,18 @@ PlasmaComponents.ToolButton { | |
} | |
background: Item { | |
- Rectangle { | |
- id: background | |
+ PlasmaCore.FrameSvgItem { | |
anchors.fill: parent | |
- color: flatButton.backgroundColor | |
+ imagePath: "widgets/viewitem" | |
+ prefix: "hover" | |
+ visible: control.hovered | |
+ } | |
+ | |
+ PlasmaCore.FrameSvgItem { | |
+ anchors.fill: parent | |
+ imagePath: "widgets/viewitem" | |
+ prefix: "selected" | |
+ visible: control.pressed | |
} | |
Rectangle { | |
@@ -138,36 +143,6 @@ PlasmaComponents.ToolButton { | |
} | |
] | |
} | |
- | |
- states: [ | |
- State { | |
- name: "hovering" | |
- when: !control.pressed && control.hovered | |
- PropertyChanges { | |
- target: background | |
- color: flatButton.backgroundHoverColor | |
- } | |
- }, | |
- State { | |
- name: "pressed" | |
- when: control.pressed | |
- PropertyChanges { | |
- target: background | |
- color: flatButton.backgroundPressedColor | |
- } | |
- } | |
- ] | |
- | |
- transitions: [ | |
- Transition { | |
- to: "hovering" | |
- ColorAnimation { duration: 200 } | |
- }, | |
- Transition { | |
- to: "pressed" | |
- ColorAnimation { duration: 100 } | |
- } | |
- ] | |
} | |
} | |
} | |
\ No newline at end of file | |
diff --git a/package/contents/ui/Hierarchy.md b/package/contents/ui/Hierarchy.md | |
deleted file mode 100644 | |
index 769cec06..00000000 | |
--- a/package/contents/ui/Hierarchy.md | |
+++ /dev/null | |
@@ -1,36 +0,0 @@ | |
-Main | |
- SearchModel | |
- SearchResultsModel | |
- LauncherIcon | |
- Popup | |
- SearchView | |
- SidebarView | |
- SearchResultsView | |
- SearchResultsList | |
- SearchField | |
- TileGrid | |
- | |
- | |
-krunner_id (filename) | |
- | |
-org.kde.activities (activityrunner) | |
-Audio Player Control Runner (audioplayercontrol) | |
-baloosearch (baloosearch) | |
-bookmarks (bookmarks) | |
-calculator (calculator) | |
-unitconverter (converter) | |
-org.kde.datetime (datetime) | |
-Dictionary (dictionary) | |
-Kill Runner (kill) | |
-kwin (kwin) | |
-locations (locations) | |
-places (places) | |
-Name=plasma-desktop (plasma) | |
-PowerDevil (powerdevil) | |
-services (services) | |
-desktopsessions (sessions) | |
-shell (shell) | |
-Spell Checker (spellchecker) | |
-webshortcuts (webshortcuts) | |
-org.kde.windowedwidgets (windowedwidgets) | |
-windows (windows) | |
diff --git a/package/contents/ui/HoverOutlineButtonEffect.qml b/package/contents/ui/HoverOutlineButtonEffect.qml | |
deleted file mode 100644 | |
index 9f6dcf0f..00000000 | |
--- a/package/contents/ui/HoverOutlineButtonEffect.qml | |
+++ /dev/null | |
@@ -1,8 +0,0 @@ | |
-import QtQuick 2.0 | |
- | |
-HoverOutlineEffect { | |
- id: hoverOutlineButtonEffect | |
- anchors.fill: parent | |
- hoverRadius: Math.max(width/2, height) | |
- pressedRadius: width | |
-} | |
diff --git a/package/contents/ui/HoverOutlineButtonStyle.qml b/package/contents/ui/HoverOutlineButtonStyle.qml | |
deleted file mode 100644 | |
index cdb5423c..00000000 | |
--- a/package/contents/ui/HoverOutlineButtonStyle.qml | |
+++ /dev/null | |
@@ -1,18 +0,0 @@ | |
-import QtQuick 2.0 | |
- | |
-Item { | |
- id: style | |
- property int paddingTop: 0 | |
- property int paddingRight: 0 | |
- property int paddingBottom: 0 | |
- property int paddingLeft: 0 | |
- | |
- Loader { | |
- id: hoverOutlineEffectLoader | |
- anchors.fill: parent | |
- active: control.containsMouse | |
- visible: active | |
- source: "HoverOutlineButtonEffect.qml" | |
- } | |
- | |
-} | |
diff --git a/package/contents/ui/HoverOutlineEffect.qml b/package/contents/ui/HoverOutlineEffect.qml | |
deleted file mode 100644 | |
index f2961319..00000000 | |
--- a/package/contents/ui/HoverOutlineEffect.qml | |
+++ /dev/null | |
@@ -1,64 +0,0 @@ | |
-import QtQuick 2.0 | |
-import QtGraphicalEffects 1.0 | |
- | |
-Item { | |
- id: hoverOutlineEffect | |
- property int hoverOutlineSize: 1 * units.devicePixelRatio | |
- property int hoverRadius: 40 | |
- property int pressedRadius: hoverRadius | |
- property bool useOutlineMask: true | |
- | |
- property int effectRadius: control.pressed ? pressedRadius : hoverRadius | |
- Behavior on effectRadius { | |
- NumberAnimation { | |
- duration: units.longDuration | |
- } | |
- } | |
- | |
- visible: control.containsMouse | |
- | |
- function alpha(c, a) { | |
- return Qt.rgba(c.r, c.g, c.b, a) | |
- } | |
- property color effectColor: theme.textColor | |
- property color fillColor: alpha(effectColor, 1/16) | |
- property color pressedFillColor: alpha(effectColor, 4/16) | |
- property color borderColor: alpha(effectColor, 8/16) | |
- | |
- Rectangle { | |
- id: hoverOutline | |
- visible: !hoverOutlineEffect.useOutlineMask | |
- anchors.fill: parent | |
- // color: "transparent" | |
- color: control.pressed ? pressedFillColor : fillColor | |
- border.color: borderColor | |
- border.width: hoverOutlineSize | |
- | |
- Behavior on color { | |
- ColorAnimation { | |
- duration: units.longDuration | |
- } | |
- } | |
- } | |
- | |
- RadialGradient { | |
- id: hoverOutlineMask | |
- visible: false | |
- anchors.fill: parent | |
- horizontalOffset: hoverOutlineEffect.visible ? control.mouseX - width/2 : 0 | |
- verticalOffset: hoverOutlineEffect.visible ? control.mouseY - height/2 : 0 | |
- horizontalRadius: effectRadius | |
- verticalRadius: effectRadius | |
- gradient: Gradient { | |
- GradientStop { position: 0.0; color: "#FFFFFFFF" } | |
- GradientStop { position: 1; color: "#00FFFFFF" } | |
- } | |
- } | |
- | |
- OpacityMask { | |
- anchors.fill: parent | |
- visible: hoverOutlineEffect.useOutlineMask | |
- source: hoverOutline | |
- maskSource: hoverOutlineMask | |
- } | |
-} | |
diff --git a/package/contents/ui/JumpToSectionView.qml b/package/contents/ui/JumpToSectionView.qml | |
index 711928ac..d5c5e7d3 100644 | |
--- a/package/contents/ui/JumpToSectionView.qml | |
+++ b/package/contents/ui/JumpToSectionView.qml | |
@@ -6,10 +6,9 @@ import org.kde.plasma.components 2.0 as PlasmaComponents | |
GridView { | |
id: jumpToSectionView | |
- Layout.fillWidth: true | |
- Layout.fillHeight: true | |
- | |
- clip: true | |
+ // Layout.fillWidth: true | |
+ // Layout.fillHeight: true | |
+ anchors.centerIn: parent | |
property bool squareView: false | |
@@ -27,7 +26,7 @@ GridView { | |
property int buttonSize: { | |
if (squareView) { | |
- return 70 * units.devicePixelRatio | |
+ return 48 * units.devicePixelRatio | |
} else { | |
return 36 * units.devicePixelRatio | |
} | |
@@ -52,7 +51,7 @@ GridView { | |
enabled: availableSections.indexOf(section) >= 0 | |
- font.pixelSize: height * 0.6 | |
+ font.pixelSize: jumpToLetterView.squareView ? 20 : theme.defaultFont.pixelSize | |
iconSource: { | |
if (isRecentApps) { | |
diff --git a/package/contents/ui/KickerListModel.qml b/package/contents/ui/KickerListModel.qml | |
index b520d2aa..d2095b22 100644 | |
--- a/package/contents/ui/KickerListModel.qml | |
+++ b/package/contents/ui/KickerListModel.qml | |
@@ -39,7 +39,6 @@ ListModel { | |
name: model.data(modelIndex, Qt.DisplayRole), | |
description: model.data(modelIndex, DescriptionRole), | |
favoriteId: model.data(modelIndex, FavoriteIdRole), | |
- largeIcon: false, // for KickerListView | |
}; | |
// ListView.append() doesn't like it when we have { key: [object] }. | |
diff --git a/package/contents/ui/KickerListView.qml b/package/contents/ui/KickerListView.qml | |
index ce0cb648..b0d6edbb 100644 | |
--- a/package/contents/ui/KickerListView.qml | |
+++ b/package/contents/ui/KickerListView.qml | |
@@ -11,7 +11,7 @@ ListView { | |
id: listView | |
width: parent.width | |
Layout.fillHeight: true | |
- clip: true | |
+ // spacing: units.smallSpacing | |
cacheBuffer: 200 // Don't unload when scrolling (prevent stutter) | |
// snapMode: ListView.SnapToItem | |
@@ -21,7 +21,7 @@ ListView { | |
property bool showItemUrl: true | |
property bool showDesktopFileUrl: false | |
- property int iconSize: 36 * units.devicePixelRatio | |
+ property int iconSize: config.menuItemHeight | |
section.delegate: KickerSectionHeader {} | |
@@ -47,9 +47,7 @@ ListView { | |
// } | |
// } | |
- highlight: PlasmaComponents.Highlight { | |
- visible: listView.currentItem && !listView.currentItem.isSeparator | |
- } | |
+ highlight: PlasmaComponents.Highlight {} | |
// function triggerIndex(index) { | |
// model.triggerIndex(index) | |
diff --git a/package/contents/ui/KickerSectionHeader.qml b/package/contents/ui/KickerSectionHeader.qml | |
index 78656894..98f3a732 100644 | |
--- a/package/contents/ui/KickerSectionHeader.qml | |
+++ b/package/contents/ui/KickerSectionHeader.qml | |
@@ -16,7 +16,6 @@ MouseArea { | |
id: sectionHeading | |
anchors { | |
left: parent.left | |
- leftMargin: units.smallSpacing | |
verticalCenter: parent.verticalCenter | |
} | |
text: { | |
@@ -26,21 +25,11 @@ MouseArea { | |
return section | |
} | |
} | |
- font.bold: true | |
- font.pointSize: 14 * units.devicePixelRatio | |
- property bool centerOverIcon: sectionHeading.contentWidth <= listView.iconSize | |
- width: centerOverIcon ? listView.iconSize : parent.width | |
- horizontalAlignment: centerOverIcon ? Text.AlignHCenter : Text.AlignLeft | |
- } | |
- | |
- HoverOutlineEffect { | |
- id: hoverOutlineEffect | |
- anchors.fill: parent | |
- visible: enableJumpToSection && control.containsMouse | |
- hoverRadius: width/2 | |
- pressedRadius: width | |
- property alias control: sectionDelegate | |
+ // property bool centerOverIcon: sectionHeading.contentWidth <= listView.iconSize | |
+ // width: centerOverIcon ? listView.iconSize : parent.width | |
+ // horizontalAlignment: centerOverIcon ? Text.AlignHCenter : Text.AlignLeft | |
+ width: parent.width | |
} | |
hoverEnabled: true | |
diff --git a/package/contents/ui/LauncherIcon.qml b/package/contents/ui/LauncherIcon.qml | |
index c45e3f75..a7a23fe8 100644 | |
--- a/package/contents/ui/LauncherIcon.qml | |
+++ b/package/contents/ui/LauncherIcon.qml | |
@@ -16,7 +16,7 @@ MouseArea { | |
case PlasmaCore.Types.Vertical: | |
return 0; | |
case PlasmaCore.Types.Horizontal: | |
- return height; | |
+ return height * 1.2; | |
default: | |
return units.gridUnit * 3; | |
} | |
@@ -25,7 +25,7 @@ MouseArea { | |
Layout.minimumHeight: { | |
switch (plasmoid.formFactor) { | |
case PlasmaCore.Types.Vertical: | |
- return width; | |
+ return width * 1.2; | |
case PlasmaCore.Types.Horizontal: | |
return 0; | |
default: | |
@@ -36,20 +36,19 @@ MouseArea { | |
readonly property int maxSize: Math.max(width, height) | |
property int size: { | |
if (inPanel) { | |
- if (plasmoid.configuration.fixedPanelIcon) { | |
- return units.iconSizeHints.panel | |
- } else { | |
+// if (plasmoid.configuration.fixedPanelIcon) { | |
+// return units.iconSizeHints.panel | |
+// } else { | |
return maxSize | |
- } | |
+// } | |
} else { | |
return -1 | |
} | |
} | |
- Layout.maximumWidth: size | |
- Layout.maximumHeight: size | |
+ Layout.maximumWidth: size * 1.2 | |
+ Layout.maximumHeight: size * 1.2 | |
- | |
- property int iconSize: Math.min(width, height) | |
+ property int iconSize: plasmoid.configuration.fixedPanelIcon ? units.iconSizeHints.panel : Math.min(width, height) | |
property alias iconSource: icon.source | |
PlasmaCore.IconItem { | |
diff --git a/package/contents/ui/Main.qml b/package/contents/ui/Main.qml | |
index 23120161..f3146353 100644 | |
--- a/package/contents/ui/Main.qml | |
+++ b/package/contents/ui/Main.qml | |
@@ -14,7 +14,7 @@ Item { | |
Logger { | |
id: logger | |
- name: 'tiledmenu' | |
+ name: 'simple10menu' | |
// showDebug: true | |
} | |
@@ -112,6 +112,7 @@ Item { | |
Plasmoid.toolTipMainText: "" | |
Plasmoid.toolTipSubText: "" | |
+ // Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground | |
Plasmoid.compactRepresentation: LauncherIcon { | |
id: panelItem | |
@@ -127,7 +128,6 @@ Item { | |
config.showSearch = false | |
popup.searchView.searchField.forceActiveFocus() | |
popup.searchView.showDefaultView() | |
- // popup.searchView.tileEditorView.open('preferred://browser') | |
} | |
} | |
@@ -142,7 +142,7 @@ Item { | |
Layout.preferredWidth: config.popupWidth | |
Layout.preferredHeight: config.popupHeight | |
- // Layout.minimumHeight: 600 // For quickly testing as a desktop widget | |
+ Layout.minimumHeight: 600 // For quickly testing as a desktop widget | |
// Layout.minimumWidth: 800 | |
onWidthChanged: { | |
@@ -158,9 +158,7 @@ Item { | |
id: resizeHeight | |
interval: 200 | |
onTriggered: { | |
- if (!plasmoid.configuration.fullscreen) { | |
- plasmoid.configuration.popupHeight = height / units.devicePixelRatio | |
- } | |
+ plasmoid.configuration.popupHeight = height / units.devicePixelRatio | |
} | |
} | |
Timer { | |
@@ -176,23 +174,10 @@ Item { | |
} | |
onTriggered: { | |
- if (plasmoid.configuration.fullscreen) { | |
- attemptsLeft = 0 | |
- } else { | |
- var favWidth = Math.max(0, widget.width - config.leftSectionWidth) // 398 // 888-60-430 | |
- // console.log(favWidth, widget.width, config.leftSectionWidth) | |
- // console.log(favWidth / config.cellBoxSize) | |
- // var cols = Math.floor(favWidth / config.favColWidth) * 2 | |
- var cols = Math.floor(favWidth / config.cellBoxSize) | |
- if (plasmoid.configuration.favGridCols != cols) { | |
- // console.log(plasmoid.configuration.favGridCols, cols) | |
- plasmoid.configuration.favGridCols = cols | |
- } | |
- // Force a reflow since Alt+RightClick+Drag resizing doesn't really play nice with PlasmaCore.Dialog. | |
- config.popupWidthChanged() | |
- widget.Layout.preferredWidthChanged() | |
- attemptsLeft -= 1 | |
- } | |
+ // Force a reflow since Alt+RightClick+Drag resizing doesn't really play nice with PlasmaCore.Dialog. | |
+ config.popupWidthChanged() | |
+ widget.Layout.preferredWidthChanged() | |
+ attemptsLeft -= 1 | |
} | |
} | |
// Layout.onPreferredWidthChanged: console.log('popup.size', width, height) | |
diff --git a/package/contents/ui/MenuListItem.qml b/package/contents/ui/MenuListItem.qml | |
index a7b2deca..1442f7f2 100644 | |
--- a/package/contents/ui/MenuListItem.qml | |
+++ b/package/contents/ui/MenuListItem.qml | |
@@ -8,7 +8,11 @@ AppToolButton { | |
id: itemDelegate | |
width: parent.width | |
- implicitHeight: row.implicitHeight | |
+ implicitHeight: listView.iconSize + (4 * units.devicePixelRatio) | |
+ | |
+ onEntered: { | |
+ listView.currentIndex = index | |
+ } | |
property var parentModel: typeof modelList !== "undefined" && modelList[index] ? modelList[index].parentModel : undefined | |
property string modelDescription: model.name == model.description ? '' : model.description // Ignore the Comment if it's the same as the Name. | |
@@ -19,7 +23,7 @@ AppToolButton { | |
property bool secondRowVisible: secondRowText | |
property string launcherUrl: model.favoriteId || model.url | |
property alias iconSource: itemIcon.source | |
- property int iconSize: model.largeIcon ? listView.iconSize * 2 : listView.iconSize | |
+ property int iconSize: config.menuIconSize | |
function endsWith(s, substr) { | |
return s.indexOf(substr) == s.length - substr.length | |
@@ -84,25 +88,26 @@ AppToolButton { | |
RowLayout { // ItemListDelegate | |
id: row | |
anchors.left: parent.left | |
- anchors.leftMargin: units.smallSpacing | |
anchors.right: parent.right | |
- anchors.rightMargin: units.smallSpacing | |
+ anchors.verticalCenter: parent.verticalCenter | |
+ anchors.leftMargin: 2 * units.devicePixelRatio | |
+ spacing: 8 * units.devicePixelRatio | |
Item { | |
- Layout.fillHeight: true | |
- implicitHeight: itemIcon.implicitHeight | |
- implicitWidth: itemIcon.implicitWidth | |
+ implicitHeight: config.menuItemHeight | |
+ implicitWidth: config.menuItemHeight | |
+ | |
+ Rectangle { | |
+ color: config.tileColors[launcherUrl.toString()] || theme.highlightColor | |
+ implicitHeight: parent.height | |
+ implicitWidth: parent.width | |
+ } | |
PlasmaCore.IconItem { | |
id: itemIcon | |
anchors.centerIn: parent | |
implicitHeight: itemDelegate.iconSize | |
implicitWidth: implicitHeight | |
- | |
- // visible: iconsEnabled | |
- | |
- animated: false | |
- // usesPlasmaTheme: false | |
source: itemDelegate.iconInstance | |
} | |
} | |
@@ -170,9 +175,6 @@ AppToolButton { | |
AppContextMenu { | |
id: contextMenu | |
onPopulateMenu: { | |
- if (launcherUrl && !plasmoid.configuration.tilesLocked) { | |
- menu.addPinToMenuAction(launcherUrl) | |
- } | |
if (listView.model.hasActionList(index)) { | |
var actionList = listView.model.getActionList(index) | |
menu.addActionList(actionList, listView.model, index) | |
diff --git a/package/contents/ui/Popup.qml b/package/contents/ui/Popup.qml | |
index 22f59785..165a45f5 100644 | |
--- a/package/contents/ui/Popup.qml | |
+++ b/package/contents/ui/Popup.qml | |
@@ -9,9 +9,6 @@ import org.kde.plasma.components 2.0 as PlasmaComponents | |
MouseArea { | |
property alias searchView: searchView | |
property alias appsView: searchView.appsView | |
- property alias tileEditorView: searchView.tileEditorView | |
- property alias tileEditorViewLoader: searchView.tileEditorViewLoader | |
- property alias tileGrid: tileGrid | |
RowLayout { | |
anchors.fill: parent | |
@@ -26,29 +23,7 @@ MouseArea { | |
SearchView { | |
id: searchView | |
Layout.fillHeight: true | |
- } | |
- | |
- TileGrid { | |
- id: tileGrid | |
- Layout.fillWidth: true | |
- Layout.fillHeight: true | |
- | |
- cellSize: config.cellSize | |
- cellMargin: config.cellMargin | |
- cellPushedMargin: config.cellPushedMargin | |
- | |
- tileModel: config.tileModel.value | |
- | |
- onEditTile: tileEditorViewLoader.open(tile) | |
- | |
- onTileModelChanged: saveTileModel.restart() | |
- Timer { | |
- id: saveTileModel | |
- interval: 2000 | |
- onTriggered: config.tileModel.save() | |
- } | |
- } | |
- | |
+ } | |
} | |
SidebarView { | |
@@ -56,7 +31,7 @@ MouseArea { | |
} | |
MouseArea { | |
- visible: !plasmoid.configuration.tilesLocked && !(plasmoid.location == PlasmaCore.Types.TopEdge || plasmoid.location == PlasmaCore.Types.RightEdge) | |
+ visible: !(plasmoid.location == PlasmaCore.Types.TopEdge || plasmoid.location == PlasmaCore.Types.RightEdge) | |
anchors.top: parent.top | |
anchors.right: parent.right | |
width: units.largeSpacing | |
@@ -72,7 +47,7 @@ MouseArea { | |
} | |
MouseArea { | |
- visible: !plasmoid.configuration.tilesLocked && !(plasmoid.location == PlasmaCore.Types.BottomEdge || plasmoid.location == PlasmaCore.Types.RightEdge) | |
+ visible: !(plasmoid.location == PlasmaCore.Types.BottomEdge || plasmoid.location == PlasmaCore.Types.RightEdge) | |
anchors.bottom: parent.bottom | |
anchors.right: parent.right | |
width: units.largeSpacing | |
diff --git a/package/contents/ui/SearchField.qml b/package/contents/ui/SearchField.qml | |
index 4854c24b..73363e99 100644 | |
--- a/package/contents/ui/SearchField.qml | |
+++ b/package/contents/ui/SearchField.qml | |
@@ -25,11 +25,8 @@ TextField { | |
} | |
property int topMargin: 0 | |
property int bottomMargin: 0 | |
- property int defaultFontSize: 16 * units.devicePixelRatio // Not the same as pointSize=16 | |
- property int styleMaxFontSize: height - topMargin - bottomMargin | |
- font.pixelSize: Math.min(defaultFontSize, styleMaxFontSize) | |
- style: plasmoid.configuration.searchFieldFollowsTheme ? plasmaStyle : redmondStyle | |
+ style: plasmaStyle | |
Component { | |
id: plasmaStyle | |
// Creates the following warning when not in use: | |
@@ -48,30 +45,6 @@ TextField { | |
} | |
} | |
} | |
- Component { | |
- id: redmondStyle | |
- | |
- // https://github.com/qt/qtquickcontrols/blob/dev/src/controls/Styles/Base/TextFieldStyle.qml | |
- // https://github.com/qt/qtquickcontrols/blob/dev/src/controls/Styles/Desktop/TextFieldStyle.qml | |
- TextFieldStyle { | |
- id: style | |
- | |
- background: Rectangle { | |
- color: "#eee" | |
- } | |
- textColor: "#111" | |
- placeholderTextColor: "#777" | |
- | |
- Component.onCompleted: { | |
- searchField.topMargin = Qt.binding(function() { | |
- return style.padding.top | |
- }) | |
- searchField.bottomMargin = Qt.binding(function() { | |
- return style.padding.bottom | |
- }) | |
- } | |
- } | |
- } | |
onTextChanged: { | |
search.query = text | |
diff --git a/package/contents/ui/SearchModel.qml b/package/contents/ui/SearchModel.qml | |
index e88be70d..bb165359 100644 | |
--- a/package/contents/ui/SearchModel.qml | |
+++ b/package/contents/ui/SearchModel.qml | |
@@ -34,7 +34,6 @@ Item { | |
id: runnerModel | |
appletInterface: plasmoid | |
- favoritesModel: rootModel.favoritesModel | |
mergeResults: config.searchResultsMerged | |
runners: [] // Empty = All runners. | |
diff --git a/package/contents/ui/SearchResultsModel.qml b/package/contents/ui/SearchResultsModel.qml | |
index 1b86fb53..d57a5094 100644 | |
--- a/package/contents/ui/SearchResultsModel.qml | |
+++ b/package/contents/ui/SearchResultsModel.qml | |
@@ -60,7 +60,6 @@ ListModel { | |
icon: icon, | |
url: url, | |
favoriteId: runner.data(modelIndex, FavoriteIdRole), | |
- largeIcon: false, // for KickerListView | |
}; | |
// console.log(resultItem.name, resultItem.url); | |
@@ -172,11 +171,6 @@ ListModel { | |
} | |
} | |
- //--- Make the (selected) first item bigger. | |
- if (resultList.length > 0) { | |
- resultList[0].largeIcon = true | |
- } | |
- | |
//--- Reverse the model? | |
if (plasmoid.configuration.searchResultsReversed) { | |
resultList.reverse() | |
diff --git a/package/contents/ui/SearchStackView.qml b/package/contents/ui/SearchStackView.qml | |
index d74073a7..10aef45d 100644 | |
--- a/package/contents/ui/SearchStackView.qml | |
+++ b/package/contents/ui/SearchStackView.qml | |
@@ -6,7 +6,7 @@ StackView { | |
id: stackView | |
clip: true | |
- delegate: panUp | |
+ delegate: noTransition | |
property int zoomDuration: 250 | |
property int zoomDelta: 100 | |
@@ -14,27 +14,6 @@ StackView { | |
property real zoomedOutRatio: Math.max(1, stackView.width - zoomDelta * units.devicePixelRatio) / stackView.width | |
readonly property var noTransition: StackViewDelegate {} | |
- | |
- readonly property var panUp: StackViewDelegate { | |
- pushTransition: StackViewTransition { | |
- PropertyAnimation { | |
- target: enterItem | |
- property: "y" | |
- from: stackView.height * (searchView.searchOnTop ? -1 : 1) | |
- to: 0 | |
- } | |
- PropertyAnimation { | |
- target: exitItem | |
- property: "opacity" | |
- from: 1 | |
- to: 0 | |
- } | |
- } | |
- | |
- function transitionFinished(properties) { | |
- properties.exitItem.opacity = 1 | |
- } | |
- } | |
readonly property var zoomOut: StackViewDelegate { | |
function transitionFinished(properties) { | |
properties.exitItem.opacity = 1 | |
diff --git a/package/contents/ui/SearchView.qml b/package/contents/ui/SearchView.qml | |
index f932e42f..c252b681 100644 | |
--- a/package/contents/ui/SearchView.qml | |
+++ b/package/contents/ui/SearchView.qml | |
@@ -38,12 +38,9 @@ Item { | |
height: config.popupHeight | |
property alias searchResultsView: searchResultsView | |
property alias appsView: appsView | |
- property alias tileEditorView: tileEditorViewLoader.item | |
- property alias tileEditorViewLoader: tileEditorViewLoader | |
property alias searchField: searchField | |
property alias jumpToLetterView: jumpToLetterView | |
- readonly property bool showingOnlyTiles: !config.showSearch | |
readonly property bool showingAppList: stackView.currentItem == appsView || stackView.currentItem == jumpToLetterView | |
readonly property bool showingAppsAlphabetically: config.showSearch && appsModel.order == "alphabetical" && showingAppList | |
readonly property bool showingAppsCategorically: config.showSearch && appsModel.order == "categories" && showingAppList | |
@@ -60,18 +57,9 @@ Item { | |
jumpToLetterView.showLetters() | |
} else if (defView == 'JumpToCategory') { | |
jumpToLetterView.showCategories() | |
- } else if (defView == 'TilesOnly') { | |
- searchView.showTilesOnly() | |
} | |
} | |
- function showTilesOnly() { | |
- if (!showingAppList) { | |
- appsView.show(stackView.noTransition) | |
- } | |
- config.showSearch = false | |
- } | |
- | |
function showSearchView() { | |
config.showSearch = true | |
} | |
@@ -117,6 +105,8 @@ Item { | |
onQueryChanged: { | |
if (search.query.length > 0 && stackView.currentItem != searchResultsView) { | |
stackView.push(searchResultsView, true) | |
+ } else if (search.query.length == 0 && stackView.currentItem == searchResultsView) { | |
+ appsView.showAppsAlphabetically() | |
} | |
searchResultsView.filterViewOpen = false | |
} | |
@@ -153,7 +143,7 @@ Item { | |
function show(animation) { | |
config.showSearch = true | |
if (stackView.currentItem != appsView) { | |
- stackView.delegate = animation || stackView.panUp | |
+ stackView.delegate = animation || stackView.noTransition | |
stackView.push({ | |
item: appsView, | |
replace: true, | |
@@ -206,19 +196,6 @@ Item { | |
// id: appsView | |
// } | |
- Loader { | |
- id: tileEditorViewLoader | |
- source: "TileEditorView.qml" | |
- visible: false | |
- active: false | |
- // asynchronous: true | |
- function open(tile) { | |
- config.showSearch = true | |
- active = true | |
- item.open(tile) | |
- } | |
- } | |
- | |
SearchStackView { | |
id: stackView | |
width: config.appAreaWidth | |
diff --git a/package/contents/ui/SidebarContextMenu.qml b/package/contents/ui/SidebarContextMenu.qml | |
index 4f04c256..694bd2ea 100644 | |
--- a/package/contents/ui/SidebarContextMenu.qml | |
+++ b/package/contents/ui/SidebarContextMenu.qml | |
@@ -10,8 +10,8 @@ SidebarMenu { | |
id: sidebarContextMenu | |
visible: open | |
open: false | |
- anchors.left: parent.right | |
- anchors.bottom: parent.bottom | |
+ anchors.left: parent.left | |
+ anchors.bottom: parent.top | |
implicitWidth: content.implicitWidth | |
implicitHeight: content.implicitHeight | |
z: 2 | |
@@ -20,6 +20,7 @@ SidebarMenu { | |
ColumnLayout { | |
id: content | |
+ spacing: 0 | |
} | |
// onVisibleChanged: { | |
diff --git a/package/contents/ui/SidebarFavouritesView.qml b/package/contents/ui/SidebarFavouritesView.qml | |
index f2c5da23..fb0681a0 100644 | |
--- a/package/contents/ui/SidebarFavouritesView.qml | |
+++ b/package/contents/ui/SidebarFavouritesView.qml | |
@@ -67,9 +67,9 @@ Repeater { | |
var s = model.url.toString() | |
if (endsWith(s, '.desktop')) { | |
if (endsWith(s, '/org.kde.dolphin.desktop')) { | |
- return 'folder-open-symbolic' | |
+ return 'system-file-manager-symbolic' | |
} else if (endsWith(s, '/systemsettings.desktop')) { | |
- return 'configure' | |
+ return 'configure-symbolic' | |
} | |
} else if (startsWith(s, 'file:///home/')) { | |
s = s.substring('file:///home/'.length, s.length) | |
diff --git a/package/contents/ui/SidebarItem.qml b/package/contents/ui/SidebarItem.qml | |
index 8e38f595..0c46de7b 100644 | |
--- a/package/contents/ui/SidebarItem.qml | |
+++ b/package/contents/ui/SidebarItem.qml | |
@@ -21,6 +21,9 @@ FlatButton { | |
property bool closeOnClick: true | |
property Item submenu: null | |
readonly property bool submenuOpen: submenu ? submenu.open : false | |
+ | |
+ property string svgIconName: "" | |
+ readonly property string svgIconFilename: svgIconName ? plasmoid.file("", "icons/" + svgIconName + ".svg") : "" | |
onClicked: { | |
if (sidebarMenu && sidebarMenu.open && closeOnClick) { | |
@@ -30,6 +33,21 @@ FlatButton { | |
submenu.open = !submenu.open | |
} | |
} | |
+ | |
+ PlasmaCore.SvgItem { | |
+ id: svgIcon | |
+ visible: !!sidebarItem.svgIconName | |
+ | |
+ svg: PlasmaCore.Svg { | |
+ imagePath: sidebarItem.svgIconFilename | |
+ } | |
+ | |
+ // From FlatButton.qml, modifed so icon is also 16px | |
+ property int iconSize: units.roundToIconSize(config.flatButtonIconSize) | |
+ width: iconSize | |
+ height: iconSize | |
+ anchors.centerIn: parent | |
+ } | |
QQC2.ToolTip { | |
id: control | |
diff --git a/package/contents/ui/SidebarItemRepeater.qml b/package/contents/ui/SidebarItemRepeater.qml | |
index 61061ce7..99c3b13b 100644 | |
--- a/package/contents/ui/SidebarItemRepeater.qml | |
+++ b/package/contents/ui/SidebarItemRepeater.qml | |
@@ -2,7 +2,7 @@ import QtQuick 2.0 | |
Repeater { | |
id: repeater | |
- delegate: SidebarItem { | |
+ delegate: SidebarContextMenuItem { | |
icon: model.iconName || model.decoration | |
text: model.name || model.display | |
sidebarMenu: repeater.parent.parent // SidebarContextMenu { Column { Repeater{} } } | |
diff --git a/package/contents/ui/SidebarMenu.qml b/package/contents/ui/SidebarMenu.qml | |
index 5f03ef38..7034e170 100644 | |
--- a/package/contents/ui/SidebarMenu.qml | |
+++ b/package/contents/ui/SidebarMenu.qml | |
@@ -10,9 +10,10 @@ MouseArea { | |
id: sidebarMenu | |
hoverEnabled: true | |
z: 1 | |
- // clip: true | |
- implicitWidth: config.sidebarWidth | |
+ // implicitWidth: config.sidebarWidth | |
+ implicitWidth: open ? config.sidebarMinOpenWidth : config.sidebarWidth | |
property bool open: false | |
+ Behavior on width { NumberAnimation { duration: 100 } } | |
onOpenChanged: { | |
if (open) { | |
@@ -24,28 +25,14 @@ MouseArea { | |
Rectangle { | |
anchors.fill: parent | |
- visible: !plasmoid.configuration.sidebarFollowsTheme | |
- color: config.sidebarBackgroundColor | |
- opacity: parent.open ? 1 : 0 | |
- } | |
- | |
- Rectangle { | |
- anchors.fill: parent | |
- visible: plasmoid.configuration.sidebarFollowsTheme | |
color: theme.backgroundColor | |
opacity: parent.open ? 1 : 0 | |
} | |
- PlasmaCore.FrameSvgItem { | |
- anchors.fill: parent | |
- visible: plasmoid.configuration.sidebarFollowsTheme | |
- imagePath: "widgets/frame" | |
- prefix: "raised" | |
- } | |
property alias showDropShadow: sidebarMenuShadows.visible | |
SidebarMenuShadows { | |
id: sidebarMenuShadows | |
anchors.fill: parent | |
- visible: !plasmoid.configuration.sidebarFollowsTheme && sidebarMenu.open | |
+ visible: sidebarMenu.open | |
} | |
} | |
diff --git a/package/contents/ui/SidebarMenuShadows.qml b/package/contents/ui/SidebarMenuShadows.qml | |
index 5915716c..cc89136a 100644 | |
--- a/package/contents/ui/SidebarMenuShadows.qml | |
+++ b/package/contents/ui/SidebarMenuShadows.qml | |
@@ -42,17 +42,17 @@ Item { | |
} | |
Rectangle { | |
id: leftShadow | |
- anchors.bottom: parent.top | |
- anchors.left: parent.left | |
+ anchors.bottom: parent.top - roundShadowHack | |
+ anchors.left: parent.left - roundShadowHack | |
height: dropShadowSize | |
- width: parent.height | |
+ width: parent.height + roundShadowHack | |
- transformOrigin: Item.BottomLeft | |
+ transformOrigin: Item.TopLeft | |
rotation: 90 | |
gradient: Gradient { | |
- GradientStop { position: 0.0; color: "#00000000" } | |
- GradientStop { position: 1.0; color: "#20000000" } | |
+ GradientStop { position: 0.0; color: "#20000000" } | |
+ GradientStop { position: 1.0; color: "#00000000" } | |
} | |
} | |
} | |
diff --git a/package/contents/ui/SidebarView.qml b/package/contents/ui/SidebarView.qml | |
index 5033e876..75b97176 100644 | |
--- a/package/contents/ui/SidebarView.qml | |
+++ b/package/contents/ui/SidebarView.qml | |
@@ -39,45 +39,29 @@ Item { | |
anchors.top: parent.top | |
anchors.bottom: parent.bottom | |
- | |
ColumnLayout { | |
id: sidebarMenuTop | |
spacing: 0 | |
- // SidebarItem { | |
- // iconName: 'open-menu-symbolic' | |
- // text: i18n("Menu") | |
- // closeOnClick: false | |
- // onClicked: sidebarMenu.open = !sidebarMenu.open | |
- // zoomOnPush: expanded | |
- // } | |
- | |
- SidebarViewButton { | |
- appletIconName: "view-tilesonly" | |
- text: i18n("Tiles Only") | |
- onClicked: searchView.showTilesOnly() | |
- checked: searchView.showingOnlyTiles | |
+ SidebarItem { | |
+ iconName: "open-menu-symbolic" | |
+ text: i18n("Menu") | |
+ closeOnClick: false | |
+ onClicked: sidebarMenu.open = !sidebarMenu.open | |
} | |
+ | |
SidebarViewButton { | |
- appletIconName: "view-list-alphabetically" | |
+ appletIconName: "view-list" | |
text: i18n("Alphabetical") | |
onClicked: appsView.showAppsAlphabetically() | |
checked: searchView.showingAppsAlphabetically | |
} | |
- SidebarViewButton { | |
- appletIconName: 'view-list-categorically' | |
- text: i18n("Categories") | |
- onClicked: appsView.showAppsCategorically() | |
- checked: searchView.showingAppsCategorically | |
- } | |
- // SidebarItem { | |
- // iconName: 'system-search-symbolic' | |
- // text: i18n("Search") | |
- // onClicked: searchResultsView.showDefaultSearch() | |
- // // checked: stackView.currentItem == searchResultsView | |
- // // checkedEdge: Qt.RightEdge | |
- // // checkedEdgeWidth: 4 * units.devicePixelRatio // Twice as thick as normal | |
- // } | |
+// SidebarViewButton { | |
+// appletIconName: "view-list-categorically" | |
+// text: i18n("Categories") | |
+// onClicked: appsView.showAppsCategorically() | |
+// checked: searchView.showingAppsCategorically | |
+// } | |
} | |
ColumnLayout { | |
anchors.bottom: parent.bottom | |
@@ -91,7 +75,11 @@ Item { | |
SidebarContextMenu { | |
id: userMenu | |
- SidebarItem { | |
+ Item { | |
+ implicitHeight: 8 * units.devicePixelRatio | |
+ } | |
+ | |
+ SidebarContextMenuItem { | |
iconName: 'system-users' | |
text: i18n("User Manager") | |
onClicked: KCMShell.open('user_manager') | |
@@ -101,6 +89,10 @@ Item { | |
SidebarItemRepeater { | |
model: appsModel.sessionActionsModel | |
} | |
+ | |
+ Item { | |
+ implicitHeight: 8 * units.devicePixelRatio | |
+ } | |
} | |
} | |
@@ -110,16 +102,24 @@ Item { | |
} | |
SidebarItem { | |
- iconName: 'system-shutdown-symbolic' | |
+ iconName: "system-shutdown-symbolic" | |
text: i18n("Power") | |
submenu: powerMenu | |
SidebarContextMenu { | |
id: powerMenu | |
+ Item { | |
+ implicitHeight: 8 * units.devicePixelRatio | |
+ } | |
+ | |
SidebarItemRepeater { | |
model: appsModel.powerActionsModel | |
} | |
+ | |
+ Item { | |
+ implicitHeight: 8 * units.devicePixelRatio | |
+ } | |
} | |
} | |
} | |
diff --git a/package/contents/ui/SidebarViewButton.qml b/package/contents/ui/SidebarViewButton.qml | |
index ee505abb..7cfdd6b9 100644 | |
--- a/package/contents/ui/SidebarViewButton.qml | |
+++ b/package/contents/ui/SidebarViewButton.qml | |
@@ -3,16 +3,15 @@ import org.kde.plasma.core 2.0 as PlasmaCore | |
SidebarItem { | |
id: control | |
- | |
+ | |
implicitWidth: config.flatButtonSize | |
property string appletIconName: "" | |
- readonly property string internalIconName: control.checked ? (appletIconName + "-selected") : appletIconName | |
- readonly property string appletIconFilename: appletIconName ? plasmoid.file("", "icons/" + internalIconName + ".svg") : "" | |
+ readonly property string appletIconFilename: appletIconName ? plasmoid.file("", "icons/" + appletIconName + ".svg") : "" | |
- checkedEdge: Qt.LeftEdge | |
+ checkedEdge: Qt.LeftEdge | |
checkedEdgeWidth: 4 * units.devicePixelRatio // Twice as thick as normal | |
- | |
+ | |
PlasmaCore.SvgItem { | |
id: icon | |
@@ -25,9 +24,5 @@ SidebarItem { | |
width: iconSize | |
height: iconSize | |
anchors.centerIn: parent | |
- | |
- // From FlatButton.qml | |
- scale: control.zoomOnPush && control.pressed ? (control.height-5) / control.height : 1 | |
- Behavior on scale { NumberAnimation { duration: 200 } } | |
} | |
} | |
diff --git a/package/contents/ui/TileEditorColorField.qml b/package/contents/ui/TileEditorColorField.qml | |
deleted file mode 100644 | |
index 01d9047c..00000000 | |
--- a/package/contents/ui/TileEditorColorField.qml | |
+++ /dev/null | |
@@ -1,95 +0,0 @@ | |
-import QtQuick 2.2 | |
-import QtQuick.Window 2.1 | |
-import QtQuick.Controls 1.2 | |
-import QtQuick.Layouts 1.0 | |
-import QtQuick.Dialogs 1.0 | |
- | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.plasma.extras 2.0 as PlasmaExtras | |
- | |
-import "lib" | |
- | |
-GroupBox { | |
- id: tileEditorColorField | |
- title: "Label" | |
- implicitWidth: parent.implicitWidth | |
- Layout.fillWidth: true | |
- property alias placeholderText: textField.placeholderText | |
- property alias enabled: textField.enabled | |
- property string key: '' | |
- | |
- style: GroupBoxStyle {} | |
- | |
- RowLayout { | |
- anchors.fill: parent | |
- | |
- MouseArea { | |
- id: mouseArea | |
- width: textField.height | |
- height: textField.height | |
- hoverEnabled: true | |
- | |
- onClicked: dialog.open() | |
- | |
- Rectangle { | |
- anchors.fill: parent | |
- color: textField.text | |
- border.width: 3 | |
- border.color: mouseArea.containsMouse ? theme.highlightColor : theme.backgroundColor | |
- | |
- Rectangle { | |
- anchors.fill: parent | |
- anchors.margins: 1 | |
- color: "transparent" | |
- border.width: 1 | |
- border.color: mouseArea.containsMouse ? theme.highlightColor : theme.textColor | |
- } | |
- } | |
- | |
- ColorDialog { | |
- id: dialog | |
- visible: false | |
- // modality: Qt.WindowModal // Don't dim the menu | |
- title: tileEditorColorField.title | |
- showAlphaChannel: true | |
- color: textField.text | |
- onCurrentColorChanged: { | |
- if (visible && color != currentColor) { | |
- textField.text = currentColor | |
- } | |
- } | |
- } | |
- } | |
- | |
- PlasmaComponents.TextField { | |
- id: textField | |
- Layout.fillWidth: true | |
- text: key && appObj.tile && appObj.tile[key] ? appObj.tile[key] : '' | |
- property bool updateOnChange: false | |
- onTextChanged: { | |
- if (key && updateOnChange) { | |
- if (text) { | |
- appObj.tile[key] = text | |
- } else { | |
- delete appObj.tile[key] | |
- } | |
- appObj.tileChanged() | |
- tileGrid.tileModelChanged() | |
- } | |
- } | |
- | |
- Connections { | |
- target: appObj | |
- | |
- onTileChanged: { | |
- if (key && tile) { | |
- textField.updateOnChange = false | |
- textField.text = appObj.tile[key] || '' | |
- textField.updateOnChange = true | |
- } | |
- } | |
- } | |
- } | |
- } | |
-} | |
diff --git a/package/contents/ui/TileEditorField.qml b/package/contents/ui/TileEditorField.qml | |
deleted file mode 100644 | |
index db1ae23f..00000000 | |
--- a/package/contents/ui/TileEditorField.qml | |
+++ /dev/null | |
@@ -1,88 +0,0 @@ | |
-import QtQuick 2.2 | |
-import QtQuick.Window 2.1 | |
-import QtQuick.Controls 1.2 | |
-import QtQuick.Layouts 1.0 | |
-import QtQuick.Dialogs 1.0 | |
- | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.plasma.extras 2.0 as PlasmaExtras | |
-import QtQuick.Controls.Styles.Plasma 2.0 as PlasmaStyles | |
- | |
-import "lib" | |
- | |
-GroupBox { | |
- id: tileEditorField | |
- title: "Label" | |
- Layout.fillWidth: true | |
- property alias text: textField.text | |
- property alias placeholderText: textField.placeholderText | |
- property alias enabled: textField.enabled | |
- property string key: '' | |
- property string checkedKey: '' | |
- checkable: checkedKey | |
- property bool checkedDefault: true | |
- | |
- property bool updateOnChange: false | |
- onCheckedChanged: { | |
- if (checkedKey && tileEditorField.updateOnChange) { | |
- appObj.tile[checkedKey] = checked | |
- appObj.tileChanged() | |
- tileGrid.tileModelChanged() | |
- } | |
- } | |
- | |
- default property alias _contentChildren: content.data | |
- | |
- Connections { | |
- target: appObj | |
- | |
- onTileChanged: { | |
- if (checkedKey && tile) { | |
- tileEditorField.updateOnChange = false | |
- tileEditorField.checked = typeof appObj.tile[checkedKey] !== "undefined" ? appObj.tile[checkedKey] : checkedDefault | |
- tileEditorField.updateOnChange = true | |
- } | |
- } | |
- } | |
- | |
- style: PlasmaStyles.GroupBoxStyle {} | |
- | |
- RowLayout { | |
- id: content | |
- anchors.left: parent.left | |
- anchors.right: parent.right | |
- | |
- PlasmaComponents.TextField { | |
- id: textField | |
- Layout.fillWidth: true | |
- text: key && appObj.tile && appObj.tile[key] ? appObj.tile[key] : '' | |
- property bool updateOnChange: false | |
- onTextChanged: { | |
- if (key && textField.updateOnChange) { | |
- appObj.tile[key] = text | |
- appObj.tileChanged() | |
- tileGrid.tileModelChanged() | |
- } | |
- } | |
- | |
- Connections { | |
- target: appObj | |
- | |
- onTileChanged: { | |
- if (key && tile) { | |
- textField.updateOnChange = false | |
- textField.text = appObj.tile[key] || '' | |
- textField.updateOnChange = true | |
- } | |
- } | |
- } | |
- } | |
- | |
- Component.onDestruction: { | |
- while (children.length > 0) { | |
- children[children.length - 1].parent = tileEditorField | |
- } | |
- } | |
- } | |
-} | |
diff --git a/package/contents/ui/TileEditorPresetTileButton.qml b/package/contents/ui/TileEditorPresetTileButton.qml | |
deleted file mode 100644 | |
index 4bd51089..00000000 | |
--- a/package/contents/ui/TileEditorPresetTileButton.qml | |
+++ /dev/null | |
@@ -1,110 +0,0 @@ | |
-import QtQuick 2.2 | |
-import QtQuick.Layouts 1.0 | |
- | |
-Item { | |
- id: presetTileButton | |
- Layout.fillWidth: parent.width | |
- Layout.preferredHeight: image.paintedHeight | |
- | |
- visible: source | |
- property alias source: image.source | |
- property string filename: 'temp.jpg' | |
- property int w: 0 | |
- property int h: 0 | |
- | |
- Image { | |
- id: image | |
- anchors.centerIn: parent | |
- width: Math.min(parent.width, sourceSize.width) | |
- | |
- fillMode: Image.PreserveAspectFit | |
- } | |
- | |
- HoverOutlineEffect { | |
- id: hoverOutlineEffect | |
- anchors.fill: image | |
- hoverRadius: Math.min(width, height) | |
- property alias control: mouseArea | |
- } | |
- | |
- MouseArea { | |
- id: mouseArea | |
- anchors.fill: image | |
- hoverEnabled: true | |
- acceptedButtons: Qt.LeftButton | |
- cursorShape: Qt.ArrowCursor | |
- | |
- onClicked: presetTileButton.select() | |
- } | |
- | |
- function getDownloadDir() { | |
- // plasmoid.downloadPath() will create this folder. | |
- // ~/Downloads/Plasma/com.github.zren.tiledmenu/ | |
- // I litters the Downloads folder... which isn't ideal. | |
- return plasmoid.downloadPath() | |
- | |
- // TODO: Download to ~/.local/share since it's hidden. | |
- // Note, this folder does not exist! So we need to create it somehow. | |
- // Maybe we could run `mkdir -p /path/to/folder` using the exec dataengine. | |
- | |
- // Requires: import Qt.labs.platform 1.0 | |
- // ~/.local/share/ | |
- // var localDownloadDir = StandardPaths.writableLocation(StandardPaths.GenericDataLocation) | |
- // console.log('localDownloadDir', localDownloadDir) | |
- | |
- // Remove file:// URL scheme | |
- // localFilepath = localDownloadDir.substr('file://'.length) | |
- | |
- // ~/.local/share/plasma_com.github.zren.tiledmenu | |
- // var tiledMenuDir = localDownloadDir + '/' + 'plasma_' + plasmoid.pluginName | |
- // console.log('tiledMenuDir', tiledMenuDir) | |
- // return tiledMenuDir | |
- } | |
- | |
- function resizeTile() { | |
- var sizeChanged = false | |
- if (presetTileButton.w > 0) { | |
- appObj.tile.w = presetTileButton.w | |
- sizeChanged = true | |
- } | |
- if (presetTileButton.h > 0) { | |
- appObj.tile.h = presetTileButton.h | |
- sizeChanged = true | |
- } | |
- if (sizeChanged) { | |
- appObj.tileChanged() | |
- tileGrid.tileModelChanged() | |
- } | |
- } | |
- | |
- function setTileBackgroundImage(filepath) { | |
- backgroundImageField.text = filepath | |
- labelField.checked = false | |
- iconField.checked = false | |
- } | |
- | |
- function select() { | |
- logger.debug('select', source) | |
- | |
- var sourceFilepath = '' + source // cast to string | |
- var isLocalFilepath = sourceFilepath.indexOf('file://') == 0 || sourceFilepath.indexOf('/') == 0 | |
- if (isLocalFilepath) { | |
- presetTileButton.setTileBackgroundImage(source) | |
- presetTileButton.resizeTile() | |
- } else { | |
- var tiledMenuDir = getDownloadDir() | |
- var localFilepath = tiledMenuDir + filename | |
- logger.debug('localFilepath', localFilepath) | |
- | |
- // Save tile image to file | |
- logger.debug('grabToImage.start') | |
- image.grabToImage(function(result){ | |
- logger.debug('grabToImage.done', result, result.url) | |
- result.saveToFile(localFilepath) | |
- presetTileButton.setTileBackgroundImage(localFilepath) | |
- presetTileButton.resizeTile() | |
- }, image.sourceSize) | |
- } | |
- } | |
- | |
-} | |
diff --git a/package/contents/ui/TileEditorPresetTiles.qml b/package/contents/ui/TileEditorPresetTiles.qml | |
deleted file mode 100644 | |
index f215058d..00000000 | |
--- a/package/contents/ui/TileEditorPresetTiles.qml | |
+++ /dev/null | |
@@ -1,150 +0,0 @@ | |
-import QtQuick 2.2 | |
-import QtQuick.Window 2.1 | |
-import QtQuick.Controls 1.2 | |
-import QtQuick.Layouts 1.0 | |
-import QtQuick.Dialogs 1.0 | |
- | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.plasma.extras 2.0 as PlasmaExtras | |
-import QtQuick.Controls.Styles.Plasma 2.0 as PlasmaStyles | |
- | |
-import "lib" | |
-import "lib/Requests.js" as Requests | |
- | |
-// Note: This references a global KCoreAddons.KUser { id: kuser } | |
- | |
-GroupBox { | |
- id: tileEditorPresetTiles | |
- title: "Label" | |
- Layout.fillWidth: true | |
- | |
- visible: false | |
- function checkForPreset() { | |
- var visiblePresets = 0 | |
- for (var i = 0; i < content.children.length; i++) { | |
- var item = content.children[i] | |
- var hasImageUrl = item.source && item.source.toString() | |
- if (hasImageUrl) { | |
- visiblePresets += 1 | |
- } | |
- } | |
- visible = visiblePresets > 0 | |
- } | |
- Component.onCompleted: { | |
- checkForPreset() | |
- } | |
- | |
- readonly property bool isDesktopFile: endsWith(appObj.appUrl, '.desktop') | |
- property string steamGameId: '' | |
- property bool isSteamGameLauncher: !!steamGameId | |
- property string lutrisGameSlug: '' | |
- property bool isLutrisGameLauncher: !!lutrisGameSlug | |
- | |
- function endsWith(s, substr) { | |
- return s.indexOf(substr) == s.length - substr.length | |
- } | |
- | |
- function checkIfRecognizedLauncher() { | |
- console.log('checkIfRecognizedLauncher', appObj.appUrl) | |
- if (!appObj.appUrl) { | |
- return | |
- } | |
- | |
- if (!isDesktopFile) { | |
- return | |
- } | |
- | |
- Requests.getFile(appObj.appUrl, function(err, data) { | |
- if (err) { | |
- console.log('[tiledmenu] checkIfRecognizedLauncher.err', err) | |
- return | |
- } | |
- | |
- var desktopFile = Requests.parseMetadata(data) | |
- checkIfSteamLauncher(desktopFile) | |
- checkIfLutrisLauncher(desktopFile) | |
- | |
- tileEditorPresetTiles.checkForPreset() | |
- }) | |
- } | |
- | |
- function checkIfSteamLauncher(desktopFile) { | |
- var steamCommandRegex = /steam steam:\/\/rungameid\/(\d+)/ | |
- var m = steamCommandRegex.exec(desktopFile['Exec']) | |
- if (m) { | |
- tileEditorPresetTiles.steamGameId = m[1] | |
- } else { | |
- tileEditorPresetTiles.steamGameId = '' // Reset | |
- } | |
- } | |
- | |
- function checkIfLutrisLauncher(desktopFile) { | |
- var lutrisCommandRegex = /lutris lutris:rungameid\/(\d+)/ | |
- var m1 = lutrisCommandRegex.exec(desktopFile['Exec']) | |
- var lutrisIconRegex = /^lutris_(.+)$/ | |
- var m2 = lutrisIconRegex.exec(desktopFile['Icon']) | |
- if (m1 && m2) { | |
- tileEditorPresetTiles.lutrisGameSlug = m2[1] | |
- } else { | |
- tileEditorPresetTiles.lutrisGameSlug = '' // Reset | |
- } | |
- } | |
- | |
- Connections { | |
- target: appObj | |
- | |
- onAppUrlChanged: { | |
- logger.debug('onAppUrlChanged', appObj.appUrl) | |
- tileEditorPresetTiles.steamGameId = '' | |
- tileEditorPresetTiles.checkForPreset() | |
- tileEditorPresetTiles.checkIfRecognizedLauncher() | |
- } | |
- } | |
- | |
- style: PlasmaStyles.GroupBoxStyle {} | |
- | |
- GridLayout { | |
- id: content | |
- anchors.left: parent.left | |
- anchors.right: parent.right | |
- columns: 2 | |
- | |
- //--- Steam | |
- // 4x2 | |
- TileEditorPresetTileButton { | |
- filename: 'steam_' + steamGameId + '_4x2.jpg' | |
- property string tileImageUrl: 'https://steamcdn-a.akamaihd.net/steam/apps/' + steamGameId + '/header.jpg' | |
- source: isSteamGameLauncher ? tileImageUrl : '' | |
- w: 4 | |
- h: 2 | |
- } | |
- | |
- // 3x1 | |
- TileEditorPresetTileButton { | |
- filename: 'steam_' + steamGameId + '_3x1.jpg' | |
- property string tileImageUrl: 'https://steamcdn-a.akamaihd.net/steam/apps/' + steamGameId + '/capsule_184x69.jpg' | |
- source: isSteamGameLauncher ? tileImageUrl : '' | |
- w: 3 | |
- h: 1 | |
- } | |
- | |
- // 5x3 or 3x2 | |
- TileEditorPresetTileButton { | |
- filename: 'steam_' + steamGameId + '_5x3.jpg' | |
- property string tileImageUrl: 'https://steamcdn-a.akamaihd.net/steam/apps/' + steamGameId + '/capsule_616x353.jpg' | |
- source: isSteamGameLauncher ? tileImageUrl : '' | |
- w: 3 | |
- h: 2 | |
- } | |
- | |
- // 5x2 or 2x1 | |
- TileEditorPresetTileButton { | |
- filename: 'lutris_' + lutrisGameSlug + '_2x1.jpg' | |
- property string tileImageUrl: '/home/' + kuser.loginName + '/.local/share/lutris/banners/' + lutrisGameSlug + '.jpg' | |
- source: (isLutrisGameLauncher && kuser.loginName) ? tileImageUrl : '' | |
- w: 2 | |
- h: 1 | |
- } | |
- } | |
-} | |
diff --git a/package/contents/ui/TileEditorRectField.qml b/package/contents/ui/TileEditorRectField.qml | |
deleted file mode 100644 | |
index 7c5f9147..00000000 | |
--- a/package/contents/ui/TileEditorRectField.qml | |
+++ /dev/null | |
@@ -1,90 +0,0 @@ | |
-import QtQuick 2.2 | |
-import QtQuick.Window 2.1 | |
-import QtQuick.Controls 1.2 | |
-import QtQuick.Layouts 1.0 | |
-import QtQuick.Dialogs 1.0 | |
- | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.plasma.extras 2.0 as PlasmaExtras | |
- | |
-import "lib" | |
- | |
-GroupBox { | |
- id: tileEditorRectField | |
- title: "Label" | |
- implicitWidth: parent.implicitWidth | |
- Layout.fillWidth: true | |
- | |
- // readonly property int xLeft: tileGrid.columns - (appObj.tileX + appObj.tileW) | |
- | |
- style: GroupBoxStyle {} | |
- | |
- RowLayout { | |
- anchors.fill: parent | |
- | |
- ColumnLayout { | |
- Layout.fillWidth: true | |
- | |
- RowLayout { | |
- PlasmaComponents.Label { text: "x:" } | |
- TileEditorSpinBox { | |
- key: 'x' | |
- minimumValue: 0 | |
- // maximumValue: tileGrid.columns - (appObj.tile && appObj.tile.w-1 || 0) | |
- // maximumValue: appObj.tileX + tileEditorRectField.xLeft | |
- } | |
- } | |
- RowLayout { | |
- PlasmaComponents.Label { text: "y:" } | |
- TileEditorSpinBox { | |
- key: 'y' | |
- minimumValue: 0 | |
- } | |
- } | |
- RowLayout { | |
- PlasmaComponents.Label { text: "w:" } | |
- TileEditorSpinBox { | |
- key: 'w' | |
- minimumValue: 1 | |
- // maximumValue: tileGrid.columns - (appObj.tile && appObj.tile.x || 0) | |
- // maximumValue: appObj.tileW + tileEditorRectField.xLeft | |
- } | |
- } | |
- RowLayout { | |
- PlasmaComponents.Label { text: "h:" } | |
- TileEditorSpinBox { | |
- key: 'h' | |
- minimumValue: 1 | |
- } | |
- } | |
- } | |
- | |
- GridLayout { | |
- id: resizeGrid | |
- Layout.fillWidth: true | |
- rows: 4 | |
- columns: 4 | |
- | |
- Repeater { | |
- model: resizeGrid.rows * resizeGrid.columns | |
- | |
- PlasmaComponents.Button { | |
- Layout.fillWidth: true | |
- implicitWidth: 20 | |
- property int w: (modelData % resizeGrid.columns) + 1 | |
- property int h: Math.floor(modelData / resizeGrid.columns) + 1 | |
- text: '' + w + 'x' + h | |
- checked: w <= appObj.tileW && h <= appObj.tileH | |
- // enabled: w - appObj.tileW <= tileEditorRectField.xLeft | |
- onClicked: { | |
- appObj.tile.w = w | |
- appObj.tile.h = h | |
- appObj.tileChanged() | |
- tileGrid.tileModelChanged() | |
- } | |
- } | |
- } | |
- } | |
- } | |
-} | |
diff --git a/package/contents/ui/TileEditorSpinBox.qml b/package/contents/ui/TileEditorSpinBox.qml | |
deleted file mode 100644 | |
index ca144f0b..00000000 | |
--- a/package/contents/ui/TileEditorSpinBox.qml | |
+++ /dev/null | |
@@ -1,38 +0,0 @@ | |
-import QtQuick 2.2 | |
-import QtQuick.Window 2.1 | |
-import QtQuick.Controls 1.2 | |
-import QtQuick.Layouts 1.0 | |
-import QtQuick.Dialogs 1.0 | |
- | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.plasma.extras 2.0 as PlasmaExtras | |
- | |
-SpinBox { | |
- id: spinBox | |
- property string key: '' | |
- Layout.fillWidth: true | |
- implicitWidth: 20 | |
- Layout.minimumWidth: 20 | |
- value: appObj.tile && appObj.tile[key] || 0 | |
- property bool updateOnChange: false | |
- onValueChanged: { | |
- if (key && updateOnChange) { | |
- appObj.tile[key] = value | |
- appObj.tileChanged() | |
- tileGrid.tileModelChanged() | |
- } | |
- } | |
- | |
- Connections { | |
- target: appObj | |
- | |
- onTileChanged: { | |
- if (key && tile) { | |
- spinBox.updateOnChange = false | |
- spinBox.value = appObj.tile[key] || 0 | |
- spinBox.updateOnChange = true | |
- } | |
- } | |
- } | |
-} | |
diff --git a/package/contents/ui/TileEditorView.qml b/package/contents/ui/TileEditorView.qml | |
deleted file mode 100644 | |
index 925c4ad5..00000000 | |
--- a/package/contents/ui/TileEditorView.qml | |
+++ /dev/null | |
@@ -1,195 +0,0 @@ | |
-import QtQuick 2.2 | |
-import QtQuick.Window 2.1 | |
-import QtQuick.Controls 1.2 | |
-import QtQuick.Layouts 1.0 | |
-import QtQuick.Dialogs 1.0 | |
- | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.plasma.extras 2.0 as PlasmaExtras | |
-import org.kde.kquickcontrolsaddons 2.0 as KQuickAddons | |
- | |
-import "./config" | |
- | |
-ColumnLayout { | |
- id: tileEditorView | |
- Layout.alignment: Qt.AlignTop | |
- | |
- AppObject { | |
- id: appObj | |
- } | |
- property alias tile: appObj.tile | |
- | |
- function resetView() { | |
- tile = null | |
- } | |
- | |
- function resetTile() { | |
- delete appObj.tile.showIcon | |
- delete appObj.tile.showLabel | |
- delete appObj.tile.label | |
- delete appObj.tile.icon | |
- delete appObj.tile.backgroundColor | |
- delete appObj.tile.backgroundImage | |
- appObj.tileChanged() | |
- tileGrid.tileModelChanged() | |
- } | |
- | |
- | |
- RowLayout { | |
- PlasmaExtras.Heading { | |
- Layout.fillWidth: true | |
- level: 2 | |
- text: i18n("Edit Tile") | |
- } | |
- | |
- PlasmaComponents.Button { | |
- text: i18n("Reset Tile") | |
- onClicked: resetTile() | |
- } | |
- | |
- PlasmaComponents.Button { | |
- text: i18n("Close") | |
- onClicked: { | |
- tileEditorView.close() | |
- } | |
- } | |
- } | |
- | |
- | |
- ScrollView { | |
- id: scrollView | |
- Layout.fillHeight: true | |
- Layout.fillWidth: true | |
- | |
- readonly property int viewportWidth: viewport ? viewport.width : 0 | |
- | |
- ColumnLayout { | |
- id: scrollContent | |
- width: scrollView.viewportWidth | |
- | |
- TileEditorField { | |
- visible: appObj.isLauncher | |
- title: i18n("Url") | |
- key: 'url' | |
- } | |
- | |
- TileEditorField { | |
- id: labelField | |
- title: i18n("Label") | |
- placeholderText: appObj.appLabel | |
- key: 'label' | |
- checkedKey: 'showLabel' | |
- } | |
- | |
- TileEditorField { | |
- id: iconField | |
- title: i18n("Icon") | |
- // placeholderText: appObj.appIcon ? appObj.appIcon.toString() : '' | |
- key: 'icon' | |
- checkedKey: 'showIcon' | |
- checkedDefault: appObj.defaultShowIcon | |
- | |
- PlasmaComponents.Button { | |
- iconName: "document-open" | |
- onClicked: iconDialog.open() | |
- | |
- KQuickAddons.IconDialog { | |
- id: iconDialog | |
- onIconNameChanged: iconField.text = iconName | |
- } | |
- } | |
- } | |
- | |
- TileEditorField { | |
- id: backgroundImageField | |
- title: i18n("Background Image") | |
- key: 'backgroundImage' | |
- | |
- PlasmaComponents.Button { | |
- iconName: 'document-open' | |
- onClicked: imagePicker.open() | |
- | |
- FileDialog { | |
- id: imagePicker | |
- | |
- title: i18n("Choose an image") | |
- | |
- selectFolder: false | |
- selectMultiple: false | |
- | |
- nameFilters: [ i18n("Image Files (*.png *.jpg *.jpeg *.bmp *.svg *.svgz)") ] | |
- | |
- onFileUrlChanged: { | |
- backgroundImageField.text = fileUrl | |
- if (fileUrl) { | |
- labelField.checked = false | |
- iconField.checked = false | |
- } | |
- } | |
- } | |
- } | |
- } | |
- | |
- TileEditorPresetTiles { | |
- title: i18n("Preset Tiles") | |
- } | |
- | |
- TileEditorColorField { | |
- title: i18n("Background Color") | |
- placeholderText: config.defaultTileColor | |
- key: 'backgroundColor' | |
- } | |
- | |
- TileEditorRectField { | |
- title: i18n("Position / Size") | |
- } | |
- | |
- Item { // Consume the extra space below | |
- Layout.fillHeight: true | |
- } | |
- } | |
- } | |
- | |
- function show() { | |
- if (stackView.currentItem != tileEditorView) { | |
- stackView.push(tileEditorView, true) | |
- } | |
- } | |
- | |
- function open(tile) { | |
- resetView() | |
- tileEditorView.tile = tile | |
- show() | |
- } | |
- | |
- function close() { | |
- searchView.showDefaultView() | |
- } | |
- | |
- | |
- Connections { | |
- target: stackView | |
- | |
- onCurrentItemChanged: { | |
- if (stackView.currentItem != tileEditorView) { | |
- tileEditorView.resetView() | |
- } | |
- } | |
- } | |
- | |
- | |
- Connections { | |
- target: config.tileModel | |
- | |
- onLoaded: { | |
- // Base64JsonString.save() will create a new JavaScript array [], | |
- // and our current tile {} reference will be incorrect, which breaks the tile editor. | |
- // We could keep a reference to the tile's index in the array, and make sure | |
- // the tile's url did not change, but there's no guarantee we won't overwrite data | |
- // during an Import, so just close the view. | |
- tileEditorView.close() | |
- } | |
- } | |
- | |
-} | |
diff --git a/package/contents/ui/TileGrid.qml b/package/contents/ui/TileGrid.qml | |
deleted file mode 100644 | |
index 7565cd52..00000000 | |
--- a/package/contents/ui/TileGrid.qml | |
+++ /dev/null | |
@@ -1,669 +0,0 @@ | |
-import QtQuick 2.0 | |
-import QtQuick.Controls 1.1 | |
-import QtQuick.Controls.Styles 1.1 | |
-import QtQuick.Layouts 1.1 | |
-import QtQuick.Window 2.1 | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.draganddrop 2.0 as DragAndDrop | |
-import org.kde.plasma.private.kicker 0.1 as Kicker | |
-import org.kde.kquickcontrolsaddons 2.0 | |
- | |
-// MouseArea { | |
-DragAndDrop.DropArea { | |
- id: tileGrid | |
- | |
- // hoverEnabled: true | |
- property bool isDragging: cellRepeater.dropping | |
- | |
- property int cellSize: 60 * units.devicePixelRatio | |
- property real cellMargin: 3 * units.devicePixelRatio | |
- property real cellPushedMargin: 6 * units.devicePixelRatio | |
- property int cellBoxSize: cellMargin + cellSize + cellMargin | |
- property int hoverOutlineSize: 2 * units.devicePixelRatio | |
- | |
- property int minColumns: Math.floor(width / cellBoxSize) | |
- property int minRows: Math.floor(height / cellBoxSize) | |
- | |
- property int maxColumn: 0 | |
- property int maxRow: 0 | |
- property int maxWidth: 0 | |
- property int maxHeight: 0 | |
- property int columns: Math.max(minColumns, maxColumn) | |
- property int rows: Math.max(minRows, maxRow) | |
- | |
- property var addedItem: null | |
- readonly property bool adding: addedItem | |
- property int draggedIndex: -1 | |
- readonly property var draggedItem: draggedIndex >= 0 ? tileModel[draggedIndex] : null | |
- property bool editing: isDragging && draggedItem || adding | |
- property int dropHoverX: -1 | |
- property int dropHoverY: -1 | |
- property int dropOffsetX: 0 | |
- property int dropOffsetY: 0 | |
- readonly property int dropWidth: draggedItem ? draggedItem.w : addedItem ? addedItem.w : 0 | |
- readonly property int dropHeight: draggedItem ? draggedItem.h : addedItem ? addedItem.h : 0 | |
- property bool canDrop: false | |
- function resetDragHover() { | |
- dropHoverX = -1 | |
- dropHoverY = -1 | |
- scrollUpArea.containsDrag = false | |
- scrollDownArea.containsDrag = false | |
- addedItem = null | |
- } | |
- function resetDrag() { | |
- resetDragHover() | |
- cellRepeater.dropping = false | |
- draggedIndex = -1 | |
- } | |
- function startDrag(index) { | |
- draggedIndex = index | |
- dropHoverX = draggedItem.x | |
- dropHoverY = draggedItem.y | |
- cellRepeater.dropping = true | |
- } | |
- | |
- function tileWithin(tile, x1, y1, x2, y2) { | |
- var tileX2 = tile.x + tile.w - 1 | |
- var tileY2 = tile.y + tile.h - 1 | |
- return (x1 <= tileX2 | |
- && tile.x <= x2 | |
- && y1 <= tileY2 | |
- && tile.y <= y2 | |
- ) | |
- } | |
- | |
- function getGroupAreaRect(groupTile) { | |
- var x1 = groupTile.x | |
- var x2 = groupTile.x + groupTile.w - 1 | |
- var y1 = groupTile.y + groupTile.h | |
- var y2 = 2000000 // maxint | |
- | |
- // Scan for other groups below this group | |
- // and adjust y2 to above that group. | |
- for (var i = 0; i < tileModel.length; i++) { | |
- var tile = tileModel[i] | |
- if (tile.tileType == "group" | |
- && tileWithin(tile, x1, y1, x2, y2) | |
- ) { | |
- y2 = tile.y - 1 | |
- // console.log('group found at y =', tile.y, 'y2 set to', y2) | |
- } | |
- } | |
- | |
- return { | |
- x1: x1, | |
- y1: y1, | |
- x2: x2, | |
- y2: y2, | |
- } | |
- } | |
- | |
- function moveGroup(groupTile, deltaX, deltaY) { | |
- var area = getGroupAreaRect(groupTile) | |
- | |
- // Move tiles below group label | |
- for (var i = 0; i < tileModel.length; i++) { | |
- var tile = tileModel[i] | |
- if (tileWithin(tile, area.x1, area.y1, area.x2, area.y2)) { | |
- tile.x += deltaX | |
- tile.y += deltaY | |
- } | |
- } | |
- | |
- // We call this in moveTile so no need to duplicate work. | |
- // tileGrid.tileModelChanged() | |
- } | |
- | |
- function moveTile(tile, cellX, cellY) { | |
- if (tile.tileType == "group") { | |
- moveGroup(tile, cellX - tile.x, cellY - tile.y) | |
- } | |
- tile.x = cellX | |
- tile.y = cellY | |
- tileGrid.tileModelChanged() | |
- } | |
- | |
- onDrop: { | |
- // console.log('onDrop', JSON.stringify(draggedItem)) | |
- if (draggedItem) { | |
- tileGrid.moveTile(draggedItem, dropHoverX, dropHoverY) | |
- tileGrid.resetDrag() | |
- // event.accept(Qt.MoveAction) | |
- } else if (addedItem) { | |
- addedItem.x = dropHoverX | |
- addedItem.y = dropHoverY | |
- tileGrid.tileModel.push(addedItem) | |
- tileGrid.tileModelChanged() | |
- tileGrid.resetDrag() | |
- } | |
- } | |
- function parseDropUrl(url) { | |
- var workingDir = Qt.resolvedUrl('.') | |
- var endsWithDesktop = url.indexOf('.desktop') === url.length - '.desktop'.length | |
- var isRelativeDesktopUrl = endsWithDesktop && ( | |
- url.indexOf(workingDir) === 0 | |
- // || url.indexOf('file:///usr/share/applications/') === 0 | |
- // || url.indexOf('/.local/share/applications/') >= 0 | |
- || url.indexOf('/share/applications/') >= 0 // 99% certain this desktop file should be accessed relatively. | |
- ) | |
- logger.debug('parseDropUrl', workingDir, endsWithDesktop, isRelativeDesktopUrl) | |
- logger.debug('onUrlDropped', 'url', url) | |
- if (isRelativeDesktopUrl) { | |
- // Remove the path because .favoriteId is just the file name. | |
- // However passing the favoriteId in mimeData.url will prefix the current QML path because it's a QUrl. | |
- var tokens = url.toString().split('/') | |
- var favoriteId = tokens[tokens.length-1] | |
- logger.debug('isRelativeDesktopUrl', tokens, favoriteId) | |
- return favoriteId | |
- } else { | |
- return url | |
- } | |
- } | |
- | |
- function dragTick(event) { | |
- var dragX = event.x + scrollView.flickableItem.contentX - dropOffsetX | |
- var dragY = event.y + scrollView.flickableItem.contentY - dropOffsetY | |
- var modelX = Math.floor(dragX / cellBoxSize) | |
- var modelY = Math.floor(dragY / cellBoxSize) | |
- // console.log('onDragMove', event.x, event.y, modelX, modelY) | |
- scrollUpArea.checkContains(event) | |
- scrollDownArea.checkContains(event) | |
- | |
- if (draggedItem) { | |
- } else if (addedItem) { | |
- } else if (event && event.mimeData && event.mimeData.url) { | |
- var url = event.mimeData.url.toString() | |
- // console.log('new addedItem', event.mimeData.url, url) | |
- url = parseDropUrl(url) | |
- | |
- addedItem = newTile(url) | |
- dropHoverX = modelX | |
- dropHoverY = modelY | |
- } else { | |
- return | |
- } | |
- | |
- dropHoverX = Math.max(0, Math.min(modelX, columns - dropWidth)) | |
- dropHoverY = Math.max(0, modelY) | |
- canDrop = !hits(dropHoverX, dropHoverY, dropWidth, dropHeight) | |
- } | |
- onDragEnter: dragTick(event) | |
- onDragMove: dragTick(event) | |
- onDragLeave: { | |
- // console.log('onExited') | |
- resetDragHover() | |
- } | |
- | |
- property var hitBox: [] // hitBox[y][x] | |
- function updateSize() { | |
- var c = 0; | |
- var r = 0; | |
- var w = 1; | |
- var h = 1; | |
- for (var i = 0; i < tileModel.length; i++) { | |
- var tile = tileModel[i] | |
- c = Math.max(c, tile.x + tile.w) | |
- r = Math.max(r, tile.y + tile.h) | |
- w = Math.max(w, tile.w) | |
- h = Math.max(h, tile.h) | |
- } | |
- // Add extra rows when dragging so we can drop scrolled down | |
- if (draggedItem) { | |
- // c += draggedItem.w | |
- r += draggedItem.h | |
- } | |
- | |
- // Rebuild hitBox | |
- var hbColumns = Math.max(minColumns, c) | |
- var hbRows = Math.max(minRows, r) | |
- var hb = new Array(hbRows) | |
- for (var i = 0; i < hbRows; i++) { | |
- hb[i] = new Array(hbColumns) | |
- } | |
- for (var i = 0; i < tileModel.length; i++) { | |
- var tile = tileModel[i] | |
- if (i == draggedIndex) { | |
- continue; | |
- } | |
- for (var j = tile.y; j < tile.y + tile.h; j++) { | |
- for (var k = tile.x; k < tile.x + tile.w; k++) { | |
- hb[j][k] = true | |
- } | |
- } | |
- } | |
- | |
- // Update Properties | |
- hitBox = hb | |
- maxColumn = c | |
- maxRow = r | |
- maxWidth = w | |
- maxHeight = h | |
- } | |
- function update() { | |
- var urlList = [] | |
- for (var i = 0; i < tileModel.length; i++) { | |
- var tile = tileModel[i] | |
- if (tile.url) { | |
- urlList.push(tile.url) | |
- } | |
- } | |
- appsModel.tileGridModel.favorites = urlList | |
- updateSize() | |
- } | |
- onDraggedItemChanged: update() | |
- onTileModelChanged: update() | |
- property var tileModel: [] | |
- | |
- | |
- function hits(x, y, w, h) { | |
- // console.log('hits', [columns,rows], [x,y,w,h], hitBox) | |
- for (var j = y; j < y + h; j++) { | |
- if (j < 0 || j >= hitBox.length) { | |
- continue; // Should we return true when out of bounds? | |
- } | |
- for (var k = x; k < x + w; k++) { | |
- if (k < 0 || k >= hitBox[j].length) { | |
- continue; // Should we return true when out of bounds? | |
- } | |
- if (hitBox[j][k]) { | |
- return true | |
- } | |
- } | |
- } | |
- return false | |
- } | |
- | |
- function getTileAt(cellX, cellY) { | |
- for (var i = 0; i < tileModel.length; i++) { | |
- var tile = tileModel[i] | |
- if (tileWithin(tile, cellX, cellY, cellX, cellY)) { | |
- return tile | |
- } | |
- } | |
- return null | |
- } | |
- | |
- function getTilesInArea(area) { | |
- var tileList = [] | |
- | |
- // Move tiles below group label | |
- for (var i = 0; i < tileModel.length; i++) { | |
- var tile = tileModel[i] | |
- if (tileWithin(tile, area.x1, area.y1, area.x2, area.y2)) { | |
- tileList.push(tile) | |
- } | |
- } | |
- | |
- // Sort results by y, then by x | |
- // tileList.sort(function(a, b) { | |
- // if (a.y == b.y) { | |
- // return b.x - a.x | |
- // } else { | |
- // return b.y - a.y | |
- // } | |
- // }) | |
- | |
- return tileList | |
- } | |
- | |
- function getTileLabel(tile) { | |
- if (tile.url) { | |
- var app = appsModel.tileGridModel.getApp(tile.url) | |
- var labelText = tile.label || app.display || app.url || "" | |
- return labelText | |
- } else { | |
- return "" | |
- } | |
- } | |
- function sortGroupTiles(groupTile) { | |
- var area = getGroupAreaRect(groupTile) | |
- var tileList = getTilesInArea(area) | |
- | |
- var cursorX = groupTile.x | |
- var cursorY = groupTile.y + groupTile.h | |
- var rowH = 0 | |
- tileList.sort(function(a, b) { | |
- var aLabel = getTileLabel(a) | |
- var bLabel = getTileLabel(b) | |
- return aLabel.localeCompare(bLabel) | |
- }) | |
- | |
- for (var i = 0; i < tileList.length; i++) { | |
- var tile = tileList[i] | |
- var tileX2 = cursorX + tile.w - 1 | |
- | |
- // If there's not enough room on this row | |
- if (tileX2 > area.x2) { | |
- // Move to the next row | |
- cursorX = groupTile.x | |
- cursorY += rowH | |
- } | |
- | |
- tile.x = cursorX | |
- tile.y = cursorY | |
- rowH = Math.max(rowH, tile.h) | |
- cursorX += tile.w | |
- } | |
- | |
- // We call this in moveTile so no need to duplicate work. | |
- tileGrid.tileModelChanged() | |
- } | |
- | |
- ScrollView { | |
- id: scrollView | |
- anchors.fill: parent | |
- | |
- readonly property int scrollTop: flickableItem ? flickableItem.contentY : 0 | |
- readonly property int scrollHeight: flickableItem ? flickableItem.contentHeight : 0 | |
- readonly property int scrollTopAtBottom: viewport ? scrollHeight - viewport.height : 0 | |
- readonly property bool scrollAtTop: scrollTop == 0 | |
- readonly property bool scrollAtBottom: scrollTop >= scrollTopAtBottom | |
- | |
- function scrollBy(deltaY) { | |
- if (flickableItem) { | |
- // console.log('scrollHeight', scrollTopAtBottom, scrollHeight, viewport.height) | |
- flickableItem.contentY = Math.max(0, Math.min(scrollTop + deltaY, scrollTopAtBottom)) | |
- } | |
- } | |
- | |
- __wheelAreaScrollSpeed: cellBoxSize | |
- style: ScrollViewStyle { | |
- transientScrollBars: true | |
- } | |
- | |
- Item { | |
- id: scrollItem | |
- | |
- width: columns * cellBoxSize | |
- height: rows * cellBoxSize | |
- | |
- // Rectangle { | |
- // anchors.fill: parent | |
- // color: "#88336699" | |
- // } | |
- | |
- Repeater { | |
- id: cellRepeater | |
- property int cellCount: columns * rows | |
- property bool dropping: false | |
- onCellCountChanged: { | |
- if (!dropping) { | |
- model = cellCount | |
- } | |
- } | |
- model: 0 | |
- | |
- Item { | |
- id: cellItem | |
- property int modelX: modelData % columns | |
- property int modelY: Math.floor(modelData / columns) | |
- x: modelX * cellBoxSize | |
- y: modelY * cellBoxSize | |
- width: cellBoxSize | |
- height: cellBoxSize | |
- | |
- readonly property bool hasDrag: tileGrid.editing && dropHoverX >= 0 && dropHoverY >= 0 | |
- readonly property bool tileHovered: (hasDrag | |
- && dropHoverX <= modelX && modelX < dropHoverX + dropWidth | |
- && dropHoverY <= modelY && modelY < dropHoverY + dropHeight | |
- ) | |
- | |
- readonly property bool isDraggingGroup: hasDrag && draggedItem && draggedItem.tileType == "group" | |
- readonly property bool groupAreaHovered: { | |
- if (isDraggingGroup) { | |
- var groupArea = getGroupAreaRect(draggedItem) | |
- return groupArea.x1 <= modelX && modelX <= groupArea.x2 | |
- && groupArea.y1 <= modelY && modelY <= groupArea.y2 | |
- } else { | |
- return false | |
- } | |
- } | |
- | |
- Rectangle { | |
- anchors.fill: parent | |
- anchors.margins: cellMargin | |
- color: { | |
- if (cellItem.tileHovered) { | |
- if (canDrop) { | |
- return "#88336699" | |
- } else { | |
- return "#88880000" | |
- } | |
- } else if (cellItem.groupAreaHovered) { | |
- return "#8848395d" // purple | |
- } else { | |
- return "transparent" | |
- } | |
- } | |
- border.width: 1 | |
- border.color: tileGrid.editing ? "#44000000" : "transparent" | |
- } | |
- | |
- MouseArea { | |
- anchors.fill: parent | |
- acceptedButtons: Qt.RightButton | |
- onClicked: { | |
- if (mouse.button == Qt.RightButton) { | |
- cellContextMenu.cellX = cellItem.modelX | |
- cellContextMenu.cellY = cellItem.modelY | |
- var pos = mapToItem(scrollItem, mouse.x, mouse.y) // cellContextMenu is a child of scrollItem | |
- cellContextMenu.open(pos.x, pos.y) | |
- } | |
- } | |
- | |
- } | |
- } | |
- } | |
- PlasmaComponents.ContextMenu { | |
- id: cellContextMenu | |
- property int cellX: -1 | |
- property int cellY: -1 | |
- | |
- PlasmaComponents.MenuItem { | |
- icon: "group-new" | |
- text: i18n("New Group") | |
- visible: !plasmoid.configuration.tilesLocked | |
- onClicked: { | |
- var tile = tileGrid.addGroup(cellContextMenu.cellX, cellContextMenu.cellY) | |
- tileGrid.editTile(tile) | |
- } | |
- } | |
- | |
- PlasmaComponents.MenuItem { | |
- icon: plasmoid.configuration.tilesLocked ? "object-unlocked" : "object-locked" | |
- text: plasmoid.configuration.tilesLocked ? i18n("Unlock Tiles") : i18n("Lock Tiles") | |
- onClicked: { | |
- plasmoid.configuration.tilesLocked = !plasmoid.configuration.tilesLocked | |
- } | |
- } | |
- } | |
- | |
- Repeater { | |
- id: tileModelRepeater | |
- model: tileModel | |
- // onCountChanged: console.log('onCountChanged', count) | |
- | |
- TileItem { | |
- id: tileItem | |
- } | |
- | |
- } | |
- } | |
- } | |
- | |
- /* Scroll on hover with drag */ | |
- property int scrollAreaTickDelta: cellBoxSize | |
- property int scrollAreaTickInterval: 200 | |
- property int scrollAreaSize: Math.min(cellBoxSize * 1.5, scrollView.height / 5) // 20vh or 90pt | |
- | |
- Item { | |
- id: scrollUpArea | |
- anchors.left: parent.left | |
- anchors.right: parent.right | |
- anchors.top: parent.top | |
- height: scrollAreaSize | |
- property bool active: !scrollView.scrollAtTop | |
- property bool containsDrag: false | |
- property bool ticking: active && containsDrag | |
- | |
- function checkContains(event) { | |
- containsDrag = scrollUpArea.contains(Qt.point(event.x, event.y)) | |
- } | |
- | |
- Timer { | |
- id: scrollUpTicker | |
- interval: scrollAreaTickInterval | |
- repeat: true | |
- running: parent.ticking | |
- onTriggered: { | |
- scrollView.scrollBy(-scrollAreaTickDelta) | |
- } | |
- } | |
- | |
- Rectangle { | |
- anchors.fill: parent | |
- opacity: parent.ticking ? 1 : 0 | |
- gradient: Gradient { | |
- GradientStop { position: 0.0; color: theme.highlightColor } | |
- GradientStop { position: 0.3; color: "transparent" } | |
- } | |
- } | |
- } | |
- | |
- Item { | |
- id: scrollDownArea | |
- anchors.left: parent.left | |
- anchors.right: parent.right | |
- anchors.bottom: parent.bottom | |
- height: scrollAreaSize | |
- property bool active: !scrollView.scrollAtBottom | |
- property bool containsDrag: false | |
- property bool ticking: active && containsDrag | |
- | |
- function checkContains(event) { | |
- var mouseY = event.y - (parent.height - height) | |
- containsDrag = scrollDownArea.contains(Qt.point(event.x, mouseY)) | |
- } | |
- | |
- Timer { | |
- id: scrollDownTicker | |
- interval: scrollAreaTickInterval | |
- repeat: true | |
- running: parent.ticking | |
- onTriggered: { | |
- scrollView.scrollBy(scrollAreaTickDelta) | |
- } | |
- } | |
- | |
- Rectangle { | |
- anchors.fill: parent | |
- opacity: parent.ticking ? 1 : 0 | |
- gradient: Gradient { | |
- GradientStop { position: 0.7; color: "transparent" } | |
- GradientStop { position: 1.0; color: theme.highlightColor } | |
- } | |
- } | |
- } | |
- | |
- function newTile(url) { | |
- return { | |
- "x": 0, | |
- "y": 0, | |
- "w": 2, | |
- "h": 2, | |
- "url": url, | |
- } | |
- } | |
- | |
- function removeIndex(i) { | |
- tileModel.splice(i, 1) // remove 1 item at index | |
- tileModelChanged() | |
- } | |
- | |
- function removeApp(url) { | |
- var removedCount = 0 | |
- for (var i = tileModel.length - 1; i >= 0; i--) { | |
- var tile = tileModel[i] | |
- if (tile.url == url) { | |
- removedCount += 1 | |
- tileModel.splice(i, 1) // remove 1 item at index | |
- } | |
- } | |
- if (removedCount > 0) { | |
- tileModelChanged() | |
- } | |
- } | |
- | |
- function addTile(tile) { | |
- tileModel.push(tile) | |
- tileModelChanged() | |
- } | |
- | |
- function findOpenPos(w, h) { | |
- for (var y = 0; y < rows; y++) { | |
- for (var x = 0; x < columns - (w-1); x++) { | |
- if (hits(x, y, w, h)) | |
- continue | |
- | |
- // Room open for | |
- return { | |
- x: x, | |
- y: y, | |
- } | |
- } | |
- } | |
- | |
- // Current grid has no room. | |
- // Add to new row. | |
- return { | |
- x: 0, | |
- y: rows | |
- } | |
- } | |
- | |
- function parseTileXY(tile, x, y) { | |
- if (typeof x !== "undefined" && typeof y !== "undefined") { | |
- tile.x = x | |
- tile.y = y | |
- } else { | |
- var openPos = findOpenPos(tile.w, tile.h) | |
- tile.x = openPos.x | |
- tile.y = openPos.y | |
- } | |
- } | |
- function addApp(url, x, y) { | |
- var tile = newTile(url) | |
- parseTileXY(tile, x, y) | |
- tileModel.push(tile) | |
- tileModelChanged() | |
- return tile | |
- } | |
- | |
- function hasAppTile(url) { | |
- for (var i = 0; i < tileModel.length; i++) { | |
- var tile = tileModel[i] | |
- if (tile.url == url) { | |
- return true | |
- } | |
- } | |
- return false | |
- } | |
- | |
- function limit(minValue, value, maxValue) { | |
- return Math.max(minValue, Math.min(value, maxValue)) | |
- } | |
- function addGroup(x, y) { | |
- var tile = newTile("") | |
- parseTileXY(tile, x, y) | |
- tile.tileType = "group" | |
- tile.label = i18nc("default group label", "Group") | |
- tile.w = limit(2, columns-x, 6) // 6 unless we have less columns. | |
- tile.h = 1 | |
- tileModel.push(tile) | |
- tileModelChanged() | |
- return tile | |
- } | |
- | |
- signal editTile(var tile) | |
-} | |
diff --git a/package/contents/ui/TileItem.qml b/package/contents/ui/TileItem.qml | |
deleted file mode 100644 | |
index 8976fa26..00000000 | |
--- a/package/contents/ui/TileItem.qml | |
+++ /dev/null | |
@@ -1,144 +0,0 @@ | |
-import QtQuick 2.0 | |
-import QtQuick.Controls 1.1 | |
-import QtQuick.Controls.Styles 1.1 | |
-import QtQuick.Layouts 1.1 | |
-import QtQuick.Window 2.1 | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.draganddrop 2.0 as DragAndDrop | |
-import QtGraphicalEffects 1.0 | |
- | |
-Item { | |
- id: tileItem | |
- x: modelData.x * cellBoxSize | |
- y: modelData.y * cellBoxSize | |
- width: modelData.w * cellBoxSize | |
- height: modelData.h * cellBoxSize | |
- | |
- AppObject { | |
- id: appObj | |
- tile: modelData | |
- } | |
- readonly property alias app: appObj.app | |
- | |
- readonly property bool faded: tileGrid.editing || tileMouseArea.isLeftPressed | |
- readonly property int fadedWidth: width - cellPushedMargin | |
- opacity: faded ? 0.75 : 1 | |
- scale: faded ? fadedWidth / width : 1 | |
- Behavior on opacity { NumberAnimation { duration: 200 } } | |
- Behavior on scale { NumberAnimation { duration: 200 } } | |
- | |
- //--- View Start | |
- TileItemView { | |
- id: tileItemView | |
- anchors.fill: parent | |
- anchors.margins: cellMargin | |
- width: modelData.w * cellBoxSize | |
- height: modelData.h * cellBoxSize | |
- readonly property int minSize: Math.min(width, height) | |
- readonly property int maxSize: Math.max(width, height) | |
- hovered: tileMouseArea.containsMouse | |
- } | |
- | |
- HoverOutlineEffect { | |
- id: hoverOutlineEffect | |
- anchors.fill: parent | |
- anchors.margins: cellMargin | |
- hoverRadius: { | |
- if (appObj.isGroup) { | |
- return tileItemView.maxSize | |
- } else { | |
- return tileItemView.minSize | |
- } | |
- } | |
- hoverOutlineSize: tileGrid.hoverOutlineSize | |
- property alias control: tileMouseArea | |
- } | |
- | |
- //--- View End | |
- | |
- DragAndDrop.DragArea { | |
- anchors.fill: parent | |
- enabled: !plasmoid.configuration.tilesLocked | |
- delegate: tileItemView | |
- onDragStarted: { | |
- console.log('onDragStarted', JSON.stringify(modelData), index, tileModel.length) | |
- // tileGrid.draggedItem = tileModel.splice(index, 1)[0] | |
- tileGrid.startDrag(index) | |
- tileGrid.dropOffsetX = Math.floor(tileMouseArea.pressX / cellBoxSize) * cellBoxSize | |
- tileGrid.dropOffsetY = Math.floor(tileMouseArea.pressY / cellBoxSize) * cellBoxSize | |
- } | |
- onDrop: { | |
- console.log('DragArea.onDrop', draggedItem) | |
- tileGrid.resetDrag() | |
- } | |
- | |
- MouseArea { | |
- id: tileMouseArea | |
- anchors.fill: parent | |
- hoverEnabled: true | |
- acceptedButtons: Qt.LeftButton | Qt.RightButton | |
- cursorShape: editing ? Qt.ClosedHandCursor : Qt.ArrowCursor | |
- readonly property bool isLeftPressed: pressedButtons & Qt.LeftButton | |
- | |
- property int pressX: -1 | |
- property int pressY: -1 | |
- onPressed: { | |
- pressX = mouse.x | |
- pressY = mouse.y | |
- } | |
- | |
- // This MouseArea will spam "QQuickItem::ungrabMouse(): Item is not the mouse grabber." | |
- // but there's no other way of having a clickable drag area. | |
- onClicked: { | |
- mouse.accepted = true | |
- tileGrid.resetDrag() | |
- if (mouse.button == Qt.LeftButton) { | |
- if (tileEditorView && tileEditorView.tile) { | |
- openTileEditor() | |
- } else { | |
- appsModel.tileGridModel.runApp(modelData.url) | |
- } | |
- } else if (mouse.button == Qt.RightButton) { | |
- contextMenu.open(mouse.x, mouse.y) | |
- } | |
- } | |
- } | |
- } | |
- | |
- AppContextMenu { | |
- id: contextMenu | |
- tileIndex: index | |
- onPopulateMenu: { | |
- if (!plasmoid.configuration.tilesLocked) { | |
- menu.addPinToMenuAction(modelData.url) | |
- } | |
- | |
- appObj.addActionList(menu) | |
- | |
- if (!plasmoid.configuration.tilesLocked) { | |
- if (modelData.tileType == "group") { | |
- var menuItem = menu.newMenuItem() | |
- menuItem.text = i18n("Sort Tiles") | |
- menuItem.icon = 'sort-name' | |
- menuItem.onClicked.connect(function(){ | |
- tileGrid.sortGroupTiles(modelData) | |
- }) | |
- } | |
- var menuItem = menu.newMenuItem() | |
- menuItem.text = i18n("Edit Tile") | |
- menuItem.icon = 'rectangle-shape' | |
- menuItem.onClicked.connect(function(){ | |
- tileItem.openTileEditor() | |
- }) | |
- } | |
- } | |
- } | |
- | |
- function openTileEditor() { | |
- tileGrid.editTile(tileGrid.tileModel[index]) | |
- } | |
- function closeTileEditor() { | |
- | |
- } | |
-} | |
diff --git a/package/contents/ui/TileItemView.qml b/package/contents/ui/TileItemView.qml | |
deleted file mode 100644 | |
index 562140ac..00000000 | |
--- a/package/contents/ui/TileItemView.qml | |
+++ /dev/null | |
@@ -1,95 +0,0 @@ | |
-import QtQuick 2.0 | |
-import QtQuick.Controls 1.1 | |
-import QtQuick.Controls.Styles 1.1 | |
-import QtQuick.Layouts 1.1 | |
-import QtQuick.Window 2.1 | |
-import org.kde.plasma.core 2.0 as PlasmaCore | |
-import org.kde.plasma.components 2.0 as PlasmaComponents | |
-import org.kde.draganddrop 2.0 as DragAndDrop | |
- | |
-Rectangle { | |
- id: tileItemView | |
- color: appObj.backgroundColor | |
- | |
- readonly property int tilePadding: 4 * units.devicePixelRatio | |
- readonly property int smallIconSize: 32 * units.devicePixelRatio | |
- readonly property int mediumIconSize: 72 * units.devicePixelRatio | |
- readonly property int largeIconSize: 96 * units.devicePixelRatio | |
- | |
- readonly property int tileLabelAlignment: config.tileLabelAlignment | |
- | |
- property bool hovered: false | |
- | |
- states: [ | |
- State { | |
- when: modelData.w == 1 && modelData.h >= 1 | |
- PropertyChanges { target: icon; size: smallIconSize } | |
- PropertyChanges { target: label; visible: false } | |
- }, | |
- State { | |
- when: modelData.w >= 2 && modelData.h == 1 | |
- AnchorChanges { target: icon | |
- anchors.horizontalCenter: undefined | |
- anchors.left: tileItemView.left | |
- } | |
- PropertyChanges { target: icon; anchors.leftMargin: tilePadding } | |
- PropertyChanges { target: label | |
- verticalAlignment: Text.AlignVCenter | |
- } | |
- AnchorChanges { target: label | |
- anchors.left: icon.right | |
- } | |
- }, | |
- State { | |
- when: (modelData.w >= 2 && modelData.h == 2) || (modelData.w == 2 && modelData.h >= 2) | |
- PropertyChanges { target: icon; size: mediumIconSize } | |
- }, | |
- State { | |
- when: modelData.w >= 3 && modelData.h >= 3 | |
- PropertyChanges { target: icon; size: largeIconSize } | |
- } | |
- ] | |
- | |
- Image { | |
- id: backgroundImage | |
- anchors.fill: parent | |
- visible: appObj.backgroundImage | |
- source: appObj.backgroundImage | |
- fillMode: Image.PreserveAspectCrop | |
- asynchronous: true | |
- } | |
- | |
- PlasmaCore.IconItem { | |
- id: icon | |
- visible: appObj.showIcon | |
- source: appObj.iconSource | |
- anchors.verticalCenter: parent.verticalCenter | |
- anchors.horizontalCenter: parent.horizontalCenter | |
- // property int size: 72 // Just a default, overriden in State change | |
- property int size: Math.min(parent.width, parent.height) / 2 | |
- width: appObj.showIcon ? size : 0 | |
- height: appObj.showIcon ? size : 0 | |
- anchors.fill: appObj.iconFill ? parent : null | |
- smooth: appObj.iconFill | |
- } | |
- | |
- PlasmaComponents.Label { | |
- id: label | |
- visible: appObj.showLabel | |
- text: appObj.labelText | |
- anchors.top: parent.top | |
- anchors.bottom: parent.bottom | |
- anchors.leftMargin: tilePadding | |
- anchors.rightMargin: tilePadding | |
- anchors.left: parent.left | |
- anchors.right: parent.right | |
- wrapMode: Text.Wrap | |
- horizontalAlignment: tileLabelAlignment | |
- verticalAlignment: Text.AlignBottom | |
- width: parent.width | |
- font.pointSize: 10 | |
- renderType: Text.QtRendering // Fix pixelation when scaling. Plasma.Label uses NativeRendering. | |
- style: Text.Outline | |
- styleColor: tileItemView.color | |
- } | |
-} | |
diff --git a/package/contents/ui/config/ConfigExportLayout.qml b/package/contents/ui/config/ConfigExportLayout.qml | |
index 86aab87e..3385bf85 100644 | |
--- a/package/contents/ui/config/ConfigExportLayout.qml | |
+++ b/package/contents/ui/config/ConfigExportLayout.qml | |
@@ -15,15 +15,7 @@ ColumnLayout { | |
id: exportData | |
Layout.fillHeight: true | |
- Base64JsonString { | |
- id: configTileModel | |
- configKey: 'tileModel' | |
- writing: exportData.base64JsonString.writing | |
- defaultValue: [] | |
- } | |
- | |
property var ignoredKeys: [ | |
- 'tileScale', | |
'searchResultsReversed', | |
'searchResultsCustomSort', | |
] | |
@@ -40,11 +32,7 @@ ColumnLayout { | |
if (ignoredKeys.indexOf(configKey) >= 0) { | |
continue | |
} | |
- if (configKey == 'tileModel') { | |
- data.tileModel = configTileModel.value | |
- } else { | |
- data[configKey] = configValue | |
- } | |
+ data[configKey] = configValue | |
} | |
return data | |
} | |
@@ -61,12 +49,8 @@ ColumnLayout { | |
if (ignoredKeys.indexOf(configKey) >= 0) { | |
continue | |
} | |
- if (configKey == 'tileModel') { | |
- configTileModel.set(propValue) | |
- } else { | |
- if (plasmoid.configuration[configKey] != propValue) { | |
- plasmoid.configuration[configKey] = propValue | |
- } | |
+ if (plasmoid.configuration[configKey] != propValue) { | |
+ plasmoid.configuration[configKey] = propValue | |
} | |
} | |
} | |
diff --git a/package/contents/ui/config/ConfigGeneral.qml b/package/contents/ui/config/ConfigGeneral.qml | |
index 89857d14..fa2dfd23 100644 | |
--- a/package/contents/ui/config/ConfigGeneral.qml | |
+++ b/package/contents/ui/config/ConfigGeneral.qml | |
@@ -53,20 +53,6 @@ ConfigPage { | |
XdgPathsLoader { id: xdgPathsLoader } | |
- ConfigSection { | |
- label: i18n("Popup") | |
- | |
- ConfigCheckBox { | |
- text: i18n("Fullscreen") | |
- configKey: 'fullscreen' | |
- } | |
- | |
- ConfigSpinBox { | |
- configKey: 'favGridCols' | |
- before: i18n("Grid Columns") | |
- } | |
- } | |
- | |
ConfigSection { | |
label: i18n("Panel Icon") | |
@@ -81,95 +67,6 @@ ConfigPage { | |
} | |
} | |
- ExclusiveGroup { id: tilesThemeGroup } | |
- ConfigSection { | |
- label: i18n("Tiles") | |
- | |
- RowLayout { | |
- visible: false | |
- ConfigSpinBox { | |
- configKey: 'tileScale' | |
- before: i18n("Tile Size") | |
- suffix: 'x' | |
- minimumValue: 0.1 | |
- maximumValue: 4 | |
- decimals: 1 | |
- } | |
- Label { | |
- text: '' + config.cellBoxSize + i18n("px") | |
- } | |
- } | |
- ConfigSpinBox { | |
- configKey: 'tileMargin' | |
- before: i18n("Tile Margin") | |
- suffix: i18n("px") | |
- minimumValue: 0 | |
- maximumValue: config.cellBoxUnits/2 | |
- } | |
- RadioButton { | |
- visible: false | |
- text: i18n("Desktop Theme (%1)", theme.themeName) | |
- exclusiveGroup: tilesThemeGroup | |
- checked: false | |
- enabled: false | |
- } | |
- RowLayout { | |
- RadioButton { | |
- id: defaultTileColorRadioButton | |
- text: i18n("Custom Color") | |
- exclusiveGroup: tilesThemeGroup | |
- checked: true | |
- } | |
- ConfigColor { | |
- id: defaultTileColorColor | |
- label: "" | |
- configKey: 'defaultTileColor' | |
- } | |
- } | |
- RadioButton { | |
- text: i18n("Transparent") | |
- exclusiveGroup: tilesThemeGroup | |
- onClicked: { | |
- defaultTileColorColor.setValue("#00000000") | |
- defaultTileColorRadioButton.checked = true | |
- } | |
- } | |
- ConfigComboBox { | |
- configKey: "tileLabelAlignment" | |
- label: i18n("Text Alignment") | |
- model: [ | |
- { value: "left", text: i18n("Left") }, | |
- { value: "center", text: i18n("Center") }, | |
- { value: "right", text: i18n("Right") }, | |
- ] | |
- } | |
- } | |
- | |
- ExclusiveGroup { id: sidebarThemeGroup } | |
- ConfigSection { | |
- label: i18n("Sidebar") | |
- | |
- RadioButton { | |
- text: i18n("Desktop Theme (%1)", theme.themeName) | |
- exclusiveGroup: sidebarThemeGroup | |
- checked: plasmoid.configuration.sidebarFollowsTheme | |
- onClicked: plasmoid.configuration.sidebarFollowsTheme = true | |
- } | |
- RowLayout { | |
- RadioButton { | |
- text: i18n("Custom Color") | |
- exclusiveGroup: sidebarThemeGroup | |
- checked: !plasmoid.configuration.sidebarFollowsTheme | |
- onClicked: plasmoid.configuration.sidebarFollowsTheme = false | |
- } | |
- ConfigColor { | |
- label: "" | |
- configKey: 'sidebarBackgroundColor' | |
- } | |
- } | |
- | |
- } | |
- | |
ConfigSection { | |
label: i18n("Sidebar Shortcuts") | |
@@ -261,32 +158,6 @@ ConfigPage { | |
} | |
} | |
- | |
- ExclusiveGroup { id: searchBoxThemeGroup } | |
- ConfigSection { | |
- label: i18n("Search Box") | |
- | |
- ConfigSpinBox { | |
- configKey: 'searchFieldHeight' | |
- before: i18n("Search Field Height") | |
- suffix: i18n("px") | |
- minimumValue: 0 | |
- } | |
- | |
- RadioButton { | |
- text: i18n("Desktop Theme (%1)", theme.themeName) | |
- exclusiveGroup: searchBoxThemeGroup | |
- checked: plasmoid.configuration.searchFieldFollowsTheme | |
- onClicked: plasmoid.configuration.searchFieldFollowsTheme = true | |
- } | |
- RadioButton { | |
- text: i18n("Windows (White)") | |
- exclusiveGroup: searchBoxThemeGroup | |
- checked: !plasmoid.configuration.searchFieldFollowsTheme | |
- onClicked: plasmoid.configuration.searchFieldFollowsTheme = false | |
- } | |
- } | |
- | |
ConfigSection { | |
label: i18n("App List") | |
@@ -307,28 +178,9 @@ ConfigPage { | |
{ value: "Categories", text: i18n("Categories") }, | |
{ value: "JumpToLetter", text: i18n("Jump To Letter") }, | |
{ value: "JumpToCategory", text: i18n("Jump To Category") }, | |
- { value: "TilesOnly", text: i18n("Tiles Only") }, | |
] | |
} | |
- ConfigComboBox { | |
- id: appDescriptionControl | |
- configKey: "appDescription" | |
- label: i18n("App Description") | |
- model: [ | |
- { value: "hidden", text: i18n("Hidden") }, | |
- { value: "after", text: i18n("After") }, | |
- { value: "below", text: i18n("Below") }, | |
- ] | |
- onValueChanged: { | |
- if (value == "below") { | |
- if (menuItemHeightControl.value <= 36) { // Smaller than 2 lines of text | |
- menuItemHeightControl.value = 36 | |
- } | |
- } | |
- } | |
- } | |
- | |
RowLayout { | |
ConfigCheckBox { | |
id: showRecentAppsCheckBox | |
@@ -353,22 +205,6 @@ ConfigPage { | |
] | |
} | |
} | |
- | |
- ConfigSpinBox { | |
- id: menuItemHeightControl | |
- configKey: 'menuItemHeight' | |
- before: i18n("Icon Size") | |
- suffix: i18n("px") | |
- minimumValue: 18 // 1 line of text | |
- maximumValue: 128 | |
- onValueChanged: { | |
- if (value < 36) { // Smaller than 2 lines of text | |
- if (appDescriptionControl.value == "below") { | |
- appDescriptionControl.setValue("after") | |
- } | |
- } | |
- } | |
- } | |
} | |
ExclusiveGroup { id: searchResultsMergedGroup } | |
diff --git a/package/contents/ui/lib/ConfigPage.qml b/package/contents/ui/lib/ConfigPage.qml | |
index 5bff0156..36425d5b 100644 | |
--- a/package/contents/ui/lib/ConfigPage.qml | |
+++ b/package/contents/ui/lib/ConfigPage.qml | |
@@ -14,6 +14,7 @@ Item { | |
anchors.left: parent.left | |
anchors.right: parent.right | |
anchors.top: parent.top | |
+ spacing: units.largeSpacing | |
// Workaround for crash when using default on a Layout. | |
// https://bugreports.qt.io/browse/QTBUG-52490 | |
diff --git a/package/contents/ui/lib/ConfigSection.qml b/package/contents/ui/lib/ConfigSection.qml | |
index a881ef56..2dc39ba2 100644 | |
--- a/package/contents/ui/lib/ConfigSection.qml | |
+++ b/package/contents/ui/lib/ConfigSection.qml | |
@@ -4,19 +4,12 @@ import QtQuick 2.0 | |
import QtQuick.Controls 1.0 | |
import QtQuick.Layouts 1.0 | |
-// Alternative to GroupBox for when we want the title to always be left aligned. | |
-Rectangle { | |
+ColumnLayout { | |
id: control | |
Layout.fillWidth: true | |
default property alias _contentChildren: content.data | |
property string label: "" | |
- color: "#0c000000" | |
- border.width: 2 * units.devicePixelRatio | |
- border.color: "#10000000" | |
- // radius: 5 * units.devicePixelRatio | |
- property int padding: 8 * units.devicePixelRatio | |
- implicitHeight: title.height + padding + content.implicitHeight + padding | |
property alias spacing: content.spacing | |
Label { | |
@@ -24,10 +17,7 @@ Rectangle { | |
visible: control.label | |
text: control.label | |
font.bold: true | |
- font.pointSize: 13 * units.devicePixelRatio | |
- anchors.leftMargin: control.padding | |
- anchors.rightMargin: control.padding | |
- // anchors.topMargin: control.padding | |
+ font.pointSize: 12 * units.devicePixelRatio | |
anchors.left: parent.left | |
anchors.top: parent.top | |
anchors.right: parent.right | |
@@ -51,7 +41,4 @@ Rectangle { | |
} | |
} | |
} | |
- | |
- // Rectangle { anchors.fill: title; border.color: "#f00"; color: "transparent"; border.width: 1; } | |
- // Rectangle { anchors.fill: content; border.color: "#ff0"; color: "transparent"; border.width: 1; } | |
} | |
diff --git a/package/metadata.desktop b/package/metadata.desktop | |
index b9d5635b..b7913aad 100644 | |
--- a/package/metadata.desktop | |
+++ b/package/metadata.desktop | |
@@ -1,6 +1,6 @@ | |
[Desktop Entry] | |
-Name=Tiled Menu | |
-Comment=A menu based on Windows 10's Start Menu. | |
+Name=Simple 10 Menu | |
+Comment=Windows 10 style start menu, but without the tiles. | |
Type=Service | |
Icon=start-here-kde | |
@@ -9,12 +9,12 @@ X-KDE-ServiceTypes=Plasma/Applet | |
X-Plasma-API=declarativeappletscript | |
X-Plasma-MainScript=ui/Main.qml | |
-X-KDE-PluginInfo-Author=Chris Holland | |
-X-KDE-PluginInfo-Email=zrenfire@gmail.com | |
-X-KDE-PluginInfo-Name=com.github.zren.tiledmenu | |
-X-KDE-PluginInfo-Version=30 | |
-X-KDE-PluginInfo-Website=https://github.com/Zren/plasma-applet-tiledmenu | |
-X-KDE-PluginInfo-KdeStoreId=1160672 | |
+X-KDE-PluginInfo-Author=Fauzie Rofi | |
+X-KDE-PluginInfo-Email=fauzie.rofi@gmail.com | |
+X-KDE-PluginInfo-Name=com.github.fauzie811.simple10menu | |
+X-KDE-PluginInfo-Version=1 | |
+X-KDE-PluginInfo-Website=https://github.com/fauzie/plasma-applet-simple10menu | |
+#X-KDE-PluginInfo-KdeStoreId=1160672 | |
X-KDE-PluginInfo-Category=Application Launchers | |
X-KDE-PluginInfo-Depends= | |
diff --git a/package/translate/ReadMe.md b/package/translate/ReadMe.md | |
index 39c89d53..1827a6e4 100644 | |
--- a/package/translate/ReadMe.md | |
+++ b/package/translate/ReadMe.md | |
@@ -4,11 +4,11 @@ With KDE Frameworks v5.37 and above, translations are bundled with the *.plasmoi | |
## Install Translations | |
-Go to `~/.local/share/plasma/plasmoids/com.github.zren.tiledmenu/translate/` and run `sh ./build --restartplasma`. | |
+Go to `~/.local/share/plasma/plasmoids/com.github.fauzie811.simple10menu/translate/` and run `sh ./build --restartplasma`. | |
## New Translations | |
-1. Fill out [`template.pot`](template.pot) with your translations then open a [new issue](https://github.com/Zren/plasma-applet-tiledmenu/issues/new), name the file `spanish.txt`, attach the txt file to the issue (drag and drop). | |
+1. Fill out [`template.pot`](template.pot) with your translations then open a [new issue](https://github.com/fauzie811/plasma-applet-simple10menu/issues/new), name the file `spanish.txt`, attach the txt file to the issue (drag and drop). | |
Or if you know how to make a pull request | |
@@ -34,15 +34,4 @@ Or if you know how to make a pull request | |
## Status | |
| Locale | Lines | % Done| | |
|----------|---------|-------| | |
-| Template | 97 | | | |
-| de | 41/97 | 42% | | |
-| es | 75/97 | 77% | | |
-| fr | 22/97 | 22% | | |
-| id | 97/97 | 100% | | |
-| ko | 95/97 | 97% | | |
-| nl_NL | 97/97 | 100% | | |
-| pl | 0/97 | 0% | | |
-| pt_BR | 97/97 | 100% | | |
-| pt_PT | 87/97 | 89% | | |
-| ru | 90/97 | 92% | | |
-| zh_CN | 86/97 | 88% | | |
+| Template | 55 | | | |
diff --git a/package/translate/template.pot b/package/translate/template.pot | |
index de98b693..5e3816ac 100644 | |
--- a/package/translate/template.pot | |
+++ b/package/translate/template.pot | |
@@ -1,14 +1,14 @@ | |
-# Translation of tiledmenu in LANGUAGE | |
+# Translation of simple10menu in LANGUAGE | |
# Copyright (C) 2019 | |
-# This file is distributed under the same license as the tiledmenu package. | |
+# This file is distributed under the same license as the simple10menu package. | |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
# | |
#, fuzzy | |
msgid "" | |
msgstr "" | |
-"Project-Id-Version: tiledmenu \n" | |
-"Report-Msgid-Bugs-To: https://github.com/Zren/plasma-applet-tiledmenu\n" | |
-"POT-Creation-Date: 2019-03-24 11:36-0400\n" | |
+"Project-Id-Version: simple10menu \n" | |
+"Report-Msgid-Bugs-To: https://github.com/fauzie/plasma-applet-simple10menu\n" | |
+"POT-Creation-Date: 2019-07-21 08:10+0700\n" | |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
"Language-Team: LANGUAGE <LL@li.org>\n" | |
@@ -29,176 +29,71 @@ msgstr "" | |
msgid "Advanced" | |
msgstr "" | |
-#: ../contents/ui/AppContextMenu.qml:69 | |
-msgid "Unpin from Menu" | |
-msgstr "" | |
- | |
-#: ../contents/ui/AppContextMenu.qml:79 | |
-msgid "Pin to Menu" | |
-msgstr "" | |
- | |
-#: ../contents/ui/AppContextMenu.qml:120 | |
-msgid "Pin to Taskbar" | |
-msgstr "" | |
- | |
-#: ../contents/ui/AppsModel.qml:38 | |
+#: ../contents/ui/AppsModel.qml:36 | |
msgid "Recent Apps" | |
msgstr "" | |
-#: ../contents/ui/AppsModel.qml:40 | |
+#: ../contents/ui/AppsModel.qml:38 | |
msgid "Most Used" | |
msgstr "" | |
#: ../contents/ui/config/ConfigGeneral.qml:57 | |
-msgid "Popup" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:60 | |
-msgid "Fullscreen" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:66 | |
-msgid "Grid Columns" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:71 | |
msgid "Panel Icon" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:78 | |
+#: ../contents/ui/config/ConfigGeneral.qml:64 | |
msgid "Fixed Size" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:86 | |
-msgid "Tiles" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:92 | |
-msgid "Tile Size" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:99 ../contents/ui/config/ConfigGeneral.qml:105 ../contents/ui/config/ConfigGeneral.qml:272 ../contents/ui/config/ConfigGeneral.qml:297 | |
-#: ../contents/ui/config/ConfigGeneral.qml:361 | |
-msgid "px" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:104 | |
-msgid "Tile Margin" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:111 ../contents/ui/config/ConfigGeneral.qml:153 ../contents/ui/config/ConfigGeneral.qml:277 | |
-msgid "Desktop Theme (%1)" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:119 ../contents/ui/config/ConfigGeneral.qml:160 | |
-msgid "Custom Color" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:130 | |
-msgid "Transparent" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:139 | |
-msgid "Text Alignment" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:141 | |
-msgid "Left" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:142 | |
-msgid "Center" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:143 | |
-msgid "Right" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:150 | |
-msgid "Sidebar" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:174 | |
+#: ../contents/ui/config/ConfigGeneral.qml:71 | |
msgid "Sidebar Shortcuts" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:220 | |
+#: ../contents/ui/config/ConfigGeneral.qml:117 | |
msgid "Add Default" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:267 | |
-msgid "Search Box" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:271 | |
-msgid "Search Field Height" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:283 | |
-msgid "Windows (White)" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:291 | |
+#: ../contents/ui/config/ConfigGeneral.qml:162 | |
msgid "App List" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:296 | |
+#: ../contents/ui/config/ConfigGeneral.qml:167 | |
msgid "App List Area Width" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:304 | |
+#: ../contents/ui/config/ConfigGeneral.qml:168 | |
+msgid "px" | |
+msgstr "" | |
+ | |
+#: ../contents/ui/config/ConfigGeneral.qml:175 | |
msgid "Default View" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:306 ../contents/ui/SidebarView.qml:63 | |
+#: ../contents/ui/config/ConfigGeneral.qml:177 ../contents/ui/SidebarView.qml:55 | |
msgid "Alphabetical" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:307 ../contents/ui/SidebarView.qml:69 | |
+#: ../contents/ui/config/ConfigGeneral.qml:178 | |
msgid "Categories" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:308 | |
+#: ../contents/ui/config/ConfigGeneral.qml:179 | |
msgid "Jump To Letter" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:309 | |
+#: ../contents/ui/config/ConfigGeneral.qml:180 | |
msgid "Jump To Category" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:310 ../contents/ui/SidebarView.qml:57 | |
-msgid "Tiles Only" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:317 | |
-msgid "App Description" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:319 | |
-msgid "Hidden" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:320 | |
-msgid "After" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:321 | |
-msgid "Below" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:360 | |
-msgid "Icon Size" | |
-msgstr "" | |
- | |
-#: ../contents/ui/config/ConfigGeneral.qml:376 | |
+#: ../contents/ui/config/ConfigGeneral.qml:212 | |
msgid "Search Results" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:380 | |
+#: ../contents/ui/config/ConfigGeneral.qml:216 | |
msgid "Merged (Application Launcher)" | |
msgstr "" | |
-#: ../contents/ui/config/ConfigGeneral.qml:389 | |
+#: ../contents/ui/config/ConfigGeneral.qml:225 | |
msgid "Split into Categories (Application Menu / Dashboard)" | |
msgstr "" | |
@@ -210,35 +105,35 @@ msgstr "" | |
msgid "<b>Version:</b> %1" | |
msgstr "" | |
-#: ../contents/ui/Main.qml:219 | |
+#: ../contents/ui/Main.qml:204 | |
msgid "System Info" | |
msgstr "" | |
-#: ../contents/ui/Main.qml:220 | |
+#: ../contents/ui/Main.qml:205 | |
msgid "Terminal" | |
msgstr "" | |
-#: ../contents/ui/Main.qml:222 | |
+#: ../contents/ui/Main.qml:207 | |
msgid "Task Manager" | |
msgstr "" | |
-#: ../contents/ui/Main.qml:223 | |
+#: ../contents/ui/Main.qml:208 | |
msgid "System Settings" | |
msgstr "" | |
-#: ../contents/ui/Main.qml:224 | |
+#: ../contents/ui/Main.qml:209 | |
msgid "File Manager" | |
msgstr "" | |
-#: ../contents/ui/Main.qml:226 | |
+#: ../contents/ui/Main.qml:211 | |
msgid "Edit Applications..." | |
msgstr "" | |
-#: ../contents/ui/Popup.qml:69 ../contents/ui/Popup.qml:85 | |
+#: ../contents/ui/Popup.qml:44 ../contents/ui/Popup.qml:60 | |
msgid "Resize?" | |
msgstr "" | |
-#: ../contents/ui/Popup.qml:70 ../contents/ui/Popup.qml:86 | |
+#: ../contents/ui/Popup.qml:45 ../contents/ui/Popup.qml:61 | |
msgid "Alt + Right Click to resize the menu." | |
msgstr "" | |
@@ -331,79 +226,14 @@ msgstr "" | |
msgid "Filters" | |
msgstr "" | |
-#: ../contents/ui/SidebarView.qml:96 | |
-msgid "User Manager" | |
-msgstr "" | |
- | |
-#: ../contents/ui/SidebarView.qml:114 | |
-msgid "Power" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:43 ../contents/ui/TileItem.qml:129 | |
-msgid "Edit Tile" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:47 | |
-msgid "Reset Tile" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:52 | |
-msgid "Close" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:73 | |
-msgid "Url" | |
+#: ../contents/ui/SidebarView.qml:48 | |
+msgid "Menu" | |
msgstr "" | |
-#: ../contents/ui/TileEditorView.qml:79 | |
-msgid "Label" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:87 | |
-msgid "Icon" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:106 | |
-msgid "Background Image" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:116 | |
-msgid "Choose an image" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:121 | |
-msgid "Image Files (*.png *.jpg *.jpeg *.bmp *.svg *.svgz)" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:135 | |
-msgid "Preset Tiles" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:139 | |
-msgid "Background Color" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileEditorView.qml:145 | |
-msgid "Position / Size" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileGrid.qml:465 | |
-msgid "New Group" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileGrid.qml:475 | |
-msgid "Unlock Tiles" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileGrid.qml:475 | |
-msgid "Lock Tiles" | |
-msgstr "" | |
- | |
-#: ../contents/ui/TileGrid.qml:660 | |
-msgctxt "default group label" | |
-msgid "Group" | |
+#: ../contents/ui/SidebarView.qml:84 | |
+msgid "User Manager" | |
msgstr "" | |
-#: ../contents/ui/TileItem.qml:122 | |
-msgid "Sort Tiles" | |
+#: ../contents/ui/SidebarView.qml:106 | |
+msgid "Power" | |
msgstr "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment