Skip to content

Commit

Permalink
Make slightly DRYer
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Jul 3, 2023
1 parent 0647a28 commit c14a3df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions calibre-plugin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ def __init__(self, plugin_action):
widget_row_pos = 0

# Setup Status
is_configured = bool(PREFS[PreferenceKeys.LIBBY_TOKEN])
self.libby_setup_status_lbl = QLabel(
_("Libby is configured.")
if PREFS[PreferenceKeys.LIBBY_TOKEN]
if is_configured
else _("Libby is not configured yet.")
)
self.libby_setup_status_lbl.setStyleSheet(
"font-weight: bold; "
f'color: {"#00D228" if PREFS[PreferenceKeys.LIBBY_TOKEN] else "#FF0F00"};'
"font-weight: bold; " f'color: {"#00D228" if is_configured else "#FF0F00"};'
)
self.layout.addWidget(self.libby_setup_status_lbl, widget_row_pos, 0)
label_column_widths.append(
Expand Down

0 comments on commit c14a3df

Please sign in to comment.