Bugfix and style update of RawTherapee.css

Still unfinished - Big thank you to DrSlony for his help
This commit is contained in:
Hombre
2016-10-19 02:20:12 +02:00
parent 0c78885d25
commit 712468197d
14 changed files with 144 additions and 82 deletions

View File

@@ -291,8 +291,8 @@ Glib::ustring Options::findProfilePath (Glib::ustring &profName)
void Options::setDefaults ()
{
font = "sans, 8";
colorPickerFont = "sans, 8";
font = "sans 8";
colorPickerFont = "sans 8";
windowWidth = 1200;
windowHeight = 680;
windowX = 0;
@@ -2337,6 +2337,29 @@ void Options::save ()
}
}
Glib::ustring Options::formatFontName (Glib::ustring font)
{
if (font.empty()) {
return "";
}
// Reformatting the font parameter
Glib::ustring sFont;
Pango::FontDescription fd(font);
sFont = "font-family: \"" + fd.get_family() + "\";";
if (fd.get_size()) {
sFont += "font-size: " + Glib::ustring::compose("%1pt", 8 /*fd.get_size()*/); // + (fd.get_size_is_absolute() ? "px;" : "pt;");
}
if (fd.get_style() == Pango::STYLE_ITALIC) {
sFont += "font-style: italic;";
}
if (fd.get_weight() > Pango::WEIGHT_NORMAL) {
sFont += "font-weight: bold;";
}
return sFont;
}
/*
* return true if fname ends with one of the retained image file extensions
*/