feat: Full UI internationalization, pool hashrate stats, and layout caching
- Replace all hardcoded English strings with TR() translation keys across every tab, dialog, and component (~20 UI files) - Expand all 8 language files (de, es, fr, ja, ko, pt, ru, zh) with complete translations (~37k lines added) - Improve i18n loader with exe-relative path fallback and English base fallback for missing keys - Add pool-side hashrate polling via pool stats API in xmrig_manager - Introduce Layout::beginFrame() per-frame caching and refresh balance layout config only on schema generation change - Offload daemon output parsing to worker thread - Add CJK subset fallback font for Chinese/Japanese/Korean glyphs
This commit is contained in:
@@ -255,8 +255,12 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Look up a DrawList custom element style
|
||||
*
|
||||
* Returns a cached const reference. The cache is invalidated on
|
||||
* hot-reload (applyIfDirty) and full loads. For missing elements
|
||||
* a static empty sentinel is returned.
|
||||
*/
|
||||
DrawElementStyle drawElement(const std::string& section, const std::string& name) const;
|
||||
const DrawElementStyle& drawElement(const std::string& section, const std::string& name) const;
|
||||
|
||||
/**
|
||||
* @brief Find a raw stored element by section and name.
|
||||
@@ -365,6 +369,10 @@ private:
|
||||
std::any data; // holds toml::table at runtime
|
||||
};
|
||||
std::unordered_map<std::string, StoredElement> elements_;
|
||||
|
||||
// Parsed DrawElementStyle cache — avoids repeated TOML table iteration.
|
||||
// Populated lazily on first drawElement() lookup, cleared on reload.
|
||||
mutable std::unordered_map<std::string, DrawElementStyle> styleCache_;
|
||||
};
|
||||
|
||||
// Convenience alias
|
||||
|
||||
Reference in New Issue
Block a user