mirror of
https://codeberg.org/vyn/selenite.git
synced 2025-07-03 10:13:26 +00:00
Add Svg 'sync/refresh' icon + Add template helper to setup Selenite
This commit is contained in:
parent
7ce7ad3ee1
commit
9d9b28318b
4 changed files with 26 additions and 1 deletions
|
@ -1,2 +1,24 @@
|
|||
#pragma once
|
||||
#include "palette.h"
|
||||
|
||||
template <typename SlintColor, typename SeleniteColor>
|
||||
SlintColor seleniteColorToSlint(const SeleniteColor &color)
|
||||
{
|
||||
return SlintColor::from_rgb_uint8(color.r, color.g, color.b);
|
||||
}
|
||||
|
||||
template <typename SlintColor, typename SeleniteColor, typename UiPalette>
|
||||
void setSelenitePalette(const UiPalette &uiPalette, const selenite::Palette &palette)
|
||||
{
|
||||
uiPalette.set_accent(seleniteColorToSlint<SlintColor>(palette.primary));
|
||||
uiPalette.set_background(seleniteColorToSlint<SlintColor>(palette.background));
|
||||
uiPalette.set_pane(seleniteColorToSlint<SlintColor>(palette.pane));
|
||||
uiPalette.set_foreground(seleniteColorToSlint<SlintColor>(palette.foreground));
|
||||
uiPalette.set_foreground_hint(seleniteColorToSlint<SlintColor>(palette.foregroundHint));
|
||||
uiPalette.set_control_background(seleniteColorToSlint<SlintColor>(palette.background3));
|
||||
uiPalette.set_control_foreground(seleniteColorToSlint<SlintColor>(palette.foreground));
|
||||
uiPalette.set_card_background(seleniteColorToSlint<SlintColor>(palette.background2));
|
||||
uiPalette.set_green(seleniteColorToSlint<SlintColor>(palette.green));
|
||||
uiPalette.set_orange(seleniteColorToSlint<SlintColor>(palette.orange));
|
||||
uiPalette.set_red(seleniteColorToSlint<SlintColor>(palette.red));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue