Skip to content

Commit 8b2b45c

Browse files
alikefianicoe
authored andcommitted
Get bg color from user prefs [CUSTOM]
* color: get bg color from user prefs: fix #5157 * comment fork patches
1 parent da92f30 commit 8b2b45c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tryton/gui/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,12 @@ def get_preferences(self, date=''):
554554
Action.execute(action_id, {})
555555
connexion_date = date.strftime('%d/%m/%Y') if date else ''
556556
self.set_title(prefs.get('status_bar', ''), connexion_date)
557+
# AKE: change bg color based on preferences
558+
color_bg = prefs.get('color_bg', None
559+
) or os.environ.get('TRYTON_CLIENT_BG_COLOR', None)
560+
if color_bg:
561+
self.window.modify_bg(Gtk.StateType.NORMAL,
562+
Gdk.color_parse(color_bg))
557563
if prefs and 'language' in prefs:
558564
translate.setlang(prefs['language'], prefs.get('locale'))
559565
if CONFIG['client.lang'] != prefs['language']:

0 commit comments

Comments
 (0)