chnage banner style when theme 'banner'
properties change.
This commit is contained in:
parent
61c64536c8
commit
b628d8f849
11
src/chat.py
11
src/chat.py
|
@ -1369,13 +1369,18 @@ class Chat:
|
||||||
textcolor = gajim.config.get_per('themes', theme, 'bannertextcolor')
|
textcolor = gajim.config.get_per('themes', theme, 'bannertextcolor')
|
||||||
# the backgrounds are colored by using an eventbox by
|
# the backgrounds are colored by using an eventbox by
|
||||||
# setting the bg color of the eventbox and the fg of the name_label
|
# setting the bg color of the eventbox and the fg of the name_label
|
||||||
|
banner_eventbox = self.xmls[jid].get_widget('banner_eventbox')
|
||||||
|
banner_name_label = self.xmls[jid].get_widget('banner_name_label')
|
||||||
if bgcolor:
|
if bgcolor:
|
||||||
self.xmls[jid].get_widget('banner_eventbox').modify_bg(
|
banner_eventbox.modify_bg(gtk.STATE_NORMAL,
|
||||||
gtk.STATE_NORMAL, gtk.gdk.color_parse(bgcolor))
|
gtk.gdk.color_parse(bgcolor))
|
||||||
|
else:
|
||||||
|
banner_eventbox.modify_bg(gtk.STATE_NORMAL, None)
|
||||||
if textcolor:
|
if textcolor:
|
||||||
banner_name_label = self.xmls[jid].get_widget('banner_name_label')
|
|
||||||
banner_name_label.modify_fg(gtk.STATE_NORMAL,
|
banner_name_label.modify_fg(gtk.STATE_NORMAL,
|
||||||
gtk.gdk.color_parse(textcolor))
|
gtk.gdk.color_parse(textcolor))
|
||||||
|
else:
|
||||||
|
banner_name_label.modify_fg(gtk.STATE_NORMAL, None)
|
||||||
|
|
||||||
def repaint_colored_widgets(self):
|
def repaint_colored_widgets(self):
|
||||||
"""Repaint widgets (banner) in the window/tab with theme color"""
|
"""Repaint widgets (banner) in the window/tab with theme color"""
|
||||||
|
|
|
@ -511,8 +511,8 @@ class PreferencesWindow:
|
||||||
|
|
||||||
# begin repainting themed widgets throughout
|
# begin repainting themed widgets throughout
|
||||||
self.plugin.roster.repaint_themed_widgets()
|
self.plugin.roster.repaint_themed_widgets()
|
||||||
|
self.plugin.roster.change_roster_style(None)
|
||||||
self.plugin.save_config()
|
self.plugin.save_config()
|
||||||
self.plugin.roster.draw_roster()
|
|
||||||
|
|
||||||
def merge_windows(self, kind):
|
def merge_windows(self, kind):
|
||||||
for acct in gajim.connections:
|
for acct in gajim.connections:
|
||||||
|
|
Loading…
Reference in New Issue