mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:30:05 +00:00
Adding alert colors to settings
This commit is contained in:
parent
aa842c11b7
commit
2b55d0cd69
6 changed files with 161 additions and 20 deletions
25
scwx-qt/source/scwx/qt/util/color.cpp
Normal file
25
scwx-qt/source/scwx/qt/util/color.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include <scwx/qt/util/color.hpp>
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
namespace color
|
||||
{
|
||||
|
||||
static const std::string logPrefix_ = "scwx::qt::util::color";
|
||||
|
||||
std::string ToArgbString(const boost::gil::rgba8_pixel_t& color)
|
||||
{
|
||||
return std::format(
|
||||
"#{:02x}{:02x}{:02x}{:02x}", color[3], color[0], color[1], color[2]);
|
||||
}
|
||||
|
||||
} // namespace color
|
||||
} // namespace util
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
19
scwx-qt/source/scwx/qt/util/color.hpp
Normal file
19
scwx-qt/source/scwx/qt/util/color.hpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/gil/typedefs.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
namespace color
|
||||
{
|
||||
|
||||
std::string ToArgbString(const boost::gil::rgba8_pixel_t& color);
|
||||
|
||||
} // namespace color
|
||||
} // namespace util
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue