uisettings.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // SPDX-FileCopyrightText: 2016 Citra Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "yuzu/uisettings.h"
  4. #ifndef CANNOT_EXPLICITLY_INSTANTIATE
  5. namespace Settings {
  6. template class Setting<bool>;
  7. template class Setting<std::string>;
  8. template class Setting<u16, true>;
  9. template class Setting<u32>;
  10. template class Setting<u8, true>;
  11. template class Setting<u8>;
  12. template class Setting<unsigned long long>;
  13. } // namespace Settings
  14. #endif
  15. namespace UISettings {
  16. const Themes themes{{
  17. {"Default", "default"},
  18. {"Default Colorful", "colorful"},
  19. {"Dark", "qdarkstyle"},
  20. {"Dark Colorful", "colorful_dark"},
  21. {"Midnight Blue", "qdarkstyle_midnight_blue"},
  22. {"Midnight Blue Colorful", "colorful_midnight_blue"},
  23. }};
  24. bool IsDarkTheme() {
  25. const auto& theme = UISettings::values.theme;
  26. return theme == QStringLiteral("qdarkstyle") ||
  27. theme == QStringLiteral("qdarkstyle_midnight_blue") ||
  28. theme == QStringLiteral("colorful_dark") ||
  29. theme == QStringLiteral("colorful_midnight_blue");
  30. }
  31. Values values = {};
  32. } // namespace UISettings