diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2021-03-06 18:08:28 +0100 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2021-03-06 18:08:28 +0100 |
| commit | d114e97f05cbe7656cc20d9c8096f243cfe30093 (patch) | |
| tree | 4d9c1f14956ba8d133d3700e47ac8a2b640b8220 /src | |
| parent | f616e903c755b6b09bf0157ab6236fa6d77a80e5 (diff) | |
| download | kristall-d114e97f05cbe7656cc20d9c8096f243cfe30093.tar.gz | |
Resolves gophermap rendering. Closes #22.
Diffstat (limited to 'src')
28 files changed, 65 insertions, 32 deletions
diff --git a/src/about/updates.gemini b/src/about/updates.gemini index ddc0dbc..b06ccd5 100644 --- a/src/about/updates.gemini +++ b/src/about/updates.gemini @@ -2,16 +2,16 @@ ## 0.4 - Improved user experience * Basic Emoji rendering support using OpenMoji -* Improved favourites: Adds grouping and custom names +* Changed: Improved favourites: Adds grouping and custom names * Adds support for text/kristall-theme mime to preview/install kristall themes via the browser surface * Adds Ctrl-F search function -* Mouse middle now opens links in new tabs -* Ctrl + mouse left opens links in new tabs -* Mouse middle now closes tabs when clicking them -* Improved settings system with folder-based approach -* Document styles are now saved as files which are exchangeable +* Adds Mouse middle now opens links in new tabs +* Adds Ctrl + mouse left opens links in new tabs +* Adds Mouse middle now closes tabs when clicking them +* Adds improved settings system with folder-based approach * Adds colored icons to dark/light theme so it has improved contrast -* New action: "View/Show document source" will display the raw data of the document in a small separate window +* Adds new action: "View/Show document source" will display the raw data of the document in a small separate window +* Change: Document styles are now saved as files which are exchangeable * Change: Makes TLS editor columns sortable -- There's a lot missing here still @@ -22,6 +22,7 @@ * Adds --isolated command line option to start a separated instance of kristall * Adds possibility to open favourites with enter key in addition to double clicking. * Adds possibility to open history entries with enter key in addition to double clicking. +* Fix: Gophermap icons map now respect the background color ## 0.3 - TLS and security * Adds support for transient client certificates diff --git a/src/icons.qrc b/src/icons.qrc index 846ef6f..455b9bc 100644 --- a/src/icons.qrc +++ b/src/icons.qrc @@ -1,17 +1,29 @@ <RCC> <qresource prefix="/"> - <file>icons/gopher/binary.svg</file> - <file>icons/gopher/directory.svg</file> - <file>icons/gopher/dns.svg</file> - <file>icons/gopher/error.svg</file> - <file>icons/gopher/gif.svg</file> - <file>icons/gopher/html.svg</file> - <file>icons/gopher/image.svg</file> - <file>icons/gopher/mirror.svg</file> - <file>icons/gopher/search.svg</file> - <file>icons/gopher/sound.svg</file> - <file>icons/gopher/telnet.svg</file> - <file>icons/gopher/text.svg</file> + <file>icons/dark/gopher/binary.svg</file> + <file>icons/dark/gopher/directory.svg</file> + <file>icons/dark/gopher/dns.svg</file> + <file>icons/dark/gopher/error.svg</file> + <file>icons/dark/gopher/gif.svg</file> + <file>icons/dark/gopher/html.svg</file> + <file>icons/dark/gopher/image.svg</file> + <file>icons/dark/gopher/mirror.svg</file> + <file>icons/dark/gopher/search.svg</file> + <file>icons/dark/gopher/sound.svg</file> + <file>icons/dark/gopher/telnet.svg</file> + <file>icons/dark/gopher/text.svg</file> + <file>icons/light/gopher/binary.svg</file> + <file>icons/light/gopher/directory.svg</file> + <file>icons/light/gopher/dns.svg</file> + <file>icons/light/gopher/error.svg</file> + <file>icons/light/gopher/gif.svg</file> + <file>icons/light/gopher/html.svg</file> + <file>icons/light/gopher/image.svg</file> + <file>icons/light/gopher/mirror.svg</file> + <file>icons/light/gopher/search.svg</file> + <file>icons/light/gopher/sound.svg</file> + <file>icons/light/gopher/telnet.svg</file> + <file>icons/light/gopher/text.svg</file> <file>icons/light/actions/window-close.svg</file> <file>icons/light/actions/process-stop.svg</file> <file>icons/light/actions/edit-delete.svg</file> diff --git a/src/icons/dark/gopher/binary.svg b/src/icons/dark/gopher/binary.svg new file mode 100644 index 0000000..8797d98 --- /dev/null +++ b/src/icons/dark/gopher/binary.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M5.12,5H18.87L17.93,4H5.93L5.12,5M20.54,5.23C20.83,5.57 21,6 21,6.5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V6.5C3,6 3.17,5.57 3.46,5.23L4.84,3.55C5.12,3.21 5.53,3 6,3H18C18.47,3 18.88,3.21 19.15,3.55L20.54,5.23M6,18H12V15H6V18Z" /></svg> diff --git a/src/icons/dark/gopher/directory.svg b/src/icons/dark/gopher/directory.svg new file mode 100644 index 0000000..faa31e5 --- /dev/null +++ b/src/icons/dark/gopher/directory.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/dns.svg b/src/icons/dark/gopher/dns.svg new file mode 100644 index 0000000..d08ee5c --- /dev/null +++ b/src/icons/dark/gopher/dns.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M7,9A2,2 0 0,1 5,7A2,2 0 0,1 7,5A2,2 0 0,1 9,7A2,2 0 0,1 7,9M20,3H4A1,1 0 0,0 3,4V10A1,1 0 0,0 4,11H20A1,1 0 0,0 21,10V4A1,1 0 0,0 20,3M7,19A2,2 0 0,1 5,17A2,2 0 0,1 7,15A2,2 0 0,1 9,17A2,2 0 0,1 7,19M20,13H4A1,1 0 0,0 3,14V20A1,1 0 0,0 4,21H20A1,1 0 0,0 21,20V14A1,1 0 0,0 20,13Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/error.svg b/src/icons/dark/gopher/error.svg new file mode 100644 index 0000000..65e2aaa --- /dev/null +++ b/src/icons/dark/gopher/error.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/gif.svg b/src/icons/dark/gopher/gif.svg new file mode 100644 index 0000000..eeb72b9 --- /dev/null +++ b/src/icons/dark/gopher/gif.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M11,8H13V16H11V8M7.67,8H4.33C3.53,8 3,8.67 3,9.33V14.67C3,15.33 3.53,16 4.33,16H7.67C8.47,16 9,15.33 9,14.67V12H7V14H5V10H9V9.33C9,8.67 8.47,8 7.67,8M21,10V8H15V16H17V14H19.5V12H17V10H21Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/html.svg b/src/icons/dark/gopher/html.svg new file mode 100644 index 0000000..f28859a --- /dev/null +++ b/src/icons/dark/gopher/html.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/image.svg b/src/icons/dark/gopher/image.svg new file mode 100644 index 0000000..08f8fac --- /dev/null +++ b/src/icons/dark/gopher/image.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/mirror.svg b/src/icons/dark/gopher/mirror.svg new file mode 100644 index 0000000..547d6ba --- /dev/null +++ b/src/icons/dark/gopher/mirror.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M12 1C16.69 1 20.5 5.93 20.5 12C20.5 18.08 16.69 23 12 23C7.31 23 3.5 18.08 3.5 12C3.5 5.93 7.31 1 12 1M12 3C8.41 3 5.5 7.03 5.5 12C5.5 16.97 8.41 21 12 21C15.59 21 18.5 16.97 18.5 12C18.5 7.03 15.59 3 12 3M8.29 10.28L11.53 7.03L12.59 8.09L9.35 11.34L8.29 10.28M8.7 14.61L14.36 8.95L15.42 10L9.76 15.67L8.7 14.61Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/search.svg b/src/icons/dark/gopher/search.svg new file mode 100644 index 0000000..25ced2e --- /dev/null +++ b/src/icons/dark/gopher/search.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/sound.svg b/src/icons/dark/gopher/sound.svg new file mode 100644 index 0000000..2fb48b2 --- /dev/null +++ b/src/icons/dark/gopher/sound.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/telnet.svg b/src/icons/dark/gopher/telnet.svg new file mode 100644 index 0000000..cdf0c0e --- /dev/null +++ b/src/icons/dark/gopher/telnet.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M20,19V7H4V19H20M20,3A2,2 0 0,1 22,5V19A2,2 0 0,1 20,21H4A2,2 0 0,1 2,19V5C2,3.89 2.9,3 4,3H20M13,17V15H18V17H13M9.58,13L5.57,9H8.4L11.7,12.3C12.09,12.69 12.09,13.33 11.7,13.72L8.42,17H5.59L9.58,13Z" /></svg>
\ No newline at end of file diff --git a/src/icons/dark/gopher/text.svg b/src/icons/dark/gopher/text.svg new file mode 100644 index 0000000..4cf4572 --- /dev/null +++ b/src/icons/dark/gopher/text.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#FFFFFF" d="M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z" /></svg>
\ No newline at end of file diff --git a/src/icons/gopher/binary.svg b/src/icons/light/gopher/binary.svg index e731a17..e731a17 100644 --- a/src/icons/gopher/binary.svg +++ b/src/icons/light/gopher/binary.svg diff --git a/src/icons/gopher/directory.svg b/src/icons/light/gopher/directory.svg index 09ce7cc..09ce7cc 100644 --- a/src/icons/gopher/directory.svg +++ b/src/icons/light/gopher/directory.svg diff --git a/src/icons/gopher/dns.svg b/src/icons/light/gopher/dns.svg index ec52048..ec52048 100644 --- a/src/icons/gopher/dns.svg +++ b/src/icons/light/gopher/dns.svg diff --git a/src/icons/gopher/error.svg b/src/icons/light/gopher/error.svg index 8cd654a..8cd654a 100644 --- a/src/icons/gopher/error.svg +++ b/src/icons/light/gopher/error.svg diff --git a/src/icons/gopher/gif.svg b/src/icons/light/gopher/gif.svg index 5a53e14..5a53e14 100644 --- a/src/icons/gopher/gif.svg +++ b/src/icons/light/gopher/gif.svg diff --git a/src/icons/gopher/html.svg b/src/icons/light/gopher/html.svg index 2c65f32..2c65f32 100644 --- a/src/icons/gopher/html.svg +++ b/src/icons/light/gopher/html.svg diff --git a/src/icons/gopher/image.svg b/src/icons/light/gopher/image.svg index 5c61724..5c61724 100644 --- a/src/icons/gopher/image.svg +++ b/src/icons/light/gopher/image.svg diff --git a/src/icons/gopher/mirror.svg b/src/icons/light/gopher/mirror.svg index c879c79..c879c79 100644 --- a/src/icons/gopher/mirror.svg +++ b/src/icons/light/gopher/mirror.svg diff --git a/src/icons/gopher/search.svg b/src/icons/light/gopher/search.svg index eb42571..eb42571 100644 --- a/src/icons/gopher/search.svg +++ b/src/icons/light/gopher/search.svg diff --git a/src/icons/gopher/sound.svg b/src/icons/light/gopher/sound.svg index 36d700f..36d700f 100644 --- a/src/icons/gopher/sound.svg +++ b/src/icons/light/gopher/sound.svg diff --git a/src/icons/gopher/telnet.svg b/src/icons/light/gopher/telnet.svg index 77b5d13..77b5d13 100644 --- a/src/icons/gopher/telnet.svg +++ b/src/icons/light/gopher/telnet.svg diff --git a/src/icons/gopher/text.svg b/src/icons/light/gopher/text.svg index 4a23bd3..4a23bd3 100644 --- a/src/icons/gopher/text.svg +++ b/src/icons/light/gopher/text.svg diff --git a/src/protocols/abouthandler.cpp b/src/protocols/abouthandler.cpp index 8a60962..46fa643 100644 --- a/src/protocols/abouthandler.cpp +++ b/src/protocols/abouthandler.cpp @@ -26,7 +26,7 @@ bool AboutHandler::startRequest(const QUrl &url, ProtocolHandler::RequestOptions { QByteArray document; - document.append(tr("# Favourites\n")); + document.append(tr("# Favourites\n").toUtf8()); QString current_group; diff --git a/src/renderers/gophermaprenderer.cpp b/src/renderers/gophermaprenderer.cpp index e3422f4..02abebd 100644 --- a/src/renderers/gophermaprenderer.cpp +++ b/src/renderers/gophermaprenderer.cpp @@ -34,18 +34,26 @@ std::unique_ptr<QTextDocument> GophermapRenderer::render(const QByteArray &input if(not emit_text_only) { - result->addResource(QTextDocument::ImageResource, QUrl("gopher/binary"), QVariant::fromValue(QImage(":/icons/gopher/binary.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/directory"), QVariant::fromValue(QImage(":/icons/gopher/directory.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/dns"), QVariant::fromValue(QImage(":/icons/gopher/dns.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/error"), QVariant::fromValue(QImage(":/icons/gopher/error.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/gif"), QVariant::fromValue(QImage(":/icons/gopher/gif.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/html"), QVariant::fromValue(QImage(":/icons/gopher/html.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/image"), QVariant::fromValue(QImage(":/icons/gopher/image.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/mirror"), QVariant::fromValue(QImage(":/icons/gopher/mirror.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/search"), QVariant::fromValue(QImage(":/icons/gopher/search.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/sound"), QVariant::fromValue(QImage(":/icons/gopher/sound.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/telnet"), QVariant::fromValue(QImage(":/icons/gopher/telnet.svg"))); - result->addResource(QTextDocument::ImageResource, QUrl("gopher/text"), QVariant::fromValue(QImage(":/icons/gopher/text.svg"))); + QString icon_prefix; + if(themed_style.background_color.valueF() < 0.65) + icon_prefix = ":/icons/dark/gopher/"; + else + icon_prefix = ":/icons/light/gopher/"; + qDebug() << "lightness" << themed_style.background_color.lightnessF(); + qDebug() << "value" << themed_style.background_color.valueF(); + + result->addResource(QTextDocument::ImageResource, QUrl("gopher/binary"), QVariant::fromValue(QImage(icon_prefix + "binary.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/directory"), QVariant::fromValue(QImage(icon_prefix + "directory.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/dns"), QVariant::fromValue(QImage(icon_prefix + "dns.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/error"), QVariant::fromValue(QImage(icon_prefix + "error.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/gif"), QVariant::fromValue(QImage(icon_prefix + "gif.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/html"), QVariant::fromValue(QImage(icon_prefix + "html.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/image"), QVariant::fromValue(QImage(icon_prefix + "image.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/mirror"), QVariant::fromValue(QImage(icon_prefix + "mirror.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/search"), QVariant::fromValue(QImage(icon_prefix + "search.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/sound"), QVariant::fromValue(QImage(icon_prefix + "sound.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/telnet"), QVariant::fromValue(QImage(icon_prefix + "telnet.svg"))); + result->addResource(QTextDocument::ImageResource, QUrl("gopher/text"), QVariant::fromValue(QImage(icon_prefix + "text.svg"))); } QTextCursor cursor{result.get()}; |
