From a8b1a382d95b0fd6c2438eb05daeea587e20b661 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 25 Aug 2009 23:18:39 +0200 Subject: [PATCH] Move stylesheets into $datadir/stylesheets; add m4yer's "classic" style --- data/CMakeLists.txt | 3 +- data/data.qrc | 2 +- data/{ => stylesheets}/default.qss | 6 +- data/stylesheets/m4yer.qss | 155 +++++++++++++++++++++++++++++ src/uisupport/uistyle.cpp | 2 +- 5 files changed, 162 insertions(+), 6 deletions(-) rename data/{ => stylesheets}/default.qss (98%) create mode 100644 data/stylesheets/m4yer.qss diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 5c0b9d1f..ff667fb5 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -18,7 +18,8 @@ if(WANT_MONO OR WANT_QTCLIENT) if(EMBED_DATA) set(CLIENT_RCS ${CLIENT_RCS} ../data/data.qrc PARENT_SCOPE) else(EMBED_DATA) - install(FILES default.qss networks.ini DESTINATION ${DATA_INSTALL_DIR}/quassel) + install(FILES networks.ini DESTINATION ${DATA_INSTALL_DIR}/quassel) + install(DIRECTORY stylesheets DESTINATION ${DATA_INSTALL_DIR}/quassel) endif(EMBED_DATA) if(NOT WIN32) diff --git a/data/data.qrc b/data/data.qrc index dcdf0972..78a9ed8f 100644 --- a/data/data.qrc +++ b/data/data.qrc @@ -1,6 +1,6 @@ - default.qss + stylesheets/default.qss networks.ini diff --git a/data/default.qss b/data/stylesheets/default.qss similarity index 98% rename from data/default.qss rename to data/stylesheets/default.qss index b2e47478..b92bd09c 100644 --- a/data/default.qss +++ b/data/stylesheets/default.qss @@ -18,9 +18,9 @@ ChatLine[label="selected"] { background: palette(highlight); } -ChatLine::sender[sender="self"] { - font-style: italic; -} +// ChatLine::sender[sender="self"] { +// font-style: italic; +// } ChatLine::timestamp { foreground: #707c70; diff --git a/data/stylesheets/m4yer.qss b/data/stylesheets/m4yer.qss new file mode 100644 index 00000000..63191545 --- /dev/null +++ b/data/stylesheets/m4yer.qss @@ -0,0 +1,155 @@ +// "Quassel Classic" stylesheet for Quassel IRC +// developed by m4yer + +// Basics +ChatLine { + foreground: palette(text); +} + +ChatLine[label="highlight"] { + background: #d7d7d7; +} + +ChatLine::sender[label="highlight"] { + background: #d7d7d7; + font-weight:bold; + foreground: #0000aa; +} + +ChatLine[label="selected"] { + foreground: palette(highlighted-text); + background: palette(highlight); +} + +ChatLine::sender { + foreground: #0000aa; +} + +ChatLine::sender[sender="self"] { + font-style: normal; + foreground: #0000ff; +} + +ChatLine[sender="self"] { foreground: #323232; } + +ChatLine::timestamp { foreground: #707c70; } +ChatLine::timestamp[sender="self"] { foreground: #707c70; } +ChatLine::timestamp[label="highlight"] { foreground: #707c70; } + +Palette { marker-line: #ff0000; } + +ChatLine::url { foreground: #0000aa; } +ChatLine::url[sender="self"] { foreground: #0000aa; } +ChatLine::url[label="highlight"] { foreground: #0000aa; } + +ChatLine::nick { font-weight: bold; } +ChatLine::nick[sender="self"] { font-weight: bold; } +ChatLine::nick[label="highlight"] { foreground: #0000aa; } + +// mIRC colors +ChatLine[fg-color="00"] { foreground: #ffffff; } +ChatLine[bg-color="00"] { background: #ffffff; } +ChatLine[fg-color="01"] { foreground: #000000; } +ChatLine[bg-color="01"] { background: #000000; } +ChatLine[fg-color="02"] { foreground: #000080; } +ChatLine[bg-color="02"] { background: #000080; } +ChatLine[fg-color="03"] { foreground: #008000; } +ChatLine[bg-color="03"] { background: #008000; } +ChatLine[fg-color="04"] { foreground: #ff0000; } +ChatLine[bg-color="04"] { background: #ff0000; } +ChatLine[fg-color="05"] { foreground: #800000; } +ChatLine[bg-color="05"] { background: #800000; } +ChatLine[fg-color="06"] { foreground: #800080; } +ChatLine[bg-color="06"] { background: #800080; } +ChatLine[fg-color="07"] { foreground: #ffa500; } +ChatLine[bg-color="07"] { background: #ffa500; } +ChatLine[fg-color="08"] { foreground: #ffff00; } +ChatLine[bg-color="08"] { background: #ffff00; } +ChatLine[fg-color="09"] { foreground: #00ff00; } +ChatLine[bg-color="09"] { background: #00ff00; } +ChatLine[fg-color="0a"] { foreground: #008080; } +ChatLine[bg-color="0a"] { background: #008080; } +ChatLine[fg-color="0b"] { foreground: #00ffff; } +ChatLine[bg-color="0b"] { background: #00ffff; } +ChatLine[fg-color="0c"] { foreground: #4169e1; } +ChatLine[bg-color="0c"] { background: #4169e1; } +ChatLine[fg-color="0d"] { foreground: #ff00ff; } +ChatLine[bg-color="0d"] { background: #ff00ff; } +ChatLine[fg-color="0e"] { foreground: #808080; } +ChatLine[bg-color="0e"] { background: #808080; } +ChatLine[fg-color="0f"] { foreground: #c0c0c0; } +ChatLine[bg-color="0f"] { background: #c0c0c0; } + + // for sender + ChatLine[fg-color="00", sender="self"] { foreground: #ffffff; } + ChatLine[bg-color="00", sender="self"] { background: #ffffff; } + ChatLine[fg-color="01", sender="self"] { foreground: #000000; } + ChatLine[bg-color="01", sender="self"] { background: #000000; } + ChatLine[fg-color="02", sender="self"] { foreground: #000080; } + ChatLine[bg-color="02", sender="self"] { background: #000080; } + ChatLine[fg-color="03", sender="self"] { foreground: #008000; } + ChatLine[bg-color="03", sender="self"] { background: #008000; } + ChatLine[fg-color="04", sender="self"] { foreground: #ff0000; } + ChatLine[bg-color="04", sender="self"] { background: #ff0000; } + ChatLine[fg-color="05", sender="self"] { foreground: #800000; } + ChatLine[bg-color="05", sender="self"] { background: #800000; } + ChatLine[fg-color="06", sender="self"] { foreground: #800080; } + ChatLine[bg-color="06", sender="self"] { background: #800080; } + ChatLine[fg-color="07", sender="self"] { foreground: #ffa500; } + ChatLine[bg-color="07", sender="self"] { background: #ffa500; } + ChatLine[fg-color="08", sender="self"] { foreground: #ffff00; } + ChatLine[bg-color="08", sender="self"] { background: #ffff00; } + ChatLine[fg-color="09", sender="self"] { foreground: #00ff00; } + ChatLine[bg-color="09", sender="self"] { background: #00ff00; } + ChatLine[fg-color="0a", sender="self"] { foreground: #008080; } + ChatLine[bg-color="0a", sender="self"] { background: #008080; } + ChatLine[fg-color="0b", sender="self"] { foreground: #00ffff; } + ChatLine[bg-color="0b", sender="self"] { background: #00ffff; } + ChatLine[fg-color="0c", sender="self"] { foreground: #4169e1; } + ChatLine[bg-color="0c", sender="self"] { background: #4169e1; } + ChatLine[fg-color="0d", sender="self"] { foreground: #ff00ff; } + ChatLine[bg-color="0d", sender="self"] { background: #ff00ff; } + ChatLine[fg-color="0e", sender="self"] { foreground: #808080; } + ChatLine[bg-color="0e", sender="self"] { background: #808080; } + ChatLine[fg-color="0f", sender="self"] { foreground: #c0c0c0; } + ChatLine[bg-color="0f", sender="self"] { background: #c0c0c0; } + +// mIRC formats +ChatLine[format="bold"] { font-weight: bold;} +ChatLine[format="italic"] { font-style: italic; } +ChatLine[format="underline"] { font-style: underline; } + + // for sender + ChatLine[format="bold", sender="self"] { foreground: #323232; font-weight: bold; } + ChatLine[format="italic", sender="self"] { foreground: #323232; font-style: italic; } + ChatLine[format="underline", sender="self"] { foreground: #323232; font-style: underline; } + +// ChatView message colors +ChatLine#notice { foreground: #916409; } +ChatLine#action { foreground: #000088; } +ChatLine#nick { foreground: #ff7700; } +ChatLine#mode { foreground: #ff7700; } +ChatLine#join { foreground: #009600; } +ChatLine#part { foreground: #990000; } +ChatLine#quit { foreground: #990000; } +ChatLine#kick { foreground: #990000; } +ChatLine#kill { foreground: #990000; } +ChatLine#server { foreground: #916409; } +ChatLine#info { foreground: #916409; } +ChatLine#error { foreground: #916409; } +ChatLine#daychange { foreground: #ff0000; } +ChatLine#topic { foreground: #ff7700; } + +// BufferView Colors +ChatListItem[type="query"] { foreground: #303030; } +ChatListItem[type="query", state="away"] { foreground: #a0a0a4; } +ChatListItem[type="network"] { foreground: #707c70; } + +ChatListItem[state="inactive"] { foreground: #a0a0a4; } +ChatListItem[state="channel-event"] { foreground: #21c300; } +ChatListItem[state="unread-message"] { foreground: #0000CC; } +ChatListItem[state="highlighted"] { foreground: #ff8000; } + +// NickView Colors +NickListItem[type="category"] { foreground: #707c70; } +NickListItem[type="user", state="away"] { foreground: #a0a0a4; } diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 281ec76c..41c50a6d 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -92,7 +92,7 @@ void UiStyle::loadStyleSheet() { UiStyleSettings s; QString styleSheet; - styleSheet += loadStyleSheet("file:///" + Quassel::findDataFilePath("default.qss")); + styleSheet += loadStyleSheet("file:///" + Quassel::findDataFilePath("stylesheets/default.qss")); styleSheet += loadStyleSheet("file:///" + Quassel::configDirPath() + "settings.qss"); if(s.value("UseCustomStyleSheet", false).toBool()) styleSheet += loadStyleSheet("file:///" + s.value("CustomStyleSheetPath").toString(), true); -- 2.20.1