Update background image without restarting
This commit is contained in:
parent
25902fd73e
commit
a06e7951f6
|
@ -212,6 +212,7 @@ DEFAULTS = {
|
||||||
'background_color' : '#000000',
|
'background_color' : '#000000',
|
||||||
'background_darkness' : 0.5,
|
'background_darkness' : 0.5,
|
||||||
'background_type' : 'solid',
|
'background_type' : 'solid',
|
||||||
|
'background_image' : '',
|
||||||
'backspace_binding' : 'ascii-del',
|
'backspace_binding' : 'ascii-del',
|
||||||
'delete_binding' : 'escape-sequence',
|
'delete_binding' : 'escape-sequence',
|
||||||
'color_scheme' : 'grey_on_black',
|
'color_scheme' : 'grey_on_black',
|
||||||
|
@ -253,8 +254,6 @@ DEFAULTS = {
|
||||||
'autoclean_groups' : True,
|
'autoclean_groups' : True,
|
||||||
'http_proxy' : '',
|
'http_proxy' : '',
|
||||||
'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'],
|
'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'],
|
||||||
'background_image' : '',
|
|
||||||
'background_alpha' : 0.0,
|
|
||||||
# Titlebar
|
# Titlebar
|
||||||
'title_hide_sizetext' : False,
|
'title_hide_sizetext' : False,
|
||||||
'title_transmit_fg_color' : '#ffffff',
|
'title_transmit_fg_color' : '#ffffff',
|
||||||
|
|
|
@ -149,12 +149,6 @@ class Terminal(Gtk.VBox):
|
||||||
self.composite_support = True
|
self.composite_support = True
|
||||||
dbg('composite_support: %s' % self.composite_support)
|
dbg('composite_support: %s' % self.composite_support)
|
||||||
|
|
||||||
self.background_alpha = self.config['background_darkness']
|
|
||||||
if self.config['background_type'] == 'image' and self.config['background_image'] != '':
|
|
||||||
self.set_background_image(self.config['background_image'])
|
|
||||||
else:
|
|
||||||
self.background_image = None
|
|
||||||
|
|
||||||
self.vte.show()
|
self.vte.show()
|
||||||
self.update_url_matches()
|
self.update_url_matches()
|
||||||
|
|
||||||
|
@ -723,11 +717,16 @@ class Terminal(Gtk.VBox):
|
||||||
self.bgcolor = Gdk.RGBA()
|
self.bgcolor = Gdk.RGBA()
|
||||||
self.bgcolor.parse(self.config['background_color'])
|
self.bgcolor.parse(self.config['background_color'])
|
||||||
|
|
||||||
if self.config['background_type'] == 'transparent' or self.config['background_type'] == 'image':
|
if self.config['background_type'] in ('transparent', 'image'):
|
||||||
self.bgcolor.alpha = self.config['background_darkness']
|
self.bgcolor.alpha = self.config['background_darkness']
|
||||||
else:
|
else:
|
||||||
self.bgcolor.alpha = 1
|
self.bgcolor.alpha = 1
|
||||||
|
|
||||||
|
if self.config['background_type'] == 'image' and self.config['background_image'] != '':
|
||||||
|
self.set_background_image(self.config['background_image'])
|
||||||
|
else:
|
||||||
|
self.background_image = None
|
||||||
|
|
||||||
factor = self.config['inactive_color_offset']
|
factor = self.config['inactive_color_offset']
|
||||||
if factor > 1.0:
|
if factor > 1.0:
|
||||||
factor = 1.0
|
factor = 1.0
|
||||||
|
|
Loading…
Reference in New Issue