Adapt the stylesheets and the stylesheet generator to the new markerline
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 16 Jun 2010 16:14:49 +0000 (18:14 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 16 Jun 2010 16:14:49 +0000 (18:14 +0200)
The markerline now supports a fully styled brush rather than just reading the color
and enforcing a gradient.

In order to get the same look as before, we adapt the stylesheets we ship and also write
out an appropriate gradient definition in settings.qss.

Note that, as always in QSS, the gradient is normalized between (0,0) and (1,1).

data/stylesheets/LinuxDolt-bluestheme.qss
data/stylesheets/default.qss
data/stylesheets/jussi01-darktheme.qss
data/stylesheets/m4yer.qss
src/qtui/qtuistyle.cpp

index 073f289..e6b775f 100644 (file)
@@ -14,7 +14,8 @@
 
 // Custom ChatView Colors
 ChatView { background: #00004b; }
 
 // Custom ChatView Colors
 ChatView { background: #00004b; }
-Palette { marker-line: #ff0000; }
+Palette { marker-line: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #ff0000, stop: 0.1 transparent); }
+
 
 ChatLine[label="highlight"] { foreground: #f0f5ff; background: #00008b; }
 
 
 ChatLine[label="highlight"] { foreground: #f0f5ff; background: #00008b; }
 
index b92bd09..cebcfb4 100644 (file)
@@ -30,8 +30,9 @@ ChatLine::url {
   foreground: palette(link);
 }
 
   foreground: palette(link);
 }
 
+// Markerline gets a nice (and hardly visible) gradient
 Palette {
 Palette {
-  marker-line: red;
+  marker-line: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 red, stop: 0.1 transparent);
 }
 
 // mIRC colors
 }
 
 // mIRC colors
index a47bc8c..cc7e2ed 100644 (file)
@@ -13,7 +13,8 @@
 // Copyright (C) Jussi Schultink 2009
 
 // Custom ChatView Colors
 // Copyright (C) Jussi Schultink 2009
 
 // Custom ChatView Colors
-Palette { marker-line: #ff0000; }
+Palette { marker-line: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #ff0000, stop: 0.1 transparent); }
+
 ChatView { background: #131313; }
 
 ChatLine[label="highlight"] {
 ChatView { background: #131313; }
 
 ChatLine[label="highlight"] {
index 6319154..0420432 100644 (file)
@@ -13,7 +13,7 @@ ChatLine[label="highlight"] {
 ChatLine::sender[label="highlight"] {
   background: #d7d7d7;
   font-weight:bold;
 ChatLine::sender[label="highlight"] {
   background: #d7d7d7;
   font-weight:bold;
-  foreground: #0000aa;  
+  foreground: #0000aa;
 }
 
 ChatLine[label="selected"] {
 }
 
 ChatLine[label="selected"] {
@@ -36,7 +36,7 @@ ChatLine::timestamp { foreground: #707c70; }
 ChatLine::timestamp[sender="self"] { foreground: #707c70; }
 ChatLine::timestamp[label="highlight"] { foreground: #707c70; }
 
 ChatLine::timestamp[sender="self"] { foreground: #707c70; }
 ChatLine::timestamp[label="highlight"] { foreground: #707c70; }
 
-Palette { marker-line: #ff0000; }
+Palette { marker-line: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #ff0000, stop: 0.1 transparent); }
 
 ChatLine::url { foreground: #0000aa; }
 ChatLine::url[sender="self"] { foreground: #0000aa; }
 
 ChatLine::url { foreground: #0000aa; }
 ChatLine::url[sender="self"] { foreground: #0000aa; }
index 396fb9a..2fa8aeb 100644 (file)
@@ -59,7 +59,8 @@ void QtUiStyle::generateSettingsQss() const {
   if(s.value("UseChatViewColors").toBool()) {
     out << "\n// Custom ChatView Colors\n"
 
   if(s.value("UseChatViewColors").toBool()) {
     out << "\n// Custom ChatView Colors\n"
 
-        << "Palette { marker-line: " << color("MarkerLine", s) << "; }\n"
+        // markerline is special in that it always used to use a gradient, so we keep this behavior even with the new implementation
+        << "Palette { marker-line: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 " << color("MarkerLine", s) << ", stop: 0.1 transparent); }\n"
         << "ChatView { background: " << color("ChatViewBackground", s) << "; }\n\n"
         << "ChatLine[label=\"highlight\"] {\n"
         << "  foreground: " << color("Highlight",s) << ";\n"
         << "ChatView { background: " << color("ChatViewBackground", s) << "; }\n\n"
         << "ChatLine[label=\"highlight\"] {\n"
         << "  foreground: " << color("Highlight",s) << ";\n"