|
a/src/qtgui/snippets_w.cpp |
|
b/src/qtgui/snippets_w.cpp |
|
... |
|
... |
30 |
using namespace std;
|
30 |
using namespace std;
|
31 |
|
31 |
|
32 |
#ifdef SNIPPETS_WEBKIT
|
32 |
#ifdef SNIPPETS_WEBKIT
|
33 |
#include <QWebSettings>
|
33 |
#include <QWebSettings>
|
34 |
#include <QWebFrame>
|
34 |
#include <QWebFrame>
|
|
|
35 |
#include <QUrl>
|
35 |
#else
|
36 |
#else
|
36 |
#include <QTextBrowser>
|
37 |
#include <QTextBrowser>
|
37 |
#endif
|
38 |
#endif
|
38 |
#include <QShortcut>
|
39 |
#include <QShortcut>
|
39 |
|
40 |
|
|
... |
|
... |
98 |
QWebSettings *ws = browser->page()->settings();
|
99 |
QWebSettings *ws = browser->page()->settings();
|
99 |
if (prefs.reslistfontfamily != "") {
|
100 |
if (prefs.reslistfontfamily != "") {
|
100 |
ws->setFontFamily(QWebSettings::StandardFont, prefs.reslistfontfamily);
|
101 |
ws->setFontFamily(QWebSettings::StandardFont, prefs.reslistfontfamily);
|
101 |
ws->setFontSize(QWebSettings::DefaultFontSize, prefs.reslistfontsize);
|
102 |
ws->setFontSize(QWebSettings::DefaultFontSize, prefs.reslistfontsize);
|
102 |
}
|
103 |
}
|
|
|
104 |
if (!prefs.snipCssFile.isEmpty())
|
|
|
105 |
ws->setUserStyleSheetUrl(QUrl::fromLocalFile(prefs.snipCssFile));
|
103 |
#else
|
106 |
#else
|
104 |
connect(browser, SIGNAL(anchorClicked(const QUrl &)),
|
107 |
connect(browser, SIGNAL(anchorClicked(const QUrl &)),
|
105 |
this, SLOT(linkWasClicked(const QUrl &)));
|
108 |
this, SLOT(linkWasClicked(const QUrl &)));
|
106 |
browser->setReadOnly(TRUE);
|
109 |
browser->setReadOnly(TRUE);
|
107 |
browser->setUndoRedoEnabled(FALSE);
|
110 |
browser->setUndoRedoEnabled(FALSE);
|
|
... |
|
... |
133 |
|
136 |
|
134 |
ostringstream oss;
|
137 |
ostringstream oss;
|
135 |
oss <<
|
138 |
oss <<
|
136 |
"<html><head>"
|
139 |
"<html><head>"
|
137 |
"<meta http-equiv=\"content-type\" "
|
140 |
"<meta http-equiv=\"content-type\" "
|
138 |
"content=\"text/html; charset=utf-8\"></head>"
|
141 |
"content=\"text/html; charset=utf-8\">"
|
|
|
142 |
"<link type=\"text/css\" rel=\"stylesheet\" href=\"/tmp/style.css\">"
|
|
|
143 |
"</head>"
|
139 |
"<body>"
|
144 |
"<body>"
|
140 |
"<table style='overflow-x: scroll; white-space: nowrap'>"
|
145 |
"<table style='overflow-x: scroll; white-space: nowrap'>"
|
141 |
;
|
146 |
;
|
142 |
|
147 |
|
143 |
g_hiliter.set_inputhtml(false);
|
148 |
g_hiliter.set_inputhtml(false);
|