cgv
Loading...
Searching...
No Matches
theme_info.cxx
1#include "theme_info.h"
2
3namespace cgv {
4namespace gui {
5
6theme_info& theme_info::instance() {
7 static theme_info instance;
8 return instance;
9}
10
12 theme_idx = -1;
13
14 background(240, 240, 240);
15 group(240, 240, 240);
16 control(225, 225, 225);
17 border(98, 98, 98);
18 text(0, 0, 0);
19 text_background(255, 255, 255);
20 selection(0, 120, 215);
21 highlight(0, 120, 215);
22 warning(255, 0, 0);
23}
24
25void theme_info::set_index(int idx) {
26 if(idx != theme_idx) {
27 theme_idx = idx;
28 on_change(instance());
29 }
30}
31
32int theme_info::get_index() const {
33 return theme_idx;
34}
35
36bool theme_info::is_dark() const {
37 return theme_idx > 1;
38}
39
40}
41}
the cgv namespace
Definition print.h:11