From 2cce748d20b9fd458add0f4f4ece1f3b54a61e7a Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Mon, 28 Mar 2011 21:18:55 +0100 Subject: [PATCH] Change superscript so it still works in print. Fix problem with openlp not closing --- openlp.pyw | 16 +++++++++------- openlp/core/lib/__init__.py | 5 ++--- openlp/core/lib/htmlbuilder.py | 7 ++++++- openlp/core/ui/mainwindow.py | 10 ++++++---- openlp/core/ui/printserviceform.py | 4 ++-- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/openlp.pyw b/openlp.pyw index b8c16c585..c9c5294b5 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -78,12 +78,13 @@ class OpenLP(QtGui.QApplication): class in order to provide the core of the application. """ - def exec_(self): - """ - Override exec method to allow the shared memory to be released on exit - """ - QtGui.QApplication.exec_() - self.sharedMemory.detach() + #def exec_(self): + #""" + #Override exec method to allow the shared memory to be released on exit + #""" + #return QtGui.QApplication.exec_() + #self.sharedMemory.detach() + #return i def run(self): """ @@ -115,7 +116,8 @@ class OpenLP(QtGui.QApplication): # make sure Qt really display the splash screen self.processEvents() # start the main app window - self.mainWindow = MainWindow(screens, self) + self.mainWindow = MainWindow(screens, self.clipboard(), + self.arguments()) self.mainWindow.show() if show_splash: # now kill the splashscreen diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index a9e8e86f1..ddb1ae9b1 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -65,9 +65,8 @@ base_html_expands.append({u'desc': u'White', u'start tag': u'{w}', u'start html': u'', u'end tag': u'{/w}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Superscript', u'start tag': u'{su}', - u'start html': u'', u'end tag': u'{/su}', - u'end html': u'', u'protected': True}) + u'start html': u'', u'end tag': u'{/su}', u'end html': u'', + u'protected': True}) base_html_expands.append({u'desc': u'Subscript', u'start tag': u'{sb}', u'start html': u'', u'end tag': u'{/sb}', u'end html': u'', u'protected': True}) diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 67a05c6a1..c4361a421 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -85,7 +85,12 @@ body { } /* lyric css */ %s - +sup { + font-size:0.6em; + vertical-align:top; + position:relative; + top:-0.3em; +}