bigger spacing for all but mac; mention httplib2>0.7

This commit is contained in:
Damien Elmes 2012-01-11 20:10:48 +09:00
parent 91cbd316b1
commit be09087ffd
5 changed files with 11 additions and 10 deletions

1
README
View file

@ -7,6 +7,7 @@ Prerequisites for Linux/FreeBSD/etc:
- Python-Qt/PyQt 4.6+
- SimpleJSON 1.7.3+
- Beautiful Soup
- Httplib2 0.7+
For audio playing support:

View file

@ -4,7 +4,7 @@
from aqt.qt import *
from aqt.utils import askUser, getOnlyText, openLink, showWarning
from anki.utils import isWin
from anki.utils import isMac
import aqt
class DeckBrowser(object):
@ -149,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(isWin and 36 or 32)
self.bottom.web.setFixedHeight(isMac and 28 or 36)
self.bottom.web.setLinkHandler(self._linkHandler)
def _onShared(self):

View file

@ -4,7 +4,7 @@
from aqt.qt import *
import re, os, sys, urllib2, ctypes, simplejson, traceback
from anki.utils import stripHTML, isWin, namedtmp
from anki.utils import stripHTML, isWin, isMac, namedtmp
from anki.sound import play
from anki.hooks import runHook
from aqt.sound import getAudio
@ -277,7 +277,7 @@ class Editor(object):
self.widget.setStyle(self.plastiqueStyle)
# icons
self.iconsBox = QHBoxLayout()
if isWin:
if not isMac:
self.iconsBox.setMargin(6)
else:
self.iconsBox.setMargin(0)

View file

@ -7,7 +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
from anki.utils import isMac
import aqt
class Overview(object):
@ -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(isWin and 36 or 32)
self.bottom.web.setFixedHeight(isMac and 28 or 36)
self.bottom.web.setLinkHandler(self._linkHandler)

View file

@ -5,7 +5,7 @@
import time, os, stat, shutil, difflib, simplejson, re
import unicodedata as ucd
from aqt.qt import *
from anki.utils import fmtTimeSpan, stripHTML, isWin
from anki.utils import fmtTimeSpan, stripHTML, isMac
from anki.hooks import addHook, runHook, runFilter
from anki.sound import playFromText, clearAudioQueue, hasSound
from aqt.utils import mungeQA, getBase, shortcut
@ -30,10 +30,10 @@ class Reviewer(object):
self.mw.keyHandler = self._keyHandler
self.web.setLinkHandler(self._linkHandler)
self.web.setKeyHandler(self._catchEsc)
if isWin:
self.bottom.web.setFixedHeight(52)
else:
if isMac:
self.bottom.web.setFixedHeight(46)
else:
self.bottom.web.setFixedHeight(52)
self.bottom.web.setLinkHandler(self._linkHandler)
self.nextCard()