Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _update_palette(self, palette):
# template and apply the primary stylesheet
themed_stylesheet = template(self.raw_stylesheet, **palette)
self.console.style_sheet = themed_stylesheet
self.console.syntax_style = palette['syntax_style']
bracket_color = QtGui.QColor(*str_to_rgb(palette['highlight']))
self.console._bracket_matcher.format.setBackground(bracket_color)
self.setStyleSheet(themed_stylesheet)
self.aboutKeybindings.setStyleSheet(themed_stylesheet)
self.canvas.bgcolor = palette['canvas']
def _update_palette(self, palette):
# set window styles which don't use the primary stylesheet
# FIXME: this is a problem with the stylesheet not using properties
self._status_bar.setStyleSheet(
template(
'QStatusBar { background: {{ background }}; '
'color: {{ text }}; }',
**palette,
)
)
self._qt_center.setStyleSheet(
template('QWidget { background: {{ background }}; }', **palette)
)
self._qt_window.setStyleSheet(template(self.raw_stylesheet, **palette))
def _update_palette(self, palette):
# set window styles which don't use the primary stylesheet
# FIXME: this is a problem with the stylesheet not using properties
self._status_bar.setStyleSheet(
template(
'QStatusBar { background: {{ background }}; '
'color: {{ text }}; }',
**palette,
)
)
self._qt_center.setStyleSheet(
template('QWidget { background: {{ background }}; }', **palette)
)
self._qt_window.setStyleSheet(template(self.raw_stylesheet, **palette))
def _update_palette(self, palette):
# set window styles which don't use the primary stylesheet
# FIXME: this is a problem with the stylesheet not using properties
self._status_bar.setStyleSheet(
template(
'QStatusBar { background: {{ background }}; '
'color: {{ text }}; }',
**palette,
)
)
self._qt_center.setStyleSheet(
template('QWidget { background: {{ background }}; }', **palette)
)
self._qt_window.setStyleSheet(template(self.raw_stylesheet, **palette))