OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
StateColor.cpp File Reference
#include "StateColor.hpp"
#include <algorithm>
#include <cmath>
#include <wx/colour.h>
#include <map>
#include <tuple>
#include <wx/string.h>
Include dependency graph for StateColor.cpp:

Go to the source code of this file.

Functions

static bool operator< (wxColour const &l, wxColour const &r)
wxColour darkModeColorFor2 (wxColour const &color)
std::map< wxColour, wxColour > revert (std::map< wxColour, wxColour > const &map)

Variables

static bool gDarkMode = false
static std::map< wxColour, wxColour > gDarkColors

Function Documentation

◆ darkModeColorFor2()

wxColour darkModeColorFor2 ( wxColour const & color)
inline
196{
197 if (!gDarkMode)
198 return color;
199 auto iter = gDarkColors.find(color);
200 if (iter != gDarkColors.end()) return iter->second;
201 return color;
202}
static std::map< wxColour, wxColour > gDarkColors
Definition StateColor.cpp:13
static bool gDarkMode
Definition StateColor.cpp:9

References gDarkColors, and gDarkMode.

Referenced by StateColor::colorForStates(), and StateColor::darkModeColorFor().

Here is the caller graph for this function:

◆ operator<()

bool operator< ( wxColour const & l,
wxColour const & r )
static
11{ return l.GetRGBA() < r.GetRGBA(); }

Referenced by Slic3r::SLAPrint::apply(), Slic3r::GUI::Plater::priv::can_reload_from_disk(), Slic3r::Measure::get_measurement(), Slic3r::Layer::make_ironing(), Slic3r::pick_pos_internal(), and Slic3r::GUI::Plater::priv::reload_from_disk().

Here is the caller graph for this function:

◆ revert()

std::map< wxColour, wxColour > revert ( std::map< wxColour, wxColour > const & map)
205{
206 std::map<wxColour, wxColour> map2;
207 for (auto &p : map) map2.emplace(p.second, p.first);
208 return map2;
209}

Referenced by StateColor::lightModeColorFor(), and Slic3r::GUI::GLGizmoCut3D::render_reset_button().

Here is the caller graph for this function:

Variable Documentation

◆ gDarkColors

std::map<wxColour, wxColour> gDarkColors
static
13 {
14 {"#009688", "#00675b"}, // rgb(0, 150, 136) ORCA color
15 {"#1F8EEA", "#2778D2"}, // rgb(31, 142, 234) ???
16 {"#FF6F00", "#D15B00"}, // rgb(255, 111, 0) Secondary color
17 {"#D01B1B", "#BB2A3A"}, // rgb(208, 27, 27) ???
18 {"#262E30", "#EFEFF0"}, // rgb(38, 46, 48) Button text color | Input Text Color
19 {"#DFDFDF", "#3E3E45"}, // rgb(223, 223, 223) Button Background color
20 {"#D4D4D4", "#4D4D54"}, // rgb(212, 212, 212) Button Background color on Hover
21 {"#6B6A6A", "#909090"}, // rgb(107, 107, 106) Button Dimmed text
22 {"#26A69A", "#008172"}, // rgb(0, 150, 136) Button Confirm Color hover | ORCA Color Hover
23 {"#6B6B6A", "#B3B3B5"}, // rgb(107, 107, 106) Input box side text
24 {"#2C2C2E", "#B3B3B4"}, // rgb(44, 44, 46) ???
25 {"#6B6B6B", "#818183"}, // rgb(107, 107, 107) Disabled Text
26 {"#ACACAC", "#65656A"}, // rgb(172, 172, 172) Disabled Text on boxes | Dimmed Elements
27 {"#EEEEEE", "#4C4C55"}, // rgb(238, 238, 238) Separator Line | Title Line Color
28 {"#E8E8E8", "#3E3E45"}, // rgb(232, 232, 232) ???
29 {"#323A3D", "#E5E5E4"}, // rgb(50, 58, 61) Softer text color
30 {"#FFFFFF", "#2D2D31"}, // rgb(255, 255, 255) Window background
31 {"#F8F8F8", "#36363C"}, // rgb(248, 248, 248) Sidebar > Titlebar > Gradient Top | BBL monitor page titlebar bg
32 {"#F1F1F1", "#36363B"}, // rgb(241, 241, 241) Sidebar > Titlebar > Gradient Bottom
33 {"#3B4446", "#2D2D30"}, // rgb(59, 68, 78) Top Bar / Main tab bar bg color
34 {"#CECECE", "#54545B"}, // rgb(206, 206, 206) Sidebar wxPanel bg |
35 {"#DBFDD5", "#3B3B40"}, // rgb(219, 253, 213) Not Used anymore // Was used for BBS combo boxes etc
36 {"#000000", "#FFFFFE"}, // rgb(0, 0, 0) Mostly Text color wxBlack
37 {"#F4F4F4", "#36363D"}, // rgb(244, 244, 244) ???
38 {"#DBDBDB", "#4A4A51"}, // rgb(219, 219, 219) Input/Combo Box Border Color
39 {"#EDFAF2", "#283232"}, // rgb(229, 240, 238) Not Used anymore // Was used for BBS Combo / Dropdown focused background color
40 {"#323A3C", "#E5E5E6"}, // rgb(50, 58, 60) Text color used on search list |
41 {"#303A3C", "#E5E5E5"}, // rgb(48, 58, 60) Object Table > Column header text color | StaticBox Border Color
42 {"#FEFFFF", "#242428"}, // rgb(254, 255, 255) Side Tabbar bg |
43 {"#A6A9AA", "#2D2D29"}, // rgb(166, 169, 170) Seperator color
44 {"#363636", "#B2B3B5"}, // rgb(54, 54, 54) Sidebar > Parameter Label/Title color | Sidebar tab text | Create Filament window text
45 {"#F0F0F1", "#333337"}, // rgb(240, 240, 241) Disabled element background // ORCA Used better background color for dark mode
46 {"#9E9E9E", "#53545A"}, // rgb(158, 158, 158) ???
47 {"#D7E8DE", "#1F2B27"}, // rgb(215, 232, 222) Not Used anymore // Leftover from BBS
48 {"#2B3436", "#808080"}, // rgb(43, 52, 54) Not Used anymore // Leftover from BBS. Was used as main fill color of icons
49 {"#ABABAB", "#ABABAB"},
50 {"#D9D9D9", "#27272A"}, // rgb(217, 217, 217) Sidebar > Toggle button track color
51 {"#FFFEFE", "#D8D9D9"}, // rgb(255, 254, 254) Sidebar > Toggle button thumb color
52 {"#EBF9F0", "#293F34"},
53 //{"#F0F0F0", "#4C4C54"},
54 // ORCA
55 {"#BFE1DE", "#223C3C"}, // rgb(191, 225, 222) Dropdown checked item background color > ORCA color with %25 opacity
56 {"#E5F0EE", "#283232"}, // rgb(229, 240, 238) Combo / Dropdown focused background color > ORCA color with %10 opacity
57};

Referenced by darkModeColorFor2(), StateColor::GetDarkMap(), and StateColor::lightModeColorFor().

◆ gDarkMode

bool gDarkMode = false
static