cgv
Loading...
Searching...
No Matches
theme_info.cxx
1
#include "theme_info.h"
2
3
namespace
cgv
{
4
namespace
gui {
5
6
theme_info& theme_info::instance() {
7
static
theme_info
instance;
8
return
instance;
9
}
10
11
theme_info::theme_info
() {
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
25
void
theme_info::set_index(
int
idx) {
26
if
(idx != theme_idx) {
27
theme_idx = idx;
28
on_change(instance());
29
}
30
}
31
32
int
theme_info::get_index()
const
{
33
return
theme_idx;
34
}
35
36
bool
theme_info::is_dark()
const
{
37
return
theme_idx > 1;
38
}
39
40
}
41
}
cgv::gui::control
Definition
control.h:82
cgv::gui::theme_info::theme_info
theme_info()
construct
Definition
theme_info.cxx:11
cgv
the cgv namespace
Definition
print.h:11
cgv
gui
theme_info.cxx
Generated by
1.9.8