Prevent colourscheme oddness setting null foreground/background colours. Closes LP #553383
This commit is contained in:
parent
dde412a53b
commit
d6e011281e
|
@ -958,15 +958,19 @@ class PrefsEditor:
|
||||||
elif value == 'ambience':
|
elif value == 'ambience':
|
||||||
forecol = '#FFFFFF'
|
forecol = '#FFFFFF'
|
||||||
backcol = '#300A24'
|
backcol = '#300A24'
|
||||||
|
elif value == 'custom':
|
||||||
|
forecol = fore.get_color().to_string()
|
||||||
|
backcol = back.get_color().to_string()
|
||||||
|
else:
|
||||||
|
err('Unknown colourscheme value: %s' % value)
|
||||||
|
return
|
||||||
|
|
||||||
if forecol is not None:
|
fore.set_color(gtk.gdk.Color(forecol))
|
||||||
fore.set_color(gtk.gdk.Color(forecol))
|
back.set_color(gtk.gdk.Color(backcol))
|
||||||
if backcol is not None:
|
|
||||||
back.set_color(gtk.gdk.Color(backcol))
|
|
||||||
|
|
||||||
self.config['color_scheme'] = value
|
|
||||||
self.config['foreground_color'] = forecol
|
self.config['foreground_color'] = forecol
|
||||||
self.config['background_color'] = backcol
|
self.config['background_color'] = backcol
|
||||||
|
self.config['color_scheme'] = value
|
||||||
self.config.save()
|
self.config.save()
|
||||||
|
|
||||||
def on_use_theme_colors_checkbutton_toggled(self, widget):
|
def on_use_theme_colors_checkbutton_toggled(self, widget):
|
||||||
|
|
Loading…
Reference in New Issue