From f02ccb928fd4ed591d2efe118a571e154f5df68a Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Mon, 8 Jun 2020 00:30:32 +0200 Subject: Starts to implement gopher protocol and gophermap support. Heavily WIP, but you can already surf on gopherspace! --- src/documentstyle.hpp | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/documentstyle.hpp (limited to 'src/documentstyle.hpp') diff --git a/src/documentstyle.hpp b/src/documentstyle.hpp new file mode 100644 index 0000000..db02a36 --- /dev/null +++ b/src/documentstyle.hpp @@ -0,0 +1,55 @@ +#ifndef DOCUMENTSTYLE_HPP +#define DOCUMENTSTYLE_HPP + +#include +#include +#include +#include + +struct DocumentStyle +{ + enum Theme { + Fixed = 0, + AutoDarkTheme = 1, + AutoLightTheme = 2 + }; + + DocumentStyle(); + + 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 + DocumentStyle derive(QUrl const & url) const; + + //! Converts this style into a CSS document for + //! non-gemini rendered files. + QString toStyleSheet() const; +}; + +#endif // DOCUMENTSTYLE_HPP -- cgit v1.2.3