MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / setTextColor

Method setTextColor

pyxrf/gui_module/useful_widgets.py:757–772  ·  view source on GitHub ↗

Set text color for the widget. This color is used in 'normal' (valid) state. Parameters ---------- rgb: tuple(int) RGB color in the form of (R, G, B)

(self, rgb)

Source from the content-addressed store, hash-verified

755 self.le_max_value.setStyleSheet(get_background_css(rgb, widget="QLineEdit", editable=True))
756
757 def setTextColor(self, rgb):
758 """
759 Set text color for the widget. This color is used in 'normal' (valid) state.
760
761 Parameters
762 ----------
763 rgb: tuple(int)
764 RGB color in the form of (R, G, B)
765 """
766 color = QColor(*rgb)
767 pal = self.le_min_value.palette()
768 pal.setColor(QPalette.Text, color)
769 self.le_min_value.setPalette(pal)
770 pal = self.le_max_value.palette()
771 pal.setColor(QPalette.Text, color)
772 self.le_max_value.setPalette(pal)
773
774 def set_value_type(self, value_type="float"):
775 """

Callers 3

fill_tableMethod · 0.95
_setup_rgb_elementMethod · 0.95
fill_tableMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected