comparison src/gui/translate/config.cc @ 91:29e2840d9b7b

*: oops
author Paper <mrpapersonic@gmail.com>
date Tue, 31 Oct 2023 23:56:10 -0400
parents
children 71832ffe425a
comparison
equal deleted inserted replaced
90:c4bb49c2f6eb 91:29e2840d9b7b
1 #include "core/config.h"
2 #include "gui/translate/config.h"
3
4 namespace Translate {
5
6 Themes ToTheme(const std::string& theme) {
7 const std::unordered_map<std::string, Themes> map = {
8 {"Default", Themes::OS },
9 {"Light", Themes::LIGHT},
10 {"Dark", Themes::DARK }
11 };
12
13 if (map.find(theme) == map.end())
14 return Themes::OS;
15 return map.at(theme);
16 }
17
18 std::string ToString(const Themes& theme) {
19 switch (theme) {
20 default:
21 case Themes::OS: return "Default";
22 case Themes::LIGHT: return "Light";
23 case Themes::DARK: return "Dark";
24 }
25 }
26
27 }