Commits

Antonio Cuni  committed 3909cbd

bah, put a workaround for a bug in the pyqt's webkit

  • Participants
  • Parent commits bf5a490

Comments (0)

Files changed (4)

File bin/jitviewer.py

             extra_data = ""
         if not all:
             loops = loops[:CUTOFF]
+
+        qt_workaround = ('Qt/4.7.2' in flask.request.user_agent.string)
         return flask.render_template('index.html', loops=loops,
                                      filename=self.filename,
+                                     qt_workaround=qt_workaround,
                                      extra_data=extra_data)
 
     def loop(self):

File static/qt_workaround.css

+/* apparently, the QWebView included in Qt 4.7.2 cannot display Droid Sans
+   Mono or Andale Mono in bold, so we switch to some other monospaced font */
+
+.dmp {
+    font-family: Inconsolata, Courier New, Courier, monospace;
+	font-size: 14px;
+}

File static/style.css

 
 html {background: rgba(238, 238, 238, 0.9);}
 body {
-	font-family: DroidSansMono, Andale Mono, Courier New, Courier, monospace;
+	font-family: DroidSansMono, Andale Mono, Inconsolata, Courier New, Courier, monospace;
 	font-size: 13px;
 	line-height: 22px;
 	

File templates/index.html

   <link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono&subset=latin' rel='stylesheet' type='text/css'>
   <link rel="stylesheet" type="text/css" href="/static/style.css"/>
   <link rel="stylesheet" type="text/css" href="/static/pygments.css"/>
+  {% if qt_workaround %}
+      <link rel="stylesheet" type="text/css" href="/static/qt_workaround.css"/>
+  {% endif %}
+
   <script src="/static/jquery.min.js"></script>
   <script src="/static/jquery.scrollTo-1.4.2-min.js"></script>
   <script src="/static/script.js"></script>