Skip to content

Commit

Permalink
Use changes_require_restart_warning() in Interface Colors
Browse files Browse the repository at this point in the history
  • Loading branch information
zas committed Apr 12, 2024
1 parent 86e4378 commit 490ce9d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions picard/ui/options/interface_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
register_options_page,
)
from picard.ui.ui_options_interface_colors import Ui_InterfaceColorsOptionsPage
from picard.ui.util import changes_require_restart_warning


class ColorButton(QtWidgets.QPushButton):
Expand Down Expand Up @@ -141,13 +142,7 @@ def load(self):

def save(self):
if interface_colors.save_to_config():
dialog = QtWidgets.QMessageBox(
QtWidgets.QMessageBox.Icon.Information,
_("Colors changed"),
_("You have changed the interface colors. You may have to restart Picard in order for the changes to take effect."),
QtWidgets.QMessageBox.StandardButton.Ok,
self)
dialog.exec()
changes_require_restart_warning(self, warnings=[_("You have changed the interface colors.")])

def restore_defaults(self):
interface_colors.set_default_colors()
Expand Down

0 comments on commit 490ce9d

Please sign in to comment.