From 53ed074ba5af70164ec424edc934b9b2711559df Mon Sep 17 00:00:00 2001 From: Paul Ebbers Date: Fri, 10 Jan 2025 15:21:24 +0100 Subject: [PATCH] Added resources folder --- README.md | 6 +++--- .../Icons/Tango-System-search.svg | 2 +- .../Icons/Tango-System-search.svg.url | 0 .../Icons/Tango-Tools-spanner-hammer.svg | 0 .../Icons/Tango-Tools-spanner-hammer.svg.url | 0 animAopt.gif => Resources/Images/animAopt.gif | Bin animB2op.gif => Resources/Images/animB2op.gif | Bin screenshot.png => Resources/Images/screenshot.png | Bin ResultsPreferences.py | 5 ++++- package.xml | 4 ++-- 10 files changed, 10 insertions(+), 7 deletions(-) rename Tango-System-search.svg => Resources/Icons/Tango-System-search.svg (99%) rename Tango-System-search.svg.url => Resources/Icons/Tango-System-search.svg.url (100%) rename Tango-Tools-spanner-hammer.svg => Resources/Icons/Tango-Tools-spanner-hammer.svg (100%) rename Tango-Tools-spanner-hammer.svg.url => Resources/Icons/Tango-Tools-spanner-hammer.svg.url (100%) rename animAopt.gif => Resources/Images/animAopt.gif (100%) rename animB2op.gif => Resources/Images/animB2op.gif (100%) rename screenshot.png => Resources/Images/screenshot.png (100%) diff --git a/README.md b/README.md index e7747a8..9a7862c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It can be extended by other mods, by adding a new result provider. The search bar appears next to the [`What's this?`](https://wiki.freecad.org/Std_WhatsThis) tool drawing in FreeCAD's default File toolbar. -![Screenshot of the search bar, with results in its drop-down menu and extra info about the result in a separate pane](screenshot.png) +![Screenshot of the search bar, with results in its drop-down menu and extra info about the result in a separate pane](Resources/Images/screenshot.png) When using the search bar for the first time, it will contain only the tools of the workbenches which have already been loaded in FreeCAD. To include results from other workbenches, select the first search result "Refresh list of tools" which will load all FreeCAD workbenches @@ -22,14 +22,14 @@ and memorize their tools. After restarting FreeCAD, the search result will inclu been loaded yet. When selecting a tool from the search results, SearchBar will attempt to automatically load the workbenches which could have provided that tool. -![Animation showing how to initially load all workbenches using the first entry in the search bar](animAopt.gif) +![Animation showing how to initially load all workbenches using the first entry in the search bar](Resources/Images/animAopt.gif) To navigate the search results, use the up and down arrows. Typing characters will filter the results on the fly. The extended information panel next to the search results provides further documentation about the results, e.g. Python snippets which can be copy-pasted (note: currently a bug crashes FreeCAD if using the context menu to perform the copy, please do not use the context menu until https://github.com/SuzanneSoy/SearchBar/issues/12 is fixed. -![Animation showing how to navigate the search results with the up and down keys and select code examples from the results](animB2op.gif) +![Animation showing how to navigate the search results with the up and down keys and select code examples from the results](Resources/Images/animB2op.gif) ### Installation diff --git a/Tango-System-search.svg b/Resources/Icons/Tango-System-search.svg similarity index 99% rename from Tango-System-search.svg rename to Resources/Icons/Tango-System-search.svg index dee0fdc..f98b2ea 100644 --- a/Tango-System-search.svg +++ b/Resources/Icons/Tango-System-search.svg @@ -42,5 +42,5 @@ - + \ No newline at end of file diff --git a/Tango-System-search.svg.url b/Resources/Icons/Tango-System-search.svg.url similarity index 100% rename from Tango-System-search.svg.url rename to Resources/Icons/Tango-System-search.svg.url diff --git a/Tango-Tools-spanner-hammer.svg b/Resources/Icons/Tango-Tools-spanner-hammer.svg similarity index 100% rename from Tango-Tools-spanner-hammer.svg rename to Resources/Icons/Tango-Tools-spanner-hammer.svg diff --git a/Tango-Tools-spanner-hammer.svg.url b/Resources/Icons/Tango-Tools-spanner-hammer.svg.url similarity index 100% rename from Tango-Tools-spanner-hammer.svg.url rename to Resources/Icons/Tango-Tools-spanner-hammer.svg.url diff --git a/animAopt.gif b/Resources/Images/animAopt.gif similarity index 100% rename from animAopt.gif rename to Resources/Images/animAopt.gif diff --git a/animB2op.gif b/Resources/Images/animB2op.gif similarity index 100% rename from animB2op.gif rename to Resources/Images/animB2op.gif diff --git a/screenshot.png b/Resources/Images/screenshot.png similarity index 100% rename from screenshot.png rename to Resources/Images/screenshot.png diff --git a/ResultsPreferences.py b/ResultsPreferences.py index 5d313a7..5821bd4 100644 --- a/ResultsPreferences.py +++ b/ResultsPreferences.py @@ -3,8 +3,11 @@ import FreeCAD as App import FreeCADGui from PySide import QtGui import Serialize_SearchBar +import path -genericToolIcon = QtGui.QIcon(QtGui.QIcon(os.path.dirname(__file__) + "/Tango-Tools-spanner-hammer.svg")) +ICON_LOCATION = os.path.join(os.path.dirname(__file__), "Resources", "Icons") + +genericToolIcon = QtGui.QIcon(QtGui.QIcon(os.path.join(ICON_LOCATION, "Tango-Tools-spanner-hammer.svg"))) def getParam(grpPath, type_, name): diff --git a/package.xml b/package.xml index ac7d3c0..9a7f9f1 100644 --- a/package.xml +++ b/package.xml @@ -5,7 +5,7 @@ Adds a search bar widget for tools, document objects, and preferences - 1.2.1 + 1.3.x 2022-06-01 @@ -23,7 +23,7 @@ SearchBar - Tango-System-search.svg + Resource/Icons/Tango-System-search.svg ./ search widget