summaryrefslogtreecommitdiff
path: root/.local/share/Anki2/addons21/advanced_review
diff options
context:
space:
mode:
authorThanosApollo <[email protected]>2022-09-01 07:41:39 +0300
committerThanosApollo <[email protected]>2022-09-01 07:41:39 +0300
commit0c89df9be987008e55c1b336489c41290653434b (patch)
tree73425d852d363acdd6c9297a97616b23f9311bd4 /.local/share/Anki2/addons21/advanced_review
parenta6d1ec012952c5e955676af22732cd177d1f3abf (diff)
Remove anki addons
Diffstat (limited to '.local/share/Anki2/addons21/advanced_review')
-rw-r--r--.local/share/Anki2/addons21/advanced_review/Bottom_Bar.py378
-rw-r--r--.local/share/Anki2/addons21/advanced_review/Button_Colors.py211
-rw-r--r--.local/share/Anki2/addons21/advanced_review/CHANGELOG.md421
-rw-r--r--.local/share/Anki2/addons21/advanced_review/Card_Info.py508
-rw-r--r--.local/share/Anki2/addons21/advanced_review/Deck_Overview.py646
-rw-r--r--.local/share/Anki2/addons21/advanced_review/LICENSE674
-rw-r--r--.local/share/Anki2/addons21/advanced_review/README.md12
-rw-r--r--.local/share/Anki2/addons21/advanced_review/Settings.py2667
-rw-r--r--.local/share/Anki2/addons21/advanced_review/Skip.py39
-rw-r--r--.local/share/Anki2/addons21/advanced_review/Tooltip.py613
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__init__.py19
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/Bottom_Bar.cpython-39.opt-2.pycbin10614 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/Button_Colors.cpython-39.opt-2.pycbin4062 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/Card_Info.cpython-39.opt-2.pycbin15470 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/Deck_Overview.cpython-39.opt-2.pycbin17194 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/Settings.cpython-39.opt-2.pycbin85298 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/Skip.cpython-39.opt-2.pycbin1445 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/Tooltip.cpython-39.opt-2.pycbin11505 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/__init__.cpython-39.opt-2.pycbin644 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/__pycache__/styles.cpython-39.opt-2.pycbin26699 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/changelog.html462
-rw-r--r--.local/share/Anki2/addons21/advanced_review/config.json115
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/activeIndicator_border.pngbin3731 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/activeIndicator_glow.pngbin11044 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/activeIndicator_none.pngbin3679 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_default.pngbin5333 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_fill1.pngbin5498 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_fill2.pngbin12784 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_neon1.pngbin8211 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_neon2.pngbin12101 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonColors_off.pngbin3275 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonColors_on.pngbin3826 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonSizes_off.pngbin6079 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonSizes_off2.pngbin6120 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonSizes_on.pngbin6234 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonSizes_on2.pngbin7519 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonStyle_defaultBackground.pngbin3207 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonStyle_defaultText.pngbin3731 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonStyle_fill1.pngbin4019 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonStyle_fill2.pngbin4157 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonStyle_neon1.pngbin16135 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonStyle_neon2.pngbin14327 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonStyle_wideBackground.pngbin3955 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/buttonStyle_wideText.pngbin4825 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons.pngbin2502 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons2.pngbin2088 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons3.pngbin3261 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/changeStyle_text.pngbin3731 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/coloredDues.pngbin4895 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/hoverEffect_brighten.pngbin3663 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/hoverEffect_glow.pngbin8569 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/hoverEffect_glowBrighten.pngbin8148 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/images/icon.pngbin8243 -> 0 bytes
-rw-r--r--.local/share/Anki2/addons21/advanced_review/manifest.json1
-rw-r--r--.local/share/Anki2/addons21/advanced_review/meta.json1
-rw-r--r--.local/share/Anki2/addons21/advanced_review/styles.py1169
-rw-r--r--.local/share/Anki2/addons21/advanced_review/user_files/Default Settings.json115
-rw-r--r--.local/share/Anki2/addons21/advanced_review/user_files/Large and Colorful Buttons.json118
-rw-r--r--.local/share/Anki2/addons21/advanced_review/user_files/My Settings (Large Buttons).json118
-rw-r--r--.local/share/Anki2/addons21/advanced_review/user_files/My Settings.json118
60 files changed, 0 insertions, 8405 deletions
diff --git a/.local/share/Anki2/addons21/advanced_review/Bottom_Bar.py b/.local/share/Anki2/addons21/advanced_review/Bottom_Bar.py
deleted file mode 100644
index 529247a..0000000
--- a/.local/share/Anki2/addons21/advanced_review/Bottom_Bar.py
+++ /dev/null
@@ -1,378 +0,0 @@
-#// auth_ Mohamad Janati
-#// Copyright (c) 2019-2021 Mohamad Janati (freaking stupid, right? :|)
-
-import json
-from aqt import mw
-import aqt
-from aqt.qt import *
-from aqt.utils import downArrow, shortcut, showInfo
-from aqt.reviewer import Reviewer
-from anki.hooks import wrap
-from . import Card_Info
-from . import styles
-from .Skip import test
-from .Skip import burySkipped
-from .Skip import try_unburySkipped
-
-
-#// getting config information
-config = mw.addonManager.getConfig(__name__)
-speedFocus_addOn = config[' Speed Focus Add-on']
-bottombarButtons_style = config[' Review_ Bottombar Buttons Style']
-skipMethod = config[' Skip Method']
-skip = config['Button_ Skip Button']
-showSkipped = config['Button_ Show Skipped Button']
-info = config['Button_ Info Button']
-undo = config['Button_ Undo Button']
-skip_shortcut = config ['Button_ Shortcut_ Skip Button'].lower()
-showSkipped_shortcut = config ['Button_ Shortcut_ Show Skipped Button'].lower()
-info_shortcut = config['Button_ Shortcut_ Info Button'].lower()
-undo_shortcut = config['Button_ Shortcut_ Undo Button'].lower()
-info_position = config['Button_ Position_ Info Button'].lower()
-skip_position = config['Button_ Position_ Skip Button'].lower()
-showSkipped_position = config['Button_ Position_ Show Skipped Button'].lower()
-undo_position = config['Button_ Position_ Undo Button'].lower()
-
-edit_label = config['Button Label_ Edit']
-showAnswer_label = config['Button Label_ Show Answer']
-more_label = config['Button Label_ More']
-info_label = config['Button Label_ Info']
-skip_label = config['Button Label_ Skip']
-showSkipped_label = config['Button Label_ Show Skipped']
-undo_label = config['Button Label_ Undo']
-
-custom_buttonSize = config ['Button_ Custom Button Sizes']
-buttons_height = config['Button_ Height_ All Bottombar Buttons']
-answer_width = config['Button_ Width_ Show Answer Button']
-text_size = config['Button_ Text Size']
-
-custom_bottombarButtonBorderColor = config['Color_ Custom Bottombar Button Border Color']
-bottombarButtonBorder_color = config['Color_ Bottombar Button Border Color']
-showAnswerBorderColor_style = config['ShowAnswer_ Border Color Style']
-showAnswerEase1 = config['ShowAnswer_ Ease1']
-showAnswerEase2 = config['ShowAnswer_ Ease2']
-showAnswerEase3 = config['ShowAnswer_ Ease3']
-showAnswerEase4 = config['ShowAnswer_ Ease4']
-showAnswerEase1_color = config['ShowAnswer_ Ease1 Color']
-showAnswerEase2_color = config['ShowAnswer_ Ease2 Color']
-showAnswerEase3_color = config['ShowAnswer_ Ease3 Color']
-showAnswerEase4_color = config['ShowAnswer_ Ease4 Color']
-
-# TODO: set the showSkipped styling and stuff
-edit_style = styles.edit_style
-info_style = styles.info_style
-skip_style = styles.skip_style
-showSkipped_style = styles.showSkipped_style
-undo_style = styles.undo_style
-more_style = styles.more_style
-min_buttonSize = styles.min_buttonSize
-bottombar_neon1 = styles.bottombar_neon1
-bottombar_neon2 = styles.bottombar_neon2
-bottombar_fill1 = styles.bottombar_fill1
-bottombar_fill2 = styles.bottombar_fill2
-
-#// adding shortcuts to _shortcutKeys function in anki
-def _shortcutKeys_wrap(self, _old):
- original = _old(self)
- sched_ver = mw.col.sched.version
- if sched_ver > 2 or skipMethod == 1:
- original.append((skip_shortcut, lambda: burySkipped()))
- original.append((showSkipped_shortcut, lambda: try_unburySkipped()))
- else:
- original.append((skip_shortcut, lambda: self.nextCard()))
- original.extend([
- (info_shortcut, lambda: Card_Info._cs.toggle()),
- (undo_shortcut, lambda: mw.onUndo())
- ])
- return original
-
-
-#// adding button links to link handler function
-def linkHandler_wrap(reviewer, url):
- sched_ver = mw.col.sched.version
- if url == "card_info":
- Card_Info._cs.toggle()
- elif url == "skip":
- if sched_ver > 2 or skipMethod == 1:
- burySkipped()
- else:
- reviewer.nextCard()
- elif url == "showSkipped":
- if sched_ver > 2 or skipMethod == 1:
- try_unburySkipped()
- else:
- showInfo("Your skip method is not \"Bury\" Hence you don't have any skipped cards that can be shown using this button.")
- elif url == "undo":
- mw.onUndo()
- else:
- Review_linkHandelr_Original(reviewer, url)
-
-Review_linkHandelr_Original = Reviewer._linkHandler
-Reviewer._linkHandler = linkHandler_wrap
-
-#// Chosing stylinhg for review other buttons in reviewer bottombar based on chosen style
-if bottombarButtons_style == 0:
- bottomHTML_style = "<style></style>"
-elif bottombarButtons_style == 1:
- bottomHTML_style = bottombar_neon1
-elif bottombarButtons_style == 2:
- bottomHTML_style = bottombar_neon2
-elif bottombarButtons_style == 3:
- bottomHTML_style = bottombar_fill1
-elif bottombarButtons_style == 4:
- bottomHTML_style = bottombar_fill2
-
-#// info button | written in a separate functions to preserve the original bottombar
-def info_button():
- if info:
- return """<button title="Shortcut key: {}" onclick="pycmd('card_info');" {}>{}</button>""".format(info_shortcut.upper(), info_style, info_label)
- else:
- return ""
-
-
-#// skip button | written in a separate functions to preserve the original bottombar
-def skip_button():
- if skip:
- return """<button title="Shortcut key: {}" onclick="pycmd('skip');" {}>{}</button>""".format(skip_shortcut.upper(), skip_style, skip_label)
- else:
- return ""
-
-#// Show Skipped button
-def showSkipped_button():
- if showSkipped:
- return """<button title="Shortcut key: {}" onclick="pycmd('showSkipped');" {}>{}</button>""".format(showSkipped_shortcut.upper(), showSkipped_style, showSkipped_label)
- else:
- return ""
-
-
-#// undo button
-def undo_button():
- if undo:
- return """<button title="Shortcut key: {}" onclick="pycmd('undo');" {}>{}</button>""".format(undo_shortcut, undo_style, undo_label)
- else:
- return ""
-
-
-#// Button Positions
-leftSide_button1 = ""
-leftSide_button2 = ""
-leftSide_button3 = ""
-leftSide_button4 = ""
-middleLeftSide_button1 = ""
-middleLeftSide_button2 = ""
-middleLeftSide_button3 = ""
-middleLeftSide_button4 = ""
-middleRightSide_button1 = ""
-middleRightSide_button2 = ""
-middleRightSide_button3 = ""
-middleRightSide_button4 = ""
-rightSide_button1 = ""
-rightSide_button2 = ""
-rightSide_button3 = ""
-rightSide_button4 = ""
-
-if info_position == "right":
- rightSide_button1 = info_button()
-elif info_position == "middle left":
- middleLeftSide_button1 = info_button()
-elif info_position == "middle right":
- middleRightSide_button1 = info_button()
-else:
- leftSide_button1 = info_button()
-
-if skip_position == "left":
- leftSide_button2 = skip_button()
-elif skip_position == "middle right":
- middleRightSide_button2 = skip_button()
-elif skip_position == "right":
- rightSide_button2 = skip_button()
-else:
- middleLeftSide_button2 = skip_button()
-
-if showSkipped_position == "left":
- leftSide_button3 = showSkipped_button()
-elif showSkipped_position == "middle right":
- middleRightSide_button3 = showSkipped_button()
-elif showSkipped_position == "right":
- rightSide_button3 = showSkipped_button()
-else:
- middleLeftSide_button3 = showSkipped_button()
-
-if undo_position == "left":
- leftSide_button4 = undo_button()
-elif undo_position == "middle right":
- middleRightSide_button4 = undo_button()
-elif undo_position == "right":
- rightSide_button4 = undo_button()
-else:
- middleLeftSide_button4 = undo_button()
-
-#// Speed focus remove conflicts
-if speedFocus_addOn:
- SF_bottomHTML = """
-var autoAnswerTimeout = 0;
-var autoAgainTimeout = 0;
-var autoAlertTimeout = 0;
-
-var setAutoAnswer = function(ms) {
- clearTimeout(autoAnswerTimeout);
- autoAnswerTimeout = setTimeout(function () { pycmd('ans') }, ms);
-}
-var setAutoAgain = function(ms) {
- clearTimeout(autoAgainTimeout);
- autoAgainTimeout = setTimeout(function () { pycmd("ease1"); }, ms);
-}
-var setAutoAlert = function(ms) {
- clearTimeout(autoAlertTimeout);
- autoAlertTimeout = setTimeout(function () { pycmd("autoalert"); }, ms);
-}"""
-else:
- SF_bottomHTML = ""
-
-#// setting buttons based on their position
-if leftSide_button1 != "":
- left_side1 = "<td width=50 align=left valign=top class=stat><br> {} </td>".format(leftSide_button1)
-else:
- left_side1 = ""
-
-if leftSide_button2 != "":
- left_side2 = "<td width=50 align=left valign=top class=stat><br> {} </td>".format(leftSide_button2)
-else:
- left_side2 = ""
-
-if leftSide_button3 != "":
- left_side3 = "<td width=50 align=left valign=top class=stat><br> {} </td>".format(leftSide_button3)
-else:
- left_side3 = ""
-
-if leftSide_button4 != "":
- left_side4 = "<td width=50 align=left valign=top class=stat><br> {} </td>".format(leftSide_button4)
-else:
- left_side4 = ""
-
-if rightSide_button1 != "":
- right_side1 = "<td width=50 align=right valign=top class=stat><br> {} </td>".format(rightSide_button1)
-else:
- right_side1 = ""
-
-if rightSide_button2 != "":
- right_side2 = "<td width=50 align=right valign=top class=stat><br> {} </td>".format(rightSide_button2)
-else:
- right_side2 = ""
-
-if rightSide_button3 != "":
- right_side3 = "<td width=50 align=right valign=top class=stat><br> {} </td>".format(rightSide_button3)
-else:
- right_side3 = ""
-
-if rightSide_button4 != "":
- right_side4 = "<td width=50 align=right valign=top class=stat><br> {} </td>".format(rightSide_button4)
-else:
- right_side4 = ""
-
-#// Review Screen Bottombar HTML
-def _bottomHTML(self):
- time_color = ""
- if custom_bottombarButtonBorderColor:
- time_color = bottombarButtonBorder_color
-
- return """%(bottomHTML_style)s
-%(min_buttonSize)s
-<center id=outer>
-<table id=innertable width=100%% cellspacing=0 cellpadding=0>
-<tr>
-<td align=left width=50 valign=top class=stat>
-<br>
-<button title="Shortcut key: E" onclick="pycmd('edit');" %(edit_style)s>%(edit_label)s</button></td>
-%(left_side1)s
-%(left_side2)s
-%(left_side3)s
-%(left_side4)s
-<td align=center valign=top id=middle>
-</td>
-%(right_side1)s
-%(right_side2)s
-%(right_side3)s
-%(right_side4)s
-<td width=50 align=right valign=top class=stat style='color: %(time_color)s'><span id=time class=stattxt>
-</span><br>
-<button onclick="pycmd('more');" %(more_style)s>%(more_label)s %(downArrow)s</button>
-</td>
-</tr>
-</table>
-</center>
-<script>
-time = %(time)d;
-%(SF_bottomHTML)s
-</script>
-""" % dict(bottomHTML_style=bottomHTML_style, min_buttonSize=min_buttonSize, rem=self._remaining(), downArrow=downArrow(), time=self.card.time_taken() // 1000,
- edit_style=edit_style, edit_label=edit_label, left_side1=left_side1, left_side2=left_side2, left_side3=left_side3, left_side4=left_side4, right_side1=right_side1,
- right_side2=right_side2, right_side3=right_side3, right_side4=right_side4, more_style=more_style, more_label=more_label, SF_bottomHTML=SF_bottomHTML, time_color=time_color)
-
-#// Show Answer Button
-def _showAnswerButton(self):
- showAnswer_text = showAnswer_label
- highEase_tooltip = ""
-
- if self.card.type not in [0, 1] and showAnswerBorderColor_style in [1, 3]:
- if self.card.factor // 10 < showAnswerEase1:
- showAnswerBorder_color = showAnswerEase1_color
- elif (showAnswerEase1 - 1) < self.card.factor // 10 < showAnswerEase2:
- showAnswerBorder_color = showAnswerEase2_color
- elif (showAnswerEase2 - 1) < self.card.factor // 10 < showAnswerEase3:
- showAnswerBorder_color = showAnswerEase3_color
- elif (showAnswerEase3 - 1) < self.card.factor // 10 < showAnswerEase4:
- showAnswerBorder_color = showAnswerEase4_color
- else:
- showAnswerBorder_color = "#7000A8"
- showAnswer_text = "<font size=6 color='#7000A8'> ^_~ </font>"
- else:
- showAnswerBorder_color = ""
-
- #// Moved show answer button size from "styles.py" here to make show answer border color based on ease compatible with custom button sizes
- if custom_buttonSize:
- if bottombarButtons_style ==0:
- showAnswer_style = 'style="height: {}px; width: {}px; font-size: {}px; border-color: {};"'.format(buttons_height, answer_width, text_size, showAnswerBorder_color)
- else:
- showAnswer_style = 'style="height: {}px; width: {}px; font-size: {}px; border-color: {};" id=main'.format(buttons_height, answer_width, text_size, showAnswerBorder_color)
- else:
- if bottombarButtons_style == 0:
- showAnswer_style = "style='border-color: {}' id=ansbut".format(showAnswerBorder_color) #// removed id=ansbut from it's own code for styling
- else:
- showAnswer_style = "style='border-color: {}' id=main".format(showAnswerBorder_color)
-
- #// removing conflict with speed focus add-on
- if speedFocus_addOn:
- c = self.mw.col.decks.confForDid(self.card.odid or self.card.did)
- if c.get('autoAnswer', 0) > 0:
- self.bottom.web.eval("setAutoAnswer(%d);" % (c['autoAnswer'] * 1000))
- if c.get('autoAlert', 0) > 0:
- self.bottom.web.eval("setAutoAlert(%d);" % (c['autoAlert'] * 1000))
- middle = '''
-<table cellspacing=0 cellpadding=0><tr><td class=stat2 align=center>
-<span class=stattxt> %(remaining)s </span><br>
-%(middleLeft_side1)s
-%(middleLeft_side2)s
-%(middleLeft_side3)s
-%(middleLeft_side4)s
-<button title="Shortcut key: Space" onclick='pycmd("ans");' %(answer_style)s>%(showAnswer_text)s</button>
-%(middleRight_side1)s
-%(middleRight_side2)s
-%(middleRight_side3)s
-%(middleRight_side4)s
-</td></tr></table>''' % dict(remaining=self._remaining(), middleLeft_side1=middleLeftSide_button1, middleLeft_side2=middleLeftSide_button2, middleLeft_side3=middleLeftSide_button3, middleLeft_side4=middleLeftSide_button4,
- answer_style=showAnswer_style, middleRight_side1=middleRightSide_button1, middleRight_side2=middleRightSide_button2, middleRight_side3=middleRightSide_button3, middleRight_side4=middleRightSide_button4, showAnswer_text=showAnswer_text)
- # wrap it in a table so it has the same top margin as the ease buttons
- middle = "%s" % middle
- if self.card.should_show_timer():
- maxTime = self.card.time_limit() / 1000
- else:
- maxTime = 0
- self.bottom.web.eval("showQuestion(%s,%d);" % (json.dumps(middle), maxTime))
- self.bottom.web.adjustHeightToFit()
-
-
-#// replacing/wraping functions
-Reviewer._shortcutKeys = wrap(Reviewer._shortcutKeys, _shortcutKeys_wrap, 'around')
-Reviewer._showAnswerButton = _showAnswerButton
-Reviewer._bottomHTML = _bottomHTML
diff --git a/.local/share/Anki2/addons21/advanced_review/Button_Colors.py b/.local/share/Anki2/addons21/advanced_review/Button_Colors.py
deleted file mode 100644
index 0560aed..0000000
--- a/.local/share/Anki2/addons21/advanced_review/Button_Colors.py
+++ /dev/null
@@ -1,211 +0,0 @@
-#// auth_ Mohamad Janati
-#// Copyright (c) 2019-2021 Mohamad Janati (freaking stupid, right? :|)
-
-from aqt.reviewer import Reviewer
-from aqt import mw
-from . import styles
-
-
-#// getting confing information
-config = mw.addonManager.getConfig(__name__)
-button_style = config[' Review_ Buttons Style']
-custom_colors = config[' Review_ Custom Colors']
-hide_hard = config['Button_ Hide Hard']
-hide_good = config['Button_ Hide Good']
-hide_easy = config['Button_ Hide Easy']
-custom_buttonSize = config['Button_ Custom Button Sizes']
-interval_style = config[' Review_ Interval Style']
-if custom_buttonSize:
- buttons_height = config['Button_ Height_ All Bottombar Buttons']
- reviewButtons_width = config['Button_ Width_ Review Buttons']
- text_size = config['Button_ Text Size']
-else:
- buttons_height = ""
- reviewButtons_width = ""
- text_size = ""
-again_label = config['Button Label_ Again']
-hard_label = config['Button Label_ Hard']
-good_label = config['Button Label_ Good']
-easy_label = config['Button Label_ Easy']
-
-#// getting styles from styles.py
-text_color = styles.text_color
-again_color = styles.again_color
-hard_color = styles.hard_color
-good_color = styles.good_color
-easy_color = styles.easy_color
-background_color = styles.background_color
-custom_text = styles.custom_text
-custom_background = styles.custom_background
-button_styles = styles.button_styles
-active_extra = styles.active_extra
-neon1 = styles.neon1
-neon2 = styles.neon2
-fill1 = styles.fill1
-fill2 = styles.fill2
-
-def _answerButtonList(self):
- cnt = self.mw.col.sched.answerButtons(self.card)
- if cnt == 2:
- #// button = ((ease, "Label"),)
- again = ((1, " {} ".format(again_label)),)
- good = ((2, " {} ".format(good_label)),)
- buttons = again
- #// don't add button "good" to returned buttons if it's disabled
- if not hide_good:
- buttons += good
- return buttons
- elif cnt == 3:
- again = ((1, " {} ".format(again_label)),)
- good = ((2, " {} ".format(good_label)),)
- easy = ((3, " {} ".format(easy_label)),)
- buttons = again
- if not hide_good:
- buttons += good
- if not hide_easy:
- buttons += easy
- return buttons
- else:
- again = ((1, " {} ".format(again_label)),)
- hard = ((2, " {} ".format(hard_label)),)
- good = ((3, " {} ".format(good_label)),)
- easy = ((4, " {} ".format(easy_label)),)
- buttons = again
- if not hide_hard:
- buttons += hard
- if not hide_good:
- buttons += good
- if not hide_easy:
- buttons += easy
- return buttons
-
-
-def _answerButtons(self):
- cnt = self.mw.col.sched.answerButtons(self.card)
- default = self._defaultEase()
- def but(i, label):
- #// Setting id name for each button based on their ease value
- if cnt == 2:
- if i == 1:
- button_id = "again"
- elif i == 2:
- button_id = "good"
- else:
- button_id = ""
- elif cnt == 3:
- if i == 1:
- button_id = "again"
- elif i == 2:
- button_id = "good"
- elif i == 3:
- button_id = "easy"
- else:
- button_id = ""
- elif cnt == 4:
- if i == 1:
- button_id = "again"
- elif i == 2:
- button_id = "hard"
- elif i == 3:
- button_id = "good"
- elif i == 4:
- button_id = "easy"
- else:
- button_id = ""
- else:
- if i == 1:
- button_id = "again"
- elif i == 2:
- button_id = "hard"
- elif i == 3:
- button_id = "good"
- elif i == 4:
- button_id = "easy"
- else:
- button_id = ""
- due_plain = self._buttonTime(i)
- inButton_due = ""
- if interval_style == 1:
- if button_id == "again":
- due = "<font color={}>{}</font>".format(again_color, due_plain)
- elif button_id == "hard":
- due = "<font color={}>{}</font>".format(hard_color, due_plain)
- elif button_id == "good":
- due = "<font color={}>{}</font>".format(good_color, due_plain)
- elif button_id == "easy":
- due = "<font color={}>{}</font>".format(easy_color, due_plain)
- else:
- if due_plain:
- due = due_plain
- else:
- return
- elif interval_style == 2:
- if due_plain:
- due = "<br>"
- inButton_due = " | {}".format(due_plain)
- else:
- return
- else:
- if due_plain:
- due = due_plain
- else:
- return
- #// Choosing button classes based on what user has chosen in config
- if button_style == 1 or button_style == 3:
- if custom_colors:
- style = custom_background
- else:
- style = background_color
- elif button_style == 4:
- style = neon1
- elif button_style == 5:
- style = neon2
- elif button_style == 6:
- style = fill1
- elif button_style == 7:
- style = fill2
- else:
- if custom_colors:
- style = custom_text
- else:
- style = text_color
- #// Choosing style for active button
- if i == default:
- extra = "style='{}; height: {}px; width: {}px; font-size: {}px;'".format(active_extra, buttons_height, reviewButtons_width, text_size)
- else:
- extra = "style='height: {}px; width: {}px; font-size: {}px;'".format(buttons_height, reviewButtons_width, text_size)
- #// Choosing button styles based on what user has chosen in config
- if button_style == 2 or button_style == 3:
- button_class = "wide"
- #// replacing styling for active button
- if i == default:
- extra = "style='{}; border-radius: 3px; height: {}px;'".format(active_extra, buttons_height)
- else:
- extra = "style='height: {}px'".format(buttons_height)
- else:
- button_class = "mybuttons"
- if interval_style == 2:
- bottombar_table = ""
- else:
- bottombar_table = ""
- return style + button_styles + '''
-<td align=center>{0}
-<button title="Shortcut Key: {1}" data-ease="{1}" onclick='pycmd("ease{1}");' class={2} id={3} {4}>{5}{6}</button>
-</td>'''.format(due, i, button_class, button_id, extra, label, inButton_due)
- #// adjusting the answer button table for wide button
- if button_style == 2 or button_style == 3:
- bottombar_width = "80%"
- else:
- bottombar_width = ""
- buf = "<center><table cellpadding=0 cellspacing=0 width={}><tr>".format(bottombar_width)
- for ease, label in self._answerButtonList():
- buf += but(ease, label)
- buf += "</tr></table>"
- script = """
-<script>$(function () { $("#defease").focus(); });</script>"""
- return buf + script
-
-
-#// replacing default functions with customized functions here
-Reviewer._answerButtonList = _answerButtonList
-Reviewer._answerButtons = _answerButtons
diff --git a/.local/share/Anki2/addons21/advanced_review/CHANGELOG.md b/.local/share/Anki2/addons21/advanced_review/CHANGELOG.md
deleted file mode 100644
index 2da5b3d..0000000
--- a/.local/share/Anki2/addons21/advanced_review/CHANGELOG.md
+++ /dev/null
@@ -1,421 +0,0 @@
-<html>
- <div class="background">
- <h1>2022/2/13</h1>
- <ul>
- <li>Added an option to change Card Info Sidebar default position</li>
- <li>Fixed description button not showing on deck overview screen</li>
- <li>Fixed a sidebar error caused by rescheduled cards</li>
- </ul>
- </div>
- <div class="background">
- <h1>2022/1/30</h1>
- <ul>
- <li>Changed load settings prompt message (forgot to do it yesterday)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2022/1/29</h1>
- <ul>
- <li>Added a feature to change <font color=dodgerred>button text size</font> [go to "Button Sizes" and change button text size]</li>
- <li>Added <font color=dodgerred>another style for button intervals</font> (now you can move button intervals inside the buttons) [to change button interval style go to "Styles" tab and change button interval style]</li>
- <li>Added a feature to enable <font color=dodgerred>direct config edit</font> (serves no purpose for now, don't enable it unless you're told to | The idea is to quickly be able to add new features without having to add options in settings menu)</li>
- <li>Added an option to <font color=dodgerred>backup your settings</font> (just press Backup Settings button and it will create a backup file of your settings - you can also share your settings and button stylings with other people by sharing the settings file)</li>
- <li>Added an option to <font color=dodgerred>load settings</font> file (you can load settings and not go through settings and changing different settings and styles)</li>
- <li>Fixed button tooltip bug in python 3.10 (Thanks to <a href="https://github.com/sdvcrx">@sdvcrx</a>)</li>
- <li>Removed "Restore Defaults" button (with the new "Load Settings" function, having this extra button doesn't make sense)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/9/22</h1>
- <ul>
- <li>Minor macOS bug fix (Hopefully -_-)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/9/15</h1>
- <ul>
- <li>Minor bug fix</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/8/23</h1>
- <ul>
- <li>Detailed Deck Overview bug fix</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/8/22</h1>
- <ul>
- <li>Added a new method for skipping cards.<br>
- <ul>
- <li>This method is partially manual. The skipped cards won't show automatically unless you finish reviewing normal cards.</li>
- <li>This method uses Anki's "Bury" function and buries skipped cards. The skipped cards will get unburied once you exit review screen or press press <button>Show Skipped</button> Button.</li>
- <li>If you want for the skipped cards to show mid-review, you'll have to press <button>Show Skipped</button> Button or press the assigned shortcut (default shortcut is <kbd>Alt</kbd> + <kbd>C</kbd>).</li>
- <li>If you use V3 sheduler, this is the only method that'll work for you and will be chosen by default.</li>
- <li>If you use V2 scheduler you can use this method or the old method. You can choose the skip method in <code>Settings Menu -> Misc -> Skip Method</code></li>
- <li>The old method is <font color=red>Next Card</font> and the new method is <font color=red>Bury</font>.</li>
- <li>The new "Bury" method might be a bit slower, especially when you use the button. If you choose to use this method, I suggets using shortcuts for skipping cards.</li>
- </ul>
- <li>Adjusted Settings Menu height for better viewing on screens with lower resulotions</li>
- <li>Moved changelog from main Settings Menu window to a separate window</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/8/4</h1>
- <ul>
- <li>Bug fix (now ARBb is compatible with Anki 2.1.45)</li>
- <li>From now on, No update will be released for Anki versions older than 2.1.45</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/7/31</h1>
- <ul>
- <li>Bug Fix</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/7/30</h1>
- <ul>
- <li>Bug Fix</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/7/30</h1>
- <ul>
- <li>Added an option to set your custom text as button labels.<br>
- replace again, hard, good, easy, etc. text with your custom text or emoji.<br>
- To change button labels and use your own custom text, go to "Button label" tab in the settings.<br>
- To the person asking me how to change button labels -_- you can use this from now on. No need to change the code.</li>
- <li>Added an option to hide hard, good, easy buttons. (Requested)<br>
- (no I haven't forgotten to put again in the list -_- you can't hide again button).<br>
- To use this option, go to "Bottombar Buttons" and look for "Hide Buttons" part there.</li>
- <li>Added an option to change the roundness of the buttons.<br>
- To use this option, go to "Styles" tab and look for "Button Border Radius" there.</li>
- <li><font color=red>Removed</font> pressed button stats from the add-on.<br>
- For those who used it, I'll be publishing it as a separate add on named "Pressed Button Stats"</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/6/9</h1>
- <ul>
- <li>Added an option to turn off more overview stats.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/12/6</h1>
- <ul>
- <li>Added another mode to overview stats (taken from "More Overview Stats 2.1")</li>
- <li>Fixed conflict with speedfocus add-on (If you use speedfocus you need to enable "Speed focus" option in ARBb settings -> Misc)</li>
- </ul>
- </div><div class="background">
- <h1>2020/6/9</h1>
- <ul>
- <li>Added an option to turn off more overview stats.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/30</h1>
- <ul>
- <li>Changed tooltip behavior.<br>
- Now it's size won't be as size of the buttons when it's position is fixed.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/18</h1>
- <ul>
- <li>Minor code changes/improvements.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/15</h1>
- <ul>
- <li>Now it designs review buttons that other add-ons add (like rememorize).<br>
- it treats them like other bottombar button so their color and style<br>
- will be like other bottombar buttons</li>
- <li>you can style other bottombar buttons that are added by other add-on (like deferer button).<br>
- you'll need to change their code a bit. if you want to style them leave a comment here or on github page.<br>
- (the last picture is how the extra buttons the those add-on add look after styling them using this add-on)</li>
- <li>finally a github page :\ <a href="https://github.com/noobj2/Anki-Advanced-Review-Bottombar">Here it is</a></li>
- <li>Changed color of timer text in bottombar.<br>
- now it uses the same color you have set for other bottombar buttons text color. (not a big deal though, right?)<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/9</h1>
- <ul>
- <li>Made neon and fill designs customizable. now you can change their colors using "Colors" tab.<br>
- Enable custom colors by checking "Custom Review Button Colors" checkbox and <br>
- changing again, hard, good and easy colors.<br>
- as these designs don't have a separate hover color, changing hover colors won't<br>
- change anything about these buttons</li>
- <li>Made review bottombar buttons, deck overview buttons and main screen bottombar buttons customizable. <br>
- you can change their border and text colors in "Colors" tab by changing "General Button" text and border colors.<br>
- you can't chage text or background color for general buttons if their button style is set on default.<br>
- to change general buttons style go to "Styles" tab and change "General Buttons Style".</li>
- <li>Added an option to change show answer button border color based on card ease. <br>
- you can enable than option in "Style" tab by changing "Show Answer Border Color Style" <br>
- from "Fixed" to "Based on Card Ease". you cand change color for each ease range in "Colors" tab.<br>
- - (honestly i think it's gonna be usless for most of you :/ it was just something that i needed).</li>
- <li>+ Other settings menu and bottombar buttons changes and improvements.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/28</h1>
- <ul>
- <li>Added an option to choose card type [learn, review, re-learn, cram] for button count stats</li>
- <li>Added an option to manually change decks in button count stats<br></li>
- <font color=#004182>at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/01</h1>
- <ul>
- <li>Added total time and time per card to information shown in pressed button stats<br></li>
- <font color=#004182>at 85%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/28</h1>
- <ul>
- <li>Added an option to choose card type [learn, review, re-learn, cram] for button count stats</li>
- <li>Added an option to manually change decks in button count stats<br></li>
- <font color=#004182>at 80%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/27</h1>
- <ul>
- <li>Added an option to choose time period for button count stats</li>
- <li>Added an option to change button count stats scope</li>
- <li>Button count stats window improvements<br></li>
- <font color=#004182>at 50%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/26</h1>
- <ul>
- <li><font color=tomato>NEW FEATURE:</font> pressed button count + Percent<br>
- <font color=red>NOTE:</font> it's work in progress and very basic<br>
- the only reason i'm publishing it is that i want to hear you opinions on it and see what you need<br>
- I want to hear your ideas about it, tell me what i can do to make it better<br>
- you can Email me your ideas<br>
- however, i think some of you may want to change the time period for this option<br>
- to do that go to config -> Advanced review bottombar -> open add-on folder -> <br>
- open Button_Count.py -> go to line 47 you'll see what you need there<br>
- when you're on a deck, it shows pressed button stats for that deck, <br>
- when you're in main window, it'll show overall stats<br></li>
- <font color=#004182>at 15%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/22</h1>
- <ul>
- <li>Made styling main screen and deck overview compatible with anki versions older than 2.1.19</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/21</h1>
- <ul>
- <li>Added an option to change main screen and deck overview buttons style<br>
- (Their style will be as other bottombar buttons style)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/20</h1>
- <ul>
- <li>Fixed tooltip bug (where it would show hard on tooltip when you<br>
- pressed good if you were in a cutom study session )</li>
- <li> Added card info sidebar auto open (opens sidebar automatically when you review a card)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/18</h1>
- <ul>
- <li>Minor settings menu improvements</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/17</h1>
- <ul>
- <li>Fixed Neon 1 style bug</li>
- <li>Addded correct percentage, fastest reveiw, slowest review, note ID and card ID options to card info sidebar</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/16</h1>
- <ul>
- <li>Added change button transition time option (for fill and neon designs only)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/15</h1>
- <ul>
- <li>Added an option to change cursor type when you hover over bottombar buttons</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/14</h1>
- <ul>
- <li>Added answer tooltips</li>
- <li>Adjusted tooltips for neon and fill designs</li>
- <li>Adjusted tooltips for custom button sizes</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/13</h1>
- <ul>
- <li>Added a function to get shortcuts (Don't have to test keys that you want to set as shortcuts anymore,<br> if it's Anki's default shortcut for something, the add-on wont accept it)</li>
- <li>Moved button design tooltip to another tab (noticed it was WAY too big for lower resulotions to be useful)</li>
- <br><br><font color="red"># NOTE:</font> if you're updating from any version other than 2020/4/12 you might run into some problems trying to<br>
- open settings menu if you can't open settings menu after update open add-on folder and delete meta.json file if<br>
- that didn't help go to settings.py and put a # in front of the last line then go to tools -> add-ons and<br> press restore defaults on this addon's config page<br>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/12</h1>
- <ul>
- <li>Changed settings menu so it's easier to work with on lower resolutions (had to code it all over again)</li>
- <li>Made picking colors completely automatic (no color code copy/paste, choose the color and it's set)</li>
- <li>Added an option for you to choose settings menu's position</li>
- <li>Made wide buttons compatible with no distractions add-on</li>
- <br><br><font color="red"># NOTE:</font> After update you need to restore config to defaults in tools -> addons<br>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/8</h1>
- <ul>
- <li>settings menu bugs fixes</li>
- <li>settings menu minor adjustments for smaller screens</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/7</h1>
- <ul>
- <li>settings menu improvements</li>
- <li>added an option to color intervals</li>
- <li>added an option to style other bottombar buttons</li>
- <li>added 4 new button designs</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/6</h1>
- <ul>
- <li>minor settings menu improvements</li>
- <li>card info sidebar improvements for old scheduler</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/5</h1>
- <ul>
- <li>minor settings menu improvements</li>
- <li>added tooltips with pictures for different settings</li>
- <li>fixed card info sidebar crash bug</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/4</h1>
- <ul>
- <li>added settings menu</li>
- <li>minor settings menu adjustments</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/2</h1>
- <ul>
- <li>fix for wide buttons</li>
- <li>fixed card info sidebar problem with beta versions of anki (2.1.23 and 2.1.24)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/1</h1>
- <ul>
- <li>fixed issue with limiting card reviews in card info sidebar</li>
- <li>added an option to change active button indicator from border to glow and change it's color</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/30</h1>
- <ul>
- <li>adjusted colors and gradients for background color change for light mode</li>
- <li>added background shadow for review buttons (enable in config)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/29</h1>
- <ul>
- <li>added undo button (enable in config)</li>
- <li>fixed button color for old scheduler</li>
- <li>removed conflict with customize keyboard shortcuts add-on</li>
- <li>removed conflict with speed focus add-on (needs to be enabled in config)</li>
- <li>removed conflict with slackers add-on</li>
- <li>added an option to choose text color in review button background color change</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/26</h1>
- <ul>
- <li>added change button size option</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/25</h1>
- <ul>
- <li>added change skip and info button position option</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/20</h1>
- <ul>
- <li>fixed conflict with "replay button on card" add-on</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/7</h1>
- <ul>
- <li>adjusted the color for review buttons</li>
- <li>added an option to choose the font for the text in card info side bar in config</li>
- <li>added an option so you could limit the maximum number of previous reviews that are shown on sidebar for a card</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/6</h1>
- <ul>
- <li>made the info sidebar customizable, you can choose what you want to see on card info sidebar in config</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/4</h1>
- <ul>
- <li>fixed not showing review button colors on new in-app night mode</li>
- <li>adjusted review button text colors for new in-app night mode</li>
- <li>adjusted wide button widths</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/2/8</h1>
- <ul>
- <li>added an option for you to choose the shortcut key for skip and info buttons (in add-on config)</li>
- <li>added an option to choose the sidebar theme (in add-on config)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/1/2</h1>
- <ul>
- <li>fix for old scheduler</li>
- </ul>
- </div>
- <div class="background">
- <h1>2019/12/14</h1>
- <ul>
- <li>Initial Release</li>
- </ul>
- </div>
-
-</body>
-</html>
diff --git a/.local/share/Anki2/addons21/advanced_review/Card_Info.py b/.local/share/Anki2/addons21/advanced_review/Card_Info.py
deleted file mode 100644
index 3d5031d..0000000
--- a/.local/share/Anki2/addons21/advanced_review/Card_Info.py
+++ /dev/null
@@ -1,508 +0,0 @@
-#// auth_ Mohamad Janati
-#// Copyright (c) 2019-2021 Mohamad Janati (freaking stupid, right? :|)
-
-import os
-import io
-
-from anki.hooks import addHook
-from aqt.qt import *
-from aqt.webview import AnkiWebView
-import aqt.stats
-import time
-import datetime
-from anki.lang import _
-from anki.utils import fmtTimeSpan
-from anki.stats import CardStats
-from aqt import *
-from anki.utils import htmlToTextLine
-from anki.collection import _Collection
-from aqt.reviewer import Reviewer
-
-
-#// sidebar functions
-class StatsSidebar(object):
- def __init__(self, mw):
- config = mw.addonManager.getConfig(__name__)
- sidebar_autoOpen = config['Card Info sidebar_ Auto Open']
- self.mw = mw
- self.shown = False
- addHook("showQuestion", self._update)
- addHook("reviewCleanup", self._update)
- if sidebar_autoOpen:
- addHook("showQuestion", self.show)
-
- def _addDockable(self, title, w):
- class DockableWithClose(QDockWidget):
- closed = pyqtSignal()
- def closeEvent(self, evt):
- self.closed.emit()
- QDockWidget.closeEvent(self, evt)
- dock = DockableWithClose(title, mw)
- dock.setObjectName(title)
- dock.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)
- dock.setFeatures(QDockWidget.AllDockWidgetFeatures)
- dock.setWidget(w)
- if mw.width() < 600:
- mw.resize(QSize(600, mw.height()))
- config = mw.addonManager.getConfig(__name__)
- sidebar_defaultPosition = config['Card Info sidebar_ Default Position']
- if sidebar_defaultPosition == 1:
- mw.addDockWidget(Qt.LeftDockWidgetArea, dock)
- else:
- mw.addDockWidget(Qt.RightDockWidgetArea, dock)
- return dock
-
- def _remDockable(self, dock):
- mw.removeDockWidget(dock)
-
- def show(self):
- if not self.shown:
- class ThinAnkiWebView(AnkiWebView):
- def sizeHint(self):
- return QSize(200, 100)
- self.web = ThinAnkiWebView()
- self.shown = self._addDockable("Card Info", self.web)
- self.shown.closed.connect(self._onClosed)
- self._update()
-
- def hide(self):
- if self.shown:
- self._remDockable(self.shown)
- self.shown = None
-
- def toggle(self):
- if self.shown:
- self.hide()
- else:
- self.show()
-
- def _onClosed(self):
- # schedule removal for after evt has finished
- self.mw.progress.timer(100, self.hide, False)
-
- # modified _revlogData function
- def _revlogData_mod(self, card, cs):
- config = mw.addonManager.getConfig(__name__)
- sidebar_font = config['Card Info sidebar_ Font']
- reviewsToShow = config['Card Info sidebar_ number of reviews to show for a card']
- limited_review_warning_note = config['Card Info sidebar_ warning note']
- custom_colors = config[' Review_ Custom Colors']
- again_color = config['Color_ Again']
- hard_color = config['Color_ Hard']
- good_color = config['Color_ Good']
- easy_color = config['Color_ Easy']
- entries = self.mw.col.db.all("select id/1000.0, ease, ivl, factor, time/1000.0, type from revlog where cid = ?", card.id)
- if not entries:
- return ""
- s = "<div style='text-align: center; font-family: arial; font-weight: bold;'> Reviews </div>"
- s += ("<style>th {font-family: %s; font-size: 13px;}</style><table width=100%% ><tr><th align=left>%s</th>") % (sidebar_font, "Date")
- s += ("<th align=center >%s</th>" * 5) % ("Type", "Button", "Interval", "Ease", "Time")
- cnt = 0
- for (date, ease, ivl, factor, taken, type) in reversed(entries):
- cnt += 1
- s += "<tr><td>%s</td>" % time.strftime("<b>%y/%m/%d</b><br>%H:%M", time.localtime(date))
- tstr = ["Learn", "Review", "Relearn", "Filtered", "Resched"][type]
- import anki.stats as st
-
- fmt = "<span style='color:%s'>%s</span>"
- if type == 0:
- tstr = fmt % (st.colLearn, tstr)
- elif type == 1:
- tstr = fmt % (st.colMature, tstr)
- elif type == 2:
- tstr = fmt % (st.colRelearn, tstr)
- elif type == 3:
- tstr = fmt % (st.colCram, tstr)
- else:
- tstr = fmt % ("#000", tstr)
- if ease == 1:
- tstr = fmt % (st.colRelearn, tstr)
- ####################
- int_due = "%s" % time.strftime("%y/%m/%d", time.localtime(date))
- if ivl > 0:
- int_due_date = time.localtime(date + (ivl * 24 * 60 * 60))
- int_due = time.strftime("%y/%m/%d", int_due_date)
- ####################
- if ivl == 0:
- ivl = "0d"
- elif ivl > 0:
- ivl = fmtTimeSpan(ivl * 86400, short=True)
- else:
- ivl = cs.time(-ivl)
-
- if not custom_colors:
- again_color = "#FF1111"
- hard_color = "#FF9814"
- good_color = "#33FF2D"
- easy_color = "#21C0FF"
- if self.mw.col.sched_ver() == 1 and type == 3:
- if ease == 1:
- button = "<div style='color: {};'>Again</div>".format(again_color)
- elif ease == 2:
- button = "<div style='color: {};'>Good</div>".format(good_color)
- elif ease == 3:
- button = "<div style='color: {};'>Good</div>".format(good_color)
- elif ease == 4:
- button = "<div style='color: {};'>Easy</div>".format(easy_color)
- else:
- button = "ease: {}".format(ease)
- elif self.mw.col.sched_ver() == 1 and (type == 0 or type == 2):
- if ease == 1:
- button = "<div style='color: {};'>Again</div>".format(again_color)
- elif ease == 2:
- button = "<div style='color: {};'>Good</div>".format(good_color)
- elif ease == 3:
- button = "<div style='color: {};'>Easy</div>".format(easy_color)
- elif ease == 4:
- button = "<div style='color: {};'>Easy</div>".format(easy_color)
- else:
- button = "ease: {}".format(ease)
- else:
- if ease == 1:
- button = "<div style='color: {};'>Again</div>".format(again_color)
- elif ease == 2:
- button = "<div style='color: {};'>Hard</div>".format(hard_color)
- elif ease == 3:
- button = "<div style='color: {};'>Good</div>".format(good_color)
- elif ease == 4:
- button = "<div style='color: {};'>Easy</div>".format(easy_color)
- else:
- button = "ease: {}".format(ease)
- s += ("<td align=center>%s</td>" * 5) % (tstr, button, "%s<br>(%s)" %(ivl, int_due), "%d%%" % (factor / 10) if factor else "", cs.time(taken)) + "</tr>"
- if reviewsToShow != 0:
- if cnt > int(reviewsToShow) - 1:
- break
- else:
- continue
- s += "</table>"
- warning = ""
- if limited_review_warning_note:
- if cnt < card.reps:
- try:
- a = int(reviewsToShow)
- warning = """<div style="font-family: consolas; font-size: 12px;"><hr> You have limited previous review information number to "{}" reviews.</div>""".format(reviewsToShow)
- except ValueError:
- warning = """<div style="font-family: consolas; font-size: 12px;"><hr>Some of the history is missing. For more information, please see the browser documentation.</div>"""
- return s + warning
-
-
- # adds the modified _revlogData function to Reviewer class in aqt.browser
- Reviewer._revlogData_mod = _revlogData_mod
-
-
- # modified report function
- def report_mod(self):
- from anki import version
- anki_version = int(version.replace('.', ''))
- if anki_version > 2119:
- from aqt.theme import theme_manager
- config = mw.addonManager.getConfig(__name__)
-
- infobar_created = config['Card Info sidebar_ Created']
- infobar_edited = config['Card Info sidebar_ Edited']
- infobar_firstReview = config['Card Info sidebar_ First Review']
- infobar_latestReview = config['Card Info sidebar_ Latest Review']
- infobar_due = config['Card Info sidebar_ Due']
- infobar_interval = config['Card Info sidebar_ Interval']
- infobar_ease = config['Card Info sidebar_ Ease']
- infobar_reviews = config['Card Info sidebar_ Reviews']
- infobar_lapses = config['Card Info sidebar_ Lapses']
- infobar_correctPercent = config['Card Info Sidebar_ Correct Percent']
- infobar_fastestReview = config['Card Info Sidebar_ Fastest Review']
- infobar_slowestReview = config['Card Info Sidebar_ Slowest Review']
- infobar_avgTime = config['Card Info sidebar_ Average Time']
- infobar_totalTime = config['Card Info sidebar_ Total Time']
- infobar_cardType = config['Card Info sidebar_ Card Type']
- infobar_noteType = config['Card Info sidebar_ Note Type']
- infobar_deck = config['Card Info sidebar_ Deck']
- infobar_tags = config['Card Info sidebar_ Tags']
- infobar_noteID = config['Card Info Sidebar_ Note ID']
- infobar_cardID = config['Card Info Sidebar_ Card ID']
- infobar_sortField = config['Card Info sidebar_ Sort Field']
-
- c = self.card
- fmt = lambda x, **kwargs: fmtTimeSpan(x, short=True, **kwargs)
- self.txt = "<table width=100%>"
- if infobar_created:
- self.addLine("Created", time.strftime("%Y-%m-%d | %H:%M", time.localtime(c.id/1000)))
- if infobar_edited:
- if c.note().mod != False and time.localtime(c.id/1000) != time.localtime(c.note().mod):
- self.addLine("Edited", time.strftime("%Y-%m-%d | %H:%M", time.localtime(c.note().mod)))
- first = self.col.db.scalar("select min(id) from revlog where cid = ?", c.id)
- last = self.col.db.scalar("select max(id) from revlog where cid = ?", c.id)
- if first:
- if infobar_firstReview:
- self.addLine("First Review", time.strftime("%Y-%m-%d | %H:%M", time.localtime(first/1000)))
- if infobar_latestReview:
- self.addLine("Latest Review", time.strftime("%Y-%m-%d | %H:%M", time.localtime(last/1000)))
- if c.type != 0:
- if c.odid or c.queue < 0:
- next = None
- else:
- if c.queue in (2,3):
- next = time.time()+((c.due - self.col.sched.today)*86400)
- else:
- next = c.due
- next = self.date(next)
- if next:
- if infobar_due:
- self.addLine("Due", next)
- if c.queue == 2:
- if infobar_interval:
- self.addLine("Interval", fmt(c.ivl * 86400))
- if infobar_ease:
- self.addLine("Ease", "%d%%" % (c.factor/10.0))
- if infobar_lapses:
- self.addLine("Lapses", "%d" % c.lapses)
- if self.col.sched_ver() == 1:
- pressed_again = mw.col.db.scalar("select sum(case when ease = 1 then 1 else 0 end) from revlog where cid = ?", c.id)
- pressed_good = mw.col.db.scalar("select sum(case when ease = 2 then 1 else 0 end) from revlog where cid = ?", c.id)
- pressed_easy = mw.col.db.scalar("select sum(case when ease = 3 then 1 else 0 end) from revlog where cid = ?", c.id)
- pressed_all = pressed_again + pressed_good + pressed_easy
- self.addLine("Again", "{} | {:.0f}%".format(str(pressed_again).rjust(4), float(pressed_again/pressed_all)*100))
- self.addLine("Good", "{} | {:.0f}%".format(str(pressed_good).rjust(4), float(pressed_good/pressed_all)*100))
- self.addLine("Easy", "{} | {:.0f}%".format(str(pressed_easy).rjust(4), float(pressed_easy/pressed_all)*100))
- elif self.col.sched_ver() == 2:
- pressed_again = mw.col.db.scalar("select sum(case when ease = 1 then 1 else 0 end) from revlog where cid = ?", c.id)
- pressed_hard = mw.col.db.scalar("select sum(case when ease = 2 then 1 else 0 end) from revlog where cid = ?", c.id)
- pressed_good = mw.col.db.scalar("select sum(case when ease = 3 then 1 else 0 end) from revlog where cid = ?", c.id)
- pressed_easy = mw.col.db.scalar("select sum(case when ease = 4 then 1 else 0 end) from revlog where cid = ?", c.id)
- pressed_all = pressed_again + pressed_hard + pressed_good + pressed_easy
- if pressed_all < 1:
- pressed_all = 1
- self.addLine("Again", "{} | {:.0f}%".format(str(pressed_again).rjust(4), float(pressed_again/pressed_all)*100))
- self.addLine("Hard", "{} | {:.0f}%".format(str(pressed_hard).rjust(4), float(pressed_hard/pressed_all)*100))
- self.addLine("Good", "{} | {:.0f}%".format(str(pressed_good).rjust(4), float(pressed_good/pressed_all)*100))
- self.addLine("Easy", "{} | {:.0f}%".format(str(pressed_easy).rjust(4), float(pressed_easy/pressed_all)*100))
- if infobar_reviews:
- self.addLine("Reviews", "%d" % c.reps)
- (cnt, total) = self.col.db.first("select count(), sum(time)/1000 from revlog where cid = ?", c.id)
- if infobar_correctPercent and c.reps > 0:
- self.addLine("Correct Percentage", "{:.0f}%".format(float((c.reps-c.lapses)/c.reps)*100))
- if infobar_fastestReview:
- fastes_rev = mw.col.db.scalar("select time/1000.0 from revlog where cid = ? order by time asc limit 1", c.id)
- self.addLine("Fastest Review", self.time(fastes_rev))
- if infobar_slowestReview:
- slowest_rev = mw.col.db.scalar("select time/1000.0 from revlog where cid = ? order by time desc limit 1", c.id)
- self.addLine("Slowest Review", self.time(slowest_rev))
- if cnt:
- if infobar_avgTime:
- self.addLine("Average Time", self.time(total / float(cnt)))
- if infobar_totalTime:
- self.addLine("Total Time", self.time(total))
- elif c.queue == 0:
- if infobar_due:
- self.addLine("Position", c.due)
- if infobar_cardType:
- self.addLine("Card Type", c.template()['name'])
- if infobar_noteType:
- self.addLine("Note Type", c.model()['name'])
- if infobar_noteID:
- self.addLine("Note ID", c.nid)
- if infobar_cardID:
- self.addLine("Card ID", c.id)
- if infobar_deck:
- self.addLine("Deck", self.col.decks.name(c.did))
- if c.note().tags:
- if infobar_tags:
- self.addLine("Tags", " | ".join(c.note().tags))
- f = c.note()
- sort_field = htmlToTextLine(f.fields[self.col.models.sortIdx(f.model())])
- if infobar_sortField:
- if len(sort_field) > 40:
- self.addLine("Sort Field", "[{}<br>{}<br>{}...]".format(sort_field[:20], sort_field[20:41], sort_field[41:58]))
- else:
- self.addLine("Sort Field", htmlToTextLine(f.fields[self.col.models.sortIdx(f.model())]))
- self.txt += "</table>"
- return self.txt
-
-
- # adds the modified report functions to CardStats class in anki.stats
- CardStats.report_mod = report_mod
-
-
- # modified cardStats function
- def cardStats_mod(self, card):
- from anki.stats import CardStats
- return CardStats(self, card).report_mod()
-
-
- # adds a modified cardStats function to _Collection class in anki.collection
- _Collection.cardStats_mod = cardStats_mod
-
-
- # functions to get more previous cards to add them to sidebard
- def lastCard2(self):
- if self._answeredIds:
- if len(self._answeredIds) > 1:
- try:
- return self.mw.col.getCard(self._answeredIds[-2])
- except TypeError:
- return
- def lastCard3(self):
- if self._answeredIds:
- if len(self._answeredIds) > 2:
- try:
- return self.mw.col.getCard(self._answeredIds[-3])
- except TypeError:
- return
- def lastCard4(self):
- if self._answeredIds:
- if len(self._answeredIds) > 3:
- try:
- return self.mw.col.getCard(self._answeredIds[-4])
- except TypeError:
- return
-
- # adds functions above to Reviewer class in aqt.reviewer
- Reviewer.lastCard2 = lastCard2
- Reviewer.lastCard3 = lastCard3
- Reviewer.lastCard4 = lastCard4
-
-
- def _update(self):
- config = mw.addonManager.getConfig(__name__)
- infobar_currentReviewCount = config['Card Info sidebar_ Current Review Count']
- try:
- sidebar_PreviousCards = int(config['Card Info sidebar_ Number of previous cards to show'])
- except ValueError:
- sidebar_PreviousCards = 2
- if not self.shown:
- return
- txt = ""
- r = self.mw.reviewer
- d = self.mw.col
- cs = CardStats(d, r.card)
- current_card = r.card
- review_count = len(self.mw.reviewer._answeredIds)
- styles = """<style>
- .title {
- font-family: arial;
- padding-bottom: 15px;
- font-weight: bold;
- }</style>"""
- currentReviewCount = "<div class='title'>Current Card</div><div style='font-family: courier; font-size: 10px;'>Current Review Count: {}</div>".format(review_count)
- if current_card:
- txt += styles
- if infobar_currentReviewCount:
- txt += currentReviewCount
- else:
- txt += "<div class='title'>Current Card</div>"
- txt += d.cardStats_mod(current_card)
- txt += "<p>"
- txt += r._revlogData_mod(current_card, cs)
- card2 = r.lastCard()
- if card2 and sidebar_PreviousCards > 1:
- if sidebar_PreviousCards == 2:
- txt += "<hr><div class='title'>Last Card</div>"
- else:
- txt += "<hr><div class='title'>Card 2</div>"
- txt += d.cardStats_mod(card2)
- txt += "<p>"
- txt += r._revlogData_mod(card2, cs)
- if sidebar_PreviousCards < 3:
- if infobar_currentReviewCount:
- txt += currentReviewCount
- card3 = r.lastCard2()
- if card3 and sidebar_PreviousCards > 2:
- txt += "<hr><div class='title''>Card 3</div>"
- txt += d.cardStats_mod(card3)
- txt += "<p>"
- txt += r._revlogData_mod(card3, cs)
- if sidebar_PreviousCards < 4:
- if infobar_currentReviewCount:
- txt += currentReviewCount
- card4 = r.lastCard3()
- if card4 and sidebar_PreviousCards > 3:
- txt += "<hr><div class='title''>Card 4</div>"
- txt += d.cardStats_mod(card4)
- txt += "<p>"
- txt += r._revlogData_mod(card4, cs)
- if infobar_currentReviewCount:
- txt += currentReviewCount
- if not txt:
- styles = """<style>
- .title {
- font-family: arial;
- padding-bottom: 15px;
- font-weight: bold;
- }</style>"""
- txt = styles
- card2 = r.lastCard()
- if card2 and sidebar_PreviousCards > 1:
- txt += "<div class='title'>Last Card</div>"
- txt += d.cardStats_mod(card2)
- txt += "<p>"
- txt += r._revlogData_mod(card2, cs)
- if sidebar_PreviousCards < 3:
- if infobar_currentReviewCount:
- txt += currentReviewCount
- card3 = r.lastCard2()
- if card3 and sidebar_PreviousCards > 2:
- txt += "<hr><div class='title''>Card 2</div>"
- txt += d.cardStats_mod(card3)
- txt += "<p>"
- txt += r._revlogData_mod(card3, cs)
- if sidebar_PreviousCards < 4:
- if infobar_currentReviewCount:
- txt += currentReviewCount
- card4 = r.lastCard3()
- if card4 and sidebar_PreviousCards > 3:
- txt += "<hr><div class='title''>Card 3</div>"
- txt += d.cardStats_mod(card4)
- txt += "<p>"
- txt += r._revlogData_mod(card4, cs)
- if infobar_currentReviewCount:
- txt += currentReviewCount
- style = self._style()
- self.web.setHtml("""
-<html>
- <head>
- <style>%s</style>
- </head>
- <body>
- <center>%s</center>
- </body>
-</html>
-"""% (style, txt))
-
-
- def _style(self):
- from anki import version
- anki_version = int(version.replace('.', ''))
- if anki_version > 2119:
- from aqt.theme import theme_manager
- config = mw.addonManager.getConfig(__name__)
- sidebar_theme = config['Card Info sidebar_ theme']
- sidebar_font = config['Card Info sidebar_ Font']
- from . import styles
- dark_styles = styles.dark
- light_styles = styles.light
- if anki_version > 2119:
- if sidebar_theme == 2:
- mystyle = dark_styles
- elif sidebar_theme == 1:
- mystyle = light_styles
- else:
- if theme_manager.night_mode:
- mystyle = dark_styles
- else:
- mystyle = light_styles
- else:
- if sidebar_theme == 2:
- mystyle = dark_styles
- else:
- mystyle = light_styles
-
-
- from anki import version
- if version.startswith("2.0."):
- return ""
- return mystyle + "td { font-size: 75%; font-family:" + "{}".format(sidebar_font) + ";}"
-
-
-_cs = StatsSidebar(mw)
-
-
-def cardStats(on):
- _cs.toggle()
diff --git a/.local/share/Anki2/addons21/advanced_review/Deck_Overview.py b/.local/share/Anki2/addons21/advanced_review/Deck_Overview.py
deleted file mode 100644
index 9b53121..0000000
--- a/.local/share/Anki2/addons21/advanced_review/Deck_Overview.py
+++ /dev/null
@@ -1,646 +0,0 @@
-
-
-import time
-from datetime import date, timedelta
-from aqt import mw
-from copy import deepcopy
-from aqt.utils import shortcut, showInfo, tr
-from anki import version
-anki_version = int(version.replace('.', ''))
-if anki_version > 2119:
- from aqt.deckbrowser import DeckBrowserBottomBar
- from aqt.overview import OverviewBottomBar
-from aqt.deckbrowser import DeckBrowser
-from aqt.overview import Overview
-from . import styles
-
-config = mw.addonManager.getConfig(__name__)
-studyNow_label = config['Button Label_ Study Now']
-more_overviewStats = config[' More Overview Stats']
-bottombarButtons_style = config[' Review_ Bottombar Buttons Style']
-style_mainScreenButtons = config[' Style Main Screen Buttons']
-
-bottombar_neon1 = styles.bottombar_neon1
-bottombar_neon2 = styles.bottombar_neon2
-bottombar_fill1 = styles.bottombar_fill1
-bottombar_fill2 = styles.bottombar_fill2
-
-#// Chosing stylinhg for review other buttons in reviewer bottombar based on chosen style
-if bottombarButtons_style == 0:
- bottomHTML_style = "<style></style>"
-elif bottombarButtons_style == 1:
- bottomHTML_style = bottombar_neon1
-elif bottombarButtons_style == 2:
- bottomHTML_style = bottombar_neon2
-elif bottombarButtons_style == 3:
- bottomHTML_style = bottombar_fill1
-elif bottombarButtons_style == 4:
- bottomHTML_style = bottombar_fill2
-
-#// Main Screen Bottombar Buttons
-def _drawButtons(self):
- buf = "{}".format(bottomHTML_style)
- if style_mainScreenButtons:
- #// style='height: px' -> to prevent changing main screen buttons heights
- # based on height defined in #main {}
- mainScreen_style = """id=main style='height: px' """
- else:
- mainScreen_style = ""
- drawLinks = deepcopy(self.drawLinks)
- for b in drawLinks:
- b.insert(0, "{}".format(mainScreen_style))
- if b[0]:
- b[0] = ("Shortcut key: %s") % shortcut(b[0])
- buf += """
-<button %s title='%s' onclick='pycmd(\"%s\");'>%s</button>""" % (tuple(b))
- if anki_version > 2121:
- self.bottom.draw(
- buf=buf,
- link_handler=self._linkHandler,
- web_context=DeckBrowserBottomBar(self),
- )
- else:
- self.bottom.draw(buf)
- self.bottom.web.onBridgeCmd = self._linkHandler
-
-#// Deck Overview Bottombar Buttons
-def _renderBottom(self):
- links = [
- ["O", "opts", tr.actions_options()],
- ]
- if self.mw.col.decks.current()["dyn"]:
- links.append(["R", "refresh", tr.actions_rebuild()])
- links.append(["E", "empty", tr.studying_empty()])
- else:
- links.append(["C", "studymore", tr.actions_custom_study()])
- # links.append(["F", "cram", ("Filter/Cram")])
- if self.mw.col.sched.haveBuried():
- links.append(["U", "unbury", tr.studying_unbury()])
- links.append(["", "description", tr.scheduling_description()])
- buf = "{}".format(bottomHTML_style)
- if style_mainScreenButtons:
- #// style='height: px' -> to prevent changing main screen buttons heights
- # based on height defined in #main {}
- mainScreen_style = """id=main style='height: px' """
- else:
- mainScreen_style = ""
- for b in links:
- b.insert(0, "{}".format(mainScreen_style))
- if b[0]:
- b[0] = ("Shortcut key: %s") % shortcut(b[0])
- buf += """
-<button %s title="%s" onclick='pycmd("%s")'>%s</button>""" % tuple(b)
- if anki_version > 2121:
- self.bottom.draw(
- buf=buf,
- link_handler=self._linkHandler,
- web_context=OverviewBottomBar(self)
- )
- else:
- self.bottom.draw(buf)
- self.bottom.web.onBridgeCmd = self._linkHandler
-
-
-#// Deck Overview Study Now Button | code from more overview stats to add more overview stats, OBVIOUSLY
-if more_overviewStats == 1:
- def _table(self):
- """Returns html table with more statistics than before."""
- sched = self.mw.col.sched
- deck = self.mw.col.decks.current()
- dconf = self.mw.col.decks.confForDid(deck.get('id'))
- but = self.mw.button
-
- # Get default counts
- # 0 = new, 1 = learn, 2 = review
- counts = list(sched.counts())
- finished = not sum(counts)
- counts = _limit(counts)
-
- totals = [
- #new
- sched.col.db.scalar("""
- select count() from (select id from cards where did = %s
- and queue = 0)""" % deck.get('id')),
- # learn
- sched.col.db.scalar("""
- select count() from (select id from cards where did = %s
- and queue in (1,3))""" % deck.get('id')),
- # review
- sched.col.db.scalar("""
- select count() from (select id from cards where did = %s
- and queue = 2)""" % deck.get('id')),
- # suspended
- sched.col.db.scalar("""
- select count() from (select id from cards where did = %s
- and queue = -1)""" % deck.get('id')),
- # buried
- sched.col.db.scalar("""
- select count() from (select id from cards where did = %s
- and queue = -2)""" % deck.get('id')),
- ]
-
- if (dconf.get('new')):
- dueTomorrow = _limit([
- # new
- min(dconf.get('new').get('perDay'), totals[0]),
- # review
- sched.col.db.scalar("""
- select count() from cards where did = %s and queue = 3
- and due = ?""" % deck.get('id'), sched.today + 1),
- sched.col.db.scalar("""
- select count() from cards where did = %s and queue = 2
- and due = ?""" % deck.get('id'), sched.today + 1)
- ])
-
- html = ''
-
- # Style if less than 2.1.20
- if (int(version.replace('.', '')) < 2120):
- html += '''
- <style>
- .new-count {color: #00a}
- .learn-count {color: #C35617}
- .review-count {color: #0a0}
- </style>'''
-
- # No need to show due if we have finished collection today
- if finished:
- mssg = sched.finishedMsg()
- html += '''
- <div style="white-space: pre-wrap;">%s</div>
- <table cellspacing=5>''' % mssg
- else:
- html +='''%s
- <table cellpadding=5>
- <tr><td align=center valign=top nowrap="nowrap">
- <table cellspacing=5>
- <tr><td nowrap="nowrap">%s:</td><td align=right>
- <span title="new" class="new-count">%s</span>
- <span title="learn" class="learn-count">%s</span>
- <span title="review" class="review-count">%s</span>
- </td></tr>''' % (bottomHTML_style, tr.browsing_sidebar_due_today(), counts[0], counts[1], counts[2])
-
- if (dconf.get('new')):
- html += '''
- <tr><td nowrap="nowrap">%s:</td><td align=right>
- <span title="new" class="new-count">%s</span>
- <span title="learn" class="learn-count">%s</span>
- <span title="review" class="review-count">%s</span>
- </td></tr>''' % (tr.statistics_due_tomorrow(), dueTomorrow[0],
- dueTomorrow[1], dueTomorrow[2])
-
- html += '''
- <tr>
- <td nowrap="nowrap">%s:</td>
- <td align=right nowrap="nowrap">
- <span title="new" class="new-count">%s</span>
- <span title="learn" class="learn-count">%s</span>
- <span title="review" class="review-count">%s</span>
- <span title="buried" style="color:#ffa500">%s</span>
- <span title="suspended" style="color:#adb300">%s</span>
- </td>
- </tr>
- </table>''' % (tr.statistics_counts_total_cards(), totals[0], totals[1], totals[2], totals[4],
- totals[3])
-
- if not finished:
- if style_mainScreenButtons:
- #// style='height: px' -> to prevent changing main screen buttons heights
- # based on height defined in #main {}
- mainScreen_style = """id=main style='height: px' """
- else:
- mainScreen_style = ""
- if style_mainScreenButtons:
- studyButton_id = "main"
- else:
- studyButton_id = "study"
- html += '''</td>
- <td align=center nowrap="nowrap">%s</td>
- </tr></table>''' % (but("study", ("{}".format(studyNow_label)), id="{}".format(studyButton_id), extra="autofocus"))
-
- return html
-
-elif more_overviewStats == 2:
- def _table(self):
- stat_colors = {
- "New" : "#00a",
- "Learning" : "#a00",
- "Review" : "#080",
- "Percent" : "#888",
- "Mature" : "#0051ff",
- "Young" : "#0051ff",
- "Learned" : "#080",
- "Unseen" : "#a00",
- "Suspended" : "#e7a100",
- "Done on Date" : "#ddd",
- "Days until done" : "#ddd",
- "Total" : "#ddd",
- }
- date_format = "%d.%m.%Y"
- correction_for_notes = 1
- last_match_length = 0
- current_deck_name = self.mw.col.decks.current()['name']
- date_format = "%m/%d/%Y"
-
- try:
- learn_per_day = self.mw.col.decks.confForDid(self.mw.col.decks.current()['id'])['new']['perDay']
- except:
- learn_per_day = 0
-
- total, mature, young, unseen, suspended, due = self.mw.col.db.first(
- u'''
- select
- -- total
- count(id),
- -- mature
- sum(case when queue = 2 and ivl >= 21
- then 1 else 0 end),
- -- young / learning
- sum(case when queue in (1, 3) or (queue = 2 and ivl < 21)
- then 1 else 0 end),
- -- unseen
- sum(case when queue = 0
- then 1 else 0 end),
- -- suspended
- sum(case when queue < 0
- then 1 else 0 end),
- -- due
- sum(case when queue = 1 and due <= ?
- then 1 else 0 end)
- from cards where did in {:s}
- '''.format(self.mw.col.sched._deckLimit()), round(time.time())
- )
- if not total:
- return u'<p> No Cards Found.</p>'
-
- scheduled_counts = list(self.mw.col.sched.counts())
- deck_is_finished = not sum(scheduled_counts)
-
- cards = {}
-
- cards['mature'] = mature // int(correction_for_notes)
- cards['young'] = young // int(correction_for_notes)
- cards['unseen'] = unseen // int(correction_for_notes)
- cards['suspended'] = suspended // int(correction_for_notes)
-
- cards['total'] = total // int(correction_for_notes)
- cards['learned'] = cards['mature'] + cards['young']
- cards['unlearned'] = cards['total'] - cards['learned']
-
- cards['new'] = scheduled_counts[0]
- cards['learning'] = scheduled_counts[1]
- cards['review'] = scheduled_counts[2]
- # cards['due'] = due + cards['review']
-
- cards['total_without_suspended'] = cards['total'] - cards['suspended']
-
- try:
- daysUntilDone = math.ceil(cards['unseen'] / learn_per_day)
- except:
- daysUntilDone = 0
-
- try:
- cards['doneDate'] = (date.today()+timedelta(days=daysUntilDone)).strftime(date_format)
- except:
- showInfo("Unsupported date format. Defaulting to Day.Month.Year instead. Use one of the shorthands: \"us\", \"asia\" or \"eu\", or specify the date like \"\%d.\%m.\%Y\", \"\%m/\%d/\%Y\" etc.\n For more information check the table at: https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior", type="warning", title="More Overview Stats 2.1 Warning")
- print(date_format)
- cards['doneDate'] = (date.today()+timedelta(days=daysUntilDone)).strftime("%d.%m.%Y")
-
- cards['daysLeft'] = daysUntilDone
-
- if(daysUntilDone == 1):
- cards['daysLeft'] = '{} day'.format(daysUntilDone)
- else:
- cards['daysLeft'] = '{} days'.format(daysUntilDone)
-
- cards_percent = {}
-
- cards_percent['mature'] = cards['mature'] * 1.0 / cards['total']
- cards_percent['young'] = cards['young'] * 1.0 / cards['total']
- cards_percent['unseen'] = cards['unseen'] * 1.0 / cards['total']
- cards_percent['suspended'] = cards['suspended'] * 1.0 / cards['total']
-
- cards_percent['total'] = 1.0
- cards_percent['learned'] = cards['learned'] * 1.0 / cards['total']
- cards_percent['unlearned'] = cards['unlearned'] * 1.0 / cards['total']
-
- cards_percent['new'] = cards['new'] * 1.0 / cards['total']
- cards_percent['learning'] = cards['learning'] * 1.0 / cards['total']
- cards_percent['review'] = cards['review'] * 1.0 / cards['total']
- # cards_percent['due'] = cards['due'] * 1.0 / cards['total']
-
- cards_percent_without_suspended = {}
-
- if(cards['total_without_suspended'] != 0):
- cards_percent_without_suspended['mature'] = cards['mature'] * 1.0 / cards['total_without_suspended']
- cards_percent_without_suspended['young'] = cards['young'] * 1.0 / cards['total_without_suspended']
- cards_percent_without_suspended['unseen'] = cards['unseen'] * 1.0 / cards['total_without_suspended']
- cards_percent_without_suspended['suspended'] = cards['suspended'] * 1.0 / cards['total_without_suspended']
-
- cards_percent_without_suspended['total'] = 1.0
- cards_percent_without_suspended['learned'] = cards['learned'] * 1.0 / cards['total_without_suspended']
- cards_percent_without_suspended['unlearned'] = cards['unlearned'] * 1.0 / cards['total_without_suspended']
-
- cards_percent_without_suspended['new'] = cards['new'] * 1.0 / cards['total_without_suspended']
- cards_percent_without_suspended['learning'] = cards['learning'] * 1.0 / cards['total_without_suspended']
- cards_percent_without_suspended['review'] = cards['review'] * 1.0 / cards['total_without_suspended']
- else:
- cards_percent_without_suspended['mature'] = 0
- cards_percent_without_suspended['young'] = 0
- cards_percent_without_suspended['unseen'] = 0
- cards_percent_without_suspended['suspended'] = 0
-
- cards_percent_without_suspended['total'] = 1.0
- cards_percent_without_suspended['learned'] = 0
- cards_percent_without_suspended['unlearned'] = 0
-
- cards_percent_without_suspended['new'] = 0
- cards_percent_without_suspended['learning'] = 0
- cards_percent_without_suspended['review'] = 0
-
- labels = {}
-
- labels['mature'] = tr.statistics_counts_mature_cards()
- labels['young'] = tr.statistics_counts_young_cards()
- labels['unseen'] = ('Unseen')
- labels['suspended'] = tr.statistics_counts_suspended_cards()
-
- labels['total'] = tr.statistics_counts_total_cards()
- labels['learned'] = ('Learned')
- labels['unlearned'] = ('Unlearned')
-
- labels['new'] = tr.statistics_counts_new_cards()
- labels['learning'] = tr.statistics_counts_learning_cards()
- labels['review'] = ('Review')
- # labels['due'] = ('Due')
-
- labels['doneDate'] = ('Done in')
-
- for key in labels:
- labels[key] = u'{:s}:'.format(labels[key])
-
- button = self.mw.button
-
- output_table = u'''
- <style type="text/css">
- <!--
- hr {
- height: 1px;
- border: none;
- border-top: 1px solid #aaa;
- }
-
- td {
- vertical-align: top;
- }
-
- td.row1 {
- text-align: left;
- }
-
- td.row2 {
- text-align: right;
- padding-left: 1.2em;
- padding-right: 1.2em;
- }
-
- td.row3 {
- text-align: left;
- padding-left: 1.2em;
- padding-right: 1.2em;
- }
-
- td.row4 {
- text-align: right;
- }
-
- td.new {
- font-weight: bold;
- color: ''' + stat_colors["New"] + ''';
- }
-
- td.learning {
- font-weight: bold;
- color: ''' + stat_colors["Learning"] + ''';
- }
-
- td.review {
- font-weight: bold;
- color: ''' + stat_colors["Review"] + ''';
- }
-
- td.percent {
- font-weight: normal;
- color: ''' + stat_colors["Percent"] + ''';
- }
-
- td.mature {
- font-weight: normal;
- color: ''' + stat_colors["Mature"] + ''';
- }
-
- td.young {
- font-weight: normal;
- color: ''' + stat_colors["Young"] + ''';
- }
-
- td.learned {
- font-weight: normal;
- color: ''' + stat_colors["Learned"] + ''';
- }
-
- td.unseen {
- font-weight: normal;
- color: ''' + stat_colors["Unseen"] + ''';
- }
-
- td.suspended {
- font-weight: normal;
- color: ''' + stat_colors["Suspended"] + ''';
- }
-
- td.doneDate {
- font-weight: bold;
- color: ''' + stat_colors["Done on Date"] + ''';
- }
-
- td.daysLeft {
- font-weight: bold;
- color: ''' + stat_colors["Days until done"] + ''';
- }
-
- td.total {
- font-weight: bold;
- color: ''' + stat_colors["Total"] + ''';
- }
- -->
- </style>
-
- <table cellspacing="2">
- '''
-
- if not deck_is_finished:
- output_table += u'''
- <tr>
- <td class="row1">{label[new]:s}</td>
- <td class="row2 new">{cards[new]:d}</td>
- <td class="row3 percent">{percent[new]:.0%}</td>
- <td class="row4 percent">{percent2[new]:.0%}</td>
- </tr>
- <tr>
- <td class="row1">{label[learning]:s}</td>
- <td class="row2 learning">{cards[learning]:d}</td>
- <td class="row3 percent">{percent[learning]:.0%}</td>
- <td class="row4 percent">{percent2[learning]:.0%}</td>
- </tr>
- <tr>
- <td class="row1">{label[review]:s}</td>
- <td class="row2 review">{cards[review]:d}</td>
- <td class="row3 percent">{percent[review]:.0%}</td>
- <td class="row4 percent">{percent2[review]:.0%}</td>
- </tr>
- <tr>
- <td colspan="4"><hr /></td>
- </tr>
- '''.format(label=labels, cards=cards, percent=cards_percent, percent2=cards_percent_without_suspended)
- output_table += u'''
- <tr>
- <td class="row1">{label[mature]:s}</td>
- <td class="row2 mature">{cards[mature]:d}</td>
- <td class="row3 percent">{percent[mature]:.0%}</td>
- <td class="row4 percent">{percent2[mature]:.0%}</td>
- </tr>
- <tr>
- <td class="row1">{label[young]:s}</td>
- <td class="row2 young">{cards[young]:d}</td>
- <td class="row3 percent">{percent[young]:.0%}</td>
- <td class="row4 percent">{percent2[young]:.0%}</td>
- </tr>
- <tr>
- <td colspan="4"><hr /></td>
- </tr>
- <tr>
- <td class="row1">{label[learned]:s}</td>
- <td class="row2 learned">{cards[learned]:d}</td>
- <td class="row3 percent">{percent[learned]:.0%}</td>
- <td class="row4 percent">{percent2[learned]:.0%}</td>
- </tr>
- <tr>
- <td class="row1">{label[unseen]:s}</td>
- <td class="row2 unseen">{cards[unseen]:d}</td>
- <td class="row3 percent">{percent[unseen]:.0%}</td>
- <td class="row4 percent">{percent2[unseen]:.0%}</td>
- </tr>
- <tr>
- <td class="row1">{label[suspended]:s}</td>
- <td class="row2 suspended">{cards[suspended]:d}</td>
- <td class="row3 percent">{percent[suspended]:.0%}</td>
- <td class="row4 percent">ignored</td>
- </tr>
- <tr>
- <td colspan="4"><hr /></td>
- </tr>
- <tr>
- <td class="row1">{label[total]:s}</td>
- <td class="row2 total">{cards[total]:d}</td>
- <td class="row3 percent">{percent[total]:.0%}</td>
- <td class="row4 percent">{percent2[total]:.0%}</td>
- </tr>
- <td colspan="4"><hr /></td>
- <tr>
- <td class="row1">{label[doneDate]:s}</td>
- <td class="row2 daysLeft">{cards[daysLeft]:s}</td>
- <td class="row3">on:</td>
- <td class="row4 doneDate">{cards[doneDate]:s}</td>
- </tr>
- '''.format(label=labels, cards=cards, percent=cards_percent, percent2=cards_percent_without_suspended)
-
- output = ''
-
- if deck_is_finished:
- if (config == None or not 'options' in config) or (config['options'].get('Show table for finished decks', True)):
- output += output_table
- output += u'''
- </table>
- <hr style="margin: 1.5em 0; border-top: 1px dotted #888;" />
- '''
- output += u'''
- <div style="white-space: pre-wrap;">{:s}</div>
- '''.format(self.mw.col.sched.finishedMsg())
- else:
- if style_mainScreenButtons:
- #// style='height: px' -> to prevent changing main screen buttons heights
- # based on height defined in #main {}
- mainScreen_style = """id=main style='height: px' """
- else:
- mainScreen_style = ""
- if style_mainScreenButtons:
- studyButton_id = "main"
- else:
- studyButton_id = "study"
-
- output += output_table
- output += bottomHTML_style
- output += u'''
- <tr>
- <td colspan="4" style="text-align: center; padding-top: 0.6em;">{button:s}</td>
- </tr>
- </table>
- '''.format(button=button('study', tr.studying_study_now(), id='{}'.format(studyButton_id), extra="autofocus"))
-
- return output
-
-else:
- def _table(self):
- counts = list(self.mw.col.sched.counts())
- finished = not sum(counts)
- if self.mw.col.sched_ver() == 1:
- for n in range(len(counts)):
- if counts[n] >= 1000:
- counts[n] = "1000+"
- but = self.mw.button
- if finished:
- return '<div style="white-space: pre-wrap;">%s</div>' % (
- self.mw.col.sched.finishedMsg()
- )
- else:
- if style_mainScreenButtons:
- #// style='height: px' -> to prevent changing main screen buttons heights
- # based on height defined in #main {}
- mainScreen_style = """id=main style='height: px' """
- else:
- mainScreen_style = ""
- if style_mainScreenButtons:
- studyButton_id = "main"
- else:
- studyButton_id = "study"
- return """%s
- <table width=400 cellpadding=5>
- <tr><td align=center valign=top>
- <table cellspacing=5>
- <tr><td>%s:</td><td><b><span class=new-count>%s</span></b></td></tr>
- <tr><td>%s:</td><td><b><span class=learn-count>%s</span></b></td></tr>
- <tr><td>%s:</td><td><b><span class=review-count>%s</span></b></td></tr>
- </table>
- </td><td align=center>
- %s</td></tr></table>""" % (
- bottomHTML_style,
- tr.actions_new(),
- counts[0],
- tr.scheduling_learning(),
- counts[1],
- tr.studying_to_review(),
- counts[2],
- but("study", tr.studying_study_now(), id="{}".format(studyButton_id), extra="autofocus"),
- )
-
-def _limit(counts):
- for i, count in enumerate(counts):
- if count >= 1000:
- counts[i] = "1000+"
- return counts
-
-
-Overview._renderBottom = _renderBottom
-DeckBrowser._drawButtons = _drawButtons
-Overview._table = _table
diff --git a/.local/share/Anki2/addons21/advanced_review/LICENSE b/.local/share/Anki2/addons21/advanced_review/LICENSE
deleted file mode 100644
index 3877ae0..0000000
--- a/.local/share/Anki2/addons21/advanced_review/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<https://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/.local/share/Anki2/addons21/advanced_review/README.md b/.local/share/Anki2/addons21/advanced_review/README.md
deleted file mode 100644
index b20ba61..0000000
--- a/.local/share/Anki2/addons21/advanced_review/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Anki-Advanced-Review-Bottombar
-An Anki add-on that makes you able to change Anki button styles to your liking.
-
-You can see these images to see the settings menu and the things you can do with this add-on:
-
-<a href="https://imgur.com/a/pb53ODD" rel="nofollow"><img src="https://img.shields.io/badge/Images-button%20styles-blue"></a>
-
-<a href="https://imgur.com/a/LDzwvrG" rel="nofollow"><img src="https://img.shields.io/badge/Images-features-blue"></a>
-
-<a href="https://imgur.com/a/LGUqiUJ" rel="nofollow"><img src="https://img.shields.io/badge/Images-settings%20menu-blue"></a>
-
-If you find the settings too complicated, just hover over each title in the settings, a little help box will appear in which I have explained what the option does (used images to show you what it does in most cases).
diff --git a/.local/share/Anki2/addons21/advanced_review/Settings.py b/.local/share/Anki2/addons21/advanced_review/Settings.py
deleted file mode 100644
index 4c279c3..0000000
--- a/.local/share/Anki2/addons21/advanced_review/Settings.py
+++ /dev/null
@@ -1,2667 +0,0 @@
-#// auth_ Mohamad Janati
-#// Copyright (c) 2019-2022 Mohamad Janati (freaking stupid, right? :|)
-
-from os.path import join, dirname
-from datetime import datetime
-from aqt import mw
-from aqt.qt import *
-from aqt.utils import tooltip, showInfo, askUser, getText
-import random
-import os
-import json
-import subprocess
-
-
-def refreshConfig():
- #// Makes the information that it gets fron "config" global so I can use them for loading the current settings in "loadCurrent(self)" function
- global C_style_mainScreenButtons, C_button_style, C_hover_effect, C_active_indicator, C_bottombarButtons_style, C_cursor_style, C_interval_style, C_showAnswerBorderColor_style, C_buttonTransition_time, C_buttonBorderRadius, C_reviewTooltip, C_reviewTooltip_timer, C_reviewTooltipText_color, C_reviewTooltip_style, C_reviewTooltip_position, C_info, C_skip, C_showSkipped, C_undo, C_hideHard, C_hideGood, C_hideEasy, C_right_info, C_middleRight_info, C_middleLeft_info, C_left_info, C_right_skip, C_middleRight_skip, C_middleLeft_skip, C_left_skip, C_right_showSkipped, C_middleRight_showSkipped, C_middleLeft_showSkipped, C_left_showSkipped, C_right_undo, C_middleRight_undo, C_middleLeft_undo, C_left_undo, C_skip_shortcut, C_showSkipped_shortcut, C_info_shortcut, C_undo_shortcut, C_custom_sizes, C_text_size, C_buttons_height, C_reviewButtons_width, C_edit_width, C_answer_width, C_more_width, C_info_width, C_skip_width, C_showSkipped_width, C_undo_width, C_buttonLabel_studyNow, C_buttonLabel_edit, C_buttonLabel_showAnswer, C_buttonLabel_more, C_buttonLabel_info, C_buttonLabel_skip, C_buttonLabel_showSkipped, C_buttonLabel_undo, C_buttonLabel_again, C_buttonLabel_hard, C_buttonLabel_good, C_buttonLabel_easy, C_sidebar_position, C_sidebar_theme, C_sidebar_font, C_sidebar_PreviousCards, C_sidebar_reviewsToShow, C_sidebar_currentReviewCount, C_sidebar_reviewsToShow, C_sidebar_dateCreated, C_sidebar_dateEdited, C_sidebar_firstReview, C_sidebar_latestReview, C_sidebar_due, C_sidebar_interval, C_sidebar_ease, C_sidebar_numberOfReviews, C_sidebar_lapses, C_infobar_correctPercent, C_infobar_fastestReview, C_infobar_slowestReview, C_sidebar_averageTime, C_sidebar_totalTime, C_sidebar_cardType, C_sidebar_noteType, C_sidebar_deck, C_sidebar_tags, C_infobar_noteID, C_infobar_cardID, C_sidebar_sortField, C_sidebar_autoOpen, C_sidebar_warningNote, C_custom_reviewButtonColors, C_custom_reviewButtonTextColor, C_custom_activeIndicatorColor, C_custom_bottombarButtonTextColor, C_custom_bottombarButtonBorderColor, C_reviewButtonText_color, C_activeIndicator_color, C_bottombarButtonText_color, C_bottombarButtonBorder_color, C_again_color, C_againHover_color, C_hard_color, C_hardHover_color, C_good_color, C_goodHover_color, C_easy_color, C_easyHover_color, C_button_colors, C_showAnswerEase1, C_showAnswerEase2, C_showAnswerEase3, C_showAnswerEase4, C_showAnswerEase1_color, C_showAnswerEase2_color, C_showAnswerEase3_color, C_showAnswerEase4_color, C_speedFocus, C_configEdit, C_overViewStats, C_settingsMenu_palce, C_skipMethod
-
- config = mw.addonManager.getConfig(__name__)
-
- #// Gets the information from the config and assigns them to the "C_" variables so I can make them global | "C_" is added to the name of the parts of the settings variables to avoid confusion :D
- #// Just delete the "C_" from the name to find related parts of the settings (C_style_mainScreenButtons -> style_mainScreenButtons)
- C_style_mainScreenButtons = config[' Style Main Screen Buttons']
-
- C_button_style = config[' Review_ Buttons Style']
- C_hover_effect = config[' Review_ Hover Effect']
- C_active_indicator = config[' Review_ Active Button Indicator']
- C_bottombarButtons_style = config[' Review_ Bottombar Buttons Style']
- C_cursor_style = config[' Review_ Cursor Style']
- C_interval_style = config[' Review_ Interval Style']
- C_buttonTransition_time = config[' Review_ Button Transition Time']
- # Button Border Radius is used for all buttons, not just the review buttons
- C_buttonBorderRadius = config[' Review_ Button Border Radius']
-
- C_reviewTooltip = config['Tooltip']
- C_reviewTooltip_timer = config['Tooltip Timer']
- C_reviewTooltipText_color = config['Tooltip Text Color']
- C_reviewTooltip_style = config['Tooltip Style']
- C_reviewTooltip_position = config['Tooltip Position']
-
- C_info = config['Button_ Info Button']
- C_skip = config['Button_ Skip Button']
- C_showSkipped = config['Button_ Show Skipped Button']
- C_undo = config['Button_ Undo Button']
- C_hideHard = config['Button_ Hide Hard']
- C_hideGood = config['Button_ Hide Good']
- C_hideEasy = config['Button_ Hide Easy']
- C_info_position = config['Button_ Position_ Info Button']
- C_skip_position = config['Button_ Position_ Skip Button']
- C_showSkipped_position = config['Button_ Position_ Show Skipped Button']
- C_undo_position = config['Button_ Position_ Undo Button']
- C_skip_shortcut = config ['Button_ Shortcut_ Skip Button']
- C_showSkipped_shortcut = config ['Button_ Shortcut_ Show Skipped Button']
- C_info_shortcut = config['Button_ Shortcut_ Info Button']
- C_undo_shortcut = config['Button_ Shortcut_ Undo Button']
-
- C_custom_sizes = config ['Button_ Custom Button Sizes']
- C_text_size = config['Button_ Text Size']
- C_buttons_height = config['Button_ Height_ All Bottombar Buttons']
- C_reviewButtons_width = config['Button_ Width_ Review Buttons']
- C_edit_width = config['Button_ Width_ Edit Button']
- C_answer_width = config['Button_ Width_ Show Answer Button']
- C_more_width = config['Button_ Width_ More Button']
- C_info_width = config['Button_ Width_ Info Button']
- C_skip_width = config['Button_ Width_ Skip Button']
- C_showSkipped_width = config['Button_ Width_ Show Skipped Button']
- C_undo_width = config['Button_ Width_ Undo Button']
-
- C_buttonLabel_studyNow = config['Button Label_ Study Now']
- C_buttonLabel_edit = config['Button Label_ Edit']
- C_buttonLabel_showAnswer = config['Button Label_ Show Answer']
- C_buttonLabel_more = config['Button Label_ More']
- C_buttonLabel_info = config['Button Label_ Info']
- C_buttonLabel_skip = config['Button Label_ Skip']
- C_buttonLabel_showSkipped = config['Button Label_ Show Skipped']
- C_buttonLabel_undo = config['Button Label_ Undo']
- C_buttonLabel_again = config['Button Label_ Again']
- C_buttonLabel_hard = config['Button Label_ Hard']
- C_buttonLabel_good = config['Button Label_ Good']
- C_buttonLabel_easy = config['Button Label_ Easy']
-
- C_sidebar_position = config['Card Info sidebar_ Default Position']
- C_sidebar_theme = config['Card Info sidebar_ theme']
- C_sidebar_font = config['Card Info sidebar_ Font']
- C_sidebar_PreviousCards = config['Card Info sidebar_ Number of previous cards to show']
- C_sidebar_reviewsToShow = config['Card Info sidebar_ number of reviews to show for a card']
- C_sidebar_currentReviewCount = config['Card Info sidebar_ Current Review Count']
- C_sidebar_dateCreated = config['Card Info sidebar_ Created']
- C_sidebar_dateEdited = config['Card Info sidebar_ Edited']
- C_sidebar_firstReview = config['Card Info sidebar_ First Review']
- C_sidebar_latestReview = config['Card Info sidebar_ Latest Review']
- C_sidebar_due = config['Card Info sidebar_ Due']
- C_sidebar_interval = config['Card Info sidebar_ Interval']
- C_sidebar_ease = config['Card Info sidebar_ Ease']
- C_sidebar_numberOfReviews = config['Card Info sidebar_ Reviews']
- C_sidebar_lapses = config['Card Info sidebar_ Lapses']
- C_infobar_correctPercent = config['Card Info Sidebar_ Correct Percent']
- C_infobar_fastestReview = config['Card Info Sidebar_ Fastest Review']
- C_infobar_slowestReview = config['Card Info Sidebar_ Slowest Review']
- C_sidebar_averageTime = config['Card Info sidebar_ Average Time']
- C_sidebar_totalTime = config['Card Info sidebar_ Total Time']
- C_sidebar_cardType = config['Card Info sidebar_ Card Type']
- C_sidebar_noteType = config['Card Info sidebar_ Note Type']
- C_sidebar_deck = config['Card Info sidebar_ Deck']
- C_sidebar_tags = config['Card Info sidebar_ Tags']
- C_infobar_noteID = config['Card Info Sidebar_ Note ID']
- C_infobar_cardID = config['Card Info Sidebar_ Card ID']
- C_sidebar_sortField = config['Card Info sidebar_ Sort Field']
- C_sidebar_autoOpen = config['Card Info sidebar_ Auto Open']
- C_sidebar_warningNote = config['Card Info sidebar_ warning note']
-
- C_custom_reviewButtonColors = config[' Review_ Custom Colors']
- C_custom_reviewButtonTextColor = config[' Review_ Custom Review Button Text Color']
- C_custom_activeIndicatorColor = config[' Review_ Custom Active Indicator Color']
- C_custom_bottombarButtonTextColor = config['Color_ Custom Bottombar Button Text Color']
- C_custom_bottombarButtonBorderColor = config['Color_ Custom Bottombar Button Border Color']
- C_reviewButtonText_color = config['Color_ General Text Color']
- C_activeIndicator_color = config['Color_ Active Button Indicator']
- C_bottombarButtonText_color = config['Color_ Bottombar Button Text Color']
- C_bottombarButtonBorder_color = config['Color_ Bottombar Button Border Color']
- C_again_color = config['Color_ Again']
- C_againHover_color = config['Color_ Again on hover']
- C_hard_color = config['Color_ Hard']
- C_hardHover_color = config['Color_ Hard on hover']
- C_good_color = config['Color_ Good']
- C_goodHover_color = config['Color_ Good on hover']
- C_easy_color = config['Color_ Easy']
- C_easyHover_color = config['Color_ Easy on hover']
-
- C_showAnswerBorderColor_style = config['ShowAnswer_ Border Color Style']
- C_showAnswerEase1 = config['ShowAnswer_ Ease1']
- C_showAnswerEase2 = config['ShowAnswer_ Ease2']
- C_showAnswerEase3 = config['ShowAnswer_ Ease3']
- C_showAnswerEase4 = config['ShowAnswer_ Ease4']
- C_showAnswerEase1_color = config['ShowAnswer_ Ease1 Color']
- C_showAnswerEase2_color = config['ShowAnswer_ Ease2 Color']
- C_showAnswerEase3_color = config['ShowAnswer_ Ease3 Color']
- C_showAnswerEase4_color = config['ShowAnswer_ Ease4 Color']
-
- C_button_colors = config[' Button Colors']
- C_speedFocus = config[' Speed Focus Add-on']
- C_configEdit = config[' Direct Config Edit']
- C_overViewStats = config[' More Overview Stats']
- C_settingsMenu_palce = config[' Settings Menu Place']
- C_skipMethod = config[' Skip Method']
-
- #// it's easier to store extra button positions as text in config | but here in the settings, I hate to turn it into true/false as each checkbox is diabled/enabled like that :|
- #// Every checkbox is disabled by default
- C_right_info = False
- C_middleRight_info = False
- C_middleLeft_info = False
- C_left_info = False
- C_right_skip = False
- C_middleRight_skip = False
- C_middleLeft_skip = False
- C_left_showSkipped = False
- C_right_showSkipped = False
- C_middleRight_showSkipped = False
- C_middleLeft_showSkipped = False
- C_left_showSkipped = False
- C_right_undo = False
- C_middleRight_undo = False
- C_middleLeft_undo = False
- C_left_undo = False
-
- #// here we enable (make it "True") the correct checkbox based on the config value
- #// All of this is for loading the current settings in "loadCurrent(self)" function
- if C_info_position == "right":
- C_right_info = True
- elif C_info_position == "middle right":
- C_middleRight_info = True
- elif C_info_position == "middle left":
- C_middleLeft_info = True
- else:
- C_left_info = True
- if C_skip_position == "right":
- C_right_skip = True
- elif C_skip_position == "middle right":
- C_middleRight_skip = True
- elif C_skip_position == "middle left":
- C_middleLeft_skip = True
- else:
- C_left_skip = True
- if C_showSkipped_position == "right":
- C_right_showSkipped = True
- elif C_showSkipped_position == "middle right":
- C_middleRight_showSkipped = True
- elif C_showSkipped_position == "middle left":
- C_middleLeft_showSkipped = True
- else:
- C_left_showSkipped = True
- if C_undo_position == "right":
- C_right_undo = True
- elif C_undo_position == "middle right":
- C_middleRight_undo = True
- elif C_undo_position == "middle left":
- C_middleLeft_undo = True
- else:
- C_left_undo = True
-
-class GetShortcut(QDialog):
- def __init__(self, parent, button_variable):
- QDialog.__init__(self, parent=parent)
- self.parent = parent
- self.button_variable = button_variable
- #// when recording a shortcut, there is 0 active (pushed) key at first | by pressing each key, this increases by +1
- self.active = 0
- #// and the state of all the accepted keys on the keyboard is "False" | by pressing each key, the state for that button changes to "True"
- self.ctrl = False
- self.alt = False
- self.shift = False
- self.f1 = False
- self.f2 = False
- self.f3 = False
- self.f4 = False
- self.f5 = False
- self.f3 = False
- self.f6 = False
- self.f7 = False
- self.f8 = False
- self.f9 = False
- self.f10 = False
- self.f11 = False
- self.f12 = False
- self.extra = None
- self.getShortcutWindow()
-
- def getShortcutWindow(self):
- #// Sets up the screen that asks you to press the shortcut you want to assign
- text = QLabel('<div style="font-size: 15px">Press the new shortcut key...</div>')
- mainLayout = QVBoxLayout()
- mainLayout.addWidget(text)
- self.setLayout(mainLayout)
- self.setWindowTitle('Set Shortcut')
-
- def keyPressEvent(self, evt):
- #// increases the active keys count upon pressing each key
- self.active += 1
- #// limits the allowed keys to keyboard keys
- if evt.key() > 30 and evt.key() < 127:
- self.extra = chr(evt.key())
- #// stores the pressed key in a variable so we could later add it in a list and use it as a key combination
- elif evt.key() == Qt.Key_Control:
- self.ctrl = True
- elif evt.key() == Qt.Key_Alt:
- self.alt = True
- elif evt.key() == Qt.Key_Shift:
- self.shift = True
- elif evt.key() == Qt.Key_F1:
- self.f1 = True
- elif evt.key() == Qt.Key_F2:
- self.f2 = True
- elif evt.key() == Qt.Key_F3:
- self.f3 = True
- elif evt.key() == Qt.Key_F4:
- self.f4 = True
- elif evt.key() == Qt.Key_F5:
- self.f5 = True
- elif evt.key() == Qt.Key_F6:
- self.f6 = True
- elif evt.key() == Qt.Key_F7:
- self.f7 = True
- elif evt.key() == Qt.Key_F8:
- self.f8 = True
- elif evt.key() == Qt.Key_F9:
- self.f9 = True
- elif evt.key() == Qt.Key_F10:
- self.f10 = True
- elif evt.key() == Qt.Key_F11:
- self.f11 = True
- elif evt.key() == Qt.Key_F12:
- self.f12 = True
-
- def keyReleaseEvent(self, evt):
- #// reduces the number of held keys upon releasing each key
- self.active -= 1
- #// I was having fun -_- don't blame me
- shiftList = ["Who uses \"Shift\" alone as a shortcut key?", "You wanna use \"Shift\" without any other key as your shortcut??\n\n SERIOUSLY?!?!", "You must have forgotten to press another key...\n\n I don't wanna believe that there is someone who uses \"Shift\" without another key as a shortcut", "Dude, you can't just use \"Shift\"\n\n You should combine it with another key", "Are you really trying to use \"Shift\" as your shortcut?!!\n\n C'mon...", "What's so special about \"Shift\" that you wanna use it alone as a shortcut??", "\"Shift\" is scared of being used alone, you should use it with another key :)"]
- if os.name == "nt":
- altList = ["Who uses \"Alt\" alone as a shortcut key?", "You wanna use \"Alt\" without any other key as your shortcut??\n\n SERIOUSLY?!?!", "You must have forgotten to press another key...\n\n I don't wanna believe that there is someone who uses \"Alt\" without another key as a shortcut", "Dude, you can't just use \"Alt\"\n\n You should combine it with another key", "Are you really trying to use \"Alt\" as your shortcut?!!\n\n C'mon...", "What's so special about \"Alt\" that you wanna use it alone as a shortcut??", "\"Alt\" is scared of being used alone, you should use it with another key :)"]
- ctrlList = ["Who uses \"Ctrl\" alone as a shortcut key?", "You wanna use \"Ctrl\" without any other key as your shortcut??\n\n SERIOUSLY?!?!", "You must have forgotten to press another key...\n\n I don't wanna believe that there is someone who uses \"Ctrl\" without another key as a shortcut", "Dude, you can't just use \"Ctrl\"\n\n You should combine it with another key", "Are you really trying to use \"Ctrl\" as your shortcut?!!\n\n C'mon...", "What's so special about \"Ctrl\" that you wanna use it alone as a shortcut??", "\"Ctrl\" is scared of being used alone, you should use it with another key :)"]
- else:
- altList = ["Who uses \"Option\" alone as a shortcut key?", "You wanna use \"Option\" without any other key as your shortcut??\n\n SERIOUSLY?!?!", "You must have forgotten to press another key...\n\n I don't wanna believe that there is someone who uses \"Option\" without another key as a shortcut", "Dude, you can't just use \"Option\"\n\n You should combine it with another key", "Are you really trying to use \"Option\" as your shortcut?!!\n\n C'mon...", "What's so special about \"Option\" that you wanna use it alone as a shortcut??", "\"Option\" is scared of being used alone, you should use it with another key :)"]
- ctrlList = ["Who uses \"Command\" alone as a shortcut key?", "You wanna use \"Command\" without any other key as your shortcut??\n\n SERIOUSLY?!?!", "You must have forgotten to press another key...\n\n I don't wanna believe that there is someone who uses \"Command\" without another key as a shortcut", "Dude, you can't just use \"Command\"\n\n You should combine it with another key", "Are you really trying to use \"Command\" as your shortcut?!!\n\n C'mon...", "What's so special about \"Command\" that you wanna use it alone as a shortcut??", "\"Command\" is scared of being used alone, you should use it with another key :)"]
- shiftAlone = random.choice(shiftList)
- altAlone = random.choice(altList)
- ctrlAlone = random.choice(ctrlList)
- if not (self.f1 or self.f2 or self.f3 or self.f4 or self.f5 or self.f6 or self.f7 or self.f8 or self.f9 or self.f10 or self.f11 or self.f12):
- if not self.extra:
- #// special treats for buttons that everyone knows can't be used as a shortcut on their own -_-
- if self.alt:
- showInfo("{}".format(altAlone), title="Advanced Review Bottombar")
- elif self.shift:
- showInfo("{}".format(shiftAlone), title="Advanced Review Bottombar")
- elif self.ctrl:
- showInfo("{}".format(ctrlAlone), title="Advanced Review Bottombar")
- #// lets the users that the pressed key is not allowed to be used in a shortcut
- elif evt.key() == Qt.Key_Escape:
- showInfo("You can't use \"Escape\" as shortcut, try something else", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Tab:
- showInfo("Don't you know \"Tab\" Always does something? Why do you even try to set it as your shortcut?", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Backspace:
- showInfo("Are you really trying to set \"Backspace\" as your shortcut? Seriously?", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Enter:
- showInfo("Have you ever seen anyone using \"Enter\" as a shortcut??\n\nWhy are you even trying to set it as your shortcut?", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Return:
- showInfo("Have you ever seen anyone using \"Enter\" as a shortcut??\n\nWhy are you even trying to set it as your shortcut?", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Insert:
- showInfo("You can't use \"Insert\" as shortcut, try something else", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Delete:
- showInfo("Who even thinks about using \"Delete\" as shortcut?? WTF man, SERIOUSLY????", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Pause:
- showInfo("You can't use \"Pause/Break\" as shortcut, try something else", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Home:
- showInfo("Do you really think \"Home Key\" is a good key a a shortcut??!", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Left:
- showInfo("You can't use \"Left\" as shortcut, try something else", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Up:
- showInfo("You can't use \"Up\" as shortcut, try something else", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Right:
- showInfo("You can't use \"Right\" as shortcut, try something else", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_Down:
- showInfo("You can't use \"Down\" as shortcut, try something else", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_PageUp:
- showInfo("You can't use \"Page Up\" as shortcut, try something else.\n\nEven if you could, would it really be a SHORTcut?? I mean look at you keyboard...", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_PageDown:
- showInfo("You can't use \"Page Down\" as shortcut, try something else.\n\nEven if you could, would it really be a SHORTcut?? I mean look at you keyboard...", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_CapsLock:
- showInfo("wHO THINKS IT'S A GOOD IDEA TO USE \"cAPs LoCk\" AS A SHORTCUT???", title="Advanced Review Bottombar")
- elif evt.key() == Qt.Key_NumLock:
- showInfo("Why \"Num Lock\"???\n\n It's THE MOST remote key on keyboard, it can't be a SHORTcut man...", title="Advanced Review Bottombar")
- else:
- showInfo("You can't use that as shortcut, try something else.", title="Advanced Review Bottombar")
- self.alt = False
- self.shift = False
- self.ctrl = False
- self.extra = None
- self.active = 0
- evt = False
- combination = []
- return
-
- #// the (empty) list for storing keys and then turning them into a shortcut
- combination = []
- if self.ctrl:
- combination.append("Ctrl")
- if self.shift:
- combination.append("Shift")
- if self.alt:
- combination.append("Alt")
- if self.f1:
- combination.append("F1")
- if self.f2:
- combination.append("F2")
- if self.f3:
- combination.append("F3")
- if self.f4:
- combination.append("F4")
- if self.f5:
- combination.append("F5")
- if self.f6:
- combination.append("F6")
- if self.f7:
- combination.append("F7")
- if self.f8:
- combination.append("F8")
- if self.f9:
- combination.append("F9")
- if self.f10:
- combination.append("F10")
- if self.f11:
- combination.append("F11")
- if self.f12:
- combination.append("F12")
- if self.extra:
- combination.append(self.extra)
- combination = "+".join(combination)
- #// preventing users from assigning a defauls Anki shortcut to something else | to avoid conflicts and stuff :|
- if combination in ["E", " ", "F5", "Ctrl+1", "Ctrl+2", "Ctrl+3", "Ctrl+4", "Shift+*", "=", "-", "Shift+!", "Shift+@", "Ctrl+Delete", "V", "Shift+V", "O", "1", "2", "3", "4", "5", "6", "7", "T", "Y", "A", "S", "D", "F", "B", "I", "/", "F1", "Ctrl+Q", "Ctrl+E", "Ctrl+P", "Ctrl+Shift+I", "Ctrl+Shift+P", "Ctrl+Shift+A", "Ctrl+Shift+:", "Ctrl+Shif+N", "Ctrl+Z"]:
- if combination == "E":
- showInfo("\"E\" is default Anki shortcut for \"Edit Current Card\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == " ":
- showInfo("\"Space Bar\" is default Anki shortcut for \"Show Answer\" or \"Default Review Button\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "F5":
- showInfo("\"F5\" is default Anki shortcut for \"Replay Audio\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+1":
- showInfo("\"Ctrl+1\" is default Anki shortcut for \"Set Red Flag\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+2":
- showInfo("\"Ctrl+2\" is default Anki shortcut for \"Set Orange Flag\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+3":
- showInfo("\"Ctrl+3\" is default Anki shortcut for \"Set Green Flag\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+4":
- showInfo("\"Ctrl+4\" is default Anki shortcut for \"Set Blue Flag\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Shift+*":
- showInfo("\"*\" is default Anki shortcut for \"Mark Current Card\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "=":
- showInfo("\"=\" is default Anki shortcut for \"Bury Note\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "-":
- showInfo("\"-\" is default Anki shortcut for \"Bury Current Card\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Shift+!":
- showInfo("\"!\" is default Anki shortcut for \"Suspend Note\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Shift+@":
- showInfo("\"@\" is default Anki shortcut for \"Suspend Current Card\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+Delete":
- showInfo("\"Ctrl+Delete\" is default Anki shortcut for \"Delete Note\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "V":
- showInfo("\"V\" is default Anki shortcut for \"Replay Audio\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Shift+V":
- showInfo("\"Shift+V\" is default Anki shortcut for \"Record Voice\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "O":
- showInfo("\"O\" is default Anki shortcut for \"Options\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "1":
- showInfo("\"1\" is default Anki shortcut for \"Answer with ease 1 (Again)\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "2":
- showInfo("\"2\" is default Anki shortcut for \"Answer with ease 2 (usually Hard)\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "3":
- showInfo("\"3\" is default Anki shortcut for \"Answer with ease 3 (usually Good)\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "4":
- showInfo("\"4\" is default Anki shortcut for \"Answer with ease 4 (Easy)\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "5":
- showInfo("\"5\" is default Anki shortcut for \"Puase Audio\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "6":
- showInfo("\"6\" is default Anki shortcut for \"Seek Backward\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "7":
- showInfo("\"7\" is default Anki shortcut for \"Seek Forward\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "T":
- showInfo("\"T\" is default Anki shortcut for \"Stats\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Y":
- showInfo("\"Y\" is default Anki shortcut for \"Sync\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "A":
- showInfo("\"A\" is default Anki shortcut for \"Add Cards\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "S":
- showInfo("\"S\" is default Anki shortcut for \"Toggle Study Current Deck\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "D":
- showInfo("\"D\" is default Anki shortcut for \"Decks View\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "F":
- showInfo("\"F\" is default Anki shortcut for \"Create Filtered Deck\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "B":
- showInfo("\"B\" is default Anki shortcut for \"Browse\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "I":
- showInfo("\"I\" is default Anki shortcut for \"Card Info Window\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "/":
- showInfo("\"/\" is default Anki shortcut for \"Study Deck\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "F1":
- showInfo("\"F1\" is default Anki shortcut for \"Open Guide (Anki Manual)\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+Q":
- showInfo("\"Ctrl+Q\" is default Anki shortcut for \"Exit\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+E":
- showInfo("\"Ctrl+E\" is default Anki shortcut for \"Export\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+P":
- showInfo("\"Ctrl+P\" is default Anki shortcut for \"Preferences\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+Shift+I":
- showInfo("\"Ctrl+Shift+I\" is default Anki shortcut for \"Import\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+Shift+P":
- showInfo("\"Ctrl+Shift+P\" is default Anki shortcut for \"Swith Profile\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+Shift+A":
- showInfo("\"Ctrl+Shift+A\" is default Anki shortcut for \"Add-ons\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+Shift+:":
- showInfo("\"Ctrl+Shift+:\" is default Anki shortcut for \"Debug Console\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+Shift+N":
- showInfo("\"Ctrl+Shift+N\" is default Anki shortcut for \"Manage Note Types\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- if combination == "Ctrl+Shift+Z":
- showInfo("\"Ctrl+Shift+Z\" is default Anki shortcut for \"Undo\" You can't use this shortcut.", type="warning", title="Advanced Review Bottombar")
- self.ctrl = False
- self.alt = False
- self.shift = False
- self.extra = None
- self.f1 = False
- self.f5 = False
- self.active = 0
- combination = []
- return
- self.parent.updateShortcut(self.button_variable, combination)
- self.close()
-
-class SettingsMenu(QDialog):
- refreshConfig()
- addon_path = dirname(__file__)
- images = join(addon_path, 'images')
- begin = "<div style='font-size: 14px'>"
- end = "</div>"
- info_shortcut = C_info_shortcut
- skip_shortcut = C_skip_shortcut
- showSkipped_shortcut = C_showSkipped_shortcut
- undo_shortcut = C_undo_shortcut
- def __init__(self, parent=None):
- super(SettingsMenu, self).__init__(parent)
- self.mainWindow()
- self.reviewButtonText_color = C_reviewButtonText_color
- self.activeIndicator_color = C_activeIndicator_color
- self.bottombarButtonText_color = C_bottombarButtonText_color
- self.bottombarButtonBorder_color = C_bottombarButtonBorder_color
- self.reviewTooltipText_color = C_reviewTooltipText_color
- self.again_color = C_again_color
- self.againHover_color = C_againHover_color
- self.hard_color = C_hard_color
- self.hardHover_color = C_hardHover_color
- self.good_color = C_good_color
- self.goodHover_color = C_goodHover_color
- self.easy_color = C_easy_color
- self.easyHover_color = C_easyHover_color
- self.showAnswerEase1_color = C_showAnswerEase1_color
- self.showAnswerEase2_color = C_showAnswerEase2_color
- self.showAnswerEase3_color = C_showAnswerEase3_color
- self.showAnswerEase4_color = C_showAnswerEase4_color
- def mainWindow(self):
- images = self.images
- self.createFirstTab()
- self.createSecondTab()
- self.createThirdTab()
- self.createFourthTab()
- self.createFifthTab()
- self.createSixthTab()
- self.createSeventhTab()
- self.createEighthTab()
- self.createNinthTab()
- self.loadCurrent()
-
- #// Create the bottom row of settings menu
- loadSettingsButton = QPushButton("&Load Settings")
- loadSettingsButton.clicked.connect(self.onLoadSettings)
- saveSettingsButton = QPushButton("&Backup Settings")
- saveSettingsButton.clicked.connect(self.onSaveSettings)
- acceptButton = QPushButton("&Apply")
- acceptButton.clicked.connect(self.onApply)
- rejectButton = QPushButton("&Discard")
- rejectButton.clicked.connect(self.reject)
- rejectButton.clicked.connect(lambda: tooltip("Changes Discarded."))
- buttonbox = QHBoxLayout()
- buttonbox.addWidget(loadSettingsButton)
- buttonbox.addWidget(saveSettingsButton)
- buttonbox.addStretch()
- buttonbox.addWidget(acceptButton)
- buttonbox.addWidget(rejectButton)
-
- #// create tabs widget and adds each tab
- tabs = QTabWidget()
- tabs.addTab(self.tab1, "Styles")
- tabs.addTab(self.tab2, "Answer Tooltip")
- tabs.addTab(self.tab3, "Bottombar Buttons")
- tabs.addTab(self.tab4, "Button Sizes")
- tabs.addTab(self.tab5, "Button Labels")
- tabs.addTab(self.tab6, "Sidebar")
- tabs.addTab(self.tab7, "Colors")
- tabs.addTab(self.tab8, "Misc")
- tabs.addTab(self.tab9, "About")
-
- vbox = QVBoxLayout()
- vbox.addWidget(tabs)
- vbox.addLayout(buttonbox)
-
- self.setLayout(vbox)
- self.setWindowTitle("Advanced Review Bottombar Settings Menu")
- self.setWindowIcon(QIcon(images + "/icon.png"))
-
- def createFirstTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- buttonStyle_label = QLabel("Button Style:")
- buttonStyle_label.setToolTip("{0} Changes the way review buttons look.{1}".format(begin, end))
- buttonStyle_label.setFixedWidth(180)
- self.button_style = QComboBox()
- self.button_style.addItems(["Default + Text Color", "Default + Background Color", "Wide + Text Color", "Wide + Background Color", "Neon 1", "Neon 2", "Fill 1", "Fill 2"])
- self.button_style.setToolTip("{0}To see designs please go to about tab.{1}".format(begin, end))
- self.button_style.setMinimumWidth(180)
- reviewButtonDesigns_button = QPushButton("Show Designs")
- reviewButtonDesigns_button.setFixedWidth(180)
- reviewButtonDesigns_text = "{0}Default + Text Color <br> <img src='{2}/buttonStyle_defaultText.png'><hr> Default\
- + Bakground Color<br> <img src='{2}/buttonStyle_defaultBackground.png'><hr>\
- Wide + Text Color<br> <img src='{2}/buttonStyle_wideText.png'><hr>Wide +\
- Background Color<br> <img src='{2}/buttonStyle_wideBackground.png'><hr>Neon1 (Easy is hovered over)<br>\
- <img src='{2}/buttonStyle_neon1.png'><hr>Neon2 (Easy is hovered over)<br>\
- <img src='{2}/buttonStyle_neon2.png'><hr> Fill1 (Easy is hovered over)<br><img src='{2}/buttonStyle_fill1.png'><hr>\
- Fill2 (Easy is hovered over)<br><img src='{2}/buttonStyle_fill2.png'>{1}".format(begin, end, images)
- reviewButton_designs = QLabel()
- reviewButton_designs.setText(reviewButtonDesigns_text)
- reviewButtonDesigns_scroll = QScrollArea()
- reviewButtonDesigns_scroll.setWidget(reviewButton_designs)
- reviewButtonDesigns_layout = QVBoxLayout()
- reviewButtonDesigns_layout.addWidget(reviewButtonDesigns_scroll)
- reviewButtonDesigns_window = QDialog()
- reviewButtonDesigns_window.setWindowTitle("Advanced Review Bottombar [Review Button Designs]")
- reviewButtonDesigns_window.setWindowIcon(QIcon(images + "/icon.png"))
- reviewButtonDesigns_window.setLayout(reviewButtonDesigns_layout)
- reviewButtonDesigns_button.clicked.connect(lambda: reviewButtonDesigns_window.exec_())
- buttonStyle_holder = QHBoxLayout()
- buttonStyle_holder.addWidget(buttonStyle_label)
- buttonStyle_holder.addWidget(self.button_style)
- buttonStyle_holder.addWidget(reviewButtonDesigns_button)
- buttonStyle_holder.addStretch()
- bottombaButtonsStyle_label = QLabel("General Buttons Style:")
- bottombaButtonsStyle_label.setToolTip("{0} Changes The way general buttons (main screen bottombar, deck overview, show answer, edit, etc.) look. {1}".format(begin, end))
- bottombaButtonsStyle_label.setFixedWidth(180)
- self.bottombarButtons_style = QComboBox()
- self.bottombarButtons_style.addItems(["Default", "Neon 1", "Neon 2", "Fill1", "Fill 2"])
- self.bottombarButtons_style.setToolTip("{0}To see what every design looks like, please go to about tab{1}".format(begin, end))
- self.bottombarButtons_style.setMinimumWidth(180)
- otherBottombarButtonDesigns_button = QPushButton("Show Designs")
- otherBottombarButtonDesigns_button.setFixedWidth(180)
- otherBottombarButtonDesigns_text = "{0} Default<br><img src='{2}/bottombarButtonsStyle_default.png'><hr>\
- Neon1 (Show answer is hovered over)<br> <img src='{2}/bottombarButtonsStyle_neon1.png'>\
- <hr>Neon2 (Show answer is hovered over)<br> <img src='{2}/bottombarButtonsStyle_neon2.png'><hr>Fill1 (Show answer is hovered over)<br>\
- <img src='{2}/bottombarButtonsStyle_fill1.png'><hr>Fill2 (Show answer is hovered over)<br>\
- <img src='{2}/bottombarButtonsStyle_fill2.png'>{1}".format(begin, end, images)
- otherBottombarButton_designs = QLabel()
- otherBottombarButton_designs.setText(otherBottombarButtonDesigns_text)
- otherBottombarButtonDesigns_scroll = QScrollArea()
- otherBottombarButtonDesigns_scroll.setWidget(otherBottombarButton_designs)
- otherBottombarButtonDesigns_layout = QVBoxLayout()
- otherBottombarButtonDesigns_layout.addWidget(otherBottombarButtonDesigns_scroll)
- otherBottombarButtonDesigns_window = QDialog()
- otherBottombarButtonDesigns_window.setWindowTitle("Advanced Review Bottombar [Other Bottombar Buttons Designs]")
- otherBottombarButtonDesigns_window.setWindowIcon(QIcon(images + "/icon.png"))
- otherBottombarButtonDesigns_window.setLayout(otherBottombarButtonDesigns_layout)
- otherBottombarButtonDesigns_button.clicked.connect(lambda: otherBottombarButtonDesigns_window.exec_())
- bottombarButtonsStyle_holder = QHBoxLayout()
- bottombarButtonsStyle_holder.addWidget(bottombaButtonsStyle_label)
- bottombarButtonsStyle_holder.addWidget(self.bottombarButtons_style)
- bottombarButtonsStyle_holder.addWidget(otherBottombarButtonDesigns_button)
- bottombarButtonsStyle_holder.addStretch()
- hoverEffect_label = QLabel("Hover Effect:")
- hoverEffect_label.setToolTip("{0} Changes the way review buttons look when you hover over them.\
- <hr> This option does not change hover effect for neon buttons.<hr> If you use\
- custom colors for review buttons, brighten and glow colors will be the color\
- you have set for each buttons hover color.{1}".format(begin, end))
- hoverEffect_label.setFixedWidth(180)
- self.hover_effect = QComboBox()
- self.hover_effect.addItems(["Disable", "Brighten", "Glow", "Brighten + Glow"])
- self.hover_effect.setToolTip("{0} Disable -> Buttons won't change as you hover\
- over them.<hr> Brighten -> The text or the background color will get brightened\
- as you hover over them.<br><img src='{2}/hoverEffect_brighten.png'><hr> Glow ->\
- There will be a shadow around the button as you hover them.<br><img src='{2}/hoverEffect_glow.png'><hr>\
- Glow + Brighten -> Combines both glow and brighten effects.<br> <img src='{2}/hoverEffect_glowBrighten.png'>{1}".format(begin, end, images))
- self.hover_effect.setMinimumWidth(180)
- hoverEffect_holder = QHBoxLayout()
- hoverEffect_holder.addWidget(hoverEffect_label)
- hoverEffect_holder.addWidget(self.hover_effect)
- hoverEffect_holder.addStretch()
- activeIndicator_label = QLabel("Active Indicator:")
- activeIndicator_label.setToolTip("{0} Changes the way active review button looks. active button\
- is the button that is clicked if you press spacebar or enter.<hr> This option can not change active\
- indicator for neon and fill buttons as it's disabled on those designs. {1}".format(begin, end))
- activeIndicator_label.setFixedWidth(180)
- self.active_indicator = QComboBox()
- self.active_indicator.addItems(["Disable", "Border", "Glow"])
- self.active_indicator.setToolTip("{0} Indicator is turned off and all review buttons are the\
- same.<br> {1} <img src='{2}/activeIndicator_none.png'>{0}<hr> Indicator is\
- set on border and there is a thin border around active button.<br>\
- {1} <img src='{2}/activeIndicator_border.png'>{0}<hr> Indicator is set on\
- glow and active button is glowing. <br> {1}\
- <img src='{2}/activeIndicator_glow.png'>".format(begin, end, images))
- self.active_indicator.setMinimumWidth(180)
- activeIndicator_holder = QHBoxLayout()
- activeIndicator_holder.addWidget(activeIndicator_label)
- activeIndicator_holder.addWidget(self.active_indicator)
- activeIndicator_holder.addStretch()
- cursorStyle_label = QLabel("Cursor Style:")
- cursorStyle_label.setToolTip("{0}Changes the cursor style when hovered over buttons.{1}".format(begin, end))
- cursorStyle_label.setFixedWidth(180)
- self.cursor_style = QComboBox()
- self.cursor_style.addItems(["Normal", "Pointer"])
- self.cursor_style.setFixedWidth(180)
- cursorStyle_holder = QHBoxLayout()
- cursorStyle_holder.addWidget(cursorStyle_label)
- cursorStyle_holder.addWidget(self.cursor_style)
- cursorStyle_holder.addStretch()
- showAnswerBorderType_label = QLabel("Show Answer Border Color Style:")
- showAnswerBorderType_label.setToolTip("{0}Changes how show answer border color behaves.<hr>\
- if set on \"Fixed\" it's border color will be the same as other bottombar buttons.<br>\
- if set on \"Bases on Card Ease\" it's color will change based on card ease.\
- <hr> you can change it's color for each ease range in colors tab.{1}".format(begin, end))
- showAnswerBorderType_label.setFixedWidth(180)
- self.showAnswerBorderColor_style = QComboBox()
- self.showAnswerBorderColor_style.addItems(["Fixed", "Show Based on Card Ease"])
- self.showAnswerBorderColor_style.setFixedWidth(180)
- showAnswerBorderType_holder = QHBoxLayout()
- showAnswerBorderType_holder.addWidget(showAnswerBorderType_label)
- showAnswerBorderType_holder.addWidget(self.showAnswerBorderColor_style)
- showAnswerBorderType_holder.addStretch()
- intervalStyle_label = QLabel("Button Interval Style:")
- intervalStyle_label.setToolTip("{0}Changes the style of button intervals.{1}".format(begin, end))
- intervalStyle_label.setFixedWidth(180)
- self.interval_style = QComboBox()
- self.interval_style.addItems(["Stock", "Colored Stock", "Inside the Buttons"])
- self.interval_style.setFixedWidth(180)
- intervalStyle_holder = QHBoxLayout()
- intervalStyle_holder.addWidget(intervalStyle_label)
- intervalStyle_holder.addWidget(self.interval_style)
- intervalStyle_holder.addStretch()
- buttonTransitionTime_label = QLabel("Button Transition Time:")
- buttonTransitionTime_label.setToolTip("{0}Changes button animation time for fill and neon styles.{1}".format(begin, end))
- buttonTransitionTime_label.setFixedWidth(180)
- self.buttonTransition_time = QSpinBox()
- self.buttonTransition_time.setMinimum(0)
- self.buttonTransition_time.setMaximum(10000)
- self.buttonTransition_time.setSingleStep(20)
- self.buttonTransition_time.setFixedWidth(180)
- buttonTransitionTime_ms = QLabel("ms")
- buttonTransitionTime_holder = QHBoxLayout()
- buttonTransitionTime_holder.addWidget(buttonTransitionTime_label)
- buttonTransitionTime_holder.addWidget(self.buttonTransition_time)
- buttonTransitionTime_holder.addWidget(buttonTransitionTime_ms)
- buttonTransitionTime_holder.addStretch()
- buttonBorderRadius_label = QLabel("Button Border Radius:")
- buttonBorderRadius_label.setToolTip("{0}Changer the roundness of the buttons.{1}".format(begin, end))
- buttonBorderRadius_label.setFixedWidth(180)
- self.buttonBorderRadius = QSpinBox()
- self.buttonBorderRadius.setMinimum(0)
- self.buttonBorderRadius.setMaximum(50)
- self.buttonBorderRadius.setSingleStep(1)
- self.buttonBorderRadius.setFixedWidth(180)
- buttonBorderRadius_px = QLabel("px")
- buttonBorderRadius_holder = QHBoxLayout()
- buttonBorderRadius_holder.addWidget(buttonBorderRadius_label)
- buttonBorderRadius_holder.addWidget(self.buttonBorderRadius)
- buttonBorderRadius_holder.addWidget(buttonBorderRadius_px)
- def buttonStyle_signal():
- buttonStyle_index = self.button_style.currentIndex()
- self.hover_effect.setDisabled(True)
- if buttonStyle_index in [0, 1, 2, 3]:
- self.hover_effect.setEnabled(True)
- self.active_indicator.setDisabled(True)
- if buttonStyle_index in [0, 1, 2, 3]:
- self.active_indicator.setEnabled(True)
- # self.cursor_style.setDisabled(True)
- self.buttonTransition_time.setDisabled(True)
- if buttonStyle_index in [4, 5, 6, 7]:
- # self.cursor_style.setEnabled(True)
- self.buttonTransition_time.setEnabled(True)
- buttonStyle_signal()
- self.button_style.currentIndexChanged.connect(buttonStyle_signal)
- self.style_mainScreenButtons = QCheckBox("Style Main Screen Buttons")
- self.style_mainScreenButtons.setToolTip("{0}Changes style of main screen and deck overview buttons if enabled.<hr>\
- <img src='{2}/changeMainScreenButtons.png'><br>\
- <img src='{2}/changeMainScreenButtons2.png'><br>\
- <img src='{2}/changeMainScreenButtons3.png'>{1}".format(begin, end, images))
- self.style_mainScreenButtons.setFixedWidth(180)
- tab1line5 = QHBoxLayout()
- tab1line5.addWidget(self.style_mainScreenButtons)
- tab1line5.addStretch()
- layout = QVBoxLayout()
- layout.addLayout(buttonStyle_holder)
- layout.addLayout(bottombarButtonsStyle_holder)
- layout.addLayout(hoverEffect_holder)
- layout.addLayout(activeIndicator_holder)
- layout.addLayout(cursorStyle_holder)
- layout.addLayout(showAnswerBorderType_holder)
- layout.addLayout(intervalStyle_holder)
- layout.addLayout(buttonTransitionTime_holder)
- layout.addLayout(buttonBorderRadius_holder)
- layout.addLayout(tab1line5)
- layout.addStretch()
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab1 = QScrollArea()
- self.tab1.setFixedWidth(640)
- self.tab1.setAlignment(Qt.AlignHCenter)
- self.tab1.setWidgetResizable(True)
- self.tab1.setWidget(layout_holder)
-
- def createSecondTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- reviewTooltip_label = QLabel("Review Confirmation Tooltip:")
- reviewTooltip_label.setToolTip("{0}Shows a tooltip when you press any of\
- review buttons, showing you what button you have pressed.{1}".format(begin, end))
- reviewTooltip_label.setFixedWidth(180)
- self.reviewTooltip_on = QRadioButton("On")
- self.reviewTooltip_on.setFixedWidth(90)
- self.reviewTooltip_off = QRadioButton("off")
- self.reviewTooltip_off.setFixedWidth(90)
- reviewTooltip_holder = QHBoxLayout()
- reviewTooltip_holder.addWidget(reviewTooltip_label)
- reviewTooltip_holder.addWidget(self.reviewTooltip_on)
- reviewTooltip_holder.addWidget(self.reviewTooltip_off)
- reviewTooltip_holder.addStretch()
- tab2box1 = QGroupBox()
- tab2box1.setLayout(reviewTooltip_holder)
- reviewTooltipStyle_label = QLabel("Tooltip Position:")
- reviewTooltipStyle_label.setToolTip("{0}Changes the position of answer tooltip.{1}".format(begin, end))
- reviewTooltipStyle_label.setFixedWidth(180)
- self.reviewTooltip_style = QComboBox()
- self.reviewTooltip_style.addItems(["On Buttons", "Fixed Position"])
- self.reviewTooltip_style.setToolTip("{0}On buttons -> Shows the tooltip on the button that you have pressed<hr>\
- Fixed Position -> Shows all the tooltips in a position that you have chosen in review toolip position box.{1}".format(begin, end))
- self.reviewTooltip_style.setFixedWidth(180)
- reviewTooltipStyle_holder = QHBoxLayout()
- reviewTooltipStyle_holder.addWidget(reviewTooltipStyle_label)
- reviewTooltipStyle_holder.addWidget(self.reviewTooltip_style)
- reviewTooltipStyle_holder.addStretch()
- reviewTooltipTimer_label = QLabel("Tooltip Show Duration:")
- reviewTooltipTimer_label.setToolTip("{0}Changes lenghth of the period that tooltip is shown.<hr>the unit is millisecond, 1000ms = 1s{1} (I know everybody knows this, put it here just in case :|)".format(begin, end))
- reviewTooltipTimer_label.setFixedWidth(180)
- self.reviewTooltip_timer = QSpinBox()
- self.reviewTooltip_timer.setFixedWidth(180)
- self.reviewTooltip_timer.setMinimum(100)
- self.reviewTooltip_timer.setMaximum(10000)
- reviewerTooltipTimer_ms = QLabel("ms")
- reviewTooltipTimer_holder = QHBoxLayout()
- reviewTooltipTimer_holder.addWidget(reviewTooltipTimer_label)
- reviewTooltipTimer_holder.addWidget(self.reviewTooltip_timer)
- reviewTooltipTimer_holder.addWidget(reviewerTooltipTimer_ms)
- reviewTooltipTimer_holder.addStretch()
- reviewTooltipTextColor_label = QLabel("Tooltip Text Color:")
- reviewTooltipTextColor_label.setToolTip("{0}Changes color of the text inside tooltips.{1}".format(begin, end))
- reviewTooltipTextColor_label.setFixedWidth(180)
- self.reviewTooltipTextColor_button = QPushButton()
- self.reviewTooltipTextColor_button.setFixedWidth(180)
- self.reviewTooltipTextColor_button.clicked.connect(lambda: self.getNewColor("reviewTooltipText_color", self.reviewTooltipTextColor_button))
- reviewTooltipTextColor_holder = QHBoxLayout()
- reviewTooltipTextColor_holder.addWidget(reviewTooltipTextColor_label)
- reviewTooltipTextColor_holder.addWidget(self.reviewTooltipTextColor_button)
- reviewTooltipTextColor_holder.addStretch()
- tab2line2 = QVBoxLayout()
- tab2line2.addLayout(reviewTooltipStyle_holder)
- tab2line2.addLayout(reviewTooltipTimer_holder)
- tab2line2.addLayout(reviewTooltipTextColor_holder)
- tab2box2 = QGroupBox()
- tab2box2.setLayout(tab2line2)
- self.reviewTooltipPositionX = QSlider(Qt.Horizontal)
- self.reviewTooltipPositionX.setFixedWidth(200)
- self.reviewTooltipPositionX.setMinimum(0)
- self.reviewTooltipPositionX.setMaximum(1850)
- self.reviewTooltipPositionX.setPageStep(100)
- self.reviewTooltipPositionX.setSliderPosition(0)
- reviewerTooltipPosition_holder = QHBoxLayout()
- self.reviewTooltipPositionY = QSlider(Qt.Vertical)
- self.reviewTooltipPositionY.setFixedHeight(200)
- self.reviewTooltipPositionY.setMinimum(-950)
- self.reviewTooltipPositionY.setMaximum(0)
- self.reviewTooltipPositionY.setPageStep(100)
- self.reviewTooltipPositionY.setSliderPosition(0)
- reviewerTooltipPosition_holder = QHBoxLayout()
- reviewerTooltipPosition_holder.addWidget(self.reviewTooltipPositionX)
- reviewerTooltipPosition_holder.addWidget(self.reviewTooltipPositionY)
- reviewerTooltipPosition_holder.addStretch()
- tab2line3 = QVBoxLayout()
- tab2line3.addLayout(reviewerTooltipPosition_holder)
- tab2box3 = QGroupBox("Tooltip Position")
- tab2box3.setToolTip("{0}Changes position of the fixed tooltip.<hr>\
- (<font color=red># NOTE:</font> If your resulotion is not 1920 x 1080, it's not accurate, but you\
- can find the place that you wanna put the tooltip on, by toying with the sliders\
- and restarting anki till you get the desired result.<br>\
- <font color=red># NOTE:</font> If your resulotion is 1920 x 1080 the sliders are accurate for\
- maximized anki window.<br> <font color=red># NOTE:</font> If you set the position for a window that\
- it's size is for example 500 x 500, the position will not be accurate when you\
- change anki's window size to any other size. and if you decide to resize anki's\
- window, you should set the positions again in order for the tooltip to be in the\
- position you want.){1}".format(begin, end))
- tab2box3.setLayout(tab2line3)
- tab2box3.setDisabled(True)
- if self.reviewTooltip_style.currentIndex() == 1:
- tab2box3.setEnabled(True)
- self.reviewTooltip_off.toggled.connect(tab2box3.setDisabled)
- self.reviewTooltip_style.currentIndexChanged.connect(tab2box3.setEnabled)
- tab2box2.setDisabled(True)
- if self.reviewTooltip_on.isChecked():
- tab2box2.setEnabled(True)
- self.reviewTooltip_on.toggled.connect(tab2box2.setEnabled)
- layout = QVBoxLayout()
- layout.addWidget(tab2box1)
- layout.addWidget(tab2box2)
- layout.addWidget(tab2box3)
- layout.addStretch()
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab2 = QScrollArea()
- self.tab2.setFixedWidth(640)
- self.tab2.setAlignment(Qt.AlignHCenter)
- self.tab2.setWidgetResizable(True)
- self.tab2.setWidget(layout_holder)
-
- def createThirdTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- self.info = QCheckBox("Info")
- self.info.setToolTip("{0} If enabled adds info button to review bottombar. {1}".format(begin, end))
- self.skip = QCheckBox("Skip")
- self.skip.setToolTip("{0} If enabled adds skip card button to review bottombar. {1}".format(begin, end))
- self.showSkipped = QCheckBox("Show Skipped")
- self.showSkipped.setToolTip("{0} If enabled adds show skipped button to review bottombar. {1}".format(begin, end))
- self.undo = QCheckBox("Undo")
- self.undo.setToolTip("{0} If enabled adds undo review button to review bottombar. {1}".format(begin, end))
- extraButtonsPart = QHBoxLayout()
- extraButtonsPart.addWidget(self.info)
- extraButtonsPart.addWidget(self.skip)
- extraButtonsPart.addWidget(self.showSkipped)
- extraButtonsPart.addWidget(self.undo)
- extraButtonsBox = QGroupBox("Extra Buttons")
- extraButtonsBox.setLayout(extraButtonsPart)
- self.hideHard = QCheckBox("Hide Hard")
- self.hideHard.setToolTip("{0}Hides the Hard button.{1}".format(begin, end))
- self.hideGood = QCheckBox("Hide Good")
- self.hideGood.setToolTip("{0}Hides the Good button.{1}".format(begin, end))
- self.hideEasy = QCheckBox("Hide Easy")
- self.hideEasy.setToolTip("{0}Hides the Easy button.{1}".format(begin, end))
- hideButtonsPart = QHBoxLayout()
- hideButtonsPart.addWidget(self.hideHard)
- hideButtonsPart.addWidget(self.hideGood)
- hideButtonsPart.addWidget(self.hideEasy)
- hideButtonsPart.addWidget(QLabel(""))
- hideButtonsBox = QGroupBox("Hide Buttons")
- hideButtonsBox.setLayout(hideButtonsPart)
- infoPosition_label = QLabel("Info:")
- infoPosition_label.setToolTip("{0} Changes info button position in bottombar. {1}".format(begin, end))
- self.left_info = QRadioButton("Left")
- self.middleLeft_info = QRadioButton("Middle left")
- self.middleRight_info = QRadioButton("Middle right")
- self.right_info = QRadioButton("Right")
- infoPosition_holder = QHBoxLayout()
- infoPosition_holder.addWidget(infoPosition_label)
- infoPosition_holder.addWidget(self.left_info)
- infoPosition_holder.addWidget(self.middleLeft_info)
- infoPosition_holder.addWidget(self.middleRight_info)
- infoPosition_holder.addWidget(self.right_info)
- infoButtonPositionBox = QGroupBox()
- infoButtonPositionBox.setDisabled(True)
- if self.info.isChecked():
- self.infoButtonPositionBox.setEnabled(True)
- self.info.toggled.connect(infoButtonPositionBox.setEnabled)
- infoButtonPositionBox.setLayout(infoPosition_holder)
- skipPosition_label = QLabel("Skip:")
- skipPosition_label.setToolTip("{0} Changes skip button position in bottombar. {1}".format(begin, end))
- self.left_skip = QRadioButton("Left")
- self.middleLeft_skip = QRadioButton("Middle left")
- self.middleRight_skip = QRadioButton("Middle right")
- self.right_skip = QRadioButton("Right")
- skipPosition_holder = QHBoxLayout()
- skipPosition_holder.addWidget(skipPosition_label)
- skipPosition_holder.addWidget(self.left_skip)
- skipPosition_holder.addWidget(self.middleLeft_skip)
- skipPosition_holder.addWidget(self.middleRight_skip)
- skipPosition_holder.addWidget(self.right_skip)
- skipButtonPositionBox = QGroupBox()
- skipButtonPositionBox.setDisabled(True)
- if self.skip.isChecked():
- skipButtonPositionBox.setEnabled(True)
- self.skip.toggled.connect(skipButtonPositionBox.setEnabled)
- skipButtonPositionBox.setLayout(skipPosition_holder)
- showSkippedPosition_label = QLabel("Show Skipped:")
- showSkippedPosition_label.setToolTip("{0} Changes show skipped button position in bottombar. {1}".format(begin, end))
- self.left_showSkipped = QRadioButton("Left")
- self.middleLeft_showSkipped = QRadioButton("Middle left")
- self.middleRight_showSkipped = QRadioButton("Middle right")
- self.right_showSkipped = QRadioButton("Right")
- showSkippedPosition_holder = QHBoxLayout()
- showSkippedPosition_holder.addWidget(showSkippedPosition_label)
- showSkippedPosition_holder.addWidget(self.left_showSkipped)
- showSkippedPosition_holder.addWidget(self.middleLeft_showSkipped)
- showSkippedPosition_holder.addWidget(self.middleRight_showSkipped)
- showSkippedPosition_holder.addWidget(self.right_showSkipped)
- showSkippedButtonPositionBox = QGroupBox()
- showSkippedButtonPositionBox.setDisabled(True)
- if self.showSkipped.isChecked():
- showSkippedButtonPositionBox.setEnabled(True)
- self.showSkipped.toggled.connect(showSkippedButtonPositionBox.setEnabled)
- showSkippedButtonPositionBox.setLayout(showSkippedPosition_holder)
- undoPosition_label = QLabel("Undo:")
- undoPosition_label.setToolTip("{0} Changes undo review button position in bottombar. {1}".format(begin, end))
- self.left_undo = QRadioButton("Left")
- self.middleLeft_undo = QRadioButton("Middle left")
- self.middleRight_undo = QRadioButton("Middle right")
- self.right_undo = QRadioButton("Right")
- undoPosition_holder = QHBoxLayout()
- undoPosition_holder.addWidget(undoPosition_label)
- undoPosition_holder.addWidget(self.left_undo)
- undoPosition_holder.addWidget(self.middleLeft_undo)
- undoPosition_holder.addWidget(self.middleRight_undo)
- undoPosition_holder.addWidget(self.right_undo)
- undoButtonPositionBox = QGroupBox()
- undoButtonPositionBox.setDisabled(True)
- if self.undo.isChecked():
- undoButtonPositionBox.setEnabled(True)
- self.undo.toggled.connect(undoButtonPositionBox.setEnabled)
- undoButtonPositionBox.setLayout(undoPosition_holder)
- buttonPositionsPart = QVBoxLayout()
- buttonPositionsPart.addWidget(infoButtonPositionBox)
- buttonPositionsPart.addWidget(skipButtonPositionBox)
- buttonPositionsPart.addWidget(showSkippedButtonPositionBox)
- buttonPositionsPart.addWidget(undoButtonPositionBox)
- buttonPositionsBox = QGroupBox("Button Positions")
- buttonPositionsBox.setLayout(buttonPositionsPart)
- infoShortcut_label = QLabel("Info:")
- infoShortcut_label.setToolTip("{0} Changes show card info shortcut.<hr> Shortcut will work even if\
- you disable the Info button.<hr> Info button can be a sngle key\
- like \"i\" or \"f4\" or a combination of keys like \"ctrl+i\" or \"alt+i\".<hr>\
- <font color=red>NOTE: </font>Make sure the shortcut you want to set for the\
- button isn't already in use by anki itself or another add-on. {1}".format(begin, end))
- infoShortcut_label.setFixedWidth(125)
- self.infoShortcut_button = QPushButton(self)
- self.infoShortcut_button.setFixedWidth(300)
- self.infoShortcut_button.clicked.connect(lambda: self.showGetShortcut("info_shortcut"))
- infoShortcut_holder = QHBoxLayout()
- infoShortcut_holder.addWidget(infoShortcut_label)
- infoShortcut_holder.addStretch()
- infoShortcut_holder.addWidget(self.infoShortcut_button)
- skipShortcut_label = QLabel("Skip:")
- skipShortcut_label.setToolTip("{0} Changes skip card shortcut.<hr> Shortcut will work even if\
- you disable the skip button.<hr> skip button can be a sngle key\
- like \"s\" or \"f6\" or a combination of keys like \"ctrl+s\" or \"alt+s\".<hr>\
- <font color=red>NOTE: </font>Make sure the shortcut you want to set for the\
- button isn't already in use by anki itself or another add-on. {1}".format(begin, end))
- skipShortcut_label.setFixedWidth(125)
- self.skipShortcut_button = QPushButton()
- self.skipShortcut_button.setFixedWidth(300)
- self.skipShortcut_button.clicked.connect(lambda: self.showGetShortcut("skip_shortcut"))
- skipShortcut_holder = QHBoxLayout()
- skipShortcut_holder.addWidget(skipShortcut_label)
- skipShortcut_holder.addStretch()
- skipShortcut_holder.addWidget(self.skipShortcut_button)
- showSkippedShortcut_label = QLabel("Show Skipped:")
- showSkippedShortcut_label.setToolTip("{0} Changes Show Skipped cards shortcut.<hr> Shortcut will work even if\
- you disable the Show Skipped Cards button.<hr> Show Skipped cards button shortcut can be a sngle key\
- like \"s\" or \"f6\" or a combination of keys like \"ctrl+s\" or \"alt+s\".<hr>\
- <font color=red>NOTE: </font>Make sure the shortcut you want to set for the\
- button isn't already in use by anki itself or another add-on. {1}".format(begin, end))
- showSkippedShortcut_label.setFixedWidth(125)
- self.showSkippedShortcut_button = QPushButton()
- self.showSkippedShortcut_button.setFixedWidth(300)
- self.showSkippedShortcut_button.clicked.connect(lambda: self.showGetShortcut("showSkipped_shortcut"))
- showSkippedShortcut_holder = QHBoxLayout()
- showSkippedShortcut_holder.addWidget(showSkippedShortcut_label)
- showSkippedShortcut_holder.addStretch()
- showSkippedShortcut_holder.addWidget(self.showSkippedShortcut_button)
- undoShortcut_label = QLabel("Undo:")
- undoShortcut_label.setToolTip("{0} Changes undo review shortcut.<hr> Shortcut will work even if\
- you disable the undo button.<hr> undo button shortcut can be a sngle key\
- like \"z\" or \"f1\" or a combination of keys like \"ctrl+z\" or \"alt+z\".<hr>\
- <font color=red>NOTE: </font>Make sure the shortcut you want to set for the button isn't already\
- in use by anki itself or another add-on.<hr> the default shortcut for this\
- action is (Ctrl+Z), by changing th shortcut here, the default shortcut\
- will still wok, in other words, if you set a shortcut for undo review\
- here, you will have two shortcuts for it, one is the default (Ctrl+Z)\
- and the other is the shortcut that you have set. {1}".format(begin, end))
- undoShortcut_label.setFixedWidth(125)
- self.undoShortcut_button = QPushButton()
- self.undoShortcut_button.setFixedWidth(300)
- self.undoShortcut_button.clicked.connect(lambda: self.showGetShortcut("undo_shortcut"))
- undoShortcut_holder = QHBoxLayout()
- undoShortcut_holder.addWidget(undoShortcut_label)
- undoShortcut_holder.addStretch()
- undoShortcut_holder.addWidget(self.undoShortcut_button)
- buttonShortcutsPart = QVBoxLayout()
- buttonShortcutsPart.addLayout(infoShortcut_holder)
- buttonShortcutsPart.addLayout(skipShortcut_holder)
- buttonShortcutsPart.addLayout(showSkippedShortcut_holder)
- buttonShortcutsPart.addLayout(undoShortcut_holder)
- buttonShortcutsBox = QGroupBox("Button Shortcuts")
- buttonShortcutsBox.setLayout(buttonShortcutsPart)
- layout = QVBoxLayout()
- layout.addWidget(extraButtonsBox)
- layout.addWidget(hideButtonsBox)
- layout.addWidget(buttonPositionsBox)
- layout.addWidget(buttonShortcutsBox)
- layout.addStretch()
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab3 = QScrollArea()
- self.tab3.setFixedWidth(640)
- self.tab3.setAlignment(Qt.AlignHCenter)
- self.tab3.setWidgetResizable(True)
- self.tab3.setWidget(layout_holder)
-
- def createFourthTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- customSizes_label = QLabel('Custom Sizes:')
- customSizes_label.setToolTip("{0} Enables and disables custom button sizes.<hr> If Enabled\
- button sizes will change according to the sizes you set for each button.<hr>\
- If disabled button sizes will be set on default size.<hr> <font color=red>NOTE: </font>If you use\
- wide buttons, you won't be able to change review buttons width and even when\
- you disable custom button sizes, review buttons will be wide. {1}".format(begin, end))
- customSizes_label.setFixedWidth(180)
- self.customSizes_on = QRadioButton("On")
- self.customSizes_on.setToolTip("{0} Button sizes is disabled and buttons height and width\
- is set to height and width that we have set.<hr> {1} <img src='{2}/buttonSizes_on.png'>\
- <br><img src='{2}/buttonSizes_on2.png'>".format(begin, end, images))
- self.customSizes_on.setFixedWidth(90)
- self.customSizes_off = QRadioButton("Off")
- self.customSizes_off.setToolTip("{0} Button sizes is disabled and all buttons are in default size.<hr>\
- {1} <img src='{2}/buttonSizes_off.png'><img src='{2}/buttonSizes_off2.png'>".format(begin, end, images))
- self.customSizes_off.setFixedWidth(90)
- tab4line1 = QHBoxLayout()
- tab4line1.addWidget(customSizes_label)
- tab4line1.addWidget(self.customSizes_on)
- tab4line1.addWidget(self.customSizes_off)
- tab4line1.addStretch()
- tab4box1 = QGroupBox()
- tab4box1.setLayout(tab4line1)
- textSize_label = QLabel("Buttons Text Size:")
- textSize_label.setToolTip("{0}Sets the text size for all bottombar buttons.\
- It only works on review screen buttons and it will not affect main screen\
- and study screen buttons{1}".format(begin, end))
- textSize_label.setFixedWidth(180)
- self.text_size = QSpinBox()
- self.text_size.setFixedWidth(120)
- self.text_size.setMinimum(0)
- self.text_size.setMaximum(200)
- textSize_px = QLabel("px")
- textSize_holder = QHBoxLayout()
- textSize_holder.addWidget(textSize_label)
- textSize_holder.addWidget(self.text_size)
- textSize_holder.addWidget(textSize_px)
- buttonsHeight_label = QLabel("Bottombar Buttons Height:")
- buttonsHeight_label.setToolTip("{0} Sets height for all bottombar buttons including edit, info,\
- ski, show answer, undo review, more and review buttons.".format(begin, end))
- buttonsHeight_label.setFixedWidth(180)
- self.buttons_height = QSpinBox()
- self.buttons_height.setFixedWidth(120)
- self.buttons_height.setMinimum(0)
- self.buttons_height.setMaximum(200)
- buttonsHeight_px = QLabel("px")
- buttonsHeight_holder = QHBoxLayout()
- buttonsHeight_holder.addWidget(buttonsHeight_label)
- buttonsHeight_holder.addWidget(self.buttons_height)
- buttonsHeight_holder.addWidget(buttonsHeight_px)
- reviewButtonsWidth_label = QLabel("Review Buttons Width:")
- reviewButtonsWidth_label.setToolTip("{0} Sets width for review buttons\
- (again, hard, good and easy buttons).{1}".format(begin, end))
- reviewButtonsWidth_label.setFixedWidth(180)
- self.reviewButtons_width = QSpinBox()
- self.reviewButtons_width.setFixedWidth(120)
- self.reviewButtons_width.setMinimum(0)
- self.reviewButtons_width.setMaximum(400)
- reviewButtonsWidth_px = QLabel("px")
- reviewButtonsWidth_holder = QHBoxLayout()
- reviewButtonsWidth_holder.addWidget(reviewButtonsWidth_label)
- reviewButtonsWidth_holder.addWidget(self.reviewButtons_width)
- reviewButtonsWidth_holder.addWidget(reviewButtonsWidth_px)
- editWidth_label = QLabel("Edit Width:")
- editWidth_label.setToolTip("{0} Sets width for edit button.{1}".format(begin, end))
- editWidth_label.setFixedWidth(180)
- self.edit_width = QSpinBox()
- self.edit_width.setFixedWidth(120)
- self.edit_width.setMinimum(0)
- self.edit_width.setMaximum(400)
- editWidth_px = QLabel("px")
- editWidth_holder = QHBoxLayout()
- editWidth_holder.addWidget(editWidth_label)
- editWidth_holder.addWidget(self.edit_width)
- editWidth_holder.addWidget(editWidth_px)
- answerWidth_label = QLabel("Show Answer Width:")
- answerWidth_label.setToolTip("{0} Sets width for show answer button.{1}".format(begin, end))
- answerWidth_label.setFixedWidth(180)
- self.answer_width = QSpinBox()
- self.answer_width.setFixedWidth(120)
- self.answer_width.setMinimum(0)
- self.answer_width.setMaximum(400)
- answerWidth_px = QLabel("px")
- answerWidth_holder = QHBoxLayout()
- answerWidth_holder.addWidget(answerWidth_label)
- answerWidth_holder.addWidget(self.answer_width)
- answerWidth_holder.addWidget(answerWidth_px)
- moreWidth_label = QLabel("More Width:")
- moreWidth_label.setToolTip("{0} Sets width for more button.{1}".format(begin, end))
- moreWidth_label.setFixedWidth(180)
- self.more_width = QSpinBox()
- self.more_width.setFixedWidth(120)
- self.more_width.setMinimum(0)
- self.more_width.setMaximum(400)
- moreWidth_px = QLabel("px")
- moreWidth_holder = QHBoxLayout()
- moreWidth_holder.addWidget(moreWidth_label)
- moreWidth_holder.addWidget(self.more_width)
- moreWidth_holder.addWidget(moreWidth_px)
- infoWidth_label = QLabel("Info Width:")
- infoWidth_label.setToolTip("{0} Sets width for info button.{1}".format(begin, end))
- infoWidth_label.setFixedWidth(180)
- self.info_width = QSpinBox()
- self.info_width.setFixedWidth(120)
- self.info_width.setMinimum(0)
- self.info_width.setMaximum(400)
- infoWidth_px = QLabel("px")
- infoWidth_holder = QHBoxLayout()
- infoWidth_holder.addWidget(infoWidth_label)
- infoWidth_holder.addWidget(self.info_width)
- infoWidth_holder.addWidget(infoWidth_px)
- skipWidth_label = QLabel("Skip Width:")
- skipWidth_label.setToolTip("{0} Sets width for skip button.{1}".format(begin, end))
- skipWidth_label.setFixedWidth(180)
- self.skip_width = QSpinBox()
- self.skip_width.setFixedWidth(120)
- self.skip_width.setMinimum(0)
- self.skip_width.setMaximum(400)
- skipWidth_px = QLabel("px")
- skipWidth_holder = QHBoxLayout()
- skipWidth_holder.addWidget(skipWidth_label)
- skipWidth_holder.addWidget(self.skip_width)
- skipWidth_holder.addWidget(skipWidth_px)
- showSkippedWidth_label = QLabel("Show Skipped Width:")
- showSkippedWidth_label.setToolTip("{0} Sets width for Show Skipped button.{1}".format(begin, end))
- showSkippedWidth_label.setFixedWidth(180)
- self.showSkipped_width = QSpinBox()
- self.showSkipped_width.setFixedWidth(120)
- self.showSkipped_width.setMinimum(0)
- self.showSkipped_width.setMaximum(400)
- showSkippedWidth_px = QLabel("px")
- showSkippedWidth_holder = QHBoxLayout()
- showSkippedWidth_holder.addWidget(showSkippedWidth_label)
- showSkippedWidth_holder.addWidget(self.showSkipped_width)
- showSkippedWidth_holder.addWidget(showSkippedWidth_px)
- undoWidth_label = QLabel("Undo Width:")
- undoWidth_label.setToolTip("{0} Sets width for undo button.{1}".format(begin, end))
- undoWidth_label.setFixedWidth(180)
- self.undo_width = QSpinBox()
- self.undo_width.setFixedWidth(120)
- self.undo_width.setMinimum(0)
- self.undo_width.setMaximum(400)
- undoWidth_px = QLabel("px")
- undoWidth_holder = QHBoxLayout()
- undoWidth_holder.addWidget(undoWidth_label)
- undoWidth_holder.addWidget(self.undo_width)
- undoWidth_holder.addWidget(undoWidth_px)
- tab4line2 = QVBoxLayout()
- tab4line2.addLayout(textSize_holder)
- tab4line2.addLayout(buttonsHeight_holder)
- tab4line2.addLayout(reviewButtonsWidth_holder)
- tab4line2.addLayout(editWidth_holder)
- tab4line2.addLayout(answerWidth_holder)
- tab4line2.addLayout(moreWidth_holder)
- tab4line2.addLayout(infoWidth_holder)
- tab4line2.addLayout(skipWidth_holder)
- tab4line2.addLayout(showSkippedWidth_holder)
- tab4line2.addLayout(undoWidth_holder)
- tab4box2 = QGroupBox()
- tab4box2.setDisabled(True)
- if self.customSizes_on.isChecked():
- tab4box2.setEnabled(True)
- self.customSizes_on.toggled.connect(tab4box2.setEnabled)
- tab4box2.setLayout(tab4line2)
- layout = QVBoxLayout()
- layout.addWidget(tab4box1)
- layout.addWidget(tab4box2)
- layout.addStretch()
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab4 = QScrollArea()
- self.tab4.setFixedWidth(640)
- self.tab4.setAlignment(Qt.AlignHCenter)
- self.tab4.setWidgetResizable(True)
- self.tab4.setWidget(layout_holder)
-
- def createFifthTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- buttonLabel_studyNow_label = QLabel("Study Now:")
- buttonLabel_studyNow_label.setToolTip("{0}Replaces the text for \"Study Now\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_studyNow_label.setFixedWidth(90)
- self.buttonLabel_studyNow = QLineEdit()
- buttonlabel_studyNow_holder = QHBoxLayout()
- buttonlabel_studyNow_holder.addWidget(buttonLabel_studyNow_label)
- buttonlabel_studyNow_holder.addWidget(self.buttonLabel_studyNow)
- buttonLabel_studyNow_box = QGroupBox()
- buttonLabel_studyNow_box.setLayout(buttonlabel_studyNow_holder)
- buttonLabel_edit_label = QLabel("Edit:")
- buttonLabel_edit_label.setToolTip("{0}Replaces the text for \"Edit\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_edit_label.setFixedWidth(90)
- self.buttonLabel_edit = QLineEdit()
- buttonlabel_edit_holder = QHBoxLayout()
- buttonlabel_edit_holder.addWidget(buttonLabel_edit_label)
- buttonlabel_edit_holder.addWidget(self.buttonLabel_edit)
- buttonLabel_edit_box = QGroupBox()
- buttonLabel_edit_box.setLayout(buttonlabel_edit_holder)
- firstLine = QHBoxLayout()
- firstLine.addWidget(buttonLabel_studyNow_box)
- firstLine.addWidget(buttonLabel_edit_box)
- buttonLabel_showAnswer_label = QLabel("Show Answer:")
- buttonLabel_showAnswer_label.setToolTip("{0}Replaces the text for \"Show Answer\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_showAnswer_label.setFixedWidth(90)
- self.buttonLabel_showAnswer = QLineEdit()
- buttonlabel_showAnswer_holder = QHBoxLayout()
- buttonlabel_showAnswer_holder.addWidget(buttonLabel_showAnswer_label)
- buttonlabel_showAnswer_holder.addWidget(self.buttonLabel_showAnswer)
- buttonLabel_showAnswer_box = QGroupBox()
- buttonLabel_showAnswer_box.setLayout(buttonlabel_showAnswer_holder)
- buttonLabel_more_label = QLabel("More:")
- buttonLabel_more_label.setToolTip("{0}Replaces the text for \"More\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_more_label.setFixedWidth(90)
- self.buttonLabel_more = QLineEdit()
- buttonlabel_more_holder = QHBoxLayout()
- buttonlabel_more_holder.addWidget(buttonLabel_more_label)
- buttonlabel_more_holder.addWidget(self.buttonLabel_more)
- buttonLabel_more_box = QGroupBox()
- buttonLabel_more_box.setLayout(buttonlabel_more_holder)
- secondLine = QHBoxLayout()
- secondLine.addWidget(buttonLabel_showAnswer_box)
- secondLine.addWidget(buttonLabel_more_box)
- buttonLabel_info_label = QLabel("Info:")
- buttonLabel_info_label.setToolTip("{0}Replaces the text for \"Info\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_info_label.setFixedWidth(90)
- self.buttonLabel_info = QLineEdit()
- buttonlabel_info_holder = QHBoxLayout()
- buttonlabel_info_holder.addWidget(buttonLabel_info_label)
- buttonlabel_info_holder.addWidget(self.buttonLabel_info)
- buttonLabel_info_box = QGroupBox()
- buttonLabel_info_box.setLayout(buttonlabel_info_holder)
- buttonLabel_skip_label = QLabel("Skip:")
- buttonLabel_skip_label.setToolTip("{0}Replaces the text for \"Skip\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_skip_label.setFixedWidth(90)
- self.buttonLabel_skip = QLineEdit()
- buttonlabel_skip_holder = QHBoxLayout()
- buttonlabel_skip_holder.addWidget(buttonLabel_skip_label)
- buttonlabel_skip_holder.addWidget(self.buttonLabel_skip)
- buttonLabel_skip_box = QGroupBox()
- buttonLabel_skip_box.setLayout(buttonlabel_skip_holder)
- thirdLine = QHBoxLayout()
- thirdLine.addWidget(buttonLabel_info_box)
- thirdLine.addWidget(buttonLabel_skip_box)
- buttonLabel_undo_label = QLabel("Undo:")
- buttonLabel_undo_label.setToolTip("{0}Replaces the text for \"Undo\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_undo_label.setFixedWidth(90)
- self.buttonLabel_undo = QLineEdit()
- buttonlabel_undo_holder = QHBoxLayout()
- buttonlabel_undo_holder.addWidget(buttonLabel_undo_label)
- buttonlabel_undo_holder.addWidget(self.buttonLabel_undo)
- buttonLabel_undo_box = QGroupBox()
- buttonLabel_undo_box.setLayout(buttonlabel_undo_holder)
- buttonLabel_showSkipped_label = QLabel("Show Skipped:")
- buttonLabel_showSkipped_label.setToolTip("{0}Replaces the text for \"Show Skipped\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_showSkipped_label.setFixedWidth(90)
- self.buttonLabel_showSkipped = QLineEdit()
- buttonlabel_showSkipped_holder = QHBoxLayout()
- buttonlabel_showSkipped_holder.addWidget(buttonLabel_showSkipped_label)
- buttonlabel_showSkipped_holder.addWidget(self.buttonLabel_showSkipped)
- buttonLabel_showSkipped_box = QGroupBox()
- buttonLabel_showSkipped_box.setLayout(buttonlabel_showSkipped_holder)
- fourthLine = QHBoxLayout()
- fourthLine.addWidget(buttonLabel_undo_box)
- fourthLine.addWidget(buttonLabel_showSkipped_box)
- buttonLabel_again_label = QLabel("Again:")
- buttonLabel_again_label.setToolTip("{0}Replaces the text for \"Again\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_again_label.setFixedWidth(90)
- self.buttonLabel_again = QLineEdit()
- buttonlabel_again_holder = QHBoxLayout()
- buttonlabel_again_holder.addWidget(buttonLabel_again_label)
- buttonlabel_again_holder.addWidget(self.buttonLabel_again)
- buttonLabel_again_box = QGroupBox()
- buttonLabel_again_box.setLayout(buttonlabel_again_holder)
- buttonLabel_hard_label = QLabel("Hard:")
- buttonLabel_hard_label.setToolTip("{0}Replaces the text for \"Hard\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_hard_label.setFixedWidth(90)
- self.buttonLabel_hard = QLineEdit()
- buttonlabel_hard_holder = QHBoxLayout()
- buttonlabel_hard_holder.addWidget(buttonLabel_hard_label)
- buttonlabel_hard_holder.addWidget(self.buttonLabel_hard)
- buttonLabel_hard_box = QGroupBox()
- buttonLabel_hard_box.setLayout(buttonlabel_hard_holder)
- fifthLine = QHBoxLayout()
- fifthLine.addWidget(buttonLabel_again_box)
- fifthLine.addWidget(buttonLabel_hard_box)
- buttonLabel_good_label = QLabel("Good:")
- buttonLabel_good_label.setToolTip("{0}Replaces the text for \"Good\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_good_label.setFixedWidth(90)
- self.buttonLabel_good = QLineEdit()
- buttonlabel_good_holder = QHBoxLayout()
- buttonlabel_good_holder.addWidget(buttonLabel_good_label)
- buttonlabel_good_holder.addWidget(self.buttonLabel_good)
- buttonLabel_good_box = QGroupBox()
- buttonLabel_good_box.setLayout(buttonlabel_good_holder)
- buttonLabel_easy_label = QLabel("Easy:")
- buttonLabel_easy_label.setToolTip("{0}Replaces the text for \"Easy\" Button with your custom text.{1}".format(begin, end))
- buttonLabel_easy_label.setFixedWidth(90)
- self.buttonLabel_easy = QLineEdit()
- buttonlabel_easy_holder = QHBoxLayout()
- buttonlabel_easy_holder.addWidget(buttonLabel_easy_label)
- buttonlabel_easy_holder.addWidget(self.buttonLabel_easy)
- buttonLabel_easy_box = QGroupBox()
- buttonLabel_easy_box.setLayout(buttonlabel_easy_holder)
- sixthLine = QHBoxLayout()
- sixthLine.addWidget(buttonLabel_good_box)
- sixthLine.addWidget(buttonLabel_easy_box)
- layout = QVBoxLayout()
- layout.addLayout(firstLine)
- layout.addLayout(secondLine)
- layout.addLayout(thirdLine)
- layout.addLayout(fourthLine)
- layout.addLayout(fifthLine)
- layout.addLayout(sixthLine)
- layout.addStretch()
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab5 = QScrollArea()
- self.tab5.setFixedWidth(640)
- self.tab5.setAlignment(Qt.AlignHCenter)
- self.tab5.setWidgetResizable(True)
- self.tab5.setWidget(layout_holder)
-
- def createSixthTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- sidebarPosition_label = QLabel("Card Info Sidebar Default Position:")
- sidebarPosition_label.setToolTip("{0}Chanes the default position of the sidebar (duh!){1}".format(begin, end))
- sidebarPosition_label.setFixedWidth(195)
- self.sidebar_position = QComboBox()
- self.sidebar_position.addItems(["Right", "Left"])
- self.sidebar_position.setMinimumWidth(200)
- sidebarPosition_holder = QHBoxLayout()
- sidebarPosition_holder.addWidget(sidebarPosition_label)
- sidebarPosition_holder.addWidget(self.sidebar_position)
- sidebarPosition_holder.addStretch()
- sidebarTheme_label = QLabel("Card Info Sidebar Theme:")
- sidebarTheme_label.setToolTip("{0} Changes sidebar theme. {1}".format(begin, end))
- sidebarTheme_label.setFixedWidth(195)
- self.sidebar_theme = QComboBox()
- self.sidebar_theme.addItems(["Auto", "Day/Light", "Night/Dark"])
- self.sidebar_theme.setToolTip("{0} Auto: Chooses the sidebar theme based on your anki theme.<br>\
- <font color=red>NOTE: </font>This option only supports anki's native night\
- mode and does not work with night mode add-on.<hr> Day: Forces sidebar to use light theme whether your anki is\
- in night mode or not.<hr> Night: Forces sidebar to use dark theme whether your anki is\
- in night mode or not. {1}".format(begin, end))
- self.sidebar_theme.setMinimumWidth(200)
- sideBarTheme_holder = QHBoxLayout()
- sideBarTheme_holder.addWidget(sidebarTheme_label)
- sideBarTheme_holder.addWidget(self.sidebar_theme)
- sideBarTheme_holder.addStretch()
- sidebarFont_label = QLabel("Card Info Sidebar Font:")
- sidebarFont_label.setToolTip("{0} Changes card info sidebar font. {1}".format(begin, end))
- sidebarFont_label.setFixedWidth(195)
- self.sidebar_font = QFontComboBox()
- self.sidebar_font.setMinimumWidth(200)
- sidebarFont_holder = QHBoxLayout()
- sidebarFont_holder.addWidget(sidebarFont_label)
- sidebarFont_holder.addWidget(self.sidebar_font)
- sidebarFont_holder.addStretch()
- sidebarPreviousCards_label = QLabel("Number of Previous Cards To Show:")
- sidebarPreviousCards_label.setToolTip("{0} Changes number of previous cards that show on the card\
- info sidebar.</font> {1}".format(begin, end))
- sidebarPreviousCards_label.setFixedWidth(195)
- self.sidebar_PreviousCards = QSpinBox()
- self.sidebar_PreviousCards.setMinimumWidth(200)
- self.sidebar_PreviousCards.setMaximum(4)
- sidebarPreviousCards_holder = QHBoxLayout()
- sidebarPreviousCards_holder.addWidget(sidebarPreviousCards_label)
- sidebarPreviousCards_holder.addWidget(self.sidebar_PreviousCards)
- sidebarPreviousCards_holder.addStretch()
- sidebarReviewsToShow_label = QLabel("Card Previous Reviews To Show:")
- sidebarReviewsToShow_label.setToolTip("{0} Changes number of previous reviews for a card to show on\
- the card info sidebar.<hr><font color=red> If you want it to show all reviews for a card, set it on 0.{1}".format(begin, end))
- sidebarReviewsToShow_label.setFixedWidth(195)
- self.sidebar_reviewsToShow = QSpinBox()
- self.sidebar_reviewsToShow.setMinimumWidth(200)
- self.sidebar_reviewsToShow.setMaximum(500)
- sidebarReviewsToShow_holder = QHBoxLayout()
- sidebarReviewsToShow_holder.addWidget(sidebarReviewsToShow_label)
- sidebarReviewsToShow_holder.addWidget(self.sidebar_reviewsToShow)
- sidebarReviewsToShow_holder.addStretch()
- tab5line1 = QVBoxLayout()
- tab5line1.addLayout(sidebarPosition_holder)
- tab5line1.addLayout(sideBarTheme_holder)
- tab5line1.addLayout(sidebarFont_holder)
- tab5line1.addLayout(sidebarPreviousCards_holder)
- tab5line1.addLayout(sidebarReviewsToShow_holder)
- tab5box1 = QGroupBox()
- tab5box1.setLayout(tab5line1)
- self.sidebar_currentReviewCount = QCheckBox("Current Review Count")
- self.sidebar_currentReviewCount.setFixedWidth(140)
- self.sidebar_dateCreated = QCheckBox('Date Created')
- self.sidebar_dateCreated.setFixedWidth(140)
- self.sidebar_dateEdited = QCheckBox('Dated Edited')
- self.sidebar_dateEdited.setFixedWidth(140)
- tab5subline1 = QHBoxLayout()
- tab5subline1.addWidget(self.sidebar_currentReviewCount)
- tab5subline1.addWidget(self.sidebar_dateCreated)
- tab5subline1.addWidget(self.sidebar_dateEdited)
- tab5subline1.addStretch()
- self.sidebar_firstReview = QCheckBox('First Review')
- self.sidebar_firstReview.setFixedWidth(140)
- self.sidebar_latestReview = QCheckBox('Latest Review')
- self.sidebar_latestReview.setFixedWidth(140)
- self.sidebar_due = QCheckBox('Due')
- self.sidebar_due.setFixedWidth(140)
- tab5subline2 = QHBoxLayout()
- tab5subline2.addWidget(self.sidebar_firstReview)
- tab5subline2.addWidget(self.sidebar_latestReview)
- tab5subline2.addWidget(self.sidebar_due)
- tab5subline2.addStretch()
- self.sidebar_interval = QCheckBox('Interval')
- self.sidebar_interval.setFixedWidth(140)
- self.sidebar_ease = QCheckBox('Ease')
- self.sidebar_ease.setFixedWidth(140)
- self.sidebar_numberOfReviews = QCheckBox('Number of Reviews')
- self.sidebar_numberOfReviews.setFixedWidth(140)
- tab5subline3 = QHBoxLayout()
- tab5subline3.addWidget(self.sidebar_interval)
- tab5subline3.addWidget(self.sidebar_ease)
- tab5subline3.addWidget(self.sidebar_numberOfReviews)
- tab5subline3.addStretch()
- self.sidebar_lapses = QCheckBox('Lapses')
- self.sidebar_lapses.setFixedWidth(140)
- self.sidebar_averageTime = QCheckBox('Average Time')
- self.sidebar_averageTime.setFixedWidth(140)
- self.sidebar_totalTime = QCheckBox('Total Time')
- self.sidebar_totalTime.setFixedWidth(140)
- tab5subline4 = QHBoxLayout()
- tab5subline4.addWidget(self.sidebar_lapses)
- tab5subline4.addWidget(self.sidebar_averageTime)
- tab5subline4.addWidget(self.sidebar_totalTime)
- tab5subline4.addStretch()
- self.sidebar_cardType = QCheckBox('Card Type')
- self.sidebar_cardType.setFixedWidth(140)
- self.sidebar_noteType = QCheckBox('Note Type')
- self.sidebar_noteType.setFixedWidth(140)
- self.sidebar_deck = QCheckBox('Deck')
- self.sidebar_deck.setFixedWidth(140)
- tab5subline5 = QHBoxLayout()
- tab5subline5.addWidget(self.sidebar_cardType)
- tab5subline5.addWidget(self.sidebar_noteType)
- tab5subline5.addWidget(self.sidebar_deck)
- tab5subline5.addStretch()
- self.sidebar_tags = QCheckBox('Tags')
- self.sidebar_tags.setFixedWidth(140)
- self.sidebar_sortField = QCheckBox('Sort Field')
- self.sidebar_sortField.setFixedWidth(140)
- self.sidebar_warningNote = QCheckBox('Warning Note')
- self.sidebar_warningNote.setFixedWidth(140)
- tab5subline6 = QHBoxLayout()
- tab5subline6.addWidget(self.sidebar_tags)
- tab5subline6.addWidget(self.sidebar_sortField)
- tab5subline6.addWidget(self.sidebar_warningNote)
- tab5subline6.addStretch()
- self.sidebar_correctPercent = QCheckBox('Correct Percentage')
- self.sidebar_correctPercent.setFixedWidth(140)
- self.sidebar_fastestReview = QCheckBox('Fastest Review')
- self.sidebar_fastestReview.setFixedWidth(140)
- self.sidebar_slowestReview = QCheckBox('Slowest Review')
- self.sidebar_slowestReview.setFixedWidth(140)
- tab5subline7 = QHBoxLayout()
- tab5subline7.addWidget(self.sidebar_correctPercent)
- tab5subline7.addWidget(self.sidebar_fastestReview)
- tab5subline7.addWidget(self.sidebar_slowestReview)
- tab5subline7.addStretch()
- self.sidebar_noteID = QCheckBox('Note ID')
- self.sidebar_noteID.setFixedWidth(140)
- self.sidebar_cardID = QCheckBox('Card ID')
- self.sidebar_cardID.setFixedWidth(140)
- self.sidebar_autoOpen = QCheckBox('Auto Open')
- self.sidebar_autoOpen.setToolTip("Opens sidebar automatically when you review a card")
- self.sidebar_autoOpen.setFixedWidth(140)
- tab5subline8 = QHBoxLayout()
- tab5subline8.addWidget(self.sidebar_noteID)
- tab5subline8.addWidget(self.sidebar_cardID)
- tab5subline8.addWidget(self.sidebar_autoOpen)
- tab5subline8.addStretch()
- tab5line2 = QVBoxLayout()
- tab5line2.addLayout(tab5subline1)
- tab5line2.addLayout(tab5subline2)
- tab5line2.addLayout(tab5subline3)
- tab5line2.addLayout(tab5subline4)
- tab5line2.addLayout(tab5subline5)
- tab5line2.addLayout(tab5subline6)
- tab5line2.addLayout(tab5subline7)
- tab5line2.addLayout(tab5subline8)
- tab5box2 = QGroupBox()
- tab5box2.setLayout(tab5line2)
- layout = QVBoxLayout()
- layout.addWidget(tab5box1)
- layout.addWidget(tab5box2)
- layout.addStretch()
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab6 = QScrollArea()
- self.tab6.setFixedWidth(640)
- self.tab6.setAlignment(Qt.AlignHCenter)
- self.tab6.setWidgetResizable(True)
- self.tab6.setWidget(layout_holder)
-
- def createSeventhTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- self.custom_reviewButtonColors = QGroupBox("Custom Review Button Colors")
- self.custom_reviewButtonColors.setToolTip("{0}Changes text or background color and hover colors for review buttons.<hr>\
- as the neon and fill buttons don't have a separate hover color, changing hover color will not affect those buttons.{1}".format(begin, end))
- self.custom_reviewButtonColors.setCheckable(True)
- self.custom_reviewButtonColors.setChecked(False)
- againColor_label = QLabel("Again:")
- againColor_label.setFixedWidth(140)
- self.againColor_button = QPushButton()
- self.againColor_button.clicked.connect(lambda: self.getNewColor("again_color", self.againColor_button))
- againColor_holder = QHBoxLayout()
- againColor_holder.addWidget(againColor_label)
- againColor_holder.addWidget(self.againColor_button)
- againColor_box = QGroupBox()
- againColor_box.setLayout(againColor_holder)
- againHoverColor_label = QLabel("Again on Hover:")
- againHoverColor_label.setFixedWidth(140)
- self.againHoverColor_button = QPushButton()
- self.againHoverColor_button.clicked.connect(lambda: self.getNewColor("againHover_color", self.againHoverColor_button))
- againHoverColor_holder = QHBoxLayout()
- againHoverColor_holder.addWidget(againHoverColor_label)
- againHoverColor_holder.addWidget(self.againHoverColor_button)
- againHover_box = QGroupBox()
- againHover_box.setLayout(againHoverColor_holder)
- again_line = QHBoxLayout()
- again_line.addWidget(againColor_box)
- again_line.addWidget(againHover_box)
- hardColor_label = QLabel("Hard:")
- hardColor_label.setFixedWidth(140)
- self.hardColor_button = QPushButton()
- self.hardColor_button.clicked.connect(lambda: self.getNewColor("hard_color", self.hardColor_button))
- hardColor_holder = QHBoxLayout()
- hardColor_holder.addWidget(hardColor_label)
- hardColor_holder.addWidget(self.hardColor_button)
- hardColor_box = QGroupBox()
- hardColor_box.setLayout(hardColor_holder)
- hardHoverColor_label = QLabel("Hard on Hover:")
- hardHoverColor_label.setFixedWidth(140)
- self.hardHoverColor_button = QPushButton()
- self.hardHoverColor_button.clicked.connect(lambda: self.getNewColor("hardHover_color", self.hardHoverColor_button))
- hardHoverColor_holder = QHBoxLayout()
- hardHoverColor_holder.addWidget(hardHoverColor_label)
- hardHoverColor_holder.addWidget(self.hardHoverColor_button)
- hardHover_box = QGroupBox()
- hardHover_box.setLayout(hardHoverColor_holder)
- hard_line = QHBoxLayout()
- hard_line.addWidget(hardColor_box)
- hard_line.addWidget(hardHover_box)
- goodColor_label = QLabel("Good:")
- goodColor_label.setFixedWidth(140)
- self.goodColor_button = QPushButton()
- self.goodColor_button.clicked.connect(lambda: self.getNewColor("good_color", self.goodColor_button))
- goodColor_holder = QHBoxLayout()
- goodColor_holder.addWidget(goodColor_label)
- goodColor_holder.addWidget(self.goodColor_button)
- goodColor_box = QGroupBox()
- goodColor_box.setLayout(goodColor_holder)
- goodHoverColor_label = QLabel("Good on Hover:")
- goodHoverColor_label.setFixedWidth(140)
- self.goodHoverColor_button = QPushButton()
- self.goodHoverColor_button.clicked.connect(lambda: self.getNewColor("goodHover_color", self.goodHoverColor_button))
- goodHoverColor_holder = QHBoxLayout()
- goodHoverColor_holder.addWidget(goodHoverColor_label)
- goodHoverColor_holder.addWidget(self.goodHoverColor_button)
- goodHover_box = QGroupBox()
- goodHover_box.setLayout(goodHoverColor_holder)
- good_line = QHBoxLayout()
- good_line.addWidget(goodColor_box)
- good_line.addWidget(goodHover_box)
- easyColor_label = QLabel("Easy:")
- easyColor_label.setFixedWidth(140)
- self.easyColor_button = QPushButton()
- self.easyColor_button.clicked.connect(lambda: self.getNewColor("easy_color", self.easyColor_button))
- easyColor_holder = QHBoxLayout()
- easyColor_holder.addWidget(easyColor_label)
- easyColor_holder.addWidget(self.easyColor_button)
- easyColor_box = QGroupBox()
- easyColor_box.setLayout(easyColor_holder)
- easyHoverColor_label = QLabel("Easy on Hover:")
- easyHoverColor_label.setFixedWidth(140)
- self.easyHoverColor_button = QPushButton()
- self.easyHoverColor_button.clicked.connect(lambda: self.getNewColor("easyHover_color", self.easyHoverColor_button))
- easyHoverColor_holder = QHBoxLayout()
- easyHoverColor_holder.addWidget(easyHoverColor_label)
- easyHoverColor_holder.addWidget(self.easyHoverColor_button)
- easyHover_box = QGroupBox()
- easyHover_box.setLayout(easyHoverColor_holder)
- easy_line = QHBoxLayout()
- easy_line.addWidget(easyColor_box)
- easy_line.addWidget(easyHover_box)
- reviewButtonColors_layout = QVBoxLayout()
- reviewButtonColors_layout.addLayout(again_line)
- reviewButtonColors_layout.addLayout(hard_line)
- reviewButtonColors_layout.addLayout(good_line)
- reviewButtonColors_layout.addLayout(easy_line)
- self.custom_reviewButtonColors.setLayout(reviewButtonColors_layout)
- self.custom_reviewButtonTextColor = QCheckBox("Review Button Text:")
- self.custom_reviewButtonTextColor.setToolTip("{0}Changes the color of general textcolor inside buttons.\
- <hr> This option does not work on Default + Text Color and Wide + Text Color Styles {1}".format(begin, end))
- self.custom_reviewButtonTextColor.setFixedWidth(140)
- self.reviewButtonTextColor_button = QPushButton()
- self.reviewButtonTextColor_button.clicked.connect(lambda: self.getNewColor("reviewButtonText_color", self.reviewButtonTextColor_button))
- reviewButtonTextColor_holder = QHBoxLayout()
- reviewButtonTextColor_holder.addWidget(self.custom_reviewButtonTextColor)
- reviewButtonTextColor_holder.addWidget(self.reviewButtonTextColor_button)
- reviewButtonTextColor_box = QGroupBox()
- reviewButtonTextColor_box.setLayout(reviewButtonTextColor_holder)
- self.reviewButtonTextColor_button.setDisabled(True)
- if self.custom_reviewButtonTextColor.isChecked():
- self.reviewButtonTextColor_button.setEnabled(True)
- self.custom_reviewButtonTextColor.toggled.connect(self.reviewButtonTextColor_button.setEnabled)
- self.custom_activeIndicatorColor = QCheckBox("Active Indicator:")
- self.custom_activeIndicatorColor.setToolTip("{0}Changes the active indicator color.<hr>\
- This option doesn not work on neon and fill buttons as they don't have active indicator for active buttons.{1}".format(begin, end))
- self.custom_activeIndicatorColor.setFixedWidth(140)
- self.activeIndicatorColor_button = QPushButton()
- self.activeIndicatorColor_button.clicked.connect(lambda: self.getNewColor("activeIndicator_color", self.activeIndicatorColor_button))
- activeIndicatorColor_holder = QHBoxLayout()
- activeIndicatorColor_holder.addWidget(self.custom_activeIndicatorColor)
- activeIndicatorColor_holder.addWidget(self.activeIndicatorColor_button)
- activeIndicatorColor_box = QGroupBox()
- activeIndicatorColor_box.setLayout(activeIndicatorColor_holder)
- self.activeIndicatorColor_button.setDisabled(True)
- if self.custom_activeIndicatorColor.isChecked():
- self.activeIndicatorColor_button.setEnabled(True)
- self.custom_activeIndicatorColor.toggled.connect(self.activeIndicatorColor_button.setEnabled)
- reviewButtonTextColor_activeIndicatorColor_line = QHBoxLayout()
- reviewButtonTextColor_activeIndicatorColor_line.addWidget(reviewButtonTextColor_box)
- reviewButtonTextColor_activeIndicatorColor_line.addWidget(activeIndicatorColor_box)
- self.custom_bottombarButtonTextColor = QCheckBox("General Button Text:")
- self.custom_bottombarButtonTextColor.setToolTip("{0}Changes color of text inside all buttons including bottombar buttons, deck overview buttons and main screen bottombar buttons.{1}".format(begin, end))
- self.custom_bottombarButtonTextColor.setFixedWidth(140)
- self.bottombarButtonTextColor_button = QPushButton()
- self.bottombarButtonTextColor_button.clicked.connect(lambda: self.getNewColor("bottombarButtonText_color", self.bottombarButtonTextColor_button))
- bottombarButtonTextColor_holder = QHBoxLayout()
- bottombarButtonTextColor_holder.addWidget(self.custom_bottombarButtonTextColor)
- bottombarButtonTextColor_holder.addWidget(self.bottombarButtonTextColor_button)
- bottombarButtonTextColor_box = QGroupBox()
- bottombarButtonTextColor_box.setLayout(bottombarButtonTextColor_holder)
- self.bottombarButtonTextColor_button.setDisabled(True)
- if self.custom_bottombarButtonTextColor.isChecked():
- self.bottombarButtonTextColor_button.setEnabled(True)
- self.custom_bottombarButtonTextColor.toggled.connect(self.bottombarButtonTextColor_button.setEnabled)
- self.custom_bottombarButtonBorderColor = QCheckBox("General Button Border:")
- self.custom_bottombarButtonBorderColor.setToolTip("{0}Changes border color for all buttons including bottombar buttons, deck overview buttons and main screen bottombar buttons.{1}".format(begin, end))
- self.custom_bottombarButtonBorderColor.setFixedWidth(140)
- self.bottombarButtonBorderColor_button = QPushButton()
- self.bottombarButtonBorderColor_button.clicked.connect(lambda: self.getNewColor("bottombarButtonBorder_color", self.bottombarButtonBorderColor_button))
- bottombarButtonBorderColor_holder = QHBoxLayout()
- bottombarButtonBorderColor_holder.addWidget(self.custom_bottombarButtonBorderColor)
- bottombarButtonBorderColor_holder.addWidget(self.bottombarButtonBorderColor_button)
- bottombarButtonBorderColor_box = QGroupBox()
- bottombarButtonBorderColor_box.setLayout(bottombarButtonBorderColor_holder)
- self.bottombarButtonBorderColor_button.setDisabled(True)
- if self.custom_bottombarButtonBorderColor.isChecked():
- self.bottombarButtonBorderColor_button.setEnabled(True)
- self.custom_bottombarButtonBorderColor.toggled.connect(self.bottombarButtonBorderColor_button.setEnabled)
- bottobarButtonTextColor_bottombarButtonBorderColor_line = QHBoxLayout()
- bottobarButtonTextColor_bottombarButtonBorderColor_line.addWidget(bottombarButtonTextColor_box)
- bottobarButtonTextColor_bottombarButtonBorderColor_line.addWidget(bottombarButtonBorderColor_box)
- showAnswerEase1_label = QLabel("Ease less than")
- showAnswerEase1_label.setFixedWidth(120)
- self.showAnswerEase1 = QSpinBox()
- self.showAnswerEase1.setFixedWidth(90)
- self.showAnswerEase1.setMinimum(130)
- self.showAnswerEase1.setMaximum(999999)
- self.showAnswerEase1_button = QPushButton()
- self.showAnswerEase1_button.setFixedWidth(210)
- self.showAnswerEase1_button.clicked.connect(lambda: self.getNewColor("showAnswerEase1", self.showAnswerEase1_button))
- showAnswerEase1_holder = QHBoxLayout()
- showAnswerEase1_holder.addWidget(showAnswerEase1_label)
- showAnswerEase1_holder.addWidget(self.showAnswerEase1)
- showAnswerEase1_holder.addStretch()
- showAnswerEase1_holder.addWidget(self.showAnswerEase1_button)
- showAnswerEase1_box = QGroupBox()
- showAnswerEase1_box.setLayout(showAnswerEase1_holder)
- showAnswerEase2_label = QLabel("Ease from {} to".format(C_showAnswerEase1))
- showAnswerEase2_label.setFixedWidth(120)
- self.showAnswerEase2 = QSpinBox()
- self.showAnswerEase2.setMinimum(130)
- self.showAnswerEase2.setMaximum(999999)
- self.showAnswerEase2.setFixedWidth(90)
- self.showAnswerEase2_button = QPushButton()
- self.showAnswerEase2_button.setFixedWidth(210)
- self.showAnswerEase2_button.clicked.connect(lambda: self.getNewColor("showAnswerEase2", self.showAnswerEase2_button))
- showAnswerEase2_holder = QHBoxLayout()
- showAnswerEase2_holder.addWidget(showAnswerEase2_label)
- showAnswerEase2_holder.addWidget(self.showAnswerEase2)
- showAnswerEase2_holder.addStretch()
- showAnswerEase2_holder.addWidget(self.showAnswerEase2_button)
- showAnswerEase2_box = QGroupBox()
- showAnswerEase2_box.setLayout(showAnswerEase2_holder)
- showAnswerEase3_label = QLabel("Ease from {} to".format(C_showAnswerEase2))
- showAnswerEase3_label.setFixedWidth(120)
- self.showAnswerEase3 = QSpinBox()
- self.showAnswerEase3.setMinimum(130)
- self.showAnswerEase3.setMaximum(999999)
- self.showAnswerEase3.setFixedWidth(90)
- self.showAnswerEase3_button = QPushButton()
- self.showAnswerEase3_button.setFixedWidth(210)
- self.showAnswerEase3_button.clicked.connect(lambda: self.getNewColor("showAnswerEase3", self.showAnswerEase3_button))
- showAnswerEase3_holder = QHBoxLayout()
- showAnswerEase3_holder.addWidget(showAnswerEase3_label)
- showAnswerEase3_holder.addWidget(self.showAnswerEase3)
- showAnswerEase3_holder.addStretch()
- showAnswerEase3_holder.addWidget(self.showAnswerEase3_button)
- showAnswerEase3_box = QGroupBox()
- showAnswerEase3_box.setLayout(showAnswerEase3_holder)
- showAnswerEase4_label = QLabel("Ease from {} to".format(C_showAnswerEase3))
- showAnswerEase4_label.setFixedWidth(120)
- self.showAnswerEase4 = QSpinBox()
- self.showAnswerEase4.setMinimum(130)
- self.showAnswerEase4.setMaximum(999999)
- self.showAnswerEase4.setFixedWidth(90)
- self.showAnswerEase4_button = QPushButton()
- self.showAnswerEase4_button.setFixedWidth(210)
- self.showAnswerEase4_button.clicked.connect(lambda: self.getNewColor("showAnswerEase4", self.showAnswerEase4_button))
- showAnswerEase4_holder = QHBoxLayout()
- showAnswerEase4_holder.addWidget(showAnswerEase4_label)
- showAnswerEase4_holder.addWidget(self.showAnswerEase4)
- showAnswerEase4_holder.addStretch()
- showAnswerEase4_holder.addWidget(self.showAnswerEase4_button)
- showAnswerEase4_box = QGroupBox()
- showAnswerEase4_box.setLayout(showAnswerEase4_holder)
- showAnswerColors_layout = QVBoxLayout()
- showAnswerColors_layout.addWidget(showAnswerEase1_box)
- showAnswerColors_layout.addWidget(showAnswerEase2_box)
- showAnswerColors_layout.addWidget(showAnswerEase3_box)
- showAnswerColors_layout.addWidget(showAnswerEase4_box)
- self.showAnswerColors_box = QGroupBox()
- self.showAnswerColors_box.setLayout(showAnswerColors_layout)
- def showAnswerType_signal():
- self.showAnswerColors_box.setEnabled(True)
- if self.showAnswerBorderColor_style.currentIndex() == 0:
- self.showAnswerColors_box.setDisabled(True)
- showAnswerType_signal()
- self.showAnswerBorderColor_style.currentIndexChanged.connect(showAnswerType_signal)
- layout = QVBoxLayout()
- layout.addWidget(self.custom_reviewButtonColors)
- layout.addLayout(reviewButtonTextColor_activeIndicatorColor_line)
- layout.addLayout(bottobarButtonTextColor_bottombarButtonBorderColor_line)
- layout.addWidget(self.showAnswerColors_box)
- layout.addStretch()
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab7 = QScrollArea()
- #// I use this part to control the initial settings menu width -_-
- self.tab7.setFixedWidth(645)
- self.tab7.setAlignment(Qt.AlignHCenter)
- self.tab7.setWidgetResizable(True)
- self.tab7.setWidget(layout_holder)
-
- def createEighthTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- overViewStats_label = QLabel("More Overview Stats:")
- overViewStats_label.setToolTip("{0}Shows number of new, learn and review cards for today and\
- tomorrow and show total number of new, review, learn, buried and suspended cards on deck overview\
- if enabled.{1}".format(begin, end))
- overViewStats_label.setFixedWidth(180)
- self.overViewStats = QComboBox()
- self.overViewStats.addItems(["Stock", "Stock-ish", "Detailed"])
- self.overViewStats.setFixedWidth(150)
- overViewStats_holder = QHBoxLayout()
- overViewStats_holder.addWidget(overViewStats_label)
- overViewStats_holder.addWidget(self.overViewStats)
- overViewStats_holder.addStretch()
- settingsMenuPlace_label = QLabel("Settings Menu Placement:")
- settingsMenuPlace_label.setToolTip("{0}Changes the position of settings menu.{1}".format(begin, end))
- settingsMenuPlace_label.setFixedWidth(180)
- self.settingsMenu_place = QComboBox()
- self.settingsMenu_place.addItems(["Main Toolbar", "Tools Menu"])
- self.settingsMenu_place.setFixedWidth(150)
- settingsMenuPlace_holder = QHBoxLayout()
- settingsMenuPlace_holder.addWidget(settingsMenuPlace_label)
- settingsMenuPlace_holder.addWidget(self.settingsMenu_place)
- settingsMenuPlace_holder.addStretch()
- skipMethod_label = QLabel("Skip Method:")
- skipMethod_label.setToolTip("{0}Changes Skip method.\n\"Next Card\" just skips the card and the skipped cards will be shown again randomly\
- while \"Bury\" bureis the skipped cards and the skipped cards will get unburied when you finish reviewing normal cards. You\
- can manually unbury skipped cards by pressing the \"Show Skipped\" button or by pressing the shortcut key that you've chosen for the button.{1}".format(begin, end))
- skipMethod_label.setFixedWidth(180)
- self.skipMethod = QComboBox()
- self.skipMethod.addItems(["Next Card", "Bury"])
- self.skipMethod.setFixedWidth(150)
- skipMethod_holder = QHBoxLayout()
- skipMethod_holder.addWidget(skipMethod_label)
- skipMethod_holder.addWidget(self.skipMethod)
- skipMethod_holder.addStretch()
- skipMethod_box = QVBoxLayout()
- skipMethod_box.addLayout(overViewStats_holder)
- skipMethod_box.addLayout(settingsMenuPlace_holder)
- skipMethod_box.addLayout(skipMethod_holder)
- general_box = QGroupBox()
- general_box.setLayout(skipMethod_box)
- buttonColors_label = QLabel("Button Colors:")
- buttonColors_label.setToolTip("{0} Enables and disables change button color.<hr> If you use\
- any other add-on to change review button colors, turn this off and you can\
- use other functions of this add-on without using this add-on to change\
- review button colors.<hr> This should be enabled for options Review Button\
- Background Shadow, Button Style, Change Style, Review Active Button Indicator\
- and Review Buttons Width to work. {1}".format(begin, end, images))
- buttonColors_label.setFixedWidth(180)
- self.buttonColors_on = QRadioButton("On")
- self.buttonColors_on.setToolTip("{0} Enabled -> Buttons are styled by this\
- add-on. <br><img src='{2}/buttonColors_on.png'>{1}".format(begin, end, images))
- self.buttonColors_on.setFixedWidth(90)
- self.buttonColors_off = QRadioButton("Off")
- self.buttonColors_off.setToolTip("{0} Disabled -> Buttons are\
- not styled by this add-on and since there is no other add-on styling them,\
- they are in default mode.<hr><img src='{2}/buttonColors_off.png'>{1}".format(begin, end, images))
- self.buttonColors_off.setFixedWidth(90)
- buttonColors_holder = QHBoxLayout()
- buttonColors_holder.addWidget(buttonColors_label)
- buttonColors_holder.addWidget(self.buttonColors_on)
- buttonColors_holder.addWidget(self.buttonColors_off)
- buttonColors_holder.addStretch()
- buttonColors_box = QGroupBox()
- buttonColors_box.setLayout(buttonColors_holder)
- speedFocus_label = QLabel("Speed Focus Add-on:")
- speedFocus_label.setToolTip("{0} Removes the conflict with speed focus add-on so you can\
- use this add-on on speed focus add-on at the same time without having issues.<hr>\
- Don't forget to disable this option when you don't want to use speed focus add-on,\
- otherwise this add-on will automatically reveal the answer after the time\
- you set on speed focus add-on is passed.<hr> DON'T ENABLE THIS IF YOU DON'T\
- HAVE SPEED FOCUS ADD-ON. {1}".format(begin, end))
- speedFocus_label.setFixedWidth(180)
- self.speedFocus_on = QRadioButton("On")
- self.speedFocus_on.setFixedWidth(90)
- self.speedFocus_off = QRadioButton("Off")
- self.speedFocus_off.setFixedWidth(90)
- speedFocus_holder = QHBoxLayout()
- speedFocus_holder.addWidget(speedFocus_label)
- speedFocus_holder.addWidget(self.speedFocus_on)
- speedFocus_holder.addWidget(self.speedFocus_off)
- speedFocus_holder.addStretch()
- speedFocus_box = QGroupBox()
- speedFocus_box.setLayout(speedFocus_holder)
- configEdit_label = QLabel("Direct Config Edit:")
- configEdit_label.setToolTip("{0} Enables direct config editor.\
- If you enable this option, clicking on \"Config\" in add-ons window\
- won't open ARBb settings window and will open the config editor instead.{1}".format(begin, end))
- configEdit_label.setFixedWidth(180)
- self.configEdit_on = QRadioButton("On")
- self.configEdit_on.setFixedWidth(90)
- self.configEdit_off = QRadioButton("Off")
- self.configEdit_off.setFixedWidth(90)
- configEdit_holder = QHBoxLayout()
- configEdit_holder.addWidget(configEdit_label)
- configEdit_holder.addWidget(self.configEdit_on)
- configEdit_holder.addWidget(self.configEdit_off)
- configEdit_holder.addStretch()
- configEdit_box = QGroupBox()
- configEdit_box.setLayout(configEdit_holder)
- layout = QVBoxLayout()
- layout.addWidget(general_box)
- layout.addWidget(buttonColors_box)
- layout.addWidget(speedFocus_box)
- layout.addWidget(configEdit_box)
- layout.addStretch()
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab8 = QScrollArea()
- self.tab8.setFixedWidth(640)
- self.tab8.setAlignment(Qt.AlignHCenter)
- self.tab8.setWidgetResizable(True)
- self.tab8.setWidget(layout_holder)
- self.tab1.setDisabled(True)
- if self.buttonColors_on.isChecked():
- self.tab1.setEnabled(True)
- self.buttonColors_on.toggled.connect(self.tab1.setEnabled)
-
- def createNinthTab(self):
- begin = self.begin
- end = self.end
- images = self.images
- about_text = """
- <div class="None">
- <font color="tomato">Don't know what each option does?<br></font>
- hover over the title and you'll see a brief description about that option <br><br>
-
- <font color="tomato">Wanna see what each design is like withot having to restart anki?<br></font>
- by hovering over options in front of titles, if the option is related to styling buttons<br>
- or changing how something looks like, you'll see pictures showing you what each option looks like<br>
- Hovering over them won't show you the animations, if the buttons are animated<br><br><br>
-
- <font color="tomato">Have an idea for a new feature?<br></font>
- Feel free to tell me in comment section on <a href="https://ankiweb.net/shared/info/1136455830">Add-on's Page</a> or <a href="mailto:[email protected]">Email me</a><br><br>
-
- <font color="tomato">Saw a cool button design somewhere?<br></font>
- senf me a link to where you saw that design, i'll try to replicate that design<br>
- and put it on the add-on as and option for you to choose<br>
- <a href="https://ankiweb.net/shared/info/1136455830">Add-on's Page</a> or <a href="mailto:[email protected]">my Email</a><br><br>
-
- <font color="tomato">Encountered a bug or some part is not acting how it's supposed to?<br></font>
- Tell me what your settings were on add-on, what's your anki version or if anki showed you an error log,<br>
- copy the error log and comment it on <a href="https://ankiweb.net/shared/info/1136455830">Add-on's Page</a> or or <a href="mailto:[email protected]">Email me</a> <br>
- (the more information you give me,<br>
- the sooner i find out what's causing the problem and i fix the bug)<br><br>
-
- <font color="tomato">Like the add-on?<br></font>
- Give it a like on <a href="https://ankiweb.net/shared/review/1136455830">Add-on's Page</a>
- </div>
- """
- about = QLabel()
- about.setText(about_text)
- about.setOpenExternalLinks(True)
- about_scroll = QScrollArea()
- about_scroll.setWidget(about)
- changeLog_window = QDialog()
- changeLog_window.setWindowFlags(Qt.WindowCloseButtonHint | Qt.WindowMaximizeButtonHint | Qt.WindowMinimizeButtonHint)
- changeLog_window.setWindowTitle("Changelog")
- changeLog_window.setWindowIcon(QIcon(images + "\icon.png"))
- changeLog_button = QPushButton("Show Changelog")
- self.changeLog_webView = QWebEngineView()
- self.loadChaneLog()
- changeLog_layout = QVBoxLayout()
- changeLog_layout.addWidget(self.changeLog_webView)
- changeLog_window.setLayout(changeLog_layout)
- changeLog_button.clicked.connect(lambda: changeLog_window.exec_())
- layout = QVBoxLayout()
- layout.addWidget(about_scroll)
- layout.addWidget(changeLog_button)
- layout_holder = QWidget()
- layout_holder.setLayout(layout)
- self.tab9 = QScrollArea()
- self.tab9.setAlignment(Qt.AlignHCenter)
- self.tab9.setWidgetResizable(True)
- self.tab9.setWidget(layout_holder)
-
- def loadChaneLog(self):
- #// For some weird reason, using dirname(__file__) inside the .format() thingy doesn't seem to be working on macOS
- #// Can't confirm tho -_- since I can't test my add-on on mac
- addon_path = dirname(__file__)
- file = "{}/changelog.html".format(addon_path)
- with open(file, 'r') as f:
- html = f.read()
- self.changeLog_webView.setHtml(html)
-
- def loadCurrent(self):
- self.button_style.setCurrentIndex(C_button_style)
- self.bottombarButtons_style.setCurrentIndex(C_bottombarButtons_style)
- self.hover_effect.setCurrentIndex(C_hover_effect)
- self.active_indicator.setCurrentIndex(C_active_indicator)
- self.cursor_style.setCurrentIndex(C_cursor_style)
- self.interval_style.setCurrentIndex(C_interval_style)
- self.showAnswerBorderColor_style.setCurrentIndex(C_showAnswerBorderColor_style)
- self.buttonTransition_time.setValue(int(C_buttonTransition_time))
- self.buttonBorderRadius.setValue(int(C_buttonBorderRadius))
- if C_style_mainScreenButtons:
- self.style_mainScreenButtons.setChecked(True)
- if C_reviewTooltip:
- self.reviewTooltip_on.setChecked(True)
- else:
- self.reviewTooltip_off.setChecked(True)
- self.reviewTooltip_style.setCurrentIndex(C_reviewTooltip_style)
- self.reviewTooltip_timer.setValue(int(C_reviewTooltip_timer))
- self.changeButtonColor(self.reviewTooltipTextColor_button, C_reviewTooltipText_color)
- self.reviewTooltipPositionX.setValue(int(C_reviewTooltip_position[0]))
- self.reviewTooltipPositionY.setValue(int(C_reviewTooltip_position[1]))
- if C_info:
- self.info.setChecked(True)
- if C_skip:
- self.skip.setChecked(True)
- if C_showSkipped:
- self.showSkipped.setChecked(True)
- if C_undo:
- self.undo.setChecked(True)
- if C_hideHard:
- self.hideHard.setChecked(True)
- if C_hideGood:
- self.hideGood.setChecked(True)
- if C_hideEasy:
- self.hideEasy.setChecked(True)
- if C_right_info:
- self.right_info.setChecked(True)
- elif C_middleRight_info:
- self.middleRight_info.setChecked(True)
- elif C_middleLeft_info:
- self.middleLeft_info.setChecked(True)
- else:
- self.left_info.setChecked(True)
- if C_right_skip:
- self.right_skip.setChecked(True)
- elif C_middleRight_skip:
- self.middleRight_skip.setChecked(True)
- elif C_middleLeft_skip:
- self.middleLeft_skip.setChecked(True)
- else:
- self.left_skip.setChecked(True)
- if C_right_showSkipped:
- self.right_showSkipped.setChecked(True)
- elif C_middleRight_showSkipped:
- self.middleRight_showSkipped.setChecked(True)
- elif C_middleLeft_showSkipped:
- self.middleLeft_showSkipped.setChecked(True)
- else:
- self.left_showSkipped.setChecked(True)
- if C_right_undo:
- self.right_undo.setChecked(True)
- elif C_middleRight_undo:
- self.middleRight_undo.setChecked(True)
- elif C_middleLeft_undo:
- self.middleLeft_undo.setChecked(True)
- else:
- self.left_undo.setChecked(True)
- self.infoShortcut_button.setText("Change Shortcut (Current: {})".format(C_info_shortcut))
- self.skipShortcut_button.setText("Change Shortcut (Current: {})".format(C_skip_shortcut))
- self.showSkippedShortcut_button.setText("Change Shortcut (Current: {})".format(C_showSkipped_shortcut))
- self.undoShortcut_button.setText("Change Shortcut (Current: {})".format(C_undo_shortcut))
- if C_custom_sizes:
- self.customSizes_on.setChecked(True)
- else:
- self.customSizes_off.setChecked(True)
- self.text_size.setValue(int(C_text_size))
- self.buttons_height.setValue(int(C_buttons_height))
- self.reviewButtons_width.setValue(int(C_reviewButtons_width))
- self.edit_width.setValue(int(C_edit_width))
- self.answer_width.setValue(int(C_answer_width))
- self.more_width.setValue(int(C_more_width))
- self.info_width.setValue(int(C_info_width))
- self.skip_width.setValue(int(C_skip_width))
- self.showSkipped_width.setValue(int(C_showSkipped_width))
- self.undo_width.setValue(int(C_undo_width))
- self.buttonLabel_studyNow.setText(C_buttonLabel_studyNow)
- self.buttonLabel_edit.setText(C_buttonLabel_edit)
- self.buttonLabel_showAnswer.setText(C_buttonLabel_showAnswer)
- self.buttonLabel_more.setText(C_buttonLabel_more)
- self.buttonLabel_info.setText(C_buttonLabel_info)
- self.buttonLabel_skip.setText(C_buttonLabel_skip)
- self.buttonLabel_showSkipped.setText(C_buttonLabel_showSkipped)
- self.buttonLabel_undo.setText(C_buttonLabel_undo)
- self.buttonLabel_again.setText(C_buttonLabel_again)
- self.buttonLabel_hard.setText(C_buttonLabel_hard)
- self.buttonLabel_good.setText(C_buttonLabel_good)
- self.buttonLabel_easy.setText(C_buttonLabel_easy)
- self.sidebar_position.setCurrentIndex(C_sidebar_position)
- self.sidebar_theme.setCurrentIndex(C_sidebar_theme)
- self.sidebar_font.setCurrentFont(QFont(C_sidebar_font))
- self.sidebar_PreviousCards.setValue(int(C_sidebar_PreviousCards))
- self.sidebar_reviewsToShow.setValue(int(C_sidebar_reviewsToShow))
- if C_sidebar_currentReviewCount:
- self.sidebar_currentReviewCount.setChecked(True)
- if C_sidebar_dateCreated:
- self.sidebar_dateCreated.setChecked(True)
- if C_sidebar_dateEdited:
- self.sidebar_dateEdited.setChecked(True)
- if C_sidebar_firstReview:
- self.sidebar_firstReview.setChecked(True)
- if C_sidebar_latestReview:
- self.sidebar_latestReview.setChecked(True)
- if C_sidebar_due:
- self.sidebar_due.setChecked(True)
- if C_sidebar_interval:
- self.sidebar_interval.setChecked(True)
- if C_sidebar_ease:
- self.sidebar_ease.setChecked(True)
- if C_sidebar_numberOfReviews:
- self.sidebar_numberOfReviews.setChecked(True)
- if C_sidebar_lapses:
- self.sidebar_lapses.setChecked(True)
- if C_sidebar_averageTime:
- self.sidebar_averageTime.setChecked(True)
- if C_sidebar_totalTime:
- self.sidebar_totalTime.setChecked(True)
- if C_sidebar_cardType:
- self.sidebar_cardType.setChecked(True)
- if C_sidebar_noteType:
- self.sidebar_noteType.setChecked(True)
- if C_sidebar_deck:
- self.sidebar_deck.setChecked(True)
- if C_sidebar_tags:
- self.sidebar_tags.setChecked(True)
- if C_sidebar_sortField:
- self.sidebar_sortField.setChecked(True)
- if C_sidebar_warningNote:
- self.sidebar_warningNote.setChecked(True)
- if C_infobar_correctPercent:
- self.sidebar_correctPercent.setChecked(True)
- if C_infobar_fastestReview:
- self.sidebar_fastestReview.setChecked(True)
- if C_infobar_slowestReview:
- self.sidebar_slowestReview.setChecked(True)
- if C_infobar_noteID:
- self.sidebar_noteID.setChecked(True)
- if C_infobar_cardID:
- self.sidebar_cardID.setChecked(True)
- if C_sidebar_autoOpen:
- self.sidebar_autoOpen.setChecked(True)
- if C_custom_reviewButtonColors:
- self.custom_reviewButtonColors.setChecked(True)
- if C_custom_reviewButtonTextColor:
- self.custom_reviewButtonTextColor.setChecked(True)
- if C_custom_activeIndicatorColor:
- self.custom_activeIndicatorColor.setChecked(True)
- if C_custom_bottombarButtonTextColor:
- self.custom_bottombarButtonTextColor.setChecked(True)
- if C_custom_bottombarButtonBorderColor:
- self.custom_bottombarButtonBorderColor.setChecked(True)
- self.changeButtonColor(self.reviewButtonTextColor_button, C_reviewButtonText_color)
- self.changeButtonColor(self.activeIndicatorColor_button, C_activeIndicator_color)
- self.changeButtonColor(self.bottombarButtonTextColor_button, C_bottombarButtonText_color)
- self.changeButtonColor(self.bottombarButtonBorderColor_button, C_bottombarButtonBorder_color)
- self.changeButtonColor(self.againColor_button, C_again_color)
- self.changeButtonColor(self.againHoverColor_button, C_againHover_color)
- self.changeButtonColor(self.hardColor_button, C_hard_color)
- self.changeButtonColor(self.hardHoverColor_button, C_hardHover_color)
- self.changeButtonColor(self.goodColor_button, C_good_color)
- self.changeButtonColor(self.goodHoverColor_button, C_goodHover_color)
- self.changeButtonColor(self.easyColor_button, C_easy_color)
- self.changeButtonColor(self.easyHoverColor_button, C_easyHover_color)
- self.showAnswerEase1.setValue(int(C_showAnswerEase1))
- self.showAnswerEase2.setValue(int(C_showAnswerEase2))
- self.showAnswerEase3.setValue(int(C_showAnswerEase3))
- self.showAnswerEase4.setValue(int(C_showAnswerEase4))
- self.changeButtonColor(self.showAnswerEase1_button, C_showAnswerEase1_color)
- self.changeButtonColor(self.showAnswerEase2_button, C_showAnswerEase2_color)
- self.changeButtonColor(self.showAnswerEase3_button, C_showAnswerEase3_color)
- self.changeButtonColor(self.showAnswerEase4_button, C_showAnswerEase4_color)
- if C_button_colors:
- self.buttonColors_on.setChecked(True)
- else:
- self.buttonColors_off.setChecked(True)
- if C_speedFocus:
- self.speedFocus_on.setChecked(True)
- else:
- self.speedFocus_off.setChecked(True)
- if C_configEdit:
- self.configEdit_on.setChecked(True)
- else:
- self.configEdit_off.setChecked(True)
- self.overViewStats.setCurrentIndex(C_overViewStats)
- self.settingsMenu_place.setCurrentIndex(C_settingsMenu_palce)
- self.skipMethod.setCurrentIndex(C_skipMethod)
-
- def onLoadSettings(self):
- addon_path = dirname(__file__)
- #// Open a file browser to choose the settings file (returns a tuple) the first item in the tuple is the settings file location
- fileName_tuple = QFileDialog.getOpenFileName(self, 'Open file', r'{}\user_files'.format(addon_path))
- #// If user cancels the operation and no file is chosen, then return without doing anything
- if not fileName_tuple[0]:
- return
- #// Select the settings file from the tuple
- settingsFile = fileName_tuple[0]
- #// Open and read the JSON File
- settings = open("{}".format(settingsFile), "r")
- conf = json.load(settings)
- settingsFile_name = os.path.basename(settingsFile)
- load = askUser("Replace current settings with settings file <{}>?".format(settingsFile_name), self, None, defaultno=True, title="Advanced Review Bottomabr")
- if load:
- mw.addonManager.writeConfig(__name__, conf)
- showInfo("<div style='font-size: 15px;'>Settings Loaded Succesfully.\
- </div><div style='color: red; font-size: 15px;'> Changes will take \
- effect after you restart anki.</div>", title="Advanced Review Bottombar Settings")
- self.close()
- refreshConfig()
- else:
- return
- settings.close()
-
- def onSaveSettings(self):
- addon_path = dirname(__file__)
- #// Choose a name for the backup file
- file_name = "ARBb {}".format(datetime.now().strftime("%d-%b-%Y %H-%M-%S"))
- path_to_file = "{}\\user_files\\{}.json".format(addon_path, file_name)
- f = open(path_to_file, "w")
-
- if self.left_skip.isChecked():
- skip_position = "left"
- elif self.middleRight_skip.isChecked():
- skip_position ="middle right"
- elif self.right_skip.isChecked():
- skip_position ="right"
- else:
- skip_position = "middle left"
- if self.left_showSkipped.isChecked():
- showSkipped_position = "left"
- elif self.middleRight_showSkipped.isChecked():
- showSkipped_position ="middle right"
- elif self.right_showSkipped.isChecked():
- showSkipped_position ="right"
- else:
- showSkipped_position = "middle left"
- if self.middleLeft_info.isChecked():
- info_position = "middle left"
- elif self.middleRight_info.isChecked():
- info_position = "middle right"
- elif self.right_info.isChecked():
- info_position = "right"
- else:
- info_position = "left"
- if self.left_undo.isChecked():
- undo_position = "left"
- elif self.middleLeft_undo.isChecked():
- undo_position = "middle left"
- elif self.right_undo.isChecked():
- undo_position = "right"
- else:
- undo_position = "middle right"
- if self.showAnswerEase1.value() > self.showAnswerEase2.value():
- self.showAnswerEase2.setValue((self.showAnswerEase1.value() + 50))
- if self.showAnswerEase2.value() > self.showAnswerEase3.value():
- self.showAnswerEase3.setValue((self.showAnswerEase2.value() + 50))
- if self.showAnswerEase3.value() > self.showAnswerEase4.value():
- self.showAnswerEase4.setValue((self.showAnswerEase3.value() + 50))
- conf = {
- " Button Colors": self.buttonColors_on.isChecked(),
- " Speed Focus Add-on": self.speedFocus_on.isChecked(),
- " Direct Config Edit": self.configEdit_on.isChecked(),
- " More Overview Stats": self.overViewStats.currentIndex(),
- " Settings Menu Place": self.settingsMenu_place.currentIndex(),
- " Skip Method": self.skipMethod.currentIndex(),
- " Style Main Screen Buttons": self.style_mainScreenButtons.isChecked(),
- " Review_ Active Button Indicator": self.active_indicator.currentIndex(),
- " Review_ Buttons Style": self.button_style.currentIndex(),
- " Review_ Hover Effect": self.hover_effect.currentIndex(),
- " Review_ Custom Colors": self.custom_reviewButtonColors.isChecked(),
- " Review_ Custom Review Button Text Color": self.custom_reviewButtonTextColor.isChecked(),
- " Review_ Custom Active Indicator Color": self.custom_activeIndicatorColor.isChecked(),
- " Review_ Bottombar Buttons Style": self.bottombarButtons_style.currentIndex(),
- " Review_ Cursor Style": self.cursor_style.currentIndex(),
- " Review_ Interval Style": self.interval_style.currentIndex(),
- " Review_ Button Transition Time": self.buttonTransition_time.value(),
- " Review_ Button Border Radius": self.buttonBorderRadius.value(),
- "Button_ Info Button": self.info.isChecked(),
- "Button_ Skip Button": self.skip.isChecked(),
- "Button_ Show Skipped Button": self.showSkipped.isChecked(),
- "Button_ Undo Button": self.undo.isChecked(),
- "Button_ Hide Hard": self.hideHard.isChecked(),
- "Button_ Hide Good": self.hideGood.isChecked(),
- "Button_ Hide Easy": self.hideEasy.isChecked(),
- "Button_ Custom Button Sizes": self.customSizes_on.isChecked(),
- "Button_ Shortcut_ Skip Button": self.skip_shortcut,
- "Button_ Shortcut_ Show Skipped Button": self.showSkipped_shortcut,
- "Button_ Shortcut_ Info Button": self.info_shortcut,
- "Button_ Shortcut_ Undo Button": self.undo_shortcut,
- "Button_ Position_ Info Button": info_position,
- "Button_ Position_ Skip Button": skip_position,
- "Button_ Position_ Show Skipped Button": showSkipped_position,
- "Button_ Position_ Undo Button": undo_position,
- "Button_ Text Size": self.text_size.value(),
- "Button_ Height_ All Bottombar Buttons": self.buttons_height.value(),
- "Button_ Width_ Edit Button": self.edit_width.value(),
- "Button_ Width_ Show Answer Button": self.answer_width.value(),
- "Button_ Width_ Info Button": self.info_width.value(),
- "Button_ Width_ Skip Button": self.skip_width.value(),
- "Button_ Width_ Show Skipped Button": self.showSkipped_width.value(),
- "Button_ Width_ More Button": self.more_width.value(),
- "Button_ Width_ Review Buttons": self.reviewButtons_width.value(),
- "Button_ Width_ Undo Button": self.undo_width.value(),
- "Button Label_ Study Now": self.buttonLabel_studyNow.text(),
- "Button Label_ Edit": self.buttonLabel_edit.text(),
- "Button Label_ Show Answer": self.buttonLabel_showAnswer.text(),
- "Button Label_ More": self.buttonLabel_more.text(),
- "Button Label_ Info": self.buttonLabel_info.text(),
- "Button Label_ Skip": self.buttonLabel_skip.text(),
- "Button Label_ Show Skipped": self.buttonLabel_showSkipped.text(),
- "Button Label_ Undo": self.buttonLabel_undo.text(),
- "Button Label_ Again": self.buttonLabel_again.text(),
- "Button Label_ Hard": self.buttonLabel_hard.text(),
- "Button Label_ Good": self.buttonLabel_good.text(),
- "Button Label_ Easy": self.buttonLabel_easy.text(),
- "Card Info sidebar_ Number of previous cards to show": self.sidebar_PreviousCards.value(),
- "Card Info sidebar_ Default Position": self.sidebar_position.currentIndex(),
- "Card Info sidebar_ theme": self.sidebar_theme.currentIndex(),
- "Card Info sidebar_ Created": self.sidebar_dateCreated.isChecked(),
- "Card Info sidebar_ Edited": self.sidebar_dateEdited.isChecked(),
- "Card Info sidebar_ First Review": self.sidebar_firstReview.isChecked(),
- "Card Info sidebar_ Latest Review": self.sidebar_latestReview.isChecked(),
- "Card Info sidebar_ Due": self.sidebar_due.isChecked(),
- "Card Info sidebar_ Interval": self.sidebar_interval.isChecked(),
- "Card Info sidebar_ Ease": self.sidebar_ease.isChecked(),
- "Card Info sidebar_ Reviews": self.sidebar_numberOfReviews.isChecked(),
- "Card Info sidebar_ Lapses": self.sidebar_lapses.isChecked(),
- "Card Info Sidebar_ Correct Percent": self.sidebar_correctPercent.isChecked(),
- "Card Info Sidebar_ Fastest Review": self.sidebar_fastestReview.isChecked(),
- "Card Info Sidebar_ Slowest Review": self.sidebar_slowestReview.isChecked(),
- "Card Info sidebar_ Average Time": self.sidebar_averageTime.isChecked(),
- "Card Info sidebar_ Total Time": self.sidebar_totalTime.isChecked(),
- "Card Info sidebar_ Card Type": self.sidebar_cardType.isChecked(),
- "Card Info sidebar_ Note Type": self.sidebar_noteType.isChecked(),
- "Card Info sidebar_ Deck": self.sidebar_deck.isChecked(),
- "Card Info sidebar_ Tags": self.sidebar_tags.isChecked(),
- "Card Info Sidebar_ Note ID": self.sidebar_noteID.isChecked(),
- "Card Info Sidebar_ Card ID": self.sidebar_cardID.isChecked(),
- "Card Info sidebar_ Sort Field": self.sidebar_sortField.isChecked(),
- "Card Info sidebar_ Current Review Count": self.sidebar_currentReviewCount.isChecked(),
- "Card Info sidebar_ Font": self.sidebar_font.currentFont().family(),
- "Card Info sidebar_ number of reviews to show for a card": self.sidebar_reviewsToShow.value(),
- "Card Info sidebar_ Auto Open": self.sidebar_autoOpen.isChecked(),
- "Card Info sidebar_ warning note": self.sidebar_warningNote.isChecked(),
- "Color_ General Text Color": self.reviewButtonText_color,
- "Color_ Active Button Indicator": self.activeIndicator_color,
- "Color_ Bottombar Button Text Color": self.bottombarButtonText_color,
- "Color_ Bottombar Button Border Color": self.bottombarButtonBorder_color,
- "Color_ Custom Bottombar Button Text Color": self.custom_bottombarButtonTextColor.isChecked(),
- "Color_ Custom Bottombar Button Border Color": self.custom_bottombarButtonBorderColor.isChecked(),
- "Color_ Again": self.again_color,
- "Color_ Again on hover": self.againHover_color,
- "Color_ Hard": self.hard_color,
- "Color_ Hard on hover": self.hardHover_color,
- "Color_ Good":self.good_color,
- "Color_ Good on hover": self.goodHover_color,
- "Color_ Easy": self.easy_color,
- "Color_ Easy on hover": self.easyHover_color,
- "Tooltip": self.reviewTooltip_on.isChecked(),
- "Tooltip Timer": self.reviewTooltip_timer.value(),
- "Tooltip Text Color": self.reviewTooltipText_color,
- "Tooltip Style": self.reviewTooltip_style.currentIndex(),
- "Tooltip Position": [self.reviewTooltipPositionX.value(), self.reviewTooltipPositionY.value()],
- "ShowAnswer_ Border Color Style": self.showAnswerBorderColor_style.currentIndex(),
- "ShowAnswer_ Ease1": self.showAnswerEase1.value(),
- "ShowAnswer_ Ease2": self.showAnswerEase2.value(),
- "ShowAnswer_ Ease3": self.showAnswerEase3.value(),
- "ShowAnswer_ Ease4": self.showAnswerEase4.value(),
- "ShowAnswer_ Ease1 Color": self.showAnswerEase1_color,
- "ShowAnswer_ Ease2 Color": self.showAnswerEase2_color,
- "ShowAnswer_ Ease3 Color": self.showAnswerEase3_color,
- "ShowAnswer_ Ease4 Color": self.showAnswerEase4_color
- }
- #// Save settings in a JSON file
- json.dump(conf, f, indent=4)
- #// Open file explorer after saving so users know where the backup file is (and maybe save it somewhere else)
- subprocess.Popen(f'explorer /select, "{path_to_file}"')
- f.close()
-
- def onApply(self):
- if self.left_skip.isChecked():
- skip_position = "left"
- elif self.middleRight_skip.isChecked():
- skip_position ="middle right"
- elif self.right_skip.isChecked():
- skip_position ="right"
- else:
- skip_position = "middle left"
- if self.left_showSkipped.isChecked():
- showSkipped_position = "left"
- elif self.middleRight_showSkipped.isChecked():
- showSkipped_position ="middle right"
- elif self.right_showSkipped.isChecked():
- showSkipped_position ="right"
- else:
- showSkipped_position = "middle left"
- if self.middleLeft_info.isChecked():
- info_position = "middle left"
- elif self.middleRight_info.isChecked():
- info_position = "middle right"
- elif self.right_info.isChecked():
- info_position = "right"
- else:
- info_position = "left"
- if self.left_undo.isChecked():
- undo_position = "left"
- elif self.middleLeft_undo.isChecked():
- undo_position = "middle left"
- elif self.right_undo.isChecked():
- undo_position = "right"
- else:
- undo_position = "middle right"
- if self.showAnswerEase1.value() > self.showAnswerEase2.value():
- self.showAnswerEase2.setValue((self.showAnswerEase1.value() + 50))
- if self.showAnswerEase2.value() > self.showAnswerEase3.value():
- self.showAnswerEase3.setValue((self.showAnswerEase2.value() + 50))
- if self.showAnswerEase3.value() > self.showAnswerEase4.value():
- self.showAnswerEase4.setValue((self.showAnswerEase3.value() + 50))
-
- conf = {
- " Button Colors": self.buttonColors_on.isChecked(),
- " Speed Focus Add-on": self.speedFocus_on.isChecked(),
- " Direct Config Edit": self.configEdit_on.isChecked(),
- " More Overview Stats": self.overViewStats.currentIndex(),
- " Settings Menu Place": self.settingsMenu_place.currentIndex(),
- " Skip Method": self.skipMethod.currentIndex(),
- " Style Main Screen Buttons": self.style_mainScreenButtons.isChecked(),
- " Review_ Active Button Indicator": self.active_indicator.currentIndex(),
- " Review_ Buttons Style": self.button_style.currentIndex(),
- " Review_ Hover Effect": self.hover_effect.currentIndex(),
- " Review_ Custom Colors": self.custom_reviewButtonColors.isChecked(),
- " Review_ Custom Review Button Text Color": self.custom_reviewButtonTextColor.isChecked(),
- " Review_ Custom Active Indicator Color": self.custom_activeIndicatorColor.isChecked(),
- " Review_ Bottombar Buttons Style": self.bottombarButtons_style.currentIndex(),
- " Review_ Cursor Style": self.cursor_style.currentIndex(),
- " Review_ Interval Style": self.interval_style.currentIndex(),
- " Review_ Button Transition Time": self.buttonTransition_time.value(),
- " Review_ Button Border Radius": self.buttonBorderRadius.value(),
- "Button_ Info Button": self.info.isChecked(),
- "Button_ Skip Button": self.skip.isChecked(),
- "Button_ Show Skipped Button": self.showSkipped.isChecked(),
- "Button_ Undo Button": self.undo.isChecked(),
- "Button_ Hide Hard": self.hideHard.isChecked(),
- "Button_ Hide Good": self.hideGood.isChecked(),
- "Button_ Hide Easy": self.hideEasy.isChecked(),
- "Button_ Custom Button Sizes": self.customSizes_on.isChecked(),
- "Button_ Shortcut_ Skip Button": self.skip_shortcut,
- "Button_ Shortcut_ Show Skipped Button": self.showSkipped_shortcut,
- "Button_ Shortcut_ Info Button": self.info_shortcut,
- "Button_ Shortcut_ Undo Button": self.undo_shortcut,
- "Button_ Position_ Info Button": info_position,
- "Button_ Position_ Skip Button": skip_position,
- "Button_ Position_ Show Skipped Button": showSkipped_position,
- "Button_ Position_ Undo Button": undo_position,
- "Button_ Text Size": self.text_size.value(),
- "Button_ Height_ All Bottombar Buttons": self.buttons_height.value(),
- "Button_ Width_ Edit Button": self.edit_width.value(),
- "Button_ Width_ Show Answer Button": self.answer_width.value(),
- "Button_ Width_ Info Button": self.info_width.value(),
- "Button_ Width_ Skip Button": self.skip_width.value(),
- "Button_ Width_ Show Skipped Button": self.showSkipped_width.value(),
- "Button_ Width_ More Button": self.more_width.value(),
- "Button_ Width_ Review Buttons": self.reviewButtons_width.value(),
- "Button_ Width_ Undo Button": self.undo_width.value(),
- "Button Label_ Study Now": self.buttonLabel_studyNow.text(),
- "Button Label_ Edit": self.buttonLabel_edit.text(),
- "Button Label_ Show Answer": self.buttonLabel_showAnswer.text(),
- "Button Label_ More": self.buttonLabel_more.text(),
- "Button Label_ Info": self.buttonLabel_info.text(),
- "Button Label_ Skip": self.buttonLabel_skip.text(),
- "Button Label_ Show Skipped": self.buttonLabel_showSkipped.text(),
- "Button Label_ Undo": self.buttonLabel_undo.text(),
- "Button Label_ Again": self.buttonLabel_again.text(),
- "Button Label_ Hard": self.buttonLabel_hard.text(),
- "Button Label_ Good": self.buttonLabel_good.text(),
- "Button Label_ Easy": self.buttonLabel_easy.text(),
- "Card Info sidebar_ Number of previous cards to show": self.sidebar_PreviousCards.value(),
- "Card Info sidebar_ Default Position": self.sidebar_position.currentIndex(),
- "Card Info sidebar_ theme": self.sidebar_theme.currentIndex(),
- "Card Info sidebar_ Created": self.sidebar_dateCreated.isChecked(),
- "Card Info sidebar_ Edited": self.sidebar_dateEdited.isChecked(),
- "Card Info sidebar_ First Review": self.sidebar_firstReview.isChecked(),
- "Card Info sidebar_ Latest Review": self.sidebar_latestReview.isChecked(),
- "Card Info sidebar_ Due": self.sidebar_due.isChecked(),
- "Card Info sidebar_ Interval": self.sidebar_interval.isChecked(),
- "Card Info sidebar_ Ease": self.sidebar_ease.isChecked(),
- "Card Info sidebar_ Reviews": self.sidebar_numberOfReviews.isChecked(),
- "Card Info sidebar_ Lapses": self.sidebar_lapses.isChecked(),
- "Card Info Sidebar_ Correct Percent": self.sidebar_correctPercent.isChecked(),
- "Card Info Sidebar_ Fastest Review": self.sidebar_fastestReview.isChecked(),
- "Card Info Sidebar_ Slowest Review": self.sidebar_slowestReview.isChecked(),
- "Card Info sidebar_ Average Time": self.sidebar_averageTime.isChecked(),
- "Card Info sidebar_ Total Time": self.sidebar_totalTime.isChecked(),
- "Card Info sidebar_ Card Type": self.sidebar_cardType.isChecked(),
- "Card Info sidebar_ Note Type": self.sidebar_noteType.isChecked(),
- "Card Info sidebar_ Deck": self.sidebar_deck.isChecked(),
- "Card Info sidebar_ Tags": self.sidebar_tags.isChecked(),
- "Card Info Sidebar_ Note ID": self.sidebar_noteID.isChecked(),
- "Card Info Sidebar_ Card ID": self.sidebar_cardID.isChecked(),
- "Card Info sidebar_ Sort Field": self.sidebar_sortField.isChecked(),
- "Card Info sidebar_ Current Review Count": self.sidebar_currentReviewCount.isChecked(),
- "Card Info sidebar_ Font": self.sidebar_font.currentFont().family(),
- "Card Info sidebar_ number of reviews to show for a card": self.sidebar_reviewsToShow.value(),
- "Card Info sidebar_ Auto Open": self.sidebar_autoOpen.isChecked(),
- "Card Info sidebar_ warning note": self.sidebar_warningNote.isChecked(),
- "Color_ General Text Color": self.reviewButtonText_color,
- "Color_ Active Button Indicator": self.activeIndicator_color,
- "Color_ Bottombar Button Text Color": self.bottombarButtonText_color,
- "Color_ Bottombar Button Border Color": self.bottombarButtonBorder_color,
- "Color_ Custom Bottombar Button Text Color": self.custom_bottombarButtonTextColor.isChecked(),
- "Color_ Custom Bottombar Button Border Color": self.custom_bottombarButtonBorderColor.isChecked(),
- "Color_ Again": self.again_color,
- "Color_ Again on hover": self.againHover_color,
- "Color_ Hard": self.hard_color,
- "Color_ Hard on hover": self.hardHover_color,
- "Color_ Good":self.good_color,
- "Color_ Good on hover": self.goodHover_color,
- "Color_ Easy": self.easy_color,
- "Color_ Easy on hover": self.easyHover_color,
- "Tooltip": self.reviewTooltip_on.isChecked(),
- "Tooltip Timer": self.reviewTooltip_timer.value(),
- "Tooltip Text Color": self.reviewTooltipText_color,
- "Tooltip Style": self.reviewTooltip_style.currentIndex(),
- "Tooltip Position": [self.reviewTooltipPositionX.value(), self.reviewTooltipPositionY.value()],
- "ShowAnswer_ Border Color Style": self.showAnswerBorderColor_style.currentIndex(),
- "ShowAnswer_ Ease1": self.showAnswerEase1.value(),
- "ShowAnswer_ Ease2": self.showAnswerEase2.value(),
- "ShowAnswer_ Ease3": self.showAnswerEase3.value(),
- "ShowAnswer_ Ease4": self.showAnswerEase4.value(),
- "ShowAnswer_ Ease1 Color": self.showAnswerEase1_color,
- "ShowAnswer_ Ease2 Color": self.showAnswerEase2_color,
- "ShowAnswer_ Ease3 Color": self.showAnswerEase3_color,
- "ShowAnswer_ Ease4 Color": self.showAnswerEase4_color
- }
- mw.addonManager.writeConfig(__name__, conf)
- showInfo("<div style='color: red;\
- font-size: 15px;'> Changes will take effect after you restart anki. </div>\
- <div style='font-size: 15px;'> Sidebar changes will take effect immediately.\
- </div>", title="Advanced Review Bottombar Settings")
- refreshConfig()
- self.close()
-
- def getNewColor(self, color_variable, color_button):
- color_window = QColorDialog()
- color = color_window.getColor()
- if color.isValid():
- color = color.name()
- if color_variable == "again_color":
- self.again_color = color
- elif color_variable == "againHover_color":
- self.againHover_color = color
- elif color_variable == "hard_color":
- self.hard_color = color
- elif color_variable == "hardHover_color":
- self.hardHover_color = color
- elif color_variable == "good_color":
- self.good_color = color
- elif color_variable == "goodHover_color":
- self.goodHover_color = color
- elif color_variable == "easy_color":
- self.easy_color = color
- elif color_variable == "easyHover_color":
- self.easyHover_color = color
- elif color_variable == "reviewButtonText_color":
- self.reviewButtonText_color = color
- elif color_variable == "activeIndicator_color":
- self.activeIndicator_color = color
- elif color_variable == "reviewTooltipText_color":
- self.reviewTooltipText_color = color
- elif color_variable == "bottombarButtonText_color":
- self.bottombarButtonText_color = color
- elif color_variable == "bottombarButtonBorder_color":
- self.bottombarButtonBorder_color = color
- elif color_variable == "showAnswerEase1":
- self.showAnswerEase1_color = color
- elif color_variable == "showAnswerEase2":
- self.showAnswerEase2_color = color
- elif color_variable == "showAnswerEase3":
- self.showAnswerEase3_color = color
- elif color_variable == "showAnswerEase4":
- self.showAnswerEase4_color = color
- self.changeButtonColor(color_button, color)
-
- def changeButtonColor(self, button, color):
- pixmap = QPixmap(95, 18)
- qcolour = QColor(0, 0, 0)
- qcolour.setNamedColor(color)
- pixmap.fill(qcolour)
- button.setIcon(QIcon(pixmap))
- button.setIconSize(QSize(95, 18))
-
- def updateShortcut(self, button_variable, combination=None):
- """Update hotkey label and attribute"""
- if button_variable == "info_shortcut":
- shortcut = combination or self.info_shortcut
- self.infoShortcut_button.setText("Change Shortcut (Current: {})".format(shortcut))
- elif button_variable == "skip_shortcut":
- shortcut = combination or self.skip_shortcut
- self.skipShortcut_button.setText("Change Shortcut (Current: {})".format(shortcut))
- elif button_variable == "showSkipped_shortcut":
- shortcut = combination or self.showSkippedp_shortcut
- self.showSkippedShortcut_button.setText("Change Shortcut (Current: {})".format(shortcut))
- elif button_variable == "undo_shortcut":
- shortcut = combination or self.undo_shortcut
- self.undoShortcut_button.setText("Change Shortcut (Current: {})".format(shortcut))
- else:
- return
-
- if combination:
- if button_variable == "info_shortcut":
- self.info_shortcut = combination
- elif button_variable == "skip_shortcut":
- self.skip_shortcut = combination
- elif button_variable == "showSkipped_shortcut":
- self.showSkipped_shortcut = combination
- elif button_variable == "undo_shortcut":
- self.undo_shortcut = combination
- else:
- return
-
- def showGetShortcut(self, button_variable):
- getShortcut = GetShortcut(self, button_variable)
- getShortcut.exec()
-
-def open_settings():
- settings = SettingsMenu()
- #// For styling settings menu -_-
- # settings.setStyle(QStyleFactory.create("Fusion"))
- settings.exec()
-
-def setupMenu():
- settings = QAction('&Advanced Review Bottombar Settings', mw)
- if C_settingsMenu_palce == 1:
- mw.form.menuTools.addAction(settings)
- else:
- mw.ARBB_menu = QMenu('&ARBb', mw)
- mw.ARBB_menu.addAction(settings)
- mw.form.menubar.insertMenu(mw.form.menuHelp.menuAction(), mw.ARBB_menu)
- settings.triggered.connect(open_settings)
- settings.setShortcut(QKeySequence('Shift+A'))
-setupMenu()
-
-if not C_configEdit:
- mw.addonManager.setConfigAction(__name__, open_settings)
diff --git a/.local/share/Anki2/addons21/advanced_review/Skip.py b/.local/share/Anki2/addons21/advanced_review/Skip.py
deleted file mode 100644
index 47d5d11..0000000
--- a/.local/share/Anki2/addons21/advanced_review/Skip.py
+++ /dev/null
@@ -1,39 +0,0 @@
-
-from aqt import mw
-from aqt import gui_hooks
-from aqt.utils import showInfo
-from aqt.reviewer import Reviewer
-
-#// Bury and mark for unburying
-def burySkipped():
- if hasattr(mw.reviewer, "skipped_cards"):
- mw.reviewer.skipped_cards.append(mw.reviewer.card.id)
- else:
- mw.reviewer.skipped_cards = [mw.reviewer.card.id,]
- mw.checkpoint(_("Bury"))
- mw.col.sched.buryCards([mw.reviewer.card.id])
- mw.reset()
-
-#// Unbury skipped cards
-def unburySkipped():
- allburied = [int(x) for x in mw.col.findCards("is:buried")]
- to_rebury = []
- if allburied:
- for card in allburied:
- if not card in mw.reviewer.skipped_cards:
- to_rebury.append(card)
- del mw.reviewer.skipped_cards
- mw.col.sched.unburyCards()
- if to_rebury:
- mw.col.sched.buryCards(to_rebury)
- mw.reset()
-
-def try_unburySkipped():
- if hasattr(mw.reviewer, "skipped_cards"):
- unburySkipped()
-
-#// Unbury skipped cards upon exiting review screeen
-gui_hooks.reviewer_will_end.append(try_unburySkipped)
-
-def test():
- showInfo("{}".format(mw.col.sched.version))
diff --git a/.local/share/Anki2/addons21/advanced_review/Tooltip.py b/.local/share/Anki2/addons21/advanced_review/Tooltip.py
deleted file mode 100644
index dbfba29..0000000
--- a/.local/share/Anki2/addons21/advanced_review/Tooltip.py
+++ /dev/null
@@ -1,613 +0,0 @@
-#// auth_ Mohamad Janati
-#// Copyright (c) 2019-2021 Mohamad Janati (freaking stupid, right? :|)
-
-
-from aqt.utils import tooltip
-from anki.hooks import wrap
-import aqt
-from aqt.reviewer import Reviewer
-import aqt
-from aqt.qt import *
-from aqt import mw
-from anki import version
-anki_version = int(version.replace('.', ''))
-if anki_version > 2119:
- from typing import Optional
-
-config = mw.addonManager.getConfig(__name__)
-tooltip_timer = config["Tooltip Timer"]
-tooltip_textColor = config["Tooltip Text Color"]
-reviewButton_style = config[" Review_ Buttons Style"]
-custom_sizes = config ['Button_ Custom Button Sizes']
-buttons_height = config['Button_ Height_ All Bottombar Buttons']
-reviewButtons_width = config['Button_ Width_ Review Buttons']
-custom_reviewButtonColors = config[' Review_ Custom Colors']
-againHover_color = config['Color_ Again on hover']
-hardHover_color = config['Color_ Hard on hover']
-goodHover_color = config['Color_ Good on hover']
-easyHover_color = config['Color_ Easy on hover']
-tooltip_style = config['Tooltip Style']
-tooltip_position = config['Tooltip Position']
-info_position = config["Button_ Position_ Info Button"]
-skip_position = config['Button_ Position_ Skip Button']
-undo_position = config['Button_ Position_ Undo Button']
-info = config['Button_ Info Button']
-skip = config['Button_ Skip Button']
-undo = config['Button_ Undo Button']
-edit_width = config["Button_ Width_ Edit Button"]
-info_width = config["Button_ Width_ Info Button"]
-skip_width = config["Button_ Width_ Skip Button"]
-more_width = config["Button_ Width_ More Button"]
-undo_width = config["Button_ Width_ Undo Button"]
-if not custom_sizes:
- edit_width = 72
- info_width = 64
- skip_width = 64
- undo_width = 64
- more_width = 72
-if custom_reviewButtonColors:
- again_backgroundColor = config['Color_ Again on hover']
- hard_backgroundColor = config['Color_ Hard on hover']
- good_backgroundColor = config['Color_ Good on hover']
- easy_backgroundColor = config['Color_ Easy on hover']
-else:
- again_backgroundColor = "#FF1111"
- hard_backgroundColor = "#FF9814"
- good_backgroundColor = "#33FF2D"
- easy_backgroundColor = "#21C0FF"
-
-def myTooltip(self, ease): #\\ should i store text, color and position all in this function?? YESSS
- button_count = self.mw.col.sched.answerButtons(self.card)
- if button_count == 2:
- if ease == 1:
- button = ["Again", again_backgroundColor, -1, -39]
- elif ease == 2:
- button = ["Good", good_backgroundColor, 70, -39]
- else:
- button = ["", "transparent", 20000, 20000]
- elif button_count == 3:
- if ease == 1:
- button = ["Again", again_backgroundColor, -37, -39]
- elif ease == 2:
- button = ["Good", good_backgroundColor, 35, -39]
- elif ease == 3:
- button = ["Easy", easy_backgroundColor, 107, -39]
- else:
- button = ["", "transparent", 20000, 20000]
- else:
- if ease == 1:
- button = ["Again", again_backgroundColor, -73, -39]
- elif ease == 2:
- button = ["Hard", hard_backgroundColor, -3, -39]
- elif ease == 3:
- button = ["Good", good_backgroundColor, 70, -39]
- elif ease == 4:
- button = ["Easy", easy_backgroundColor, 142, -39]
- else:
- button = ["", "transparent", 20000, 20000]
- button_width = 60
- button_height = 26
- x_offset = button[2]
- y_offset = button[3]
- text = button[0]
- if custom_sizes and reviewButton_style not in [2, 3]:
- button_height = buttons_height
- button_width = reviewButtons_width
- y_offset -= (buttons_height - 30)
- if button_count == 2:
- if reviewButtons_width < 61:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset += 19
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset -= 15
- elif 60 < reviewButtons_width < 81:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset += 14
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset -= 10
- elif 80 < reviewButtons_width < 101:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset += 9
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset -= 5
- elif 100 < reviewButtons_width < 121:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset += 4
- elif ease == 2:
- x_offset += reviewButtons_width/4
- elif 120 < reviewButtons_width < 141:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 1
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 5
- elif 140 < reviewButtons_width < 161:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 6
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 10
- elif 160 < reviewButtons_width < 181:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 11
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 15
- elif 180 < reviewButtons_width < 201:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 16
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 20
- elif 200 < reviewButtons_width < 221:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 21
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 25
- elif 220 < reviewButtons_width < 241:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 26
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 30
- elif 240 < reviewButtons_width < 261:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 31
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 35
- elif 260 < reviewButtons_width < 281:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 36
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 40
- elif 280 < reviewButtons_width < 301:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 41
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 45
- elif 300 < reviewButtons_width < 321:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 46
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 50
- elif 320 < reviewButtons_width < 341:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 51
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 55
- elif 340 < reviewButtons_width < 361:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 56
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 60
- elif 360 < reviewButtons_width < 381:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 61
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 65
- elif 380 < reviewButtons_width < 401:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset -= 65
- elif ease == 2:
- x_offset += reviewButtons_width/4
- x_offset += 70
- elif button_count == 3:
- if ease == 1:
- x_offset -= button_width
- x_offset += 62
- elif ease == 2:
- x_offset += 2
- elif ease == 3:
- x_offset += button_width
- x_offset -= 59
- elif button_count == 4:
- if reviewButtons_width < 61:
- if ease == 1:
- x_offset -= reviewButtons_width/4
- x_offset += 29
- elif ease == 2:
- x_offset -= reviewButtons_width/4
- x_offset += 21
- elif ease == 3:
- x_offset += reviewButtons_width/4
- x_offset -= 15
- elif ease == 4:
- x_offset += reviewButtons_width/4
- x_offset -= 25
- elif 60 < reviewButtons_width < 81:
- if ease == 1:
- x_offset -= reviewButtons_width/2
- x_offset += 21
- elif ease == 2:
- x_offset -= reviewButtons_width/4
- x_offset += 15
- elif ease == 3:
- x_offset += reviewButtons_width/4
- x_offset -= 10
- elif ease == 4:
- x_offset += reviewButtons_width/2
- x_offset -= 18
- elif 80 < reviewButtons_width < 101:
- if ease == 1:
- x_offset -= reviewButtons_width/2
- elif ease == 2:
- x_offset -= reviewButtons_width/4
- x_offset += 10
- elif ease == 3:
- x_offset += reviewButtons_width/4
- x_offset -= 5
- elif ease == 4:
- x_offset += reviewButtons_width/2
- x_offset += 2
- elif 100 < reviewButtons_width < 121:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset += 37
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset += 15
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset -= 9
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset -= 33
- elif 120 < reviewButtons_width < 141:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset += 26
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset += 13
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset -= 6
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset -= 23
- elif 140 < reviewButtons_width < 161:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset += 16
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset += 7
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset -= 3
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset -= 13
- elif 160 < reviewButtons_width < 181:
- if ease == 1:
- x_offset -= reviewButtons_width
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset += 5
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 3
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset -= 3
- elif 180 < reviewButtons_width < 201:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 5
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset += 4
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 4
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 7
- elif 200 < reviewButtons_width < 221:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 13
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 1
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 7
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 17
- elif 220 < reviewButtons_width < 241:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 23
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 5
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 11
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 27
- elif 240 < reviewButtons_width < 261:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 33
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 8
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 14
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 37
- elif 260 < reviewButtons_width < 281:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 43
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 11
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 17
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 47
- elif 280 < reviewButtons_width < 301:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 53
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 14
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 21
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 57
- elif 300 < reviewButtons_width < 321:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 63
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 17
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 24
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 67
- elif 320 < reviewButtons_width < 341:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 73
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 22
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 27
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 77
- elif 340 < reviewButtons_width < 361:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 83
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 25
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 31
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 87
- elif 360 < reviewButtons_width < 381:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 93
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 28
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 34
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 97
- elif 380 < reviewButtons_width < 401:
- if ease == 1:
- x_offset -= reviewButtons_width
- x_offset -= 103
- elif ease == 2:
- x_offset -= reviewButtons_width/3
- x_offset -= 31
- elif ease == 3:
- x_offset += reviewButtons_width/3
- x_offset += 37
- elif ease == 4:
- x_offset += reviewButtons_width
- x_offset += 107
- if reviewButton_style in [4, 5, 6, 7]:
- y_offset -= 1
- if button_count == 2:
- if ease == 1:
- x_offset -= 4
- elif ease == 2:
- x_offset += 2
- elif button_count == 3:
- if ease == 1:
- x_offset -= 1
- elif ease == 2:
- x_offset -= 1
- elif button_count == 4:
- if ease == 1:
- x_offset -= 5
- elif ease == 2:
- x_offset -= 2
- elif ease == 3:
- x_offset += 1
- elif ease == 4:
- x_offset += 5
- if reviewButton_style in [4, 5, 6, 7] and not custom_sizes:
- button_height = 29
- button_width = 72
- y_offset += 2
- if button_count == 2:
- if ease == 1:
- x_offset -= 3
- elif ease == 2:
- x_offset += 4
- elif button_count == 3:
- if ease == 1:
- x_offset -= 10
- elif ease == 2:
- x_offset += 4
- elif ease == 3:
- x_offset += 10
- elif button_count == 4:
- if ease == 1:
- x_offset -= 10
- elif ease == 2:
- x_offset += 4
- elif ease == 3:
- x_offset += 8
- elif ease == 4:
- x_offset += 15
- if not info or info_position in ['middle left', 'middle right']:
- x_offset -= 36
- if info and info_position == "left":
- x_offset += (info_width-64)/2
- if info and info_position == "right":
- x_offset -= 72
- x_offset -= (info_width-64)/2
- if skip and skip_position == "left":
- x_offset += 36
- x_offset += (skip_width-64)/2
- if skip and skip_position == "right":
- x_offset -= 36
- x_offset -= (skip_width-64)/2
- if undo and undo_position == "left":
- x_offset += 52
- x_offset += (undo_width-86)/2
- if undo and undo_position == "right":
- x_offset -= 52
- x_offset -= (undo_width-86)/2
- if reviewButton_style in [4, 5, 6, 7]:
- if not info or info_position in ['middle left', 'middle right']:
- x_offset -= 8
- if info and info_position == "right":
- x_offset -= 16
- if undo and undo_position == "left":
- x_offset +=8
- if undo and undo_position == "right":
- x_offset -= 17
- x_offset -= 7
- x_offset -= (more_width-72)/2
- x_offset += (edit_width-72)/2
- if tooltip_style == 1:
- x_offset = tooltip_position[0]
- y_offset = -tooltip_position[1]
- button_width = 72
- button_height = 29
- background_color = button[1]
-
- # if self.state == "answer": #// don't show tooltip if user hasn't pressed show answer button (you're really cool for a bug, so, I'm fucking keeping you :D)
- showTooltip(text, background_color, tooltip_textColor, button_width, button_height, x_offset, y_offset, period=tooltip_timer)
-if anki_version > 2119:
- _tooltipTimer: Optional[QTimer] = None
- _tooltipLabel: Optional[QLabel] = None
-else:
- _tooltipTimer = None
- _tooltipLabel = None
-
-def showTooltip(text, background_color, tooltip_textColor, button_width, button_height, x_offset, y_offset, period=3000, parent=None):
- global _tooltipTimer, _tooltipLabel
-
- class CustomLabel(QLabel):
- silentlyClose = True
-
- def mousePressEvent(self, evt):
- evt.accept()
- self.hide()
-
- closeTooltip()
- aw = parent or aqt.mw.app.activeWindow() or aqt.mw
- table = """
- <table align=center>
- <tr>
- <td><div style='color: {0};'>{1}</div></td>
- </tr>
- </table>
- """.format(tooltip_textColor, text)
- lab = CustomLabel(table, aw)
- lab.setFrameStyle(QFrame.Panel)
- lab.setLineWidth(2)
- lab.setFixedWidth(button_width)
- lab.setFixedHeight(button_height)
- lab.setWindowFlags(Qt.ToolTip)
- p = QPalette()
- p.setColor(QPalette.Window, QColor(background_color))
- p.setColor(QPalette.WindowText, QColor("transparent"))
- lab.setPalette(p)
- if tooltip_style == 0:
- x_coordinate = int(x_offset+(aw.width()-button_width)/2)
- y_coordinate = y_offset+aw.height()
- lab.move(aw.mapToGlobal(QPoint(x_coordinate, y_coordinate)))
- else:
- x_coordinate = min(x_offset, aw.width())
- y_coordinate = min(y_offset, aw.height())
- lab.move(aw.mapToGlobal(QPoint(x_coordinate, y_coordinate)))
- lab.show()
- _tooltipTimer = aqt.mw.progress.timer(period, closeTooltip, False, requiresCollection=False)
- _tooltipLabel = lab
-
-
-def closeTooltip():
- global _tooltipLabel, _tooltipTimer
- if _tooltipLabel:
- try:
- _tooltipLabel.deleteLater()
- except:
- # already deleted as parent window closed
- pass
- _tooltipLabel = None
- if _tooltipTimer:
- _tooltipTimer.stop()
- _tooltipTimer = None
-
-Reviewer._answerCard = wrap(Reviewer._answerCard, myTooltip, 'before')
diff --git a/.local/share/Anki2/addons21/advanced_review/__init__.py b/.local/share/Anki2/addons21/advanced_review/__init__.py
deleted file mode 100644
index b4f483f..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__init__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#// auth_ Mohamad Janati
-#// Copyright (c) 2019-2021 Mohamad Janati (freaking stupid, right? :|)
-
-from aqt import mw
-from anki import version
-from anki.collection import _Collection
-config = mw.addonManager.getConfig(__name__)
-button_colors = config[' Button Colors']
-reviewTooltip = config['Tooltip']
-
-anki_version = int(version.replace('.', ''))
-from . import Bottom_Bar
-from . import Settings
-from . import Deck_Overview
-if reviewTooltip:
- from . import Tooltip
-
-if button_colors:
- from . import Button_Colors
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/Bottom_Bar.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/Bottom_Bar.cpython-39.opt-2.pyc
deleted file mode 100644
index 3bc79e9..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/Bottom_Bar.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/Button_Colors.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/Button_Colors.cpython-39.opt-2.pyc
deleted file mode 100644
index dddcd88..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/Button_Colors.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/Card_Info.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/Card_Info.cpython-39.opt-2.pyc
deleted file mode 100644
index 84795e6..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/Card_Info.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/Deck_Overview.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/Deck_Overview.cpython-39.opt-2.pyc
deleted file mode 100644
index 63060e7..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/Deck_Overview.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/Settings.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/Settings.cpython-39.opt-2.pyc
deleted file mode 100644
index 7ff49ff..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/Settings.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/Skip.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/Skip.cpython-39.opt-2.pyc
deleted file mode 100644
index f2392f6..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/Skip.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/Tooltip.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/Tooltip.cpython-39.opt-2.pyc
deleted file mode 100644
index 2adcc46..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/Tooltip.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/__init__.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/__init__.cpython-39.opt-2.pyc
deleted file mode 100644
index 87562e0..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/__init__.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/__pycache__/styles.cpython-39.opt-2.pyc b/.local/share/Anki2/addons21/advanced_review/__pycache__/styles.cpython-39.opt-2.pyc
deleted file mode 100644
index 4e43aa8..0000000
--- a/.local/share/Anki2/addons21/advanced_review/__pycache__/styles.cpython-39.opt-2.pyc
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/changelog.html b/.local/share/Anki2/addons21/advanced_review/changelog.html
deleted file mode 100644
index f364b34..0000000
--- a/.local/share/Anki2/addons21/advanced_review/changelog.html
+++ /dev/null
@@ -1,462 +0,0 @@
-
-<!DOCTYPE html>
-<html>
-<style media="screen">
-body {
- background-color: #1D2027;
- font-family: system-ui;
- line-height: 25px;
-}
-
-h1 {
- font-size: 25px;
- font-weight: 15px;
- color: white;
- background-color: #575C66;
- border-radius: 7px 7px 0px 0px;
- padding: 5px;
- padding-left: 15px;
-}
-
-li {
- margin-bottom: 15px;
- padding-right: 10px;
-}
-
-button {
- padding: 10px;
- border-radius: 6px;
- border: none;
- background-color: #575C66;
- color: white;
-}
-
-.background {
- background-color: #99A2B3;
- margin: 15px;
- padding-bottom: 10px;
- border-radius: 7px;
-}
-</style>
-<body>
-
- <div class="background">
- <h1>2022/2/13</h1>
- <ul>
- <li>Added an option to change Card Info Sidebar default position</li>
- <li>Fixed description button not showing on deck overview screen</li>
- <li>Fixed a sidebar error caused by rescheduled cards</li>
- </ul>
- </div>
- <div class="background">
- <h1>2022/1/30</h1>
- <ul>
- <li>Changed load settings prompt message (forgot to do it yesterday)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2022/1/29</h1>
- <ul>
- <li>Added a feature to change <font color=dodgerred>button text size</font> [go to "Button Sizes" and change button text size]</li>
- <li>Added <font color=dodgerred>another style for button intervals</font> (now you can move button intervals inside the buttons) [to change button interval style go to "Styles" tab and change button interval style]</li>
- <li>Added a feature to enable <font color=dodgerred>direct config edit</font> (serves no purpose for now, don't enable it unless you're told to | The idea is to quickly be able to add new features without having to add options in settings menu)</li>
- <li>Added an option to <font color=dodgerred>backup your settings</font> (just press Backup Settings button and it will create a backup file of your settings - you can also share your settings and button stylings with other people by sharing the settings file)</li>
- <li>Added an option to <font color=dodgerred>load settings</font> file (you can load settings and not go through settings and changing different settings and styles)</li>
- <li>Fixed button tooltip bug in python 3.10 (Thanks to <a href="https://github.com/sdvcrx">@sdvcrx</a>)</li>
- <li>Removed "Restore Defaults" button (with the new "Load Settings" function, having this extra button doesn't make sense)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/9/22</h1>
- <ul>
- <li>Minor macOS bug fix (Hopefully -_-)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/9/15</h1>
- <ul>
- <li>Minor bug fix</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/8/23</h1>
- <ul>
- <li>Detailed Deck Overview bug fix</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/8/22</h1>
- <ul>
- <li>Added a new method for skipping cards.<br>
- <ul>
- <li>This method is partially manual. The skipped cards won't show automatically unless you finish reviewing normal cards.</li>
- <li>This method uses Anki's "Bury" function and buries skipped cards. The skipped cards will get unburied once you exit review screen or press press <button>Show Skipped</button> Button.</li>
- <li>If you want for the skipped cards to show mid-review, you'll have to press <button>Show Skipped</button> Button or press the assigned shortcut (default shortcut is <kbd>Alt</kbd> + <kbd>C</kbd>).</li>
- <li>If you use V3 sheduler, this is the only method that'll work for you and will be chosen by default.</li>
- <li>If you use V2 scheduler you can use this method or the old method. You can choose the skip method in <code>Settings Menu -> Misc -> Skip Method</code></li>
- <li>The old method is <font color=red>Next Card</font> and the new method is <font color=red>Bury</font>.</li>
- <li>The new "Bury" method might be a bit slower, especially when you use the button. If you choose to use this method, I suggets using shortcuts for skipping cards.</li>
- </ul>
- <li>Adjusted Settings Menu height for better viewing on screens with lower resulotions</li>
- <li>Moved changelog from main Settings Menu window to a separate window</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/8/4</h1>
- <ul>
- <li>Bug fix (now ARBb is compatible with Anki 2.1.45)</li>
- <li>From now on, No update will be released for Anki versions older than 2.1.45</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/7/31</h1>
- <ul>
- <li>Bug Fix</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/7/30</h1>
- <ul>
- <li>Bug Fix</li>
- </ul>
- </div>
- <div class="background">
- <h1>2021/7/30</h1>
- <ul>
- <li>Added an option to set your custom text as button labels.<br>
- replace again, hard, good, easy, etc. text with your custom text or emoji.<br>
- To change button labels and use your own custom text, go to "Button label" tab in the settings.<br>
- To the person asking me how to change button labels -_- you can use this from now on. No need to change the code.</li>
- <li>Added an option to hide hard, good, easy buttons. (Requested)<br>
- (no I haven't forgotten to put again in the list -_- you can't hide again button).<br>
- To use this option, go to "Bottombar Buttons" and look for "Hide Buttons" part there.</li>
- <li>Added an option to change the roundness of the buttons.<br>
- To use this option, go to "Styles" tab and look for "Button Border Radius" there.</li>
- <li><font color=red>Removed</font> pressed button stats from the add-on.<br>
- For those who used it, I'll be publishing it as a separate add on named "Pressed Button Stats"</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/6/9</h1>
- <ul>
- <li>Added an option to turn off more overview stats.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/12/6</h1>
- <ul>
- <li>Added another mode to overview stats (taken from "More Overview Stats 2.1")</li>
- <li>Fixed conflict with speedfocus add-on (If you use speedfocus you need to enable "Speed focus" option in ARBb settings -> Misc)</li>
- </ul>
- </div><div class="background">
- <h1>2020/6/9</h1>
- <ul>
- <li>Added an option to turn off more overview stats.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/30</h1>
- <ul>
- <li>Changed tooltip behavior.<br>
- Now it's size won't be as size of the buttons when it's position is fixed.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/18</h1>
- <ul>
- <li>Minor code changes/improvements.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/15</h1>
- <ul>
- <li>Now it designs review buttons that other add-ons add (like rememorize).<br>
- it treats them like other bottombar button so their color and style<br>
- will be like other bottombar buttons</li>
- <li>you can style other bottombar buttons that are added by other add-on (like deferer button).<br>
- you'll need to change their code a bit. if you want to style them leave a comment here or on github page.<br>
- (the last picture is how the extra buttons the those add-on add look after styling them using this add-on)</li>
- <li>finally a github page :\ <a href="https://github.com/noobj2/Anki-Advanced-Review-Bottombar">Here it is</a></li>
- <li>Changed color of timer text in bottombar.<br>
- now it uses the same color you have set for other bottombar buttons text color. (not a big deal though, right?)<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/9</h1>
- <ul>
- <li>Made neon and fill designs customizable. now you can change their colors using "Colors" tab.<br>
- Enable custom colors by checking "Custom Review Button Colors" checkbox and <br>
- changing again, hard, good and easy colors.<br>
- as these designs don't have a separate hover color, changing hover colors won't<br>
- change anything about these buttons</li>
- <li>Made review bottombar buttons, deck overview buttons and main screen bottombar buttons customizable. <br>
- you can change their border and text colors in "Colors" tab by changing "General Button" text and border colors.<br>
- you can't chage text or background color for general buttons if their button style is set on default.<br>
- to change general buttons style go to "Styles" tab and change "General Buttons Style".</li>
- <li>Added an option to change show answer button border color based on card ease. <br>
- you can enable than option in "Style" tab by changing "Show Answer Border Color Style" <br>
- from "Fixed" to "Based on Card Ease". you cand change color for each ease range in "Colors" tab.<br>
- - (honestly i think it's gonna be usless for most of you :/ it was just something that i needed).</li>
- <li>+ Other settings menu and bottombar buttons changes and improvements.<br></li>
- <font color=#004182>pressed button count STILL at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/28</h1>
- <ul>
- <li>Added an option to choose card type [learn, review, re-learn, cram] for button count stats</li>
- <li>Added an option to manually change decks in button count stats<br></li>
- <font color=#004182>at 90%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/5/01</h1>
- <ul>
- <li>Added total time and time per card to information shown in pressed button stats<br></li>
- <font color=#004182>at 85%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/28</h1>
- <ul>
- <li>Added an option to choose card type [learn, review, re-learn, cram] for button count stats</li>
- <li>Added an option to manually change decks in button count stats<br></li>
- <font color=#004182>at 80%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/27</h1>
- <ul>
- <li>Added an option to choose time period for button count stats</li>
- <li>Added an option to change button count stats scope</li>
- <li>Button count stats window improvements<br></li>
- <font color=#004182>at 50%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/26</h1>
- <ul>
- <li><font color=tomato>NEW FEATURE:</font> pressed button count + Percent<br>
- <font color=red>NOTE:</font> it's work in progress and very basic<br>
- the only reason i'm publishing it is that i want to hear you opinions on it and see what you need<br>
- I want to hear your ideas about it, tell me what i can do to make it better<br>
- you can Email me your ideas<br>
- however, i think some of you may want to change the time period for this option<br>
- to do that go to config -> Advanced review bottombar -> open add-on folder -> <br>
- open Button_Count.py -> go to line 47 you'll see what you need there<br>
- when you're on a deck, it shows pressed button stats for that deck, <br>
- when you're in main window, it'll show overall stats<br></li>
- <font color=#004182>at 15%<br></font>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/22</h1>
- <ul>
- <li>Made styling main screen and deck overview compatible with anki versions older than 2.1.19</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/21</h1>
- <ul>
- <li>Added an option to change main screen and deck overview buttons style<br>
- (Their style will be as other bottombar buttons style)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/20</h1>
- <ul>
- <li>Fixed tooltip bug (where it would show hard on tooltip when you<br>
- pressed good if you were in a cutom study session )</li>
- <li> Added card info sidebar auto open (opens sidebar automatically when you review a card)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/18</h1>
- <ul>
- <li>Minor settings menu improvements</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/17</h1>
- <ul>
- <li>Fixed Neon 1 style bug</li>
- <li>Addded correct percentage, fastest reveiw, slowest review, note ID and card ID options to card info sidebar</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/16</h1>
- <ul>
- <li>Added change button transition time option (for fill and neon designs only)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/15</h1>
- <ul>
- <li>Added an option to change cursor type when you hover over bottombar buttons</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/14</h1>
- <ul>
- <li>Added answer tooltips</li>
- <li>Adjusted tooltips for neon and fill designs</li>
- <li>Adjusted tooltips for custom button sizes</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/13</h1>
- <ul>
- <li>Added a function to get shortcuts (Don't have to test keys that you want to set as shortcuts anymore,<br> if it's Anki's default shortcut for something, the add-on wont accept it)</li>
- <li>Moved button design tooltip to another tab (noticed it was WAY too big for lower resulotions to be useful)</li>
- <br><br><font color="red"># NOTE:</font> if you're updating from any version other than 2020/4/12 you might run into some problems trying to<br>
- open settings menu if you can't open settings menu after update open add-on folder and delete meta.json file if<br>
- that didn't help go to settings.py and put a # in front of the last line then go to tools -> add-ons and<br> press restore defaults on this addon's config page<br>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/12</h1>
- <ul>
- <li>Changed settings menu so it's easier to work with on lower resolutions (had to code it all over again)</li>
- <li>Made picking colors completely automatic (no color code copy/paste, choose the color and it's set)</li>
- <li>Added an option for you to choose settings menu's position</li>
- <li>Made wide buttons compatible with no distractions add-on</li>
- <br><br><font color="red"># NOTE:</font> After update you need to restore config to defaults in tools -> addons<br>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/8</h1>
- <ul>
- <li>settings menu bugs fixes</li>
- <li>settings menu minor adjustments for smaller screens</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/7</h1>
- <ul>
- <li>settings menu improvements</li>
- <li>added an option to color intervals</li>
- <li>added an option to style other bottombar buttons</li>
- <li>added 4 new button designs</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/6</h1>
- <ul>
- <li>minor settings menu improvements</li>
- <li>card info sidebar improvements for old scheduler</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/5</h1>
- <ul>
- <li>minor settings menu improvements</li>
- <li>added tooltips with pictures for different settings</li>
- <li>fixed card info sidebar crash bug</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/4</h1>
- <ul>
- <li>added settings menu</li>
- <li>minor settings menu adjustments</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/2</h1>
- <ul>
- <li>fix for wide buttons</li>
- <li>fixed card info sidebar problem with beta versions of anki (2.1.23 and 2.1.24)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/4/1</h1>
- <ul>
- <li>fixed issue with limiting card reviews in card info sidebar</li>
- <li>added an option to change active button indicator from border to glow and change it's color</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/30</h1>
- <ul>
- <li>adjusted colors and gradients for background color change for light mode</li>
- <li>added background shadow for review buttons (enable in config)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/29</h1>
- <ul>
- <li>added undo button (enable in config)</li>
- <li>fixed button color for old scheduler</li>
- <li>removed conflict with customize keyboard shortcuts add-on</li>
- <li>removed conflict with speed focus add-on (needs to be enabled in config)</li>
- <li>removed conflict with slackers add-on</li>
- <li>added an option to choose text color in review button background color change</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/26</h1>
- <ul>
- <li>added change button size option</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/25</h1>
- <ul>
- <li>added change skip and info button position option</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/20</h1>
- <ul>
- <li>fixed conflict with "replay button on card" add-on</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/7</h1>
- <ul>
- <li>adjusted the color for review buttons</li>
- <li>added an option to choose the font for the text in card info side bar in config</li>
- <li>added an option so you could limit the maximum number of previous reviews that are shown on sidebar for a card</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/6</h1>
- <ul>
- <li>made the info sidebar customizable, you can choose what you want to see on card info sidebar in config</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/3/4</h1>
- <ul>
- <li>fixed not showing review button colors on new in-app night mode</li>
- <li>adjusted review button text colors for new in-app night mode</li>
- <li>adjusted wide button widths</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/2/8</h1>
- <ul>
- <li>added an option for you to choose the shortcut key for skip and info buttons (in add-on config)</li>
- <li>added an option to choose the sidebar theme (in add-on config)</li>
- </ul>
- </div>
- <div class="background">
- <h1>2020/1/2</h1>
- <ul>
- <li>fix for old scheduler</li>
- </ul>
- </div>
- <div class="background">
- <h1>2019/12/14</h1>
- <ul>
- <li>Initial Release</li>
- </ul>
- </div>
-
-</body>
-</html>
diff --git a/.local/share/Anki2/addons21/advanced_review/config.json b/.local/share/Anki2/addons21/advanced_review/config.json
deleted file mode 100644
index c93c211..0000000
--- a/.local/share/Anki2/addons21/advanced_review/config.json
+++ /dev/null
@@ -1,115 +0,0 @@
-{
- " Button Colors": true,
- " Speed Focus Add-on": false,
- " Direct Config Edit": false,
- " More Overview Stats": false,
- " Settings Menu Place": 0,
- " Skip Method": 0,
- " Style Main Screen Buttons": true,
- " Review_ Active Button Indicator": 1,
- " Review_ Hover Effect": 1,
- " Review_ Buttons Style": 0,
- " Review_ Bottombar Buttons Style": 0,
- " Review_ Custom Colors": false,
- " Review_ Custom Review Button Text Color": false,
- " Review_ Custom Active Indicator Color": false,
- " Review_ Cursor Style": 0,
- " Review_ Button Transition Time": 500,
- " Review_ Button Border Radius": 5,
- " Review_ Interval Style": 0,
- "Button_ Info Button": true,
- "Button_ Skip Button": true,
- "Button_ Show Skipped Button": false,
- "Button_ Undo Button": false,
- "Button_ Hide Hard": false,
- "Button_ Hide Good": false,
- "Button_ Hide Easy": false,
- "Button_ Custom Button Sizes": false,
- "Button_ Shortcut_ Skip Button": "c",
- "Button_ Shortcut_ Show Skipped Button": "Alt + c",
- "Button_ Shortcut_ Info Button": "f4",
- "Button_ Shortcut_ Undo Button": "x",
- "Button_ Position_ Info Button": "left",
- "Button_ Position_ Skip Button": "middle left",
- "Button_ Position_ Show Skipped Button": "middle left",
- "Button_ Position_ Undo Button": "middle right",
- "Button_ Height_ All Bottombar Buttons": 40,
- "Button_ Width_ Edit Button": 150,
- "Button_ Width_ Show Answer Button": 150,
- "Button_ Width_ Info Button": 150,
- "Button_ Width_ Skip Button": 150,
- "Button_ Width_ Show Skipped Button": 150,
- "Button_ Width_ More Button": 150,
- "Button_ Width_ Review Buttons": 150,
- "Button_ Width_ Undo Button": 150,
- "Button_ Text Size": 14,
- "Button Label_ Study Now": "Study Now",
- "Button Label_ Edit": "Edit",
- "Button Label_ Show Answer": "Show Answer",
- "Button Label_ More": "More",
- "Button Label_ Info": "Info",
- "Button Label_ Skip": "Skip",
- "Button Label_ Show Skipped": "Show Skipped",
- "Button Label_ Undo": "Undo Review",
- "Button Label_ Again": "Again",
- "Button Label_ Hard": "Hard",
- "Button Label_ Good": "Good",
- "Button Label_ Easy": "Easy",
- "Card Info sidebar_ Number of previous cards to show": 0,
- "Card Info sidebar_ Default Position": 0,
- "Card Info sidebar_ theme": 0,
- "Card Info sidebar_ Created": true,
- "Card Info sidebar_ Edited": true,
- "Card Info sidebar_ First Review": true,
- "Card Info sidebar_ Latest Review": true,
- "Card Info sidebar_ Due": true,
- "Card Info sidebar_ Interval": true,
- "Card Info sidebar_ Ease": true,
- "Card Info sidebar_ Reviews": true,
- "Card Info sidebar_ Lapses": true,
- "Card Info Sidebar_ Correct Percent": true,
- "Card Info Sidebar_ Fastest Review": true,
- "Card Info Sidebar_ Slowest Review": true,
- "Card Info sidebar_ Average Time": true,
- "Card Info sidebar_ Total Time": true,
- "Card Info sidebar_ Card Type": true,
- "Card Info sidebar_ Note Type": true,
- "Card Info sidebar_ Deck": true,
- "Card Info sidebar_ Tags": true,
- "Card Info Sidebar_ Note ID": false,
- "Card Info Sidebar_ Card ID": false,
- "Card Info sidebar_ Sort Field": true,
- "Card Info sidebar_ Current Review Count": true,
- "Card Info sidebar_ Font": "consolas",
- "Card Info sidebar_ number of reviews to show for a card": 0,
- "Card Info sidebar_ Auto Open": false,
- "Card Info sidebar_ warning note": false,
- "Color_ General Text Color": "#ffffff",
- "Color_ Active Button Indicator": "#ffffff",
- "Color_ Bottombar Button Text Color": "#FF1111",
- "Color_ Bottombar Button Border Color": "#FF1111",
- "Color_ Custom Bottombar Button Text Color": false,
- "Color_ Custom Bottombar Button Border Color": false,
- "Color_ Again": "#BA0C0C",
- "Color_ Again on hover": "#FF1111",
- "Color_ Hard": "#BF720F",
- "Color_ Hard on hover": "#FF9814",
- "Color_ Good": "#20A11C",
- "Color_ Good on hover": "#33FF2D",
- "Color_ Easy": "#188AB8",
- "Color_ Easy on hover": "#21C0FF",
- "Tooltip": true,
- "Tooltip Timer": 500,
- "Tooltip Text Color": "#000",
- "Tooltip Style": 0,
- "Tooltip Position": [100, -100],
- "ShowAnswer_ Border Color Style": 0,
- "ShowAnswer_ Ease1": 200,
- "ShowAnswer_ Ease2": 250,
- "ShowAnswer_ Ease3": 300,
- "ShowAnswer_ Ease4": 350,
- "ShowAnswer_ Ease1 Color": "#FF1111",
- "ShowAnswer_ Ease2 Color": "#FF9814",
- "ShowAnswer_ Ease3 Color": "#33FF2D",
- "ShowAnswer_ Ease4 Color": "#21C0FF"
-}
diff --git a/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_border.png b/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_border.png
deleted file mode 100644
index 725cc89..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_border.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_glow.png b/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_glow.png
deleted file mode 100644
index d67a3a0..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_glow.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_none.png b/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_none.png
deleted file mode 100644
index 4205062..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/activeIndicator_none.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_default.png b/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_default.png
deleted file mode 100644
index 0bbf97d..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_default.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_fill1.png b/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_fill1.png
deleted file mode 100644
index 4219ea8..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_fill1.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_fill2.png b/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_fill2.png
deleted file mode 100644
index 184147c..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_fill2.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_neon1.png b/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_neon1.png
deleted file mode 100644
index 570d500..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_neon1.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_neon2.png b/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_neon2.png
deleted file mode 100644
index 07e8673..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/bottombarButtonsStyle_neon2.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonColors_off.png b/.local/share/Anki2/addons21/advanced_review/images/buttonColors_off.png
deleted file mode 100644
index a591dee..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonColors_off.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonColors_on.png b/.local/share/Anki2/addons21/advanced_review/images/buttonColors_on.png
deleted file mode 100644
index cd30844..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonColors_on.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_off.png b/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_off.png
deleted file mode 100644
index f1ea2d7..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_off.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_off2.png b/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_off2.png
deleted file mode 100644
index fa32d70..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_off2.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_on.png b/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_on.png
deleted file mode 100644
index a363381..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_on.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_on2.png b/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_on2.png
deleted file mode 100644
index 757a4b8..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonSizes_on2.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_defaultBackground.png b/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_defaultBackground.png
deleted file mode 100644
index d4cb226..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_defaultBackground.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_defaultText.png b/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_defaultText.png
deleted file mode 100644
index 725cc89..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_defaultText.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_fill1.png b/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_fill1.png
deleted file mode 100644
index 39e48c9..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_fill1.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_fill2.png b/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_fill2.png
deleted file mode 100644
index ec598c8..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_fill2.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_neon1.png b/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_neon1.png
deleted file mode 100644
index 61d4990..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_neon1.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_neon2.png b/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_neon2.png
deleted file mode 100644
index 5d29166..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_neon2.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_wideBackground.png b/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_wideBackground.png
deleted file mode 100644
index 887a428..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_wideBackground.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_wideText.png b/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_wideText.png
deleted file mode 100644
index d61643c..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/buttonStyle_wideText.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons.png b/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons.png
deleted file mode 100644
index fccf09b..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons2.png b/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons2.png
deleted file mode 100644
index f1575e0..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons2.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons3.png b/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons3.png
deleted file mode 100644
index 290b7ad..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/changeMainScreenButtons3.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/changeStyle_text.png b/.local/share/Anki2/addons21/advanced_review/images/changeStyle_text.png
deleted file mode 100644
index 725cc89..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/changeStyle_text.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/coloredDues.png b/.local/share/Anki2/addons21/advanced_review/images/coloredDues.png
deleted file mode 100644
index 43b00fc..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/coloredDues.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_brighten.png b/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_brighten.png
deleted file mode 100644
index 20dd9e9..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_brighten.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_glow.png b/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_glow.png
deleted file mode 100644
index f7de78c..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_glow.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_glowBrighten.png b/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_glowBrighten.png
deleted file mode 100644
index 6344c76..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/hoverEffect_glowBrighten.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/images/icon.png b/.local/share/Anki2/addons21/advanced_review/images/icon.png
deleted file mode 100644
index e0c0d2a..0000000
--- a/.local/share/Anki2/addons21/advanced_review/images/icon.png
+++ /dev/null
Binary files differ
diff --git a/.local/share/Anki2/addons21/advanced_review/manifest.json b/.local/share/Anki2/addons21/advanced_review/manifest.json
deleted file mode 100644
index 8015fd3..0000000
--- a/.local/share/Anki2/addons21/advanced_review/manifest.json
+++ /dev/null
@@ -1 +0,0 @@
-{"package": "1136455830", "name": "Advanced Review Bottombar"}
diff --git a/.local/share/Anki2/addons21/advanced_review/meta.json b/.local/share/Anki2/addons21/advanced_review/meta.json
deleted file mode 100644
index 2b26b01..0000000
--- a/.local/share/Anki2/addons21/advanced_review/meta.json
+++ /dev/null
@@ -1 +0,0 @@
-{"name": "Advanced Review Bottom Bar", "mod": 1644739078, "min_point_version": 45, "max_point_version": 50, "branch_index": 1, "disabled": false, "config": {" Button Colors": true, " Speed Focus Add-on": false, " Direct Config Edit": false, " More Overview Stats": 0, " Settings Menu Place": 0, " Skip Method": 0, " Style Main Screen Buttons": true, " Review_ Active Button Indicator": 1, " Review_ Buttons Style": 0, " Review_ Hover Effect": 3, " Review_ Custom Colors": false, " Review_ Custom Review Button Text Color": false, " Review_ Custom Active Indicator Color": false, " Review_ Bottombar Buttons Style": 0, " Review_ Cursor Style": 0, " Review_ Interval Style": 0, " Review_ Button Transition Time": 500, " Review_ Button Border Radius": 5, "Button_ Info Button": true, "Button_ Skip Button": true, "Button_ Show Skipped Button": false, "Button_ Undo Button": false, "Button_ Hide Hard": false, "Button_ Hide Good": false, "Button_ Hide Easy": false, "Button_ Custom Button Sizes": false, "Button_ Shortcut_ Skip Button": "c", "Button_ Shortcut_ Show Skipped Button": "Alt + c", "Button_ Shortcut_ Info Button": "f4", "Button_ Shortcut_ Undo Button": "x", "Button_ Position_ Info Button": "left", "Button_ Position_ Skip Button": "middle left", "Button_ Position_ Show Skipped Button": "middle left", "Button_ Position_ Undo Button": "middle right", "Button_ Text Size": 14, "Button_ Height_ All Bottombar Buttons": 40, "Button_ Width_ Edit Button": 150, "Button_ Width_ Show Answer Button": 150, "Button_ Width_ Info Button": 150, "Button_ Width_ Skip Button": 150, "Button_ Width_ Show Skipped Button": 150, "Button_ Width_ More Button": 150, "Button_ Width_ Review Buttons": 150, "Button_ Width_ Undo Button": 150, "Button Label_ Study Now": "Study Now", "Button Label_ Edit": "Edit", "Button Label_ Show Answer": "Show Answer", "Button Label_ More": "More", "Button Label_ Info": "Info", "Button Label_ Skip": "Skip", "Button Label_ Show Skipped": "Show Skipped", "Button Label_ Undo": "Undo Review", "Button Label_ Again": "Again", "Button Label_ Hard": "Hard", "Button Label_ Good": "Good", "Button Label_ Easy": "Easy", "Card Info sidebar_ Number of previous cards to show": 0, "Card Info sidebar_ Default Position": 0, "Card Info sidebar_ theme": 0, "Card Info sidebar_ Created": true, "Card Info sidebar_ Edited": true, "Card Info sidebar_ First Review": true, "Card Info sidebar_ Latest Review": true, "Card Info sidebar_ Due": true, "Card Info sidebar_ Interval": true, "Card Info sidebar_ Ease": true, "Card Info sidebar_ Reviews": true, "Card Info sidebar_ Lapses": true, "Card Info Sidebar_ Correct Percent": true, "Card Info Sidebar_ Fastest Review": true, "Card Info Sidebar_ Slowest Review": true, "Card Info sidebar_ Average Time": true, "Card Info sidebar_ Total Time": true, "Card Info sidebar_ Card Type": true, "Card Info sidebar_ Note Type": true, "Card Info sidebar_ Deck": true, "Card Info sidebar_ Tags": true, "Card Info Sidebar_ Note ID": false, "Card Info Sidebar_ Card ID": false, "Card Info sidebar_ Sort Field": true, "Card Info sidebar_ Current Review Count": true, "Card Info sidebar_ Font": "FreeMono", "Card Info sidebar_ number of reviews to show for a card": 0, "Card Info sidebar_ Auto Open": false, "Card Info sidebar_ warning note": false, "Color_ General Text Color": "#ffffff", "Color_ Active Button Indicator": "#ffffff", "Color_ Bottombar Button Text Color": "#FF1111", "Color_ Bottombar Button Border Color": "#FF1111", "Color_ Custom Bottombar Button Text Color": false, "Color_ Custom Bottombar Button Border Color": false, "Color_ Again": "#BA0C0C", "Color_ Again on hover": "#FF1111", "Color_ Hard": "#BF720F", "Color_ Hard on hover": "#FF9814", "Color_ Good": "#20A11C", "Color_ Good on hover": "#33FF2D", "Color_ Easy": "#188AB8", "Color_ Easy on hover": "#21C0FF", "Tooltip": true, "Tooltip Timer": 500, "Tooltip Text Color": "#000", "Tooltip Style": 0, "Tooltip Position": [100, -100], "ShowAnswer_ Border Color Style": 0, "ShowAnswer_ Ease1": 200, "ShowAnswer_ Ease2": 250, "ShowAnswer_ Ease3": 300, "ShowAnswer_ Ease4": 350, "ShowAnswer_ Ease1 Color": "#FF1111", "ShowAnswer_ Ease2 Color": "#FF9814", "ShowAnswer_ Ease3 Color": "#33FF2D", "ShowAnswer_ Ease4 Color": "#21C0FF"}} \ No newline at end of file
diff --git a/.local/share/Anki2/addons21/advanced_review/styles.py b/.local/share/Anki2/addons21/advanced_review/styles.py
deleted file mode 100644
index a11156f..0000000
--- a/.local/share/Anki2/addons21/advanced_review/styles.py
+++ /dev/null
@@ -1,1169 +0,0 @@
-#// auth_ Mohamad Janati
-#// Copyright (c) 2019-2021 Mohamad Janati (freaking stupid, right? :|)
-
-from aqt import mw
-from anki import version
-anki_version = int(version.replace('.', ''))
-
-is_nightMode = False
-if anki_version > 2119:
- from aqt.theme import theme_manager
- is_nightMode = theme_manager.night_mode
-
-#// getting config information
-config = mw.addonManager.getConfig(__name__)
-
-#// getting colors that user defined in config
-again_color = config['Color_ Again']
-again_hover_color = config['Color_ Again on hover']
-hard_color = config['Color_ Hard']
-hard_hover_color = config['Color_ Hard on hover']
-good_color = config['Color_ Good']
-good_hover_color = config['Color_ Good on hover']
-easy_color = config['Color_ Easy']
-easy_hover_color = config['Color_ Easy on hover']
-button_style = config[' Review_ Buttons Style']
-custom_colors = config[' Review_ Custom Colors']
-hover_effect = config[' Review_ Hover Effect']
-active_indicator = config[' Review_ Active Button Indicator']
-bottombarButtons_style = config[' Review_ Bottombar Buttons Style']
-textColor_background = config['Color_ General Text Color']
-activeIndicator_color = config['Color_ Active Button Indicator']
-bottombarButtonText_color = config['Color_ Bottombar Button Text Color']
-bottombarButtonBorder_color = config['Color_ Bottombar Button Border Color']
-custom_bottombarButtonTextColor = config['Color_ Custom Bottombar Button Text Color']
-custom_bottombarButtonBorderColor = config['Color_ Custom Bottombar Button Border Color']
-custom_buttonSize = config ['Button_ Custom Button Sizes']
-buttons_height = config['Button_ Height_ All Bottombar Buttons']
-edit_width = config['Button_ Width_ Edit Button']
-# answer_width = config['Button_ Width_ Show Answer Button']
-info_width = config['Button_ Width_ Info Button']
-skip_width = config['Button_ Width_ Skip Button']
-text_size = config["Button_ Text Size"]
-showSkipped_width = config['Button_ Width_ Show Skipped Button']
-undo_width = config['Button_ Width_ Undo Button']
-more_width = config['Button_ Width_ More Button']
-custom_activeIndicatorColor = config[" Review_ Custom Active Indicator Color"]
-custom_reviewButtonTextColor = config[" Review_ Custom Review Button Text Color"]
-cursor_style = config[' Review_ Cursor Style']
-transition = "{}s".format(float(config[' Review_ Button Transition Time']/1000))
-border_radius = "{}px".format(config[' Review_ Button Border Radius'])
-
-######//////__BEGIN__ EXTRAS __BEGIN__//////######
-#// rplacing textColor with "default" if custom review button text color is disabled
-if custom_reviewButtonTextColor == False:
- textColor_background = "default"
-
-#//replacing indicato color with "default" is custom active indicator color is disabled
-if custom_activeIndicatorColor == False:
- activeIndicator_color = "default"
-
-#// Choosing cursor style
-if cursor_style == 0:
- cursor = "normal"
-elif cursor_style == 1:
- cursor = "pointer"
-
-#// Choosing button text color
-if not custom_reviewButtonTextColor:
- if is_nightMode:
- textColor = "#dedede"
- if button_style > 3:
- textColor = "black"
- else:
- textColor = "black"
-else:
- textColor = textColor_background
-
-#// choosing color for general buttons
-if custom_bottombarButtonTextColor:
- bottombarButton_textColor = bottombarButtonText_color
-else:
- if is_nightMode:
- bottombarButton_textColor = "#F0F0F0"
- else:
- bottombarButton_textColor = "#2F2F31"
-
-#// choosing border color for general buttons
-if custom_bottombarButtonBorderColor:
- border_color = bottombarButtonBorder_color
-else:
- if is_nightMode:
- if bottombarButtons_style == 0:
- border_color = ""
- elif bottombarButtons_style in [1, 2]:
- border_color = "#939399"
- elif bottombarButtons_style == 3:
- border_color = "#dedede"
- elif bottombarButtons_style == 4:
- border_color = "#BFBFC7"
- else:
- if bottombarButtons_style == 0:
- border_color = ""
- elif bottombarButtons_style == 1:
- border_color = "#404040"
- elif bottombarButtons_style == 2:
- border_color = "#939399"
- elif bottombarButtons_style in[3, 4]:
- border_color = "#080808"
-
-#// seting colors for neon and fill desings when custom colors is disabled
-if not custom_colors:
- again_color = "#FF1111"
- hard_color = "#FF9814"
- good_color = "#33FF2D"
- easy_color = "#21C0FF"
-
-######//////__END__ EXTRAS __END__ //////######
-
-######//////__BEGIN__ GENERAL BUTTON DESIGNS __BEGIN__ //////######
-#// changing height and width of bottombar buttons based on button design or sizes that user has given
-#// bottomHTML_style makes us able to add classes ids or edit bottombar buttons altogether
-#// edit_stle, info_style, etc. make us able to define classes, ids or add styles to each button
-#// classes and ids should be defined in bottomHTML_style first
-if is_nightMode:
- bottombar_neon1 = """<style>
- #main {
- padding: 5px 20px;
- color: %(text)s;
- border: 1px solid %(border_color)s;
- border-radius: %(border_radius)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- }
- #main:hover {
- background: %(text)s;
- border-radius: %(border_radius)s;
- color: black;
- box-shadow: 0 2px 10px 0 %(text)s;
- }
- </style>""" % dict (text=bottombarButton_textColor, border_color=border_color, border_radius=border_radius, cursor=cursor, transition=transition)
- bottombar_neon2 = """<style>
- #main {
- padding: 5px 20px;
- color: black;
- border: 1px solid %(border_color)s;
- border-radius: %(border_radius)s;
- background: %(text)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: 0 2px 10px 0 %(text)s;
- }
- #main:hover {
- background: none;
- border-radius: %(border_radius)s;
- color: %(text)s;
- box-shadow: none;
- }
- </style>""" % dict (text=bottombarButton_textColor, border_color=border_color, border_radius=border_radius, cursor=cursor, transition=transition)
- bottombar_fill1 = """<style>
- #main {
- padding: 5px 20px;
- border: 1px solid %(border_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(text)s;
- }
- #main:hover {
- color: #2F2F31;
- }
- #main::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height: 0%%;
- background: %(text)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #main:hover::before {
- height: 180%%;
- }
- </style>""" % dict(text=bottombarButton_textColor, border_color=border_color, cursor=cursor, transition=transition, border_radius=border_radius)
- bottombar_fill2 = """<style>
- #main {
- padding: 5px 20px;
- border: 1px solid %(border_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: black;
- }
- #main:hover {
- color: %(text)s;
- }
- #main::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height:180%%;
- background: %(text)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #main:hover::before {
- height: 0%%;
- }
- </style>""" % dict(text=bottombarButton_textColor, border_color=border_color, cursor=cursor, transition=transition, border_radius=border_radius)
-else:
- bottombar_neon1 = """<style>
- #main {
- padding: 5px 20px;
- color: %(text)s;
- border: 1px solid %(border_color)s;
- border-radius: %(border_radius)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- }
- #main:hover {
- background: %(text)s;
- border-radius: %(border_radius)s;
- color: #f0f0f0;
- box-shadow: 0 2px 10px 0 %(text)s;
- }
- </style>""" % dict (text=bottombarButton_textColor, border_color=border_color, border_radius=border_radius, cursor=cursor, transition=transition)
- bottombar_neon2 = """<style>
- #main {
- padding: 5px 20px;
- color: white;
- border: 1px solid %(border_color)s;
- border-radius: %(border_radius)s;
- background: %(text)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: 0 2px 10px 0 %(text)s;
- }
- #main:hover {
- border: 1px solid %(text)s;
- background: none;
- border-radius: %(border_radius)s;
- color: %(text)s;
- box-shadow: none;
- }
- </style>""" % dict (text=bottombarButton_textColor, border_color=border_color, border_radius=border_radius, cursor=cursor, transition=transition)
- bottombar_fill1 = """<style>
- #main {
- padding: 5px 20px;
- border: 1px solid %(border_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(text)s;
- }
- #main:hover {
- color: white;
- }
- #main::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height: 0%%;
- background: %(text)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #main:hover::before {
- height: 180%%;
- }
- </style>""" % dict(text=bottombarButton_textColor, border_color=border_color, cursor=cursor, transition=transition, border_radius=border_radius)
- bottombar_fill2 = """<style>
- #main {
- padding: 5px 20px;
- border: 1px solid %(border_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: white;
- }
- #main:hover {
- color: %(text)s;
- }
- #main::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height:180%%;
- background: %(text)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #main:hover::before {
- height: 0%%;
- }
- </style>""" % dict(text=bottombarButton_textColor, border_color=border_color, cursor=cursor, transition=transition, border_radius=border_radius)
-
-if custom_buttonSize:
- if bottombarButtons_style == 0:
- edit_style = 'style="height: {}px; width: {}px; font-size: {}px;"'.format(buttons_height, edit_width, text_size)
- info_style = 'style="height: {}px; width: {}px; font-size: {}px;"'.format(buttons_height, info_width, text_size)
- skip_style = 'style="height: {}px; width: {}px; font-size: {}px;"'.format(buttons_height, skip_width, text_size)
- showSkipped_style = 'style="height: {}px; width: {}px; font-size: {}px;"'.format(buttons_height, showSkipped_width, text_size)
- undo_style = 'style="height: {}px; width: {}px; font-size: {}px;"'.format(buttons_height, undo_width, text_size)
- more_style = 'style="height: {}px; width: {}px; font-size: {}px;"'.format(buttons_height, more_width, text_size)
- min_buttonSize = "<style> button {min-width: 5px; cursor: %s} </style>" % cursor
- else:
- edit_style = 'style="height: {}px; width: {}px; font-size: {}px;" id=main'.format(buttons_height, edit_width, text_size)
- info_style = 'style="height: {}px; width: {}px; font-size: {}px;" id=main'.format(buttons_height, info_width, text_size)
- skip_style = 'style="height: {}px; width: {}px; font-size: {}px;" id=main'.format(buttons_height, skip_width, text_size)
- showSkipped_style = 'style="height: {}px; width: {}px; font-size: {}px;" id=main'.format(buttons_height, showSkipped_width, text_size)
- undo_style = 'style="height: {}px; width: {}px; font-size: {}px;" id=main'.format(buttons_height, undo_width, text_size)
- more_style = 'style="height: {}px; width: {}px; font-size: {}px;" id=main'.format(buttons_height, more_width, text_size)
- min_buttonSize = "<style> button {min-width: 5px; cursor: %s} </style>" % cursor
-else:
- if bottombarButtons_style == 0:
- edit_style = ""
- info_style = ""
- skip_style = ""
- showSkipped_style = ""
- undo_style = ""
- more_style = ""
- min_buttonSize = "<style> button {cursor: %s} </style>" % cursor
- else:
- edit_style = "id=main"
- info_style = "id=main"
- skip_style = "id=main"
- showSkipped_style = "id=main"
- undo_style = "id=main"
- more_style = "id=main"
- min_buttonSize = "<style> button {cursor: %s} </style>" % cursor
-######//////__END__ GENERAL BUTTON DESIGNS __END__//////######
-
-######//////__BEGIN__ ACtIVE BUTTON INDOCATORS __BEGIN__//////######
-#// active button indicator
-if activeIndicator_color == "default":
- activeIndicator_color = "#21BFFF"
-if active_indicator == 2:
- active_extra = "border: solid 1px; border-color: {0}; box-shadow: 0 0 5px {0}, 0 0 20px {0}, 0 0 40px {0}".format(activeIndicator_color)
-else:
- active_extra = "border: solid 1px; border-color: {}".format(activeIndicator_color)
-if active_indicator == 0 or button_style in [4, 5, 6, 7]:
- active_extra = ""
-######//////__END__ ACtIVE BUTTON INDOCATORS __END__//////######
-
-
-######//////__BEGIN__ HOVER EFFECTS __BEGIN__//////######
-if not custom_colors:
- again_shadow = "box-shadow: 0 0 5px #BA0C0C, 0 0 20px #BA0C0C, 0 0 40px #BA0C0C;"
- hard_shadow = "box-shadow: 0 0 5px #BF720F, 0 0 20px #BF720F, 0 0 40px #BF720F;"
- good_shadow = "box-shadow: 0 0 5px #20A11C, 0 0 20px #20A11C, 0 0 40px #20A11C;"
- easy_shadow = "box-shadow: 0 0 5px #188AB8, 0 0 20px #188AB8, 0 0 40px #188AB8;"
-else:
- again_shadow = "box-shadow: 0 0 5px {0}, 0 0 20px {0}, 0 0 40px {0};".format(again_hover_color)
- hard_shadow = "box-shadow: 0 0 5px {0}, 0 0 20px {0}, 0 0 40px {0};".format(hard_hover_color)
- good_shadow = "box-shadow: 0 0 5px {0}, 0 0 20px {0}, 0 0 40px {0};".format(good_hover_color)
- easy_shadow = "box-shadow: 0 0 5px {0}, 0 0 20px {0}, 0 0 40px {0};".format(easy_hover_color)
-again_hover = ""
-hard_hover = ""
-good_hover = ""
-easy_hover = ""
-if not custom_colors:
- if button_style == 0 or button_style == 2:
- if hover_effect == 1:
- again_hover = "color: #FF1111;"
- hard_hover = "color: #FF9814;"
- good_hover = "color: #33FF2D;"
- easy_hover = "color: #21C0FF;"
- elif hover_effect == 2:
- again_hover = again_shadow
- hard_hover = hard_shadow
- good_hover = good_shadow
- easy_hover = easy_shadow
- elif hover_effect == 3:
- again_hover = "color: #FF1111; {}".format(again_shadow)
- hard_hover = "color: #FF9814; {}".format(hard_shadow)
- good_hover = "color: #33FF2D; {}".format(good_shadow)
- easy_hover = "color: #21C0FF; {}".format(easy_shadow)
- elif button_style == 1 or button_style == 3:
- if hover_effect == 1:
- if is_nightMode:
- again_hover = "background: #FF1111;"
- hard_hover = "background: #FF9814;"
- good_hover = "background: #33FF2D;"
- easy_hover = "background: #21C0FF;"
- else:
- again_hover = "background: linear-gradient(0deg, #E02A1C, #FF3020);"
- hard_hover = "background: linear-gradient(0deg, #E08C08, #FF9F09);"
- good_hover = "background: linear-gradient(0deg, #22D414, #27F217);"
- easy_hover = "background: linear-gradient(0deg, #11A7D1, #13C0F0);"
- elif hover_effect == 2:
- again_hover = again_shadow
- hard_hover = hard_shadow
- good_hover = good_shadow
- easy_hover = easy_shadow
- elif hover_effect == 3:
- if is_nightMode:
- again_hover = "background: #FF1111; {}".format(again_shadow)
- hard_hover = "background: #FF9814; {}".format(hard_shadow)
- good_hover = "background: #2CDB27; {}".format(good_shadow)
- easy_hover = "background: #21C0FF; {}".format(easy_shadow)
- else:
- again_hover = "background: linear-gradient(0deg, #E02A1C, #FF3020); {}".format(again_shadow)
- hard_hover = "background: linear-gradient(0deg, #E08C08, #FF9F09); {}".format(hard_shadow)
- good_hover = "background: linear-gradient(0deg, #22D414, #27F217); {}".format(good_shadow)
- easy_hover = "background: linear-gradient(0deg, #11A7D1, #13C0F0); {}".format(easy_shadow)
-else:
- if button_style == 0 or button_style == 2:
- if hover_effect == 1:
- again_hover = "color: {};".format(again_hover_color)
- hard_hover = "color: {};".format(hard_hover_color)
- good_hover = "color: {};".format(good_hover_color)
- easy_hover = "color: {};".format(easy_hover_color)
- elif hover_effect == 2:
- again_hover = again_shadow
- hard_hover = hard_shadow
- good_hover = good_shadow
- easy_hover = easy_shadow
- elif hover_effect == 3:
- again_hover = "color: {}; {}".format(again_hover_color, again_shadow)
- hard_hover = "color: {}; {}".format(hard_hover_color, hard_shadow)
- good_hover = "color: {}; {}".format(good_hover_color, good_shadow)
- easy_hover = "color: {}; {}".format(easy_hover_color, easy_shadow)
- elif button_style == 1 or button_style == 3:
- if hover_effect == 1:
- again_hover = "background: {};".format(again_hover_color)
- hard_hover = "background: {};".format(hard_hover_color)
- good_hover = "background: {};".format(good_hover_color)
- easy_hover = "background: {};".format(easy_hover_color)
- elif hover_effect == 2:
- again_hover = again_shadow
- hard_hover = hard_shadow
- good_hover = good_shadow
- easy_hover = easy_shadow
- elif hover_effect == 3:
- again_hover = "background: {}; {}".format(again_hover_color, again_shadow)
- hard_hover = "background: {}; {}".format(hard_hover_color, hard_shadow)
- good_hover = "background: {}; {}".format(good_hover_color, good_shadow)
- easy_hover = "background: {}; {}".format(easy_hover_color, easy_shadow)
-######//////__END__ HOVER EFFECTS __END__//////######
-
-######//////__BEGIN__ REVIEW BUTTON DESIGNS __BEGIN__//////######
-fill2 = """<style>
- #again {
- padding: 5px 20px;
- border: 1px solid %(again_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(text)s;
- }
- #again:hover {
- color: %(again_color)s;
- }
- #again::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height:180%%;
- background: %(again_color)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #again:hover::before {
- height: 0%%;
- }
- #hard {
- padding: 5px 20px;
- border: 1px solid %(hard_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(text)s;
- }
- #hard:hover {
- color: %(hard_color)s;
- }
- #hard::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height:180%%;
- background: %(hard_color)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #hard:hover::before {
- height: 0%%;
- }
- #good {
- padding: 5px 20px;
- border: 1px solid %(good_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(text)s;
- }
- #good:hover {
- color: %(good_color)s;
- }
- #good::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height:180%%;
- background: %(good_color)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #good:hover::before {
- height: 0%%;
- }
- #easy {
- padding: 5px 20px;
- border: 1px solid %(easy_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(text)s;
- }
- #easy:hover {
- color: %(easy_color)s;
- }
- #easy::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height:180%%;
- background: %(easy_color)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #easy:hover::before {
- height: 0%%;
- }
- </style>""" % dict(text=textColor, again_color=again_color,hard_color=hard_color, good_color=good_color,
- easy_color=easy_color,cursor=cursor, transition=transition, border_radius=border_radius)
-
-fill1 = """<style>
- #again {
- padding: 5px 20px;
- border: 1px solid %(again_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(again_color)s;
- }
- #again:hover {
- color: %(text)s;
- }
- #again::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height: 0%%;
- background: %(again_color)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #again:hover::before {
- height: 180%%;
- }
- #hard {
- padding: 5px 20px;
- border: 1px solid %(hard_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(hard_color)s;
- }
- #hard:hover {
- color: %(text)s;
- }
- #hard::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height: 0%%;
- background: %(hard_color)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #hard:hover::before {
- height: 180%%;
- }
- #good {
- padding: 5px 20px;
- border: 1px solid %(good_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(good_color)s;
- }
- #good:hover {
- color: %(text)s;
- }
- #good::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height: 0%%;
- background: %(good_color)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #good:hover::before {
- height: 180%%;
- }
- #easy {
- padding: 5px 20px;
- border: 1px solid %(easy_color)s;
- background: none;
- cursor: %(cursor)s;
- transition: %(transition)s;
- position: relative;
- overflow: hidden;
- border-radius: %(border_radius)s;
- color: %(easy_color)s;
- }
- #easy:hover {
- color: %(text)s;
- }
- #easy::before {
- content: "";
- position: absolute;
- left: 0;
- width: 100%%;
- height: 0%%;
- background: %(easy_color)s;
- z-index: -1;
- transition: %(transition)s;
- bottom: 0;
- border-radius: 50%% 50%% 0 0;
- }
- #easy:hover::before {
- height: 180%%;
- }
- </style>""" % dict(text=textColor, again_color=again_color, hard_color=hard_color, good_color=good_color,
- easy_color=easy_color, cursor=cursor, transition=transition, border_radius=border_radius)
-neon2 = """<style>
- #again {
- color: %(text)s;
- border: 1px solid %(again_color)s;
- padding: 5px 20px;
- border-radius: %(border_radius)s;
- background: %(again_color)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: 0 2px 20px 0 %(again_color)s inset, 0 2px 20px 0 %(again_color)s;
- }
- #again:hover {
- background: none;
- border-radius: %(border_radius)s;
- color: %(again_color)s;
- box-shadow: none;
- }
- #hard {
- color: %(text)s;
- border: 1px solid %(hard_color)s;
- padding: 5px 20px;
- border-radius: %(border_radius)s;
- background: %(hard_color)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: 0 2px 20px 0 %(hard_color)s inset, 0 2px 20px 0 %(hard_color)s;
- }
- #hard:hover {
- background: none;
- border-radius: %(border_radius)s;
- color: %(hard_color)s;
- box-shadow: none;
- }
- #good {
- color: %(text)s;
- border: 1px solid %(good_color)s;
- padding: 5px 20px;
- border-radius: %(border_radius)s;
- background: %(good_color)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: 0 2px 20px 0 %(good_color)s inset, 0 2px 20px 0 %(good_color)s;
- }
- #good:hover {
- background: none;
- border-radius: %(border_radius)s;
- color: %(good_color)s;
- box-shadow: none;
- }
- #easy {
- color: %(text)s;
- border: 1px solid %(easy_color)s;
- padding: 5px 20px;
- border-radius: %(border_radius)s;
- background: %(easy_color)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: 0 2px 20px 0 %(easy_color)s inset, 0 2px 20px 0 %(easy_color)s;
- }
- #easy:hover {
- background: none;
- border-radius: %(border_radius)s;
- color: %(easy_color)s;
- box-shadow: none;
- }
- </style>""" % dict(text=textColor, again_color=again_color,hard_color=hard_color,
- good_color=good_color, easy_color=easy_color, cursor=cursor, transition=transition, border_radius=border_radius)
-neon1 = """<style>
- #again {
- background: none;
- color: %(again_color)s;
- border: 1px solid %(again_color)s;
- padding: 5px 20px;
- border-radius: %(border_radius)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: none;
- }
- #again:hover {
- background: %(again_color)s;
- color: %(text)s;
- border-radius: %(border_radius)s;
- box-shadow: 0 2px 20px 0 %(again_color)s inset, 0 2px 20px 0 %(again_color)s;
- }
- #hard {
- background: none;
- color: %(hard_color)s;
- border: 1px solid %(hard_color)s;
- padding: 5px 20px;
- border-radius: %(border_radius)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: none;
- }
- #hard:hover {
- background: %(hard_color)s;
- color: %(text)s;
- border-radius: %(border_radius)s;
- box-shadow: 0 2px 20px 0 %(hard_color)s inset, 0 2px 20px 0 %(hard_color)s;
- }
- #good {
- background: none;
- color: %(good_color)s;
- border: 1px solid %(good_color)s;
- padding: 5px 20px;
- border-radius: %(border_radius)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: none;
- }
- #good:hover {
- background: %(good_color)s;
- color: %(text)s;
- border-radius: %(border_radius)s;
- box-shadow: 0 2px 20px 0 %(good_color)s inset, 0 2px 20px 0 %(good_color)s;
- }
- #easy {
- background: none;
- color: %(easy_color)s;
- border: 1px solid %(easy_color)s;
- padding: 5px 20px;
- border-radius: %(border_radius)s;
- cursor: %(cursor)s;
- transition: %(transition)s;
- box-shadow: none;
- }
- #easy:hover {
- background: %(easy_color)s;
- color: %(text)s;
- border-radius: %(border_radius)s;
- box-shadow: 0 2px 20px 0 %(easy_color)s inset, 0 2px 20px 0 %(easy_color)s;
- }
- </style>""" % dict(text=textColor, again_color=again_color, hard_color=hard_color,
- good_color=good_color, easy_color=easy_color, cursor=cursor, transition=transition, border_radius=border_radius)
-#// styling for text color change method
-text_color = """<style>
- #again {
- color: #BA0C0C;
- cursor: %(cursor)s;
- }
- #again:hover{
- %(again_hover)s
- }
- #hard {
- color: #BF720F;
- cursor: %(cursor)s;
- }
- #hard:hover{
- %(hard_hover)s
- }
- #good {
- color: #20A11C;
- cursor: %(cursor)s;
- }
- #good:hover{
- %(good_hover)s
- }
- #easy {
- color: #188AB8;
- cursor: %(cursor)s;
- }
- #easy:hover{
- %(easy_hover)s
- }
- </style>""" % dict(cursor=cursor, again_hover=again_hover, hard_hover=hard_hover, good_hover=good_hover, easy_hover=easy_hover)
-
-#// styling for background color change method
-if is_nightMode: #// style if anki version is 2.1.20 and night mode is enabled
- background_color = """<style>
- #again, #hard, #good, #easy {
- border: hidden;
- color: %(text)s;
- cursor: %(cursor)s;
- text-shadow: none;
- }
- #again {
- background: #BA0C0C;
- }
- #again:hover{
- color: %(text)s;
- %(again_hover)s
- }
- #hard {
- background: #BF720F;
- }
- #hard:hover{
- color: %(text)s;
- %(hard_hover)s
- }
- #good {
- background: #20A11C;
- }
- #good:hover{
- color: %(text)s;
- %(good_hover)s
- }
- #easy {
- background: #188AB8;
- }
- #easy:hover{
- color: %(text)s;
- %(easy_hover)s
- }
- </style>""" % dict (text=textColor, cursor=cursor, again_hover=again_hover, hard_hover=hard_hover, good_hover=good_hover, easy_hover=easy_hover)
-else: #// style if anki version is older than 2.1.20 or night mode is disabled
- background_color = """<style>
- #again, #hard, #good, #easy {
- border: hidden;
- color: %(text)s;
- cursor: %(cursor)s;
- text-shadow: none;
- border-radius: 3px;
- }
- #again {
- background: linear-gradient(0deg, #B52217, #CF271A);
- }
- #again:hover{
- color: %(text)s;
- %(again_hover)s
- }
- #hard {
- background: linear-gradient(0deg, #BF7707, #D98708);
- }
- #hard:hover{
- color: %(text)s;
- %(hard_hover)s
- }
- #good {
- background: linear-gradient(0deg, #1CA810, #20C212);
- }
- #good:hover{
- color: %(text)s;
- %(good_hover)s
- }
- #easy {
- background: linear-gradient(0deg, #0F95BA, #11AAD4);
- }
- #easy:hover{
- color: %(text)s;
- %(easy_hover)s
- }
- </style>""" % dict (text=textColor, cursor=cursor, again_hover=again_hover, hard_hover=hard_hover, good_hover=good_hover, easy_hover=easy_hover)
-
-#// styling for custom text color change method
-custom_text = """<style>
- #again {
- color: %(again_color)s;
- cursor: %(cursor)s;
- }
- #again:hover{
- %(again_hover)s
- }
- #hard {
- color: %(hard_color)s;
- cursor: %(cursor)s;
- }
- #hard:hover{
- %(hard_hover)s
- }
- #good {
- color: %(good_color)s;
- cursor: %(cursor)s;
- }
- #good:hover{
- %(good_hover)s
- }
- #easy {
- color: %(easy_color)s;
- cursor: %(cursor)s;
- }
- #easy:hover{
- %(easy_hover)s
- }
- </style>""" % dict(again_color=again_color, hard_color=hard_color, good_color=good_color, easy_color=easy_color, easy_hover_color=easy_hover_color,
- again_hover=again_hover, hard_hover=hard_hover, good_hover=good_hover, easy_hover=easy_hover, cursor=cursor)
-
-#// styling for custom background color change method
-if is_nightMode: #// style if anki version is 2.1.20 and above and night mode is endabled
- custom_background = """<style>
- #again, #hard, #good, #easy {
- border: hidden;
- color: %(text)s;
- cursor: %(cursor)s;
- text-shadow: none;
- }
- #again {
- background: %(again_color)s;
- }
- #again:hover{
- color: %(text)s;
- %(again_hover)s
- }
- #hard {
- background: %(hard_color)s;
- }
- #hard:hover{
- color: %(text)s;
- %(hard_hover)s
- }
- #good {
- background: %(good_color)s;
- }
- #good:hover{
- color: %(text)s;
- %(good_hover)s
- }
- #easy {
- background: %(easy_color)s;
- }
- #easy:hover{
- color: %(text)s;
- %(easy_hover)s
- }
- </style>""" % dict (text=textColor, cursor=cursor, again_color=again_color, hard_color=hard_color, good_color=good_color, easy_color=easy_color,
- again_hover=again_hover, hard_hover=hard_hover, good_hover=good_hover, easy_hover=easy_hover)
-else: #// style if anki is in day/light mode or anki version is older than 2.1.20
- custom_background = """<style>
- #again, #hard, #good, #easy {
- border: hidden;
- color: %(text)s;
- cursor: %(cursor)s;
- text-shadow: none;
- border-radius: 3px
- }
- #again {
- background: %(again_color)s;
- }
- #again:hover{
- color: %(text)s;
- background: %(again_hover_color)s;
- %(again_hover)s
- }
- #hard {
- background: %(hard_color)s;
- }
- #hard:hover{
- color: %(text)s;
- background: %(hard_hover_color)s;
- %(hard_hover)s
- }
- #good {
- background: %(good_color)s;
- }
- #good:hover{
- color: %(text)s;
- background: %(good_hover_color)s;
- %(good_hover)s
- }
- #easy {
- background: %(easy_color)s;
- }
- #easy:hover{
- color: %(text)s;
- background: %(easy_hover_color)s;
- %(easy_hover)s
- }
- </style>""" % dict (text=textColor, cursor=cursor, again_color=again_color, again_hover_color=again_hover_color, hard_color=hard_color, hard_hover_color=hard_hover_color, good_color=good_color, good_hover_color=good_hover_color, easy_color=easy_color, easy_hover_color=easy_hover_color,
- again_hover=again_hover, hard_hover=hard_hover, good_hover=good_hover, easy_hover=easy_hover)
-
-button_styles = """<style>
- .wide {
- min-width: 70px;
- width: 98%;
- margin: 6px 0px;
- padding: 3px 0px;
- font-size: 12px
- }
- .mybuttons {
- padding: 3px;
- font-size: 12px;
- }
- </style>"""
-######//////__END__ REVIEW BUTTONS DESIGNS __END__//////######
-
-######//////__BEGIN__ CARD INFO STYLING __BEGIN//////######
-light = """
-body {
- margin: 8px;
- background-color: #dedede;
-}
-p {
- margin-top: 1em;
- margin-bottom: 1em;
-}
-h1,h2,h3,h4{
- display: block;
- font-size: 1.17em;
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 0;
- margin-right: 0;
- font-weight: bold;
-}
-a:link {
- text-decoration: none;
- color:black;
-}
-
-/* anki.stats
-
-colYoung = "#7c7"
-colMature = "#070"
-colCum = "rgba(0,0,0,0.9)"
-colLearn = "#00F"
-colRelearn = "#c00"
-colCram = "#ff0"
-colIvl = "#077"
-colHour = "#ccc"
-colTime = "#770"
-colUnseen = "#000"
-colSusp = "#ff0"
-*/
-
-.color_learn {color: #00F;}
-.color_mature {color: #070;}
-.color_relearn {color: #c00;}
-.color_type3 {color: #3c9690;}
-.color_rest {color: #000;}
-.color_ease3 {color: navy;}
-.color_ease4 {color: darkgreen;}
-
-.critical_color_lower {color: red;}
-.critical_color_upper {color: blue;}
-"""
-dark = """
-body {
- background-color: #272828;
- color: #d7d7d7;
- margin: 8px;
-}
-p {
- background-color: #272828;
- color: #d7d7d7;
- margin-top: 1em;
- margin-bottom: 1em;
-}
-h1,h2,h3,h4{
- background-color: #272828;
- color: #d7d7d7;
- display: block;
- font-size: 1.17em;
- margin-top: 1em;
- margin-bottom: 1em;
- margin-left: 0;
- margin-right: 0;
- font-weight: bold;
-}
-a:link {
- text-decoration: none;
- color:#d7d7d7;
-}
-
-.color_learn {color: #01b3f5;}
-.color_mature {color: #070;}
-.color_relearn {color: #ff0000;}
-.color_type3 {color: #57d9d1;}
-.color_rest {color: #dedede;}
-.color_ease3 {color: #00aaff;}
-.color_ease4 {color: #55ff00;}
-
-.critical_color_lower {color: #ff0000;}
-.critical_color_upper {color: #00aaff;}
-"""
-######//////__END__ CARD INFO __END__//////######
diff --git a/.local/share/Anki2/addons21/advanced_review/user_files/Default Settings.json b/.local/share/Anki2/addons21/advanced_review/user_files/Default Settings.json
deleted file mode 100644
index 933622c..0000000
--- a/.local/share/Anki2/addons21/advanced_review/user_files/Default Settings.json
+++ /dev/null
@@ -1,115 +0,0 @@
-{
- " Button Colors": true,
- " Speed Focus Add-on": false,
- " Direct Config Edit": false,
- " More Overview Stats": 1,
- " Settings Menu Place": 0,
- " Skip Method": 0,
- " Style Main Screen Buttons": true,
- " Review_ Active Button Indicator": 1,
- " Review_ Hover Effect": 1,
- " Review_ Buttons Style": 0,
- " Review_ Bottombar Buttons Style": 0,
- " Review_ Custom Colors": false,
- " Review_ Custom Review Button Text Color": false,
- " Review_ Custom Active Indicator Color": false,
- " Review_ Cursor Style": 0,
- " Review_ Button Transition Time": 500,
- " Review_ Button Border Radius": 5,
- " Review_ Interval Style": 0,
- "Button_ Info Button": true,
- "Button_ Skip Button": true,
- "Button_ Show Skipped Button": false,
- "Button_ Undo Button": false,
- "Button_ Hide Hard": false,
- "Button_ Hide Good": false,
- "Button_ Hide Again": false,
- "Button_ Custom Button Sizes": false,
- "Button_ Shortcut_ Skip Button": "c",
- "Button_ Shortcut_ Show Skipped Button": "Alt + c",
- "Button_ Shortcut_ Info Button": "f4",
- "Button_ Shortcut_ Undo Button": "x",
- "Button_ Position_ Info Button": "left",
- "Button_ Position_ Skip Button": "middle left",
- "Button_ Position_ Show Skipped Button": "middle left",
- "Button_ Position_ Undo Button": "middle right",
- "Button_ Text Size": 14,
- "Button_ Height_ All Bottombar Buttons": 30,
- "Button_ Width_ Edit Button": 60,
- "Button_ Width_ Show Answer Button": 100,
- "Button_ Width_ Info Button": 60,
- "Button_ Width_ Skip Button": 60,
- "Button_ Width_ Show Skipped Button": 60,
- "Button_ Width_ More Button": 60,
- "Button_ Width_ Review Buttons": 60,
- "Button_ Width_ Undo Button": 60,
- "Button Label_ Study Now": "Study Now",
- "Button Label_ Edit": "Edit",
- "Button Label_ Show Answer": "Show Answer",
- "Button Label_ More": "More",
- "Button Label_ Info": "Info",
- "Button Label_ Skip": "Skip",
- "Button Label_ Show Skipped": "Show Skipped",
- "Button Label_ Undo": "Undo Review",
- "Button Label_ Again": "Again",
- "Button Label_ Hard": "Hard",
- "Button Label_ Good": "Good",
- "Button Label_ Easy": "Easy",
- "Card Info sidebar_ Number of previous cards to show": 0,
- "Card Info sidebar_ Default Position": 0,
- "Card Info sidebar_ theme": 0,
- "Card Info sidebar_ Created": true,
- "Card Info sidebar_ Edited": true,
- "Card Info sidebar_ First Review": true,
- "Card Info sidebar_ Latest Review": true,
- "Card Info sidebar_ Due": true,
- "Card Info sidebar_ Interval": true,
- "Card Info sidebar_ Ease": true,
- "Card Info sidebar_ Reviews": true,
- "Card Info sidebar_ Lapses": true,
- "Card Info Sidebar_ Correct Percent": true,
- "Card Info Sidebar_ Fastest Review": true,
- "Card Info Sidebar_ Slowest Review": true,
- "Card Info sidebar_ Average Time": true,
- "Card Info sidebar_ Total Time": true,
- "Card Info sidebar_ Card Type": true,
- "Card Info sidebar_ Note Type": true,
- "Card Info sidebar_ Deck": true,
- "Card Info sidebar_ Tags": true,
- "Card Info Sidebar_ Note ID": false,
- "Card Info Sidebar_ Card ID": false,
- "Card Info sidebar_ Sort Field": true,
- "Card Info sidebar_ Current Review Count": true,
- "Card Info sidebar_ Font": "consolas",
- "Card Info sidebar_ number of reviews to show for a card": 0,
- "Card Info sidebar_ Auto Open": false,
- "Card Info sidebar_ warning note": false,
- "Color_ General Text Color": "#ffffff",
- "Color_ Active Button Indicator": "#ffffff",
- "Color_ Bottombar Button Text Color": "#FF1111",
- "Color_ Bottombar Button Border Color": "#FF1111",
- "Color_ Custom Bottombar Button Text Color": false,
- "Color_ Custom Bottombar Button Border Color": false,
- "Color_ Again": "#BA0C0C",
- "Color_ Again on hover": "#FF1111",
- "Color_ Hard": "#BF720F",
- "Color_ Hard on hover": "#FF9814",
- "Color_ Good": "#20A11C",
- "Color_ Good on hover": "#33FF2D",
- "Color_ Easy": "#188AB8",
- "Color_ Easy on hover": "#21C0FF",
- "Tooltip": true,
- "Tooltip Timer": 500,
- "Tooltip Text Color": "#000",
- "Tooltip Style": 0,
- "Tooltip Position": [100, -100],
- "ShowAnswer_ Border Color Style": 0,
- "ShowAnswer_ Ease1": 200,
- "ShowAnswer_ Ease2": 250,
- "ShowAnswer_ Ease3": 300,
- "ShowAnswer_ Ease4": 350,
- "ShowAnswer_ Ease1 Color": "#FF1111",
- "ShowAnswer_ Ease2 Color": "#FF9814",
- "ShowAnswer_ Ease3 Color": "#33FF2D",
- "ShowAnswer_ Ease4 Color": "#21C0FF"
- }
diff --git a/.local/share/Anki2/addons21/advanced_review/user_files/Large and Colorful Buttons.json b/.local/share/Anki2/addons21/advanced_review/user_files/Large and Colorful Buttons.json
deleted file mode 100644
index 4a3f4a5..0000000
--- a/.local/share/Anki2/addons21/advanced_review/user_files/Large and Colorful Buttons.json
+++ /dev/null
@@ -1,118 +0,0 @@
-{
- " Button Colors": true,
- " Speed Focus Add-on": false,
- " Direct Config Edit": false,
- " More Overview Stats": 1,
- " Settings Menu Place": 0,
- " Skip Method": 0,
- " Style Main Screen Buttons": true,
- " Review_ Active Button Indicator": 1,
- " Review_ Buttons Style": 1,
- " Review_ Hover Effect": 1,
- " Review_ Custom Colors": true,
- " Review_ Custom Review Button Text Color": true,
- " Review_ Custom Active Indicator Color": true,
- " Review_ Bottombar Buttons Style": 0,
- " Review_ Cursor Style": 1,
- " Review_ Interval Style": 1,
- " Review_ Button Transition Time": 300,
- " Review_ Button Border Radius": 6,
- "Button_ Info Button": true,
- "Button_ Skip Button": false,
- "Button_ Show Skipped Button": false,
- "Button_ Undo Button": false,
- "Button_ Hide Hard": false,
- "Button_ Hide Good": false,
- "Button_ Hide Easy": false,
- "Button_ Custom Button Sizes": true,
- "Button_ Shortcut_ Skip Button": "c",
- "Button_ Shortcut_ Show Skipped Button": "Alt + c",
- "Button_ Shortcut_ Info Button": "f4",
- "Button_ Shortcut_ Undo Button": "x",
- "Button_ Position_ Info Button": "left",
- "Button_ Position_ Skip Button": "middle left",
- "Button_ Position_ Show Skipped Button": "middle left",
- "Button_ Position_ Undo Button": "middle right",
- "Button_ Text Size": 14,
- "Button_ Height_ All Bottombar Buttons": 64,
- "Button_ Width_ Edit Button": 60,
- "Button_ Width_ Show Answer Button": 360,
- "Button_ Width_ Info Button": 60,
- "Button_ Width_ Skip Button": 60,
- "Button_ Width_ Show Skipped Button": 60,
- "Button_ Width_ More Button": 60,
- "Button_ Width_ Review Buttons": 96,
- "Button_ Width_ Undo Button": 60,
- "Button Label_ Study Now": "Study Now",
- "Button Label_ Edit": "Edit",
- "Button Label_ Show Answer": "Show Answer",
- "Button Label_ More": "More",
- "Button Label_ Info": "Info",
- "Button Label_ Skip": "Skip",
- "Button Label_ Show Skipped": "Show Skipped",
- "Button Label_ Undo": "Undo Review",
- "Button Label_ Again": "Again",
- "Button Label_ Hard": "Hard",
- "Button Label_ Good": "Good",
- "Button Label_ Easy": "Easy",
- "Card Info sidebar_ Number of previous cards to show": 3,
- "Card Info sidebar_ Default Position": 0,
- "Card Info sidebar_ theme": 0,
- "Card Info sidebar_ Created": true,
- "Card Info sidebar_ Edited": true,
- "Card Info sidebar_ First Review": true,
- "Card Info sidebar_ Latest Review": true,
- "Card Info sidebar_ Due": true,
- "Card Info sidebar_ Interval": true,
- "Card Info sidebar_ Ease": true,
- "Card Info sidebar_ Reviews": true,
- "Card Info sidebar_ Lapses": true,
- "Card Info Sidebar_ Correct Percent": true,
- "Card Info Sidebar_ Fastest Review": true,
- "Card Info Sidebar_ Slowest Review": true,
- "Card Info sidebar_ Average Time": true,
- "Card Info sidebar_ Total Time": true,
- "Card Info sidebar_ Card Type": false,
- "Card Info sidebar_ Note Type": false,
- "Card Info sidebar_ Deck": false,
- "Card Info sidebar_ Tags": true,
- "Card Info Sidebar_ Note ID": false,
- "Card Info Sidebar_ Card ID": false,
- "Card Info sidebar_ Sort Field": false,
- "Card Info sidebar_ Current Review Count": true,
- "Card Info sidebar_ Font": "Consolas",
- "Card Info sidebar_ number of reviews to show for a card": 5,
- "Card Info sidebar_ Auto Open": false,
- "Card Info sidebar_ warning note": false,
- "Color_ General Text Color": "#ffffff",
- "Color_ Active Button Indicator": "#155182",
- "Color_ Bottombar Button Text Color": "#FF1111",
- "Color_ Bottombar Button Border Color": "#FF1111",
- "Color_ Custom Bottombar Button Text Color": false,
- "Color_ Custom Bottombar Button Border Color": false,
- "Color_ Again": "#5a5a5a",
- "Color_ Again on hover": "#d32f2f",
- "Color_ Hard": "#5a5a5a",
- "Color_ Hard on hover": "#455a64",
- "Color_ Good": "#5a5a5a",
- "Color_ Good on hover": "#4caf50",
- "Color_ Easy": "#5a5a5a",
- "Color_ Easy on hover": "#03a9f4",
- "Tooltip": true,
- "Tooltip Timer": 300,
- "Tooltip Text Color": "#000",
- "Tooltip Style": 0,
- "Tooltip Position": [
- 100,
- -100
- ],
- "ShowAnswer_ Border Color Style": 0,
- "ShowAnswer_ Ease1": 200,
- "ShowAnswer_ Ease2": 250,
- "ShowAnswer_ Ease3": 300,
- "ShowAnswer_ Ease4": 350,
- "ShowAnswer_ Ease1 Color": "#FF1111",
- "ShowAnswer_ Ease2 Color": "#FF9814",
- "ShowAnswer_ Ease3 Color": "#33FF2D",
- "ShowAnswer_ Ease4 Color": "#21C0FF"
-}
diff --git a/.local/share/Anki2/addons21/advanced_review/user_files/My Settings (Large Buttons).json b/.local/share/Anki2/addons21/advanced_review/user_files/My Settings (Large Buttons).json
deleted file mode 100644
index 4ae525d..0000000
--- a/.local/share/Anki2/addons21/advanced_review/user_files/My Settings (Large Buttons).json
+++ /dev/null
@@ -1,118 +0,0 @@
-{
- " Button Colors": true,
- " Speed Focus Add-on": false,
- " Direct Config Edit": false,
- " More Overview Stats": 1,
- " Settings Menu Place": 0,
- " Skip Method": 0,
- " Style Main Screen Buttons": true,
- " Review_ Active Button Indicator": 1,
- " Review_ Buttons Style": 6,
- " Review_ Hover Effect": 1,
- " Review_ Custom Colors": false,
- " Review_ Custom Review Button Text Color": false,
- " Review_ Custom Active Indicator Color": false,
- " Review_ Bottombar Buttons Style": 3,
- " Review_ Cursor Style": 0,
- " Review_ Interval Style": 1,
- " Review_ Button Transition Time": 300,
- " Review_ Button Border Radius": 5,
- "Button_ Info Button": true,
- "Button_ Skip Button": false,
- "Button_ Show Skipped Button": false,
- "Button_ Undo Button": false,
- "Button_ Hide Hard": false,
- "Button_ Hide Good": false,
- "Button_ Hide Easy": false,
- "Button_ Custom Button Sizes": true,
- "Button_ Shortcut_ Skip Button": "c",
- "Button_ Shortcut_ Show Skipped Button": "Alt + c",
- "Button_ Shortcut_ Info Button": "f4",
- "Button_ Shortcut_ Undo Button": "x",
- "Button_ Position_ Info Button": "left",
- "Button_ Position_ Skip Button": "middle left",
- "Button_ Position_ Show Skipped Button": "middle left",
- "Button_ Position_ Undo Button": "middle right",
- "Button_ Text Size": 18,
- "Button_ Height_ All Bottombar Buttons": 50,
- "Button_ Width_ Edit Button": 60,
- "Button_ Width_ Show Answer Button": 250,
- "Button_ Width_ Info Button": 60,
- "Button_ Width_ Skip Button": 60,
- "Button_ Width_ Show Skipped Button": 60,
- "Button_ Width_ More Button": 75,
- "Button_ Width_ Review Buttons": 100,
- "Button_ Width_ Undo Button": 60,
- "Button Label_ Study Now": "Study Now",
- "Button Label_ Edit": "Edit",
- "Button Label_ Show Answer": "Show Answer",
- "Button Label_ More": "More",
- "Button Label_ Info": "Info",
- "Button Label_ Skip": "Skip",
- "Button Label_ Show Skipped": "Show Skipped",
- "Button Label_ Undo": "Undo Review",
- "Button Label_ Again": "Again",
- "Button Label_ Hard": "Hard",
- "Button Label_ Good": "Good",
- "Button Label_ Easy": "Easy",
- "Card Info sidebar_ Number of previous cards to show": 3,
- "Card Info sidebar_ Default Position": 0,
- "Card Info sidebar_ theme": 0,
- "Card Info sidebar_ Created": true,
- "Card Info sidebar_ Edited": true,
- "Card Info sidebar_ First Review": true,
- "Card Info sidebar_ Latest Review": true,
- "Card Info sidebar_ Due": true,
- "Card Info sidebar_ Interval": true,
- "Card Info sidebar_ Ease": true,
- "Card Info sidebar_ Reviews": true,
- "Card Info sidebar_ Lapses": true,
- "Card Info Sidebar_ Correct Percent": true,
- "Card Info Sidebar_ Fastest Review": true,
- "Card Info Sidebar_ Slowest Review": true,
- "Card Info sidebar_ Average Time": true,
- "Card Info sidebar_ Total Time": true,
- "Card Info sidebar_ Card Type": false,
- "Card Info sidebar_ Note Type": false,
- "Card Info sidebar_ Deck": false,
- "Card Info sidebar_ Tags": true,
- "Card Info Sidebar_ Note ID": false,
- "Card Info Sidebar_ Card ID": false,
- "Card Info sidebar_ Sort Field": false,
- "Card Info sidebar_ Current Review Count": true,
- "Card Info sidebar_ Font": "Consolas",
- "Card Info sidebar_ number of reviews to show for a card": 5,
- "Card Info sidebar_ Auto Open": false,
- "Card Info sidebar_ warning note": false,
- "Color_ General Text Color": "#ffffff",
- "Color_ Active Button Indicator": "#ffffff",
- "Color_ Bottombar Button Text Color": "#FF1111",
- "Color_ Bottombar Button Border Color": "#FF1111",
- "Color_ Custom Bottombar Button Text Color": true,
- "Color_ Custom Bottombar Button Border Color": true,
- "Color_ Again": "#BA0C0C",
- "Color_ Again on hover": "#FF1111",
- "Color_ Hard": "#BF720F",
- "Color_ Hard on hover": "#FF9814",
- "Color_ Good": "#20A11C",
- "Color_ Good on hover": "#33FF2D",
- "Color_ Easy": "#188AB8",
- "Color_ Easy on hover": "#21C0FF",
- "Tooltip": true,
- "Tooltip Timer": 300,
- "Tooltip Text Color": "#000",
- "Tooltip Style": 0,
- "Tooltip Position": [
- 100,
- -100
- ],
- "ShowAnswer_ Border Color Style": 1,
- "ShowAnswer_ Ease1": 200,
- "ShowAnswer_ Ease2": 250,
- "ShowAnswer_ Ease3": 300,
- "ShowAnswer_ Ease4": 350,
- "ShowAnswer_ Ease1 Color": "#FF1111",
- "ShowAnswer_ Ease2 Color": "#FF9814",
- "ShowAnswer_ Ease3 Color": "#33FF2D",
- "ShowAnswer_ Ease4 Color": "#21C0FF"
-}
diff --git a/.local/share/Anki2/addons21/advanced_review/user_files/My Settings.json b/.local/share/Anki2/addons21/advanced_review/user_files/My Settings.json
deleted file mode 100644
index 7153a93..0000000
--- a/.local/share/Anki2/addons21/advanced_review/user_files/My Settings.json
+++ /dev/null
@@ -1,118 +0,0 @@
-{
- " Button Colors": true,
- " Speed Focus Add-on": false,
- " Direct Config Edit": false,
- " More Overview Stats": 1,
- " Settings Menu Place": 0,
- " Skip Method": 0,
- " Style Main Screen Buttons": true,
- " Review_ Active Button Indicator": 1,
- " Review_ Buttons Style": 6,
- " Review_ Hover Effect": 1,
- " Review_ Custom Colors": false,
- " Review_ Custom Review Button Text Color": false,
- " Review_ Custom Active Indicator Color": false,
- " Review_ Bottombar Buttons Style": 3,
- " Review_ Cursor Style": 0,
- " Review_ Interval Style": 1,
- " Review_ Button Transition Time": 300,
- " Review_ Button Border Radius": 5,
- "Button_ Info Button": true,
- "Button_ Skip Button": false,
- "Button_ Show Skipped Button": false,
- "Button_ Undo Button": false,
- "Button_ Hide Hard": false,
- "Button_ Hide Good": false,
- "Button_ Hide Easy": false,
- "Button_ Custom Button Sizes": false,
- "Button_ Shortcut_ Skip Button": "c",
- "Button_ Shortcut_ Show Skipped Button": "Alt + c",
- "Button_ Shortcut_ Info Button": "f4",
- "Button_ Shortcut_ Undo Button": "x",
- "Button_ Position_ Info Button": "left",
- "Button_ Position_ Skip Button": "middle left",
- "Button_ Position_ Show Skipped Button": "middle left",
- "Button_ Position_ Undo Button": "middle right",
- "Button_ Text Size": 21,
- "Button_ Height_ All Bottombar Buttons": 51,
- "Button_ Width_ Edit Button": 60,
- "Button_ Width_ Show Answer Button": 100,
- "Button_ Width_ Info Button": 60,
- "Button_ Width_ Skip Button": 60,
- "Button_ Width_ Show Skipped Button": 60,
- "Button_ Width_ More Button": 60,
- "Button_ Width_ Review Buttons": 200,
- "Button_ Width_ Undo Button": 60,
- "Button Label_ Study Now": "Study Now",
- "Button Label_ Edit": "Edit",
- "Button Label_ Show Answer": "Show Answer",
- "Button Label_ More": "More",
- "Button Label_ Info": "Info",
- "Button Label_ Skip": "Skip",
- "Button Label_ Show Skipped": "Show Skipped",
- "Button Label_ Undo": "Undo Review",
- "Button Label_ Again": "Again",
- "Button Label_ Hard": "Hard",
- "Button Label_ Good": "Good",
- "Button Label_ Easy": "Easy",
- "Card Info sidebar_ Number of previous cards to show": 3,
- "Card Info sidebar_ Default Position": 0,
- "Card Info sidebar_ theme": 0,
- "Card Info sidebar_ Created": true,
- "Card Info sidebar_ Edited": true,
- "Card Info sidebar_ First Review": true,
- "Card Info sidebar_ Latest Review": true,
- "Card Info sidebar_ Due": true,
- "Card Info sidebar_ Interval": true,
- "Card Info sidebar_ Ease": true,
- "Card Info sidebar_ Reviews": true,
- "Card Info sidebar_ Lapses": true,
- "Card Info Sidebar_ Correct Percent": true,
- "Card Info Sidebar_ Fastest Review": true,
- "Card Info Sidebar_ Slowest Review": true,
- "Card Info sidebar_ Average Time": true,
- "Card Info sidebar_ Total Time": true,
- "Card Info sidebar_ Card Type": false,
- "Card Info sidebar_ Note Type": false,
- "Card Info sidebar_ Deck": false,
- "Card Info sidebar_ Tags": true,
- "Card Info Sidebar_ Note ID": false,
- "Card Info Sidebar_ Card ID": false,
- "Card Info sidebar_ Sort Field": false,
- "Card Info sidebar_ Current Review Count": true,
- "Card Info sidebar_ Font": "Consolas",
- "Card Info sidebar_ number of reviews to show for a card": 5,
- "Card Info sidebar_ Auto Open": false,
- "Card Info sidebar_ warning note": false,
- "Color_ General Text Color": "#ffffff",
- "Color_ Active Button Indicator": "#ffffff",
- "Color_ Bottombar Button Text Color": "#FF1111",
- "Color_ Bottombar Button Border Color": "#FF1111",
- "Color_ Custom Bottombar Button Text Color": true,
- "Color_ Custom Bottombar Button Border Color": true,
- "Color_ Again": "#BA0C0C",
- "Color_ Again on hover": "#FF1111",
- "Color_ Hard": "#BF720F",
- "Color_ Hard on hover": "#FF9814",
- "Color_ Good": "#20A11C",
- "Color_ Good on hover": "#33FF2D",
- "Color_ Easy": "#188AB8",
- "Color_ Easy on hover": "#21C0FF",
- "Tooltip": true,
- "Tooltip Timer": 300,
- "Tooltip Text Color": "#000",
- "Tooltip Style": 0,
- "Tooltip Position": [
- 100,
- -100
- ],
- "ShowAnswer_ Border Color Style": 1,
- "ShowAnswer_ Ease1": 200,
- "ShowAnswer_ Ease2": 250,
- "ShowAnswer_ Ease3": 300,
- "ShowAnswer_ Ease4": 350,
- "ShowAnswer_ Ease1 Color": "#FF1111",
- "ShowAnswer_ Ease2 Color": "#FF9814",
- "ShowAnswer_ Ease3 Color": "#33FF2D",
- "ShowAnswer_ Ease4 Color": "#21C0FF"
-}