Project

General

Profile

Stylesheets » History » Version 4

ChrisH, 07/29/2013 10:44 PM

1 1 seezer
h1. Stylesheets
2 1 seezer
3 1 seezer
{{toc}}
4 1 seezer
5 1 seezer
As of version 0.5rc1, Quassel supports custom stylesheets.
6 1 seezer
7 4 ChrisH
The syntax follows that of "Qt-Stylesheets":http://qt-project.org/doc/qt-5.0/qtwidgets/stylesheet.html but extends it with custom elements.
8 1 seezer
9 1 seezer
h2. Use a custom stylesheet
10 1 seezer
11 1 seezer
Click on Settings -> Configure Quassel... (Shortcut: F7) and enable your stylesheet there
12 1 seezer
13 1 seezer
!setup_custom_stylesheet.png!
14 1 seezer
15 1 seezer
16 1 seezer
h2. Gallery
17 1 seezer
18 1 seezer
User created stylesheets can be found in the [[Stylesheet Gallery]].
19 1 seezer
Feel free to add your own creations there.
20 2 GabydeWilde
21 2 GabydeWilde
h2. Example
22 2 GabydeWilde
23 2 GabydeWilde
Change the background colors for all of the sections
24 1 seezer
25 4 ChrisH
<pre>
26 2 GabydeWilde
ChatView { background: #303030; }
27 2 GabydeWilde
NickView { background: #303030; }
28 2 GabydeWilde
BufferView { background: #303030; }
29 2 GabydeWilde
QTextEdit { background: #303030; color: #E2E2E2; }
30 2 GabydeWilde
StyledLabel#topicLabel { background: #303030; }
31 1 seezer
TopicWidget { background: #303030; }
32 4 ChrisH
</pre>
33 1 seezer
34 4 ChrisH
*Note:* Quassel stylesheets also support @Palette { role: color; }@ for setting the system palette. See the "QPalette docs":http://qt-project.org/doc/qt-5.1/qtgui/qpalette.html#ColorGroup-enum for available roles, and convert them into qss-style attributes, so ButtonText would become button-text or see "qssparser.cpp"https://github.com/quassel/quassel/blob/master/src/uisupport/qssparser.cpp in the source files. In fact, qssparser.cpp is the authorative source for Quassel's qss syntax that contains all the extensions over standard Qt qss syntax.
35 4 ChrisH
36 4 ChrisH
The Qt Docs contains numerous examples for styling base Qt elements: https://qt-project.org/doc/qt-5.1/qtwidgets/stylesheet-examples.html