mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +00:00
Speed Dial: replace tile monograms with native SVG icons
Tiles previously rendered a colored monogram (title/source initials plus an ordinal) with a per-id hue. Show the matching native SVG icon instead: - AppAction/NativeCommand gain an `icon` field; commands get a curated key->icon table and settings inherit their group header's icon. - Notebook tracks each page's resource icon name and reports it in tab_options(), so the tab picker can show it too. - Searcher records the group icon so settings keep it through search. - Web tile rendering swaps monogramFor/hue for an <img>; drop the now-unused hue/text CSS vars. Add a test asserting every non-empty icon resolves to a shipped SVG.
This commit is contained in:
@@ -45,6 +45,7 @@ struct GroupAndCategory
|
||||
{
|
||||
wxString group;
|
||||
wxString category;
|
||||
wxString icon; // icon of the group's own header, or empty
|
||||
};
|
||||
|
||||
struct Option
|
||||
@@ -60,6 +61,7 @@ struct Option
|
||||
std::wstring label_local;
|
||||
std::wstring group;
|
||||
std::wstring group_local;
|
||||
std::string group_icon; // SVG base name of the group's own header icon, or empty
|
||||
std::wstring category;
|
||||
std::wstring category_local;
|
||||
bool multi_category { false };
|
||||
@@ -128,7 +130,8 @@ public:
|
||||
bool search();
|
||||
bool search(const std::string &search, bool force = false, Preset::Type type = Preset::TYPE_INVALID);
|
||||
|
||||
void add_key(const std::string &opt_key, Preset::Type type, const wxString &group, const wxString &category);
|
||||
void add_key(const std::string &opt_key, Preset::Type type, const wxString &group, const wxString &category,
|
||||
const wxString &icon = wxEmptyString);
|
||||
|
||||
size_t size() const { return found_size(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user