"); + CFont font = CFont(cg.readEntry("currentFontFamily", "Terminus")); + font.setPointSize(cg.readEntry("currentFontSize", 10)); + font.setCurrentColor(QColor(cg.readEntry("currentFontColor", "#ff0000"))); + font.setHtmlWeight(cg.readEntry("currentFontWeight", 400)); + font.setItalic(cg.readEntry("currentFontStyle", "normal") == QString("italic")); + QString fontStyle; + if (font.italic()) + fontStyle = QString("italic"); + else + fontStyle = QString("normal"); + currentFormatLine[0] = QString("\ + \ + ") + .arg(font.family()) + .arg(font.pointSize()) + .arg(font.htmlWeight()) + .arg(fontStyle) + .arg(font.color().name()); + currentFormatLine[1] = QString(""); - fontFamily = cg.readEntry("fontFamily", "Terminus"); - fontSize = cg.readEntry("fontSize", 10); - fontColor = cg.readEntry("fontColor", "#000000"); - fontWeight = cg.readEntry("fontWeight", 400); - fontStyle = cg.readEntry("fontStyle", "normal"); - formatLine[0] = (""); - currentFormatLine[1] = ("
"); + font = CFont(cg.readEntry("fontFamily", "Terminus")); + font.setPointSize(cg.readEntry("fontSize", 10)); + font.setCurrentColor(QColor(cg.readEntry("fontColor", "#000000"))); + font.setHtmlWeight(cg.readEntry("fontWeight", 400)); + font.setItalic(cg.readEntry("fontStyle", "normal") == QString("italic")); + if (font.italic()) + fontStyle = QString("italic"); + else + fontStyle = QString("normal"); + formatLine[0] = QString("\ + \ + ") + .arg(font.family()) + .arg(font.pointSize()) + .arg(font.htmlWeight()) + .arg(fontStyle) + .arg(font.color().name()); + formatLine[1] = QString(""); reinit(); } diff --git a/sources/desktop-panel/desktop-panel.h b/sources/desktop-panel/desktop-panel.h index aed7bcb..d9232e4 100644 --- a/sources/desktop-panel/desktop-panel.h +++ b/sources/desktop-panel/desktop-panel.h @@ -37,7 +37,8 @@ class CustomPlasmaLabel : public Plasma::Label Q_OBJECT public: - CustomPlasmaLabel(DesktopPanel *wid, const int num); + CustomPlasmaLabel(DesktopPanel *wid, const int num, + const bool debugCmd = false); ~CustomPlasmaLabel(); int getNumber(); diff --git a/sources/desktop-panel/toggle.ui b/sources/desktop-panel/toggle.ui index 234a7d5..87a8c4d 100644 --- a/sources/desktop-panel/toggle.ui +++ b/sources/desktop-panel/toggle.ui @@ -17,7 +17,7 @@"); - formatLine[1] = ("