From a833bc5a3ebe4f3f2faed01a8580956d61428462 Mon Sep 17 00:00:00 2001 From: Al Date: Wed, 10 Jul 2019 20:52:43 +0200 Subject: [PATCH 1/6] Improved Nexus description css to be easier on the eyes and handle images better. --- src/modinfodialognexus.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modinfodialognexus.cpp b/src/modinfodialognexus.cpp index 04683c89a..5e88206c3 100644 --- a/src/modinfodialognexus.cpp +++ b/src/modinfodialognexus.cpp @@ -210,6 +210,14 @@ void NexusTab::onModChanged() max-width: 1060px; margin-left: auto; margin-right: auto; + padding-right: 7px; + padding-left: 7px; + padding-top: 20px; + padding-bottom: 20px; + } + + img { + max-width: 100%; } a From c486a883482afe4961842aacc8c53613589cd018 Mon Sep 17 00:00:00 2001 From: Al Date: Wed, 10 Jul 2019 21:41:15 +0200 Subject: [PATCH 2/6] Show timestamp seconds of log entries in logList view. --- src/logbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logbuffer.cpp b/src/logbuffer.cpp index 7314624f4..dfe8f9439 100644 --- a/src/logbuffer.cpp +++ b/src/logbuffer.cpp @@ -191,7 +191,7 @@ QVariant LogBuffer::data(const QModelIndex &index, int role) const switch (role) { case Qt::DisplayRole: { if (index.column() == 0) { - return m_Messages[msgIndex].time; + return m_Messages[msgIndex].time.toString("H: mm: ss"); } else if (index.column() == 1) { const QString &msg = m_Messages[msgIndex].message; if (msg.length() < 200) { From 23b71ca21f15288f9d2e7e04a37de95b8ae8ca18 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 14 Jul 2019 01:09:36 +0200 Subject: [PATCH 3/6] Add full support for quotes in nexus descriptions and avoid url horizontal overflow by forcing world break word wrap. --- src/bbcode.cpp | 6 +++--- src/modinfodialognexus.cpp | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/bbcode.cpp b/src/bbcode.cpp index 9f0641066..3d7b2ba25 100644 --- a/src/bbcode.cpp +++ b/src/bbcode.cpp @@ -137,11 +137,11 @@ class BBCodeMap { m_TagMap["center"] = std::make_pair(QRegExp("\\[center\\](.*)\\[/center\\]"), "
\\1
"); m_TagMap["quote"] = std::make_pair(QRegExp("\\[quote\\](.*)\\[/quote\\]"), - "
\"\\1\"
"); + "
\\1
"); m_TagMap["quote="] = std::make_pair(QRegExp("\\[quote=([^\\]]*)\\](.*)\\[/quote\\]"), - "
\"\\2\"
--\\1

"); + "
\\2
"); m_TagMap["code"] = std::make_pair(QRegExp("\\[code\\](.*)\\[/code\\]"), - "
\\1
"); + "\\1"); m_TagMap["heading"]= std::make_pair(QRegExp("\\[heading\\](.*)\\[/heading\\]"), "

\\1

"); m_TagMap["line"] = std::make_pair(QRegExp("\\[line\\]"), diff --git a/src/modinfodialognexus.cpp b/src/modinfodialognexus.cpp index 5e88206c3..180c72f09 100644 --- a/src/modinfodialognexus.cpp +++ b/src/modinfodialognexus.cpp @@ -219,9 +219,31 @@ void NexusTab::onModChanged() img { max-width: 100%; } + + figure.quote { + position: relative; + padding: 24px; + margin: 10px 20px 10px 10px; + color: #e1e1e1; + line-height: 1.5; + font-style: italic; + border-left: 6px solid #57a5cc; + border-left-color: rgb(87, 165, 204); + background: #383838 url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbi1xdW90ZSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOnJnYig2OSwgNjksIDcwKTtoZWlnaHQ6MjlweDtsZWZ0OjE1cHg7cG9zaXRpb246YWJzb2x1dGU7dG9wOjE1cHg7d2lkdGg6MzhweDsiPjxwYXRoIGNsYXNzPSJwYXRoMSIgZD0iTTAgMjAuNjc0YzAgNy4yMjUgNC42NjggMTEuMzM3IDkuODkyIDExLjMzNyA0LjgyNC0wLjA2MiA4LjcxOS0zLjk1NiA4Ljc4MS04Ljc3NSAwLTQuNzg1LTMuMzM0LTguMDA5LTcuNTU4LTguMDA5LTAuMDc4LTAuMDA0LTAuMTctMC4wMDYtMC4yNjItMC4wMDYtMC43MDMgMC0xLjM3NyAwLjEyNC0yLjAwMSAwLjM1MiAxLjA0MS00LjAxNCA1LjE1My04LjY4MyA4LjcxLTEwLjU3MmwtNi4xMTMtNS4wMDJjLTYuODkxIDQuODkxLTExLjQ0OCAxMi4zMzgtMTEuNDQ4IDIwLjY3NHpNMjIuNjc1IDIwLjY3NGMwIDcuMjI1IDQuNjY4IDExLjMzNyA5Ljg5MiAxMS4zMzcgNC44LTAuMDU2IDguNjctMy45NjEgOC42Ny04Ljc2OSAwLTAuMDA0IDAtMC4wMDggMC0wLjAxMiAwLTQuNzc5LTMuMjIzLTguMDAyLTcuNDQ3LTguMDAyLTAuMDk1LTAuMDA2LTAuMjA2LTAuMDA5LTAuMzE4LTAuMDA5LTAuNjg0IDAtMS4zMzkgMC4xMjYtMS45NDMgMC4zNTUgMC45MjctNC4wMTQgNS4xNS04LjY4MiA4LjcwNy0xMC41NzJsLTYuMTI0LTUuMDAyYy02Ljg5MSA0Ljg5MS0xMS40MzcgMTIuMzM4LTExLjQzNyAyMC42NzR6IiBzdHlsZT0iZmlsbDpyZ2IoNjksIDY5LCA3MCk7aGVpZ2h0OmF1dG87d2lkdGg6YXV0bzsiLz48L3N2Zz4=) no-repeat; + } + + figure.quote blockquote { + position: relative; + margin: 0; + padding: 0; + } a { + /*should avoid overflow with long links forcing wordwrap regardless of spaces*/ + overflow-wrap: break-word; + word-wrap: break-word; + color: #8197ec; text-decoration: none; } From a2aa4270e9d8516ece2a6e013ff6a13918dd1efc Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 14 Jul 2019 01:55:08 +0200 Subject: [PATCH 4/6] Added full Spoiler support to the nexus Description viewer. --- src/bbcode.cpp | 2 ++ src/modinfodialognexus.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/bbcode.cpp b/src/bbcode.cpp index 3d7b2ba25..51c461e67 100644 --- a/src/bbcode.cpp +++ b/src/bbcode.cpp @@ -140,6 +140,8 @@ class BBCodeMap { "
\\1
"); m_TagMap["quote="] = std::make_pair(QRegExp("\\[quote=([^\\]]*)\\](.*)\\[/quote\\]"), "
\\2
"); + m_TagMap["spoiler"] = std::make_pair(QRegExp("\\[spoiler\\](.*)\\[/spoiler\\]"), + "
Spoiler:
Show
\\1
"); m_TagMap["code"] = std::make_pair(QRegExp("\\[code\\](.*)\\[/code\\]"), "\\1"); m_TagMap["heading"]= std::make_pair(QRegExp("\\[heading\\](.*)\\[/heading\\]"), diff --git a/src/modinfodialognexus.cpp b/src/modinfodialognexus.cpp index 180c72f09..e606525c6 100644 --- a/src/modinfodialognexus.cpp +++ b/src/modinfodialognexus.cpp @@ -238,6 +238,32 @@ void NexusTab::onModChanged() padding: 0; } + div.spoiler_content { + background: #262626; + border: 1px dashed #3b3b3b; + padding: 5px; + margin: 5px; + } + + div.bbc_spoiler_show{ + border: 1px solid black; + background-color: #454545; + font-size: 11px; + padding: 3px; + color: #E6E6E6; + border-radius: 3px; + display: inline-block; + cursor: pointer; + } + + details summary::-webkit-details-marker { + display:none; + } + + summary:focus { + outline: 0; + } + a { /*should avoid overflow with long links forcing wordwrap regardless of spaces*/ From b997e97472915eb54e42dc0508ddc5d4e78cd231 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 14 Jul 2019 02:46:57 +0200 Subject: [PATCH 5/6] Fixed Youtube links in Nexus Description view. --- src/bbcode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bbcode.cpp b/src/bbcode.cpp index 51c461e67..eae38f340 100644 --- a/src/bbcode.cpp +++ b/src/bbcode.cpp @@ -183,7 +183,7 @@ class BBCodeMap { m_TagMap["email="] = std::make_pair(QRegExp("\\[email=\"?([^\\]]*)\"?\\](.*)\\[/email\\]"), "\\2"); m_TagMap["youtube"] = std::make_pair(QRegExp("\\[youtube\\](.*)\\[/youtube\\]"), - "http://www.youtube.com/v/\\1"); + "https://youtu.be/\\1"); // make all patterns non-greedy and case-insensitive From 21b9d90d0030a3608b4c9336d0d436f6e87fb998 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 14 Jul 2019 17:15:43 +0200 Subject: [PATCH 6/6] Changed youtube links in nexus description to use full version instead of shortened one. --- src/bbcode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bbcode.cpp b/src/bbcode.cpp index eae38f340..323dd1288 100644 --- a/src/bbcode.cpp +++ b/src/bbcode.cpp @@ -183,7 +183,7 @@ class BBCodeMap { m_TagMap["email="] = std::make_pair(QRegExp("\\[email=\"?([^\\]]*)\"?\\](.*)\\[/email\\]"), "\\2"); m_TagMap["youtube"] = std::make_pair(QRegExp("\\[youtube\\](.*)\\[/youtube\\]"), - "https://youtu.be/\\1"); + "https://www.youtube.com/watch?v=\\1"); // make all patterns non-greedy and case-insensitive