From: Urban Wallasch Date: Wed, 23 Jun 2021 19:32:22 +0000 (+0200) Subject: * Fixed radical list stroke count separator behavior and color. X-Git-Tag: v0.1.0~49 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=8b095fd66b99e9df8d357354fd0a98f92fee2093;p=jiten-pai.git * Fixed radical list stroke count separator behavior and color. --- diff --git a/kanjidic.py b/kanjidic.py index 904bf91..8b7c75e 100755 --- a/kanjidic.py +++ b/kanjidic.py @@ -514,10 +514,13 @@ class kdRadicalList(QDialog): continue sep = zRadicalButton(str(stroke)) sep.setEnabled(False) - sep.setStyleSheet('background-color: #ffffff; border: none;') + sep.setStyleSheet('background-color: %s; color: #ffffff; border: none;' % cfg['hl_col']) + sep.is_sep = True self._add_widget(sep) for rad in _srad[stroke]: - self._add_widget(zRadicalButton(rad)) + btn = zRadicalButton(rad) + btn.is_sep = False + self._add_widget(btn) if geo is not None: self.setGeometry(geo) else: @@ -547,11 +550,11 @@ class kdRadicalList(QDialog): def set_avail(self, avail): if avail is None: for btn in self.btns: - if not btn.isFlat(): + if not btn.is_sep: btn.setEnabled(True) else: for btn in self.btns: - if not btn.isChecked() and not btn.isFlat(): + if not btn.isChecked() and not btn.is_sep: btn.setEnabled(btn.text() in avail)