mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Style browser-from-filtered-deck button
Use theme color and add hover effect.
This commit is contained in:
parent
4d097b995d
commit
0d37254238
2 changed files with 7 additions and 10 deletions
|
@ -10,6 +10,7 @@ from anki.errors import InvalidInput
|
||||||
from anki.lang import without_unicode_isolation
|
from anki.lang import without_unicode_isolation
|
||||||
from aqt import AnkiQt
|
from aqt import AnkiQt
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
|
from aqt.theme import theme_manager
|
||||||
from aqt.utils import (
|
from aqt.utils import (
|
||||||
TR,
|
TR,
|
||||||
HelpPage,
|
HelpPage,
|
||||||
|
@ -62,6 +63,12 @@ class DeckConf(QDialog):
|
||||||
if search is not None:
|
if search is not None:
|
||||||
self.form.search.setText(search)
|
self.form.search.setText(search)
|
||||||
|
|
||||||
|
qconnect(self.form.search_button.clicked, self.on_search_button)
|
||||||
|
color = theme_manager.str_color("link")
|
||||||
|
self.setStyleSheet(
|
||||||
|
f"""QPushButton[flat=true] {{ text-align: left; color: {color}; padding: 0; border: 0 }}
|
||||||
|
QPushButton[flat=true]:hover {{ text-decoration: underline }}"""
|
||||||
|
)
|
||||||
disable_help_button(self)
|
disable_help_button(self)
|
||||||
self.setWindowModality(Qt.WindowModal)
|
self.setWindowModality(Qt.WindowModal)
|
||||||
qconnect(
|
qconnect(
|
||||||
|
@ -112,8 +119,6 @@ class DeckConf(QDialog):
|
||||||
)
|
)
|
||||||
|
|
||||||
def initialSetup(self):
|
def initialSetup(self):
|
||||||
qconnect(self.form.search_button.clicked, self.on_search_button)
|
|
||||||
|
|
||||||
import anki.consts as cs
|
import anki.consts as cs
|
||||||
|
|
||||||
self.form.order.addItems(list(cs.dynOrderLabels(self.mw.col).values()))
|
self.form.order.addItems(list(cs.dynOrderLabels(self.mw.col).values()))
|
||||||
|
|
|
@ -22,17 +22,9 @@
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QPushButton" name="search_button">
|
<widget class="QPushButton" name="search_button">
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<underline>true</underline>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>SEARCH_VIEW_IN_BROWSER</string>
|
<string>SEARCH_VIEW_IN_BROWSER</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QPushButton { text-align: left; color: blue; padding: 0; border: 0 }</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ACTIONS_SEARCH</string>
|
<string>ACTIONS_SEARCH</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue