Step 172: bundled theme pack
This commit is contained in:
@@ -160,7 +160,7 @@ private:
|
||||
std::string emacsConfigPath_;
|
||||
int fontSize_ = 15;
|
||||
int tabSize_ = 4;
|
||||
std::string theme_ = "VSCode Dark";
|
||||
std::string theme_ = "Whetstone Dark";
|
||||
bool telemetryOptIn_ = false;
|
||||
std::string updateUrl_ = "https://example.com/whetstone/releases.json";
|
||||
int autoSaveSeconds_ = 0;
|
||||
|
||||
@@ -125,8 +125,8 @@ int main(int, char**) {
|
||||
themes.loadThemesFromDirectory("editor/themes");
|
||||
themes.loadThemesFromDirectory(ThemeEngine::userThemeDirectory());
|
||||
std::string themeName = state.settings.getTheme();
|
||||
if (themeName == "Dark") themeName = "VSCode Dark";
|
||||
if (themeName == "Light") themeName = "VSCode Light";
|
||||
if (themeName == "Dark") themeName = "Whetstone Dark";
|
||||
if (themeName == "Light") themeName = "Whetstone Light";
|
||||
if (!themes.applyTheme(themeName)) {
|
||||
SetupVSCodeDarkTheme();
|
||||
}
|
||||
|
||||
@@ -34,11 +34,11 @@ static void renderSettingsPanel(EditorState& state) {
|
||||
|
||||
std::vector<std::string> themeNames = ThemeEngine::instance().listThemes();
|
||||
if (themeNames.empty()) {
|
||||
themeNames = {"VSCode Dark", "VSCode Light"};
|
||||
themeNames = {"Whetstone Dark", "Whetstone Light"};
|
||||
}
|
||||
std::string currentTheme = state.settings.getTheme();
|
||||
if (currentTheme == "Dark") currentTheme = "VSCode Dark";
|
||||
if (currentTheme == "Light") currentTheme = "VSCode Light";
|
||||
if (currentTheme == "Dark") currentTheme = "Whetstone Dark";
|
||||
if (currentTheme == "Light") currentTheme = "Whetstone Light";
|
||||
int themeIndex = 0;
|
||||
for (size_t i = 0; i < themeNames.size(); ++i) {
|
||||
if (themeNames[i] == currentTheme) {
|
||||
|
||||
Reference in New Issue
Block a user