win32 tweaks

This commit is contained in:
Damien Elmes 2012-01-11 20:04:32 +09:00
parent 54e6e94153
commit 91cbd316b1
5 changed files with 12 additions and 5 deletions

View file

@ -4,6 +4,7 @@
from aqt.qt import *
from aqt.utils import askUser, getOnlyText, openLink, showWarning
from anki.utils import isWin
import aqt
class DeckBrowser(object):
@ -148,7 +149,7 @@ Are you sure you wish to delete all of the cards in %s?""")%deck['name']):
for b in links:
buf += "<button onclick='py.link(\"%s\");'>%s</button>" % tuple(b)
self.bottom.draw(buf)
self.bottom.web.setFixedHeight(32)
self.bottom.web.setFixedHeight(isWin and 36 or 32)
self.bottom.web.setLinkHandler(self._linkHandler)
def _onShared(self):

View file

@ -277,7 +277,10 @@ class Editor(object):
self.widget.setStyle(self.plastiqueStyle)
# icons
self.iconsBox = QHBoxLayout()
self.iconsBox.setMargin(0)
if isWin:
self.iconsBox.setMargin(6)
else:
self.iconsBox.setMargin(0)
self.iconsBox.setSpacing(0)
self.outerLayout.addLayout(self.iconsBox)
b = self._addButton

View file

@ -7,6 +7,7 @@ from aqt.qt import *
from anki.consts import NEW_CARDS_RANDOM
from anki.hooks import addHook
from aqt.utils import showInfo, openLink
from anki.utils import isWin
import aqt
class Overview(object):
@ -120,7 +121,6 @@ class Overview(object):
h3 { margin-bottom: 0; }
.fin { font-size: 12px; font-weight: normal; }
td { font-size: 14px; }
button { font-weight: bold; }
.descfont {
font-size: 12px;
padding: 1em; color: #333;
@ -150,5 +150,5 @@ text-align: left;
for b in links:
buf += "<button onclick='py.link(\"%s\");'>%s</button>" % tuple(b)
self.bottom.draw(buf)
self.bottom.web.setFixedHeight(32)
self.bottom.web.setFixedHeight(isWin and 36 or 32)
self.bottom.web.setLinkHandler(self._linkHandler)

View file

@ -343,6 +343,9 @@ margin: 0;
padding: 0px;
padding-left: 5px; padding-right: 5px;
}
button {
min-width: 60px;
}
td { font-weight: bold; font-size: 12px; }
.hitem { margin-top: 2px; }
.stat { padding-top: 5px; }

View file

@ -85,7 +85,7 @@ class AnkiWebView(QWebView):
if isMac:
button = "font-weight: bold; height: 24px;"
else:
button = ""
button = "font-weight: normal; font-size: 12px;"
self.setHtml("""
<html><head><style>
body { font-family: "%s"; }