mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-09 12:37:41 +03:00
feat: init palettes with default colorscheme to avoid messed up UI
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
#include <core/palette/color.hpp>
|
||||
#include <core/palette/color_keys.hpp>
|
||||
|
||||
namespace clrsync::core
|
||||
{
|
||||
@@ -37,8 +38,15 @@ class palette
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
static color default_color{};
|
||||
return default_color;
|
||||
auto default_it = DEFAULT_COLORS.find(key);
|
||||
if (default_it != DEFAULT_COLORS.end())
|
||||
{
|
||||
static color default_color;
|
||||
default_color.set(default_it->second);
|
||||
return default_color;
|
||||
}
|
||||
static color empty_color{};
|
||||
return empty_color;
|
||||
}
|
||||
|
||||
const std::unordered_map<std::string, color> &colors() const
|
||||
|
||||
Reference in New Issue
Block a user