diff --git a/aqt/browser.py b/aqt/browser.py index 07db165b7..d52460faf 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -375,7 +375,6 @@ class Browser(QMainWindow): def setupToolbar(self): self.toolbarWeb = AnkiWebView() - self.toolbarWeb.setFixedHeight(32 + self.mw.fontHeightDelta) self.toolbar = BrowserToolbar(self.mw, self.toolbarWeb, self) self.form.verticalLayout_3.insertWidget(0, self.toolbarWeb) self.toolbar.draw() @@ -1717,12 +1716,10 @@ class BrowserToolbar(Toolbar): "Bulk Remove Tags (Ctrl+Alt+T)"))) right += borderImg("delete", "delete16", False, _("Delete")) right += "" - # fixme - #self.web.page().currentFrame().setScrollBarPolicy( - # Qt.Horizontal, Qt.ScrollBarAlwaysOff) + self.web.onBridgeCmd = self._linkHandler + self.web.onLoadFinished = self.onLoaded self.web.stdHtml(self._body % ( - "", #", - #self._centerLinks(), + "", right, ""), self._css + """ #header { font-weight: normal; } a { margin-right: 1em; } diff --git a/aqt/deckbrowser.py b/aqt/deckbrowser.py index 7f000f411..ca127a68c 100644 --- a/aqt/deckbrowser.py +++ b/aqt/deckbrowser.py @@ -349,12 +349,6 @@ where id > ?""", (self.mw.col.sched.dayCutoff-86400)*1000) buf += """ """ % tuple(b) self.bottom.draw(buf) - if isMac: - size = 28 - else: - size = 36 + self.mw.fontHeightDelta*3 - self.bottom.web.setFixedHeight(size) - self.bottom.web.resetHandlers() self.bottom.web.onBridgeCmd = self._linkHandler def _onShared(self): diff --git a/aqt/main.py b/aqt/main.py index 603b1b6fe..84e32a843 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -502,7 +502,6 @@ title="%s" %s>%s''' % ( tweb = aqt.webview.AnkiWebView() tweb.setObjectName("toolbarWeb") tweb.setFocusPolicy(Qt.WheelFocus) - tweb.setFixedHeight(32+self.fontHeightDelta) self.toolbar = aqt.toolbar.Toolbar(self, tweb) self.toolbar.draw() # main area @@ -512,8 +511,6 @@ title="%s" %s>%s''' % ( self.web.setMinimumWidth(400) # bottom area sweb = self.bottomWeb = aqt.webview.AnkiWebView() - #sweb.hide() - sweb.setFixedHeight(100) sweb.setObjectName("bottomWeb") sweb.setFocusPolicy(Qt.WheelFocus) # add in a layout diff --git a/aqt/overview.py b/aqt/overview.py index 1f839ee62..7f1274d95 100644 --- a/aqt/overview.py +++ b/aqt/overview.py @@ -201,11 +201,6 @@ text-align: center; buf += """ """ % tuple(b) self.bottom.draw(buf) - if isMac: - size = 28 - else: - size = 36 + self.mw.fontHeightDelta*3 - self.bottom.web.setFixedHeight(size) self.bottom.web.onBridgeCmd = self._linkHandler # Studying more diff --git a/aqt/reviewer.py b/aqt/reviewer.py index ae8df5d32..31a976ead 100644 --- a/aqt/reviewer.py +++ b/aqt/reviewer.py @@ -44,11 +44,6 @@ class Reviewer(object): self.web.resetHandlers() self.mw.keyHandler = self._keyHandler self.web.onBridgeCmd = self._linkHandler - if isMac: - self.bottom.web.setFixedHeight(46) - else: - self.bottom.web.setFixedHeight(52+self.mw.fontHeightDelta*4) - self.bottom.web.resetHandlers() self.bottom.web.onBridgeCmd = self._linkHandler self._reps = None self.nextCard() @@ -182,7 +177,7 @@ function _typeAnsPress() { self.web.stdHtml(self._revHtml, self._styles(), head=base) # show answer / ease buttons self.bottom.web.show() - self.bottom.web.onLoadFinished = self._showAnswerButton + self.bottom.web.onLoadFinished = self._onBottomLoadFinished self.bottom.web.stdHtml( self._bottomHTML(), self.bottom._css + self._bottomCSS) @@ -501,13 +496,7 @@ Please run Tools>Empty Cards""") _bottomCSS = """ body { -background: -webkit-gradient(linear, left top, left bottom, -from(#fff), to(#ddd)); -border-bottom: 0; -border-top: 1px solid #aaa; -margin: 0; -padding: 0px; -padding-left: 5px; padding-right: 5px; +margin: 0; padding: 0; } button { min-width: 60px; white-space: nowrap; @@ -519,11 +508,21 @@ min-width: 60px; white-space: nowrap; .nobold { font-weight: normal; display: inline-block; padding-top: 4px; } .spacer { height: 18px; } .spacer2 { height: 16px; } +#outer { + border-top: 1px solid #aaa; + background: -webkit-gradient(linear, left top, left bottom, +from(#fff), to(#ddd)); +} +#innertable { +padding: 3px; +} + """ def _bottomHTML(self): return """ -
@@ -536,6 +535,7 @@ min-width: 60px; white-space: nowrap; |