[gnome-terminal] screen: Don't use extra colours when using theme colors
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] screen: Don't use extra colours when using theme colors
- Date: Sat, 13 Feb 2016 20:19:55 +0000 (UTC)
commit c8e90edd258bce6fa1431eaa763a3d69ee324d8d
Author: Christian Persch <chpe gnome org>
Date: Sat Feb 13 21:19:40 2016 +0100
screen: Don't use extra colours when using theme colors
When using theme colours, do not apply the bold and cursor bolours.
src/terminal-screen.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 81613b9..ba26c69 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -892,12 +892,14 @@ update_color_scheme (TerminalScreen *screen)
GdkRGBA fg, bg, bold, theme_fg, theme_bg, cursor_bg, cursor_fg;
GdkRGBA *boldp, *cursor_bgp = NULL, *cursor_fgp = NULL;
GtkStyleContext *context;
+ gboolean use_theme_colors;
context = gtk_widget_get_style_context (widget);
gtk_style_context_get_color (context, gtk_style_context_get_state (context), &theme_fg);
gtk_style_context_get_background_color (context, gtk_style_context_get_state (context), &theme_bg);
- if (g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_THEME_COLORS_KEY) ||
+ use_theme_colors = g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_THEME_COLORS_KEY);
+ if (use_theme_colors ||
(!terminal_g_settings_get_rgba (profile, TERMINAL_PROFILE_FOREGROUND_COLOR_KEY, &fg) ||
!terminal_g_settings_get_rgba (profile, TERMINAL_PROFILE_BACKGROUND_COLOR_KEY, &bg)))
{
@@ -906,12 +908,14 @@ update_color_scheme (TerminalScreen *screen)
}
if (!g_settings_get_boolean (profile, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG_KEY) &&
+ !use_theme_colors &&
terminal_g_settings_get_rgba (profile, TERMINAL_PROFILE_BOLD_COLOR_KEY, &bold))
boldp = &bold;
else
boldp = NULL;
- if (g_settings_get_boolean (profile, TERMINAL_PROFILE_CURSOR_COLORS_SET_KEY))
+ if (g_settings_get_boolean (profile, TERMINAL_PROFILE_CURSOR_COLORS_SET_KEY) &&
+ !use_theme_colors)
{
if (terminal_g_settings_get_rgba (profile, TERMINAL_PROFILE_CURSOR_BACKGROUND_COLOR_KEY, &cursor_bg))
cursor_bgp = &cursor_bg;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]