comparison src/gui/theme.cc @ 118:39521c47c7a3

*: another huge megacommit, SORRY The torrents page works a lot better now Added the edit option to the anime list right click menu Vectorized currently playing files Available player and extensions are now loaded at runtime from files in (dotpath)/players.json and (dotpath)/extensions.json These paths are not permanent and will likely be moved to (dotpath)/recognition ... ... ...
author Paper <mrpapersonic@gmail.com>
date Tue, 07 Nov 2023 23:40:54 -0500
parents 2004b41d4a59
children 01d259b9c89f
comparison
equal deleted inserted replaced
117:2c1b6782e1d0 118:39521c47c7a3
25 25
26 Theme::Theme(Themes theme) { 26 Theme::Theme(Themes theme) {
27 this->theme = theme; 27 this->theme = theme;
28 } 28 }
29 29
30 Themes Theme::GetTheme() { 30 Themes Theme::GetTheme() const {
31 return theme; 31 return theme;
32 } 32 }
33 33
34 bool Theme::IsInDarkTheme() { 34 bool Theme::IsInDarkTheme() const {
35 if (theme != Themes::OS) 35 if (theme != Themes::OS)
36 return (theme == Themes::DARK); 36 return (theme == Themes::DARK);
37 #ifdef MACOSX 37 #ifdef MACOSX
38 if (osx::DarkThemeAvailable()) 38 if (osx::DarkThemeAvailable())
39 return osx::IsInDarkTheme(); 39 return osx::IsInDarkTheme();
68 win32::SetTitleBarsToBlack(false); 68 win32::SetTitleBarsToBlack(false);
69 #endif 69 #endif
70 SetStyleSheet(Themes::LIGHT); 70 SetStyleSheet(Themes::LIGHT);
71 } 71 }
72 72
73 Themes Theme::GetCurrentOSTheme() { 73 Themes Theme::GetCurrentOSTheme() const {
74 #ifdef MACOSX 74 #ifdef MACOSX
75 if (osx::DarkThemeAvailable()) 75 if (osx::DarkThemeAvailable())
76 return osx::IsInDarkTheme() ? Themes::DARK : Themes::LIGHT; 76 return osx::IsInDarkTheme() ? Themes::DARK : Themes::LIGHT;
77 #elif defined(WIN32) 77 #elif defined(WIN32)
78 if (win32::DarkThemeAvailable()) 78 if (win32::DarkThemeAvailable())