| 1792 | } |
| 1793 | |
| 1794 | void Toolbar::reload_theme_list() { |
| 1795 | themeData.selectedThemeIndex = 0; |
| 1796 | |
| 1797 | themeData.themeDirList.clear(); |
| 1798 | themeData.themeDirList.emplace_back("Default"); |
| 1799 | std::filesystem::path themeDir = main.conf.configPath / "themes"; |
| 1800 | if(std::filesystem::exists(themeDir) && std::filesystem::is_directory(themeDir)) { |
| 1801 | for(auto& theme : std::filesystem::recursive_directory_iterator(themeDir)) { |
| 1802 | std::string name = theme.path().stem().string(); |
| 1803 | if(name != "Default") { |
| 1804 | themeData.themeDirList.emplace_back(name); |
| 1805 | if(name == main.conf.themeCurrentlyLoaded) |
| 1806 | themeData.selectedThemeIndex = themeData.themeDirList.size() - 1; |
| 1807 | } |
| 1808 | } |
| 1809 | } |
| 1810 | if(!main.g.load_theme(main.conf.configPath, main.conf.themeCurrentlyLoaded)) |
| 1811 | themeData.selectedThemeIndex = 0; |
| 1812 | |
| 1813 | themeData.openedSaveAsMenu = false; |
| 1814 | } |
| 1815 | |
| 1816 | void Toolbar::file_picker_gui_refresh_entries() { |
| 1817 | auto& gui = main.g.gui; |
nothing calls this directly
no test coverage detected