forked from openlp/openlp
Remove top/left border on maindisplay. QGraphicsWebView only appeared in Qt4.6
This commit is contained in:
parent
2837c36553
commit
ad51cb8040
@ -272,7 +272,7 @@ body {
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<img id="image" class="size" src="%s" />
|
||||
<img id="image" class="size" %s />
|
||||
<video id="video" class="size"></video>
|
||||
%s
|
||||
<div id="footer" class="footer"></div>
|
||||
@ -300,9 +300,9 @@ def build_html(item, screen, alert, islive):
|
||||
theme = item.themedata
|
||||
webkitvers = webkit_version()
|
||||
if item.bg_image_bytes:
|
||||
image = u'data:image/png;base64,%s' % item.bg_image_bytes
|
||||
image = u'src="data:image/png;base64,%s"' % item.bg_image_bytes
|
||||
else:
|
||||
image = u''
|
||||
image = u'style="display:none;"'
|
||||
html = HTMLSRC % (build_background_css(item, width, height),
|
||||
width, height,
|
||||
build_alert_css(alert, width),
|
||||
|
@ -99,6 +99,7 @@ class MainDisplay(DisplayWidget):
|
||||
self.alertTab = None
|
||||
self.hide_mode = None
|
||||
self.setWindowTitle(u'OpenLP Display')
|
||||
self.setStyleSheet(u'border: 0px; margin: 0px; padding: 0px;')
|
||||
self.setWindowFlags(QtCore.Qt.FramelessWindowHint |
|
||||
QtCore.Qt.WindowStaysOnTopHint)
|
||||
if self.isLive:
|
||||
@ -116,12 +117,18 @@ class MainDisplay(DisplayWidget):
|
||||
self.screen = self.screens.current
|
||||
self.setVisible(False)
|
||||
self.setGeometry(self.screen[u'size'])
|
||||
self.scene = QtGui.QGraphicsScene()
|
||||
self.setScene(self.scene)
|
||||
self.webView = QtWebKit.QGraphicsWebView()
|
||||
self.scene.addItem(self.webView)
|
||||
self.webView.resize(self.screen[u'size'].width(),
|
||||
self.screen[u'size'].height())
|
||||
try:
|
||||
self.webView = QtWebKit.QGraphicsWebView()
|
||||
self.scene = QtGui.QGraphicsScene(self)
|
||||
self.setScene(self.scene)
|
||||
self.scene.addItem(self.webView)
|
||||
self.webView.setGeometry(QtCore.QRectF(0, 0,
|
||||
self.screen[u'size'].width(), self.screen[u'size'].height()))
|
||||
except AttributeError:
|
||||
# QGraphicsWebView a recent addition, so fall back to QWebView
|
||||
self.webView = QtWebKit.QWebView(self)
|
||||
self.webView.setGeometry(0, 0,
|
||||
self.screen[u'size'].width(), self.screen[u'size'].height())
|
||||
self.page = self.webView.page()
|
||||
self.frame = self.page.mainFrame()
|
||||
QtCore.QObject.connect(self.webView,
|
||||
|
Loading…
Reference in New Issue
Block a user