mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
add styles back
This commit is contained in:
parent
08134c2462
commit
7ca5a23e7c
3 changed files with 6 additions and 21 deletions
|
@ -305,7 +305,7 @@ class Browser(QMainWindow):
|
|||
|
||||
def __init__(self, mw):
|
||||
QMainWindow.__init__(self, mw)
|
||||
#applyStyles(self)
|
||||
applyStyles(self)
|
||||
self.mw = mw
|
||||
self.col = self.mw.col
|
||||
self.currentRow = None
|
||||
|
|
16
aqt/main.py
16
aqt/main.py
|
@ -518,8 +518,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
|||
self.form.statusbar.showMessage(text, timeout)
|
||||
|
||||
def setupStyle(self):
|
||||
print "applystyles"
|
||||
#applyStyles(self)
|
||||
applyStyles(self)
|
||||
|
||||
# Key handling
|
||||
##########################################################################
|
||||
|
@ -941,15 +940,4 @@ they will be lost. Are you sure you want to continue?"""))
|
|||
def setupProxy(self):
|
||||
print "proxy"
|
||||
return
|
||||
import urllib2
|
||||
if self.pm.profile['proxyHost']:
|
||||
proxy = "http://"
|
||||
if self.pm.profile['proxyUser']:
|
||||
proxy += (self.pm.profile['proxyUser'] + ":" +
|
||||
self.pm.profile['proxyPass'] + "@")
|
||||
proxy += (self.pm.profile['proxyHost'] + ":" +
|
||||
str(self.pm.profile['proxyPort']))
|
||||
os.environ["http_proxy"] = proxy
|
||||
proxy_handler = urllib2.ProxyHandler()
|
||||
opener = urllib2.build_opener(proxy_handler)
|
||||
urllib2.install_opener(opener)
|
||||
# need to bundle socksipy and install a default socket handler
|
||||
|
|
|
@ -310,12 +310,9 @@ def mungeQA(txt):
|
|||
return txt
|
||||
|
||||
def applyStyles(widget):
|
||||
try:
|
||||
styleFile = open(os.path.join(aqt.mw.pm.profile.confDir,
|
||||
"style.css"))
|
||||
widget.setStyleSheet(styleFile.read())
|
||||
except (IOError, OSError):
|
||||
pass
|
||||
p = os.path.join(aqt.mw.pm.base, "style.css")
|
||||
if os.path.exists(p):
|
||||
widget.setStyleSheet(open(p).read())
|
||||
|
||||
def getBase(col):
|
||||
base = None
|
||||
|
|
Loading…
Reference in a new issue