[gnome-terminal] screen: Use NULL for bold colour when same-as-fg is used
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] screen: Use NULL for bold colour when same-as-fg is used
- Date: Thu, 26 Sep 2013 20:42:54 +0000 (UTC)
commit ab688fa1d20a62127c69994f3d3fc064bf2fd9c6
Author: Christian Persch <chpe gnome org>
Date: Thu Sep 26 20:03:05 2013 +0200
screen: Use NULL for bold colour when same-as-fg is used
https://bugzilla.gnome.org/show_bug.cgi?id=706398
src/terminal-screen.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 8ebcf3e..1e040c9 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -835,6 +835,7 @@ update_color_scheme (TerminalScreen *screen)
GdkRGBA *colors;
gsize n_colors;
GdkRGBA fg, bg, bold, theme_fg, theme_bg;
+ GdkRGBA *boldp;
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
@@ -849,14 +850,16 @@ update_color_scheme (TerminalScreen *screen)
bg = theme_bg;
}
- if (g_settings_get_boolean (profile, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG_KEY) ||
- !terminal_g_settings_get_rgba (profile, TERMINAL_PROFILE_BOLD_COLOR_KEY, &bold))
- bold = fg;
+ if (!g_settings_get_boolean (profile, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG_KEY) &&
+ terminal_g_settings_get_rgba (profile, TERMINAL_PROFILE_BOLD_COLOR_KEY, &bold))
+ boldp = &bold;
+ else
+ boldp = NULL;
colors = terminal_g_settings_get_rgba_palette (priv->profile, TERMINAL_PROFILE_PALETTE_KEY, &n_colors);
vte_terminal_set_colors_rgba (VTE_TERMINAL (screen), &fg, &bg,
colors, n_colors);
- vte_terminal_set_color_bold_rgba (VTE_TERMINAL (screen), &bold);
+ vte_terminal_set_color_bold_rgba (VTE_TERMINAL (screen), boldp);
g_free (colors);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]