ui: Moved color scheme selection to preferences

* removed 'Switch Color Scheme' action from View menu
* added dropdown with all fetched color schemes to preferences

bug id = 114
This commit is contained in:
Eberhard Graether
2016-07-20 17:27:53 +02:00
parent 6e9a6f9a8d
commit b2cb95de1b
11 changed files with 92 additions and 55 deletions
+6 -6
View File
@@ -95,12 +95,12 @@ void ApplicationSettings::setFontSize(int fontSize)
setValue<int>("application/font_size", fontSize);
}
std::string ApplicationSettings::getColorSchemePath() const
FilePath ApplicationSettings::getColorSchemePath() const
{
std::string defaultPath = ResourcePaths::getColorSchemesPath() + "bright.xml";
std::string path = getValue<std::string>("application/color_scheme", defaultPath);
FilePath defaultPath(ResourcePaths::getColorSchemesPath() + "bright.xml");
FilePath path(getValue<std::string>("application/color_scheme", defaultPath.str()));
if (path != defaultPath && !FilePath(path).exists())
if (path != defaultPath && !path.exists())
{
return defaultPath;
}
@@ -108,9 +108,9 @@ std::string ApplicationSettings::getColorSchemePath() const
return path;
}
void ApplicationSettings::setColorSchemePath(const std::string& colorSchemePath)
void ApplicationSettings::setColorSchemePath(const FilePath& colorSchemePath)
{
setValue<std::string>("application/color_scheme", colorSchemePath);
setValue<std::string>("application/color_scheme", colorSchemePath.str());
}
int ApplicationSettings::getFontSizeMax() const