Skip to content
Snippets Groups Projects

change changed status's color to blue

Merged Lan Dam requested to merge i256_change_changed_color_to_blue into develop
2 unresolved threads
Files
3
@@ -23,6 +23,7 @@ from sohstationviewer.view.db_config.value_color_helper.functions import \
from sohstationviewer.view.db_config.param_helper import \
validate_value_color_str
from sohstationviewer.view.util.plot_type_info import plot_types
from sohstationviewer.view.util.color import COLOR
plot_types_with_value_colors = [
@@ -129,7 +130,7 @@ class ValueColorEdit(QTextEdit):
Set border color for the widget.
:param color: color to set to border
"""
self.setStyleSheet("QTextEdit {border: 2px solid %s;}" % color)
self.setStyleSheet("QTextEdit {border: 4px solid %s;}" % color)
def set_background_color(self, background: str):
"""
@@ -162,12 +163,12 @@ class ValueColorEdit(QTextEdit):
def set_border_color_according_to_value_color_status(self):
"""
Set border color according to current value color string.
+ Red for changed
+ Blue for changed
+ Same color as background (no border) for other case.
"""
if self.value_color_str != self.org_value_color_str:
# Show that value_color_str has been changed
self.set_border_color('red')
self.set_border_color(COLOR['changedStatus'])
else:
# Reset border the same color as background
self.set_border_color(self.background)
@@ -187,7 +188,7 @@ class ValueColorEdit(QTextEdit):
'upDownDots': UpDownDialog,
}
# set border color blue showing that the widget is being edited
self.set_border_color('blue')
self.set_border_color(COLOR['changedStatus'])
edit_dialog = plot_type_dialog_map[self.plot_type](
self, self.value_color_str
)
Loading