use the larger arrow only on windows, and in other screens
This commit is contained in:
parent
0ee2354d46
commit
6f95527758
@ -6,7 +6,7 @@ from anki.lang import _
|
|||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
import aqt.forms
|
import aqt.forms
|
||||||
from aqt.utils import saveGeom, restoreGeom, showWarning, askUser, shortcut, \
|
from aqt.utils import saveGeom, restoreGeom, showWarning, askUser, shortcut, \
|
||||||
tooltip, openHelp, addCloseShortcut
|
tooltip, openHelp, addCloseShortcut, downArrow
|
||||||
from anki.sound import clearAudioQueue
|
from anki.sound import clearAudioQueue
|
||||||
from anki.hooks import addHook, remHook, runHook
|
from anki.hooks import addHook, remHook, runHook
|
||||||
from anki.utils import stripHTMLMedia, isMac
|
from anki.utils import stripHTMLMedia, isMac
|
||||||
@ -69,7 +69,7 @@ class AddCards(QDialog):
|
|||||||
self.connect(self.helpButton, SIGNAL("clicked()"), self.helpRequested)
|
self.connect(self.helpButton, SIGNAL("clicked()"), self.helpRequested)
|
||||||
# history
|
# history
|
||||||
b = bb.addButton(
|
b = bb.addButton(
|
||||||
_("History")+ u" ▾", ar)
|
_("History")+ u" "+downArrow(), ar)
|
||||||
if isMac:
|
if isMac:
|
||||||
sc = "Ctrl+Shift+H"
|
sc = "Ctrl+Shift+H"
|
||||||
else:
|
else:
|
||||||
|
@ -10,7 +10,7 @@ import aqt
|
|||||||
from anki.sound import playFromText, clearAudioQueue
|
from anki.sound import playFromText, clearAudioQueue
|
||||||
from aqt.utils import saveGeom, restoreGeom, getBase, mungeQA,\
|
from aqt.utils import saveGeom, restoreGeom, getBase, mungeQA,\
|
||||||
showInfo, askUser, getOnlyText, \
|
showInfo, askUser, getOnlyText, \
|
||||||
showWarning, openHelp
|
showWarning, openHelp, downArrow
|
||||||
from anki.utils import isMac, isWin, joinFields
|
from anki.utils import isMac, isWin, joinFields
|
||||||
from aqt.webview import AnkiWebView
|
from aqt.webview import AnkiWebView
|
||||||
import anki.js
|
import anki.js
|
||||||
@ -167,7 +167,7 @@ Please create a new card type first."""))
|
|||||||
flip.setAutoDefault(False)
|
flip.setAutoDefault(False)
|
||||||
l.addWidget(flip)
|
l.addWidget(flip)
|
||||||
c(flip, SIGNAL("clicked()"), self.onFlip)
|
c(flip, SIGNAL("clicked()"), self.onFlip)
|
||||||
more = QPushButton(_("More") + u" ▾")
|
more = QPushButton(_("More") + u" "+downArrow())
|
||||||
more.setAutoDefault(False)
|
more.setAutoDefault(False)
|
||||||
l.addWidget(more)
|
l.addWidget(more)
|
||||||
c(more, SIGNAL("clicked()"), lambda: self.onMore(more))
|
c(more, SIGNAL("clicked()"), lambda: self.onMore(more))
|
||||||
|
@ -7,7 +7,8 @@ from anki.consts import NEW_CARDS_RANDOM
|
|||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
import aqt
|
import aqt
|
||||||
from aqt.utils import showInfo, showWarning, openHelp, getOnlyText, askUser, \
|
from aqt.utils import showInfo, showWarning, openHelp, getOnlyText, askUser, \
|
||||||
tooltip, saveGeom, restoreGeom
|
tooltip, saveGeom, restoreGeom, downArrow
|
||||||
|
|
||||||
|
|
||||||
class DeckConf(QDialog):
|
class DeckConf(QDialog):
|
||||||
def __init__(self, mw, deck):
|
def __init__(self, mw, deck):
|
||||||
@ -27,7 +28,7 @@ class DeckConf(QDialog):
|
|||||||
SIGNAL("helpRequested()"),
|
SIGNAL("helpRequested()"),
|
||||||
lambda: openHelp("deckoptions"))
|
lambda: openHelp("deckoptions"))
|
||||||
self.connect(self.form.confOpts, SIGNAL("clicked()"), self.confOpts)
|
self.connect(self.form.confOpts, SIGNAL("clicked()"), self.confOpts)
|
||||||
self.form.confOpts.setText(u"▾")
|
self.form.confOpts.setText(downArrow())
|
||||||
self.connect(self.form.buttonBox.button(QDialogButtonBox.RestoreDefaults),
|
self.connect(self.form.buttonBox.button(QDialogButtonBox.RestoreDefaults),
|
||||||
SIGNAL("clicked()"),
|
SIGNAL("clicked()"),
|
||||||
self.onRestore)
|
self.onRestore)
|
||||||
|
@ -15,7 +15,7 @@ from anki.hooks import runHook, runFilter
|
|||||||
from aqt.sound import getAudio
|
from aqt.sound import getAudio
|
||||||
from aqt.webview import AnkiWebView
|
from aqt.webview import AnkiWebView
|
||||||
from aqt.utils import shortcut, showInfo, showWarning, getBase, getFile, \
|
from aqt.utils import shortcut, showInfo, showWarning, getBase, getFile, \
|
||||||
openHelp, tooltip
|
openHelp, tooltip, downArrow
|
||||||
import aqt
|
import aqt
|
||||||
import anki.js
|
import anki.js
|
||||||
from BeautifulSoup import BeautifulSoup
|
from BeautifulSoup import BeautifulSoup
|
||||||
@ -380,7 +380,7 @@ class Editor(object):
|
|||||||
but.setToolTip(_("Set foreground colour (F7)"))
|
but.setToolTip(_("Set foreground colour (F7)"))
|
||||||
self.setupForegroundButton(but)
|
self.setupForegroundButton(but)
|
||||||
but = b("change_colour", self.onChangeCol, _("F8"),
|
but = b("change_colour", self.onChangeCol, _("F8"),
|
||||||
_("Change colour (F8)"), text=u"▾")
|
_("Change colour (F8)"), text=downArrow())
|
||||||
but.setFixedWidth(12)
|
but.setFixedWidth(12)
|
||||||
but = b("cloze", self.onCloze, _("Ctrl+Shift+C"),
|
but = b("cloze", self.onCloze, _("Ctrl+Shift+C"),
|
||||||
_("Cloze deletion (Ctrl+Shift+C)"), text="[...]")
|
_("Cloze deletion (Ctrl+Shift+C)"), text="[...]")
|
||||||
@ -392,7 +392,7 @@ class Editor(object):
|
|||||||
b("mail-attachment", self.onAddMedia, _("F3"),
|
b("mail-attachment", self.onAddMedia, _("F3"),
|
||||||
_("Attach pictures/audio/video (F3)"))
|
_("Attach pictures/audio/video (F3)"))
|
||||||
b("media-record", self.onRecSound, _("F5"), _("Record audio (F5)"))
|
b("media-record", self.onRecSound, _("F5"), _("Record audio (F5)"))
|
||||||
b("adv", self.onAdvanced, text=u"▾")
|
b("adv", self.onAdvanced, text=downArrow())
|
||||||
s = QShortcut(QKeySequence("Ctrl+T, T"), self.widget)
|
s = QShortcut(QKeySequence("Ctrl+T, T"), self.widget)
|
||||||
s.connect(s, SIGNAL("activated()"), self.insertLatex)
|
s.connect(s, SIGNAL("activated()"), self.insertLatex)
|
||||||
s = QShortcut(QKeySequence("Ctrl+T, E"), self.widget)
|
s = QShortcut(QKeySequence("Ctrl+T, E"), self.widget)
|
||||||
|
@ -14,7 +14,8 @@ from aqt.qt import *
|
|||||||
from anki.utils import stripHTML, isMac, json
|
from anki.utils import stripHTML, isMac, json
|
||||||
from anki.hooks import addHook, runHook
|
from anki.hooks import addHook, runHook
|
||||||
from anki.sound import playFromText, clearAudioQueue, play
|
from anki.sound import playFromText, clearAudioQueue, play
|
||||||
from aqt.utils import mungeQA, getBase, openLink, tooltip, askUserDialog
|
from aqt.utils import mungeQA, getBase, openLink, tooltip, askUserDialog, \
|
||||||
|
downArrow
|
||||||
from aqt.sound import getAudio
|
from aqt.sound import getAudio
|
||||||
import aqt
|
import aqt
|
||||||
|
|
||||||
@ -545,7 +546,7 @@ min-width: 60px; white-space: nowrap;
|
|||||||
</td>
|
</td>
|
||||||
<td width=50 align=right valign=top class=stat><span id=time class=stattxt>
|
<td width=50 align=right valign=top class=stat><span id=time class=stattxt>
|
||||||
</span><br>
|
</span><br>
|
||||||
<button onclick="py.link('more');">%(more)s ▾</button>
|
<button onclick="py.link('more');">%(more)s %(downArrow)s</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -593,7 +594,9 @@ function showAnswer(txt) {
|
|||||||
</script>
|
</script>
|
||||||
""" % dict(rem=self._remaining(), edit=_("Edit"),
|
""" % dict(rem=self._remaining(), edit=_("Edit"),
|
||||||
editkey=_("Shortcut key: %s") % "E",
|
editkey=_("Shortcut key: %s") % "E",
|
||||||
more=_("More"), time=self.card.timeTaken() // 1000)
|
more=_("More"),
|
||||||
|
downArrow=downArrow(),
|
||||||
|
time=self.card.timeTaken() // 1000)
|
||||||
|
|
||||||
def _showAnswerButton(self):
|
def _showAnswerButton(self):
|
||||||
self._bottomReady = True
|
self._bottomReady = True
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# Copyright: Damien Elmes <anki@ichi2.net>
|
# Copyright: Damien Elmes <anki@ichi2.net>
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
@ -381,6 +382,12 @@ def addCloseShortcut(widg):
|
|||||||
widg.connect(widg._closeShortcut, SIGNAL("activated()"),
|
widg.connect(widg._closeShortcut, SIGNAL("activated()"),
|
||||||
widg, SLOT("reject()"))
|
widg, SLOT("reject()"))
|
||||||
|
|
||||||
|
def downArrow():
|
||||||
|
if isWin:
|
||||||
|
return u"▼"
|
||||||
|
# windows 10 is lacking the smaller arrow on English installs
|
||||||
|
return u"▾"
|
||||||
|
|
||||||
# Tooltips
|
# Tooltips
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user