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 aqt import AnkiQt
|
||||
from aqt.qt import *
|
||||
from aqt.theme import theme_manager
|
||||
from aqt.utils import (
|
||||
TR,
|
||||
HelpPage,
|
||||
|
@ -62,6 +63,12 @@ class DeckConf(QDialog):
|
|||
if search is not None:
|
||||
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)
|
||||
self.setWindowModality(Qt.WindowModal)
|
||||
qconnect(
|
||||
|
@ -112,8 +119,6 @@ class DeckConf(QDialog):
|
|||
)
|
||||
|
||||
def initialSetup(self):
|
||||
qconnect(self.form.search_button.clicked, self.on_search_button)
|
||||
|
||||
import anki.consts as cs
|
||||
|
||||
self.form.order.addItems(list(cs.dynOrderLabels(self.mw.col).values()))
|
||||
|
|
|
@ -22,17 +22,9 @@
|
|||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="search_button">
|
||||
<property name="font">
|
||||
<font>
|
||||
<underline>true</underline>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>SEARCH_VIEW_IN_BROWSER</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton { text-align: left; color: blue; padding: 0; border: 0 }</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ACTIONS_SEARCH</string>
|
||||
</property>
|
||||
|
|
Loading…
Reference in a new issue