aboutsummaryrefslogtreecommitdiff
path: root/src/geminirenderer.hpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-08 00:30:32 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-08 00:30:32 +0200
commitf02ccb928fd4ed591d2efe118a571e154f5df68a (patch)
tree2fc7c4037423d074c410f4c53714ddc842d33351 /src/geminirenderer.hpp
parent425f9d41cd337133d5677744eef937a8a2a61212 (diff)
downloadkristall-f02ccb928fd4ed591d2efe118a571e154f5df68a.tar.gz
Starts to implement gopher protocol and gophermap support. Heavily WIP, but you can already surf on gopherspace!
Diffstat (limited to 'src/geminirenderer.hpp')
-rw-r--r--src/geminirenderer.hpp48
1 files changed, 2 insertions, 46 deletions
diff --git a/src/geminirenderer.hpp b/src/geminirenderer.hpp
index c93fd4e..07deec6 100644
--- a/src/geminirenderer.hpp
+++ b/src/geminirenderer.hpp
@@ -7,51 +7,7 @@
#include "documentoutlinemodel.hpp"
-struct GeminiStyle
-{
- enum Theme {
- Fixed = 0,
- AutoDarkTheme = 1,
- AutoLightTheme = 2
- };
-
- GeminiStyle();
-
- Theme theme;
-
- QFont standard_font;
- QFont h1_font;
- QFont h2_font;
- QFont h3_font;
- QFont preformatted_font;
-
- QColor background_color;
- QColor standard_color;
- QColor preformatted_color;
- QColor h1_color;
- QColor h2_color;
- QColor h3_color;
-
- QColor internal_link_color;
- QColor external_link_color;
- QColor cross_scheme_link_color;
-
- QString internal_link_prefix;
- QString external_link_prefix;
-
- double margin;
-
- bool save(QSettings & settings) const;
- bool load(QSettings & settings);
-
- //! Create a new style with auto-generated colors for the given
- //! url. The colors are based on the host name
- GeminiStyle derive(QUrl const & url) const;
-
- //! Converts this style into a CSS document for
- //! non-gemini rendered files.
- QString toStyleSheet() const;
-};
+#include "documentstyle.hpp"
class GeminiDocument :
public QTextDocument
@@ -76,7 +32,7 @@ struct GeminiRenderer
static std::unique_ptr<GeminiDocument> render(
QByteArray const & input,
QUrl const & root_url,
- GeminiStyle const & style,
+ DocumentStyle const & style,
DocumentOutlineModel & outline
);
};