Small fixes

This commit is contained in:
BasioMeusPuga
2018-04-17 11:24:16 +05:30
parent cbf01c6d16
commit 335479bcfb
5 changed files with 28 additions and 5 deletions

View File

@@ -187,21 +187,22 @@ class AnnotationsUI(QtWidgets.QDialog, annotationswindow.Ui_Dialog):
self.update_preview()
return
new_color = None
if sender == self.foregroundColorButton:
new_color = self.get_color(self.foregroundColor)
self.set_button_background_color(self.foregroundColorButton, new_color)
self.foregroundColor = new_color
if sender == self.highlightColorButton:
new_color = self.get_color(self.highlightColor)
self.set_button_background_color(self.highlightColorButton, new_color)
self.highlightColor = new_color
if sender == self.underlineColorButton:
new_color = self.get_color(self.underlineColor)
self.set_button_background_color(self.underlineColorButton, new_color)
self.underlineColor = new_color
if new_color:
self.set_button_background_color(sender, new_color)
self.update_preview()
def get_color(self, current_color):