Step 172: bundled theme pack

This commit is contained in:
Bill
2026-02-09 21:44:45 -07:00
parent b0f3a8f4e3
commit 97e8fde22a
11 changed files with 97 additions and 10 deletions

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -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) {