diff --git a/resources/desktop/com.github.rssguard.appdata.xml b/resources/desktop/com.github.rssguard.appdata.xml index bc92aef68..5257a05b0 100644 --- a/resources/desktop/com.github.rssguard.appdata.xml +++ b/resources/desktop/com.github.rssguard.appdata.xml @@ -26,7 +26,7 @@ https://github.com/sponsors/martinrotter - + none diff --git a/resources/docs/Documentation.md b/resources/docs/Documentation.md index ce89824d2..266e2038a 100644 --- a/resources/docs/Documentation.md +++ b/resources/docs/Documentation.md @@ -473,13 +473,13 @@ Note that unassigning a message labels is also synchronized at regular intervals Also, [message filters](#fltr) can assign or remove labels to/from messages. ### Skins -RSS Guard is a skin-able application. Its GUI can be almost completely styled with [stylesheets](https://doc.qt.io/qt-5/stylesheet.html). +RSS Guard is a skinable application. Its GUI can be almost completely styled with [Qt stylesheets](https://doc.qt.io/qt-5/stylesheet.html). alt-img You can select style and skin in settings category `User interface`. -RSS Guard encapsulates styling capabilities via *skins* feature. Each skin is placed in its own folder and must contain several [files](https://github.com/martinrotter/rssguard/tree/master/resources/skins/vergilius). There are some [built-in](https://github.com/martinrotter/rssguard/tree/master/resources/skins) skins, but you can place your custom skins in your [user data folder](#userd). You can find exact path to your user data folder in `About` dialog. Note that there must be subfolder `skins`. Create it if it does not exist and place your custom skins inside. +RSS Guard encapsulates styling capabilities via *skins* feature. Each skin is placed in its own folder and must contain several [files](https://github.com/martinrotter/rssguard/tree/master/resources/skins/plain). There are some [built-in](https://github.com/martinrotter/rssguard/tree/master/resources/skins) skins, but you can place your custom skins in your [user data folder](#userd). You can find exact path to your user data folder in `About` dialog. Note that there must be subfolder `skins`. Create it if it does not exist and place your custom skins inside. The base for your custom skin may serve an empty ["plain" skin](https://github.com/martinrotter/rssguard/tree/master/resources/skins/plain). Look the [README file](https://github.com/martinrotter/rssguard/tree/master/resources/skins/plain/README) there, for some commentaries to it. diff --git a/resources/skins/plain/README b/resources/skins/plain/README new file mode 100755 index 000000000..d87d10ae4 --- /dev/null +++ b/resources/skins/plain/README @@ -0,0 +1,37 @@ +%1, %2, ..., %N placeholders are used through all files and are replaced +with various article's properties in run-time when needed. + +Here is overview of all placeholders used throughtout the skin: + Common placeholders: + %data% - is replaced by current absolute path to user data folder. + + html_wrapper.html: + %style% - Skin-wide CSS, will be replaced by custom CSS if skin provides it in file "html_style.css". + %1 - Title of the article. + %2 - Body of the preview which is composed from: + - single html_single_message.html (single article preview), + - multiple html_single_message.html (newspaper mode). + + html_single_message.html: + %1 - Title of the article. + %2 - "Written by" text. + %3 - URL of the article. + %4 - Body of the article. + %5 - Date/time of the article. + %6 - Attachments (composed from html_enclosure_every.html). + %7 - Attached pictures (composed from html_enclosure_image.html). + %8 - Database ID of the message. + + html_adblocked.html: + %1 - Title of the page. This page is used when the website is entirely blocked by AdBlock. + %2 - Description of what and why was blocked. + + html_enclosure_every.html: + %1 - URL of the attached media file. + %2 - Attachment symbol. + %3 - MIME type of the attachment. + + html_enclosure_image.html: + %1 - URL of the attached picture file. + %2 - MIME type of the picture. + %3 - height of the picture thumbnail to be displayed which is loaded from application settings. diff --git a/resources/skins/plain/html_adblocked.html b/resources/skins/plain/html_adblocked.html new file mode 100755 index 000000000..ab3b1b4d5 --- /dev/null +++ b/resources/skins/plain/html_adblocked.html @@ -0,0 +1,4 @@ +
+

%1

+
%2
+
\ No newline at end of file diff --git a/resources/skins/plain/html_enclosure_every.html b/resources/skins/plain/html_enclosure_every.html new file mode 100755 index 000000000..b4ecb8e0d --- /dev/null +++ b/resources/skins/plain/html_enclosure_every.html @@ -0,0 +1 @@ +%2%3 \ No newline at end of file diff --git a/resources/skins/plain/html_enclosure_image.html b/resources/skins/plain/html_enclosure_image.html new file mode 100755 index 000000000..fd617f8ac --- /dev/null +++ b/resources/skins/plain/html_enclosure_image.html @@ -0,0 +1 @@ +%2 \ No newline at end of file diff --git a/resources/skins/plain/html_single_message.html b/resources/skins/plain/html_single_message.html new file mode 100755 index 000000000..2dc165bd5 --- /dev/null +++ b/resources/skins/plain/html_single_message.html @@ -0,0 +1,8 @@ +
+
%1 🔗URL %6
+
+
%2, %5
+
%7
+ %4 +
+
diff --git a/resources/skins/plain/html_wrapper.html b/resources/skins/plain/html_wrapper.html new file mode 100755 index 000000000..528542f56 --- /dev/null +++ b/resources/skins/plain/html_wrapper.html @@ -0,0 +1,42 @@ + + + + + + + + + + %1 + + + %2 + + diff --git a/resources/skins/plain/metadata.xml b/resources/skins/plain/metadata.xml new file mode 100755 index 000000000..ced7b669f --- /dev/null +++ b/resources/skins/plain/metadata.xml @@ -0,0 +1,19 @@ + + + + Martin Rotter + + + + #3A4EE4 + #ff66cc + #4EE43A + #ff99ff + #00ff99 + + \ No newline at end of file diff --git a/resources/skins/plain/qt_style.qss b/resources/skins/plain/qt_style.qss new file mode 100755 index 000000000..afc662729 --- /dev/null +++ b/resources/skins/plain/qt_style.qss @@ -0,0 +1,13 @@ +/* Qt stylesheet. */ + +QTextEdit { + selection-background-color: #4861f0; +} + +QStatusBar::item { + border: none; +} + +QSplitter::handle { + background: rgba(117, 117, 117, 0.5); +} \ No newline at end of file diff --git a/src/librssguard/miscellaneous/skinfactory.cpp b/src/librssguard/miscellaneous/skinfactory.cpp index c8ee4bbf3..150739176 100644 --- a/src/librssguard/miscellaneous/skinfactory.cpp +++ b/src/librssguard/miscellaneous/skinfactory.cpp @@ -271,7 +271,8 @@ Skin SkinFactory::skinInfo(const QString& skin_name, bool* ok) const { skin.m_adblocked = loadSkinFile(skin_folder_no_sep, QSL("html_adblocked.html"), base_skin_folder); if (ok != nullptr) { - *ok = !skin.m_author.isEmpty() && !skin.m_version.isEmpty() && + *ok = !skin.m_author.isEmpty() && + !skin.m_version.isEmpty() && !skin.m_baseName.isEmpty() && !skin.m_layoutMarkup.isEmpty(); }