aboutsummaryrefslogtreecommitdiff
path: root/src/renderers/textstyleinstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderers/textstyleinstance.cpp')
-rw-r--r--src/renderers/textstyleinstance.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/renderers/textstyleinstance.cpp b/src/renderers/textstyleinstance.cpp
new file mode 100644
index 0000000..e7295b0
--- /dev/null
+++ b/src/renderers/textstyleinstance.cpp
@@ -0,0 +1,28 @@
+#include "textstyleinstance.hpp"
+
+TextStyleInstance::TextStyleInstance(DocumentStyle const & themed_style)
+{
+ preformatted.setFont(themed_style.preformatted_font);
+ preformatted.setForeground(themed_style.preformatted_color);
+
+ standard.setFont(themed_style.standard_font);
+ standard.setForeground(themed_style.standard_color);
+
+ standard_link.setFont(themed_style.standard_font);
+ standard_link.setForeground(QBrush(themed_style.internal_link_color));
+
+ external_link.setFont(themed_style.standard_font);
+ external_link.setForeground(QBrush(themed_style.external_link_color));
+
+ cross_protocol_link.setFont(themed_style.standard_font);
+ cross_protocol_link.setForeground(QBrush(themed_style.cross_scheme_link_color));
+
+ standard_h1.setFont(themed_style.h1_font);
+ standard_h1.setForeground(QBrush(themed_style.h1_color));
+
+ standard_h2.setFont(themed_style.h2_font);
+ standard_h2.setForeground(QBrush(themed_style.h2_color));
+
+ standard_h3.setFont(themed_style.h3_font);
+ standard_h3.setForeground(QBrush(themed_style.h3_color));
+}