diff options
author | Antenore Gatta <antenore@simbiosi.org> | 2021-01-07 18:31:19 +0300 |
---|---|---|
committer | Antenore Gatta <antenore@simbiosi.org> | 2021-01-07 18:31:19 +0300 |
commit | c1c49ff82f40ed77dfca42136e5402ac1cad765a (patch) | |
tree | e2189cfb2ddd07085b019e7b8b01987b779b7acb | |
parent | 8f9f43ae1292a33296edf1053cbd7edfefa02445 (diff) |
Updating colors and fixing bold and brightenss issues
-rw-r--r-- | data/theme/Aurora.colors | 23 | ||||
-rw-r--r-- | data/theme/Guezwhoz.colors | 23 | ||||
-rw-r--r-- | data/theme/Overnight Slumber.colors | 23 | ||||
-rw-r--r-- | data/theme/Rapture.colors | 23 | ||||
-rw-r--r-- | data/theme/jubi.colors | 23 | ||||
-rw-r--r-- | data/ui/remmina_preferences.glade | 72 | ||||
-rw-r--r-- | src/remmina_pref.c | 2 | ||||
-rw-r--r-- | src/remmina_pref.h | 1 | ||||
-rw-r--r-- | src/remmina_pref_dialog.c | 8 | ||||
-rw-r--r-- | src/remmina_pref_dialog.h | 2 | ||||
-rw-r--r-- | src/remmina_ssh_plugin.c | 17 |
11 files changed, 193 insertions, 24 deletions
diff --git a/data/theme/Aurora.colors b/data/theme/Aurora.colors new file mode 100644 index 000000000..651f243f1 --- /dev/null +++ b/data/theme/Aurora.colors @@ -0,0 +1,23 @@ +[ssh_colors] +background = #23262e +cursor = #ee5d43 +foreground = #ffca28 +color0 = #23262e +color1 = #f0266f +color2 = #8fd46d +color3 = #ffe66d +color4 = #0321d7 +color5 = #ee5d43 +color6 = #03d6b8 +color7 = #c74ded +color8 = #292e38 +color9 = #f92672 +color10 = #8fd46d +color11 = #ffe66d +color12 = #03d6b8 +color13 = #ee5d43 +color14 = #03d6b8 +color15 = #c74ded +colorBD = #fbfbff +colorIT = +colorUL = #596181 diff --git a/data/theme/Guezwhoz.colors b/data/theme/Guezwhoz.colors new file mode 100644 index 000000000..d0cf067a1 --- /dev/null +++ b/data/theme/Guezwhoz.colors @@ -0,0 +1,23 @@ +[ssh_colors] +background = #1c1c1c +cursor = #eeeeee +foreground = #d0d0d0 +color0 = #080808 +color1 = #ff5f5f +color2 = #87d7af +color3 = #d7d787 +color4 = #5fafd7 +color5 = #afafff +color6 = #5fd7d7 +color7 = #dadada +color8 = #8a8a8a +color9 = #d75f5f +color10 = #afd7af +color11 = #d7d7af +color12 = #87afd7 +color13 = #afafd7 +color14 = #87d7d7 +color15 = #dadada +colorBD = #eeeeee +colorIT = +colorUL = #783232 diff --git a/data/theme/Overnight Slumber.colors b/data/theme/Overnight Slumber.colors new file mode 100644 index 000000000..c8871651e --- /dev/null +++ b/data/theme/Overnight Slumber.colors @@ -0,0 +1,23 @@ +[ssh_colors] +background = #0e1729 +cursor = #ffa7c4 +foreground = #ced2d6 +color0 = #0a1222 +color1 = #ffa7c4 +color2 = #85cc95 +color3 = #ffcb8b +color4 = #8dabe1 +color5 = #c792eb +color6 = #78ccf0 +color7 = #ffffff +color8 = #575656 +color9 = #ffa7c4 +color10 = #85cc95 +color11 = #ffcb8b +color12 = #8dabe1 +color13 = #c792eb +color14 = #ffa7c4 +color15 = #ffffff +colorBD = #ffcb8b +colorIT = +colorUL = diff --git a/data/theme/Rapture.colors b/data/theme/Rapture.colors new file mode 100644 index 000000000..85d811401 --- /dev/null +++ b/data/theme/Rapture.colors @@ -0,0 +1,23 @@ +[ssh_colors] +background = #111e2a +cursor = #ffffff +foreground = #c0c9e5 +color0 = #000000 +color1 = #fc644d +color2 = #7afde1 +color3 = #fff09b +color4 = #6c9bf5 +color5 = #ff4fa1 +color6 = #64e0ff +color7 = #c0c9e5 +color8 = #304b66 +color9 = #fc644d +color10 = #7afde1 +color11 = #fff09b +color12 = #6c9bf5 +color13 = #ff4fa1 +color14 = #64e0ff +color15 = #ffffff +colorBD = #d5ced9 +colorIT = +colorUL = diff --git a/data/theme/jubi.colors b/data/theme/jubi.colors new file mode 100644 index 000000000..a8d0f90bb --- /dev/null +++ b/data/theme/jubi.colors @@ -0,0 +1,23 @@ +[ssh_colors] +background = #262b33 +cursor = #c3d3de +foreground = #c3d3de +color0 = #3b3750 +color1 = #cf7b98 +color2 = #90a94b +color3 = #6ebfc0 +color4 = #576ea6 +color5 = #bc4f68 +color6 = #75a7d2 +color7 = #c3d3de +color8 = #a874ce +color9 = #de90ab +color10 = #bcdd61 +color11 = #87e9ea +color12 = #8c9fcd +color13 = #e16c87 +color14 = #b7c9ef +color15 = #d5e5f1 +colorBD = #a874ce +colorIT = +colorUL = diff --git a/data/ui/remmina_preferences.glade b/data/ui/remmina_preferences.glade index d2309d2c6..896fb785a 100644 --- a/data/ui/remmina_preferences.glade +++ b/data/ui/remmina_preferences.glade @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 +<!-- Generated with glade 3.36.0 Remmina Preferences Dialog - Copyright © 2014-2021 Antenore Gatta, Giovanni Panozzo @@ -1923,6 +1923,7 @@ Author: Antenore Gatta <object class="GtkSwitch" id="switch_terminal_bold"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes">Sets whether the SGR 1 attribute also switches to the bright counterpart of the first 8 palette colors, in addition to making them bold (legacy behavior) or if SGR 1 only enables bold and leaves the color intact.</property> <property name="halign">start</property> </object> <packing> @@ -1937,7 +1938,7 @@ Author: Antenore Gatta <property name="can_focus">False</property> <property name="halign">start</property> <property name="margin_left">18</property> - <property name="label" translatable="yes">Allow bold text</property> + <property name="label" translatable="yes">Allow using bright colours with bold text</property> </object> <packing> <property name="left_attach">0</property> @@ -1955,7 +1956,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">15</property> + <property name="top_attach">16</property> </packing> </child> <child> @@ -1970,7 +1971,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">15</property> + <property name="top_attach">16</property> <property name="width">8</property> </packing> </child> @@ -1984,7 +1985,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -1996,7 +1997,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -2008,7 +2009,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">2</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -2020,7 +2021,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">3</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -2032,7 +2033,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">4</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -2044,7 +2045,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">5</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -2056,7 +2057,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">6</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -2068,7 +2069,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">7</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -2081,7 +2082,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">8</property> - <property name="top_attach">14</property> + <property name="top_attach">15</property> </packing> </child> <child> @@ -2093,7 +2094,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2105,7 +2106,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">2</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2117,7 +2118,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">3</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2129,7 +2130,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">4</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2141,7 +2142,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">5</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2153,7 +2154,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">6</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2165,7 +2166,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">7</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2178,7 +2179,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">8</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2191,7 +2192,7 @@ Author: Antenore Gatta </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">13</property> + <property name="top_attach">14</property> </packing> </child> <child> @@ -2370,6 +2371,33 @@ Author: Antenore Gatta <property name="width">8</property> </packing> </child> + <child> + <object class="GtkLabel" id="label_terminal_bold_color"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Bold colour</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">13</property> + </packing> + </child> + <child> + <object class="GtkColorButton" id="colorbutton_bold"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="halign">start</property> + <property name="margin_end">18</property> + <property name="title" translatable="yes">Cursor colour</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">13</property> + <property name="width">8</property> + </packing> + </child> </object> <packing> <property name="position">6</property> diff --git a/src/remmina_pref.c b/src/remmina_pref.c index 57add8264..4d4bfec53 100644 --- a/src/remmina_pref.c +++ b/src/remmina_pref.c @@ -186,6 +186,7 @@ void remmina_pref_file_load_colors(GKeyFile *gkeyfile, RemminaColorPref *color_p } colors[] = { { "background", &color_pref->background, "#d5ccba" }, { "cursor", &color_pref->cursor, "#45373c" }, + { "bold", &color_pref->bold, "#45373c" }, { "foreground", &color_pref->foreground, "#45373c" }, { "color0", &color_pref->color0, "#20111b" }, { "color1", &color_pref->color1, "#be100e" }, @@ -823,6 +824,7 @@ gboolean remmina_pref_save(void) g_key_file_set_integer(gkeyfile, "remmina_pref", "vte_lines", remmina_pref.vte_lines); g_key_file_set_string(gkeyfile, "ssh_colors", "background", remmina_pref.color_pref.background ? remmina_pref.color_pref.background : ""); g_key_file_set_string(gkeyfile, "ssh_colors", "cursor", remmina_pref.color_pref.cursor ? remmina_pref.color_pref.cursor : ""); + g_key_file_set_string(gkeyfile, "ssh_colors", "bold", remmina_pref.color_pref.bold ? remmina_pref.color_pref.bold : ""); g_key_file_set_string(gkeyfile, "ssh_colors", "foreground", remmina_pref.color_pref.foreground ? remmina_pref.color_pref.foreground : ""); g_key_file_set_string(gkeyfile, "ssh_colors", "color0", remmina_pref.color_pref.color0 ? remmina_pref.color_pref.color0 : ""); g_key_file_set_string(gkeyfile, "ssh_colors", "color1", remmina_pref.color_pref.color1 ? remmina_pref.color_pref.color1 : ""); diff --git a/src/remmina_pref.h b/src/remmina_pref.h index 3593c487a..a7964a2f5 100644 --- a/src/remmina_pref.h +++ b/src/remmina_pref.h @@ -89,6 +89,7 @@ typedef struct _RemminaColorPref { /* Color palette for VTE terminal */ gchar * background; gchar * cursor; + gchar * bold; gchar * foreground; gchar * color0; gchar * color1; diff --git a/src/remmina_pref_dialog.c b/src/remmina_pref_dialog.c index 3fd3a12ab..6f228753b 100644 --- a/src/remmina_pref_dialog.c +++ b/src/remmina_pref_dialog.c @@ -316,6 +316,8 @@ void remmina_pref_on_dialog_destroy(GtkWidget *widget, gpointer user_data) remmina_pref.color_pref.background = gdk_rgba_to_string(&color); gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(remmina_pref_dialog->colorbutton_cursor), &color); remmina_pref.color_pref.cursor = gdk_rgba_to_string(&color); + gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(remmina_pref_dialog->colorbutton_bold), &color); + remmina_pref.color_pref.bold = gdk_rgba_to_string(&color); gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(remmina_pref_dialog->colorbutton_color0), &color); remmina_pref.color_pref.color0 = gdk_rgba_to_string(&color); gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(remmina_pref_dialog->colorbutton_color1), &color); @@ -520,6 +522,9 @@ static void remmina_pref_dialog_init(void) /* Cursor color option */ gdk_rgba_parse(&color, remmina_pref.color_pref.cursor); gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(remmina_pref_dialog->colorbutton_cursor), &color); + /* Bold color option */ + gdk_rgba_parse(&color, remmina_pref.color_pref.bold); + gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(remmina_pref_dialog->colorbutton_bold), &color); /* 16 colors */ gdk_rgba_parse(&color, remmina_pref.color_pref.color0); gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(remmina_pref_dialog->colorbutton_color0), &color); @@ -557,6 +562,7 @@ static void remmina_pref_dialog_init(void) #if !VTE_CHECK_VERSION(0, 38, 0) /* Disable color scheme buttons if old version of VTE */ gtk_widget_set_sensitive(GTK_WIDGET(remmina_pref_dialog->colorbutton_cursor), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(remmina_pref_dialog->colorbutton_bold), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(remmina_pref_dialog->colorbutton_color0), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(remmina_pref_dialog->colorbutton_color1), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(remmina_pref_dialog->colorbutton_color2), FALSE); @@ -708,6 +714,8 @@ GtkDialog* remmina_pref_dialog_new(gint default_tab, GtkWindow *parent) remmina_pref_dialog->colorbutton_background = GTK_COLOR_BUTTON(GET_OBJECT("colorbutton_background")); remmina_pref_dialog->label_terminal_cursor_color = GTK_LABEL(GET_OBJECT("label_terminal_cursor_color")); remmina_pref_dialog->colorbutton_cursor = GTK_COLOR_BUTTON(GET_OBJECT("colorbutton_cursor")); + remmina_pref_dialog->label_terminal_bold_color = GTK_LABEL(GET_OBJECT("label_terminal_bold_color")); + remmina_pref_dialog->colorbutton_bold = GTK_COLOR_BUTTON(GET_OBJECT("colorbutton_bold")); remmina_pref_dialog->label_terminal_normal_colors = GTK_LABEL(GET_OBJECT("label_terminal_normal_colors")); remmina_pref_dialog->colorbutton_color0 = GTK_COLOR_BUTTON(GET_OBJECT("colorbutton_color0")); remmina_pref_dialog->colorbutton_color1 = GTK_COLOR_BUTTON(GET_OBJECT("colorbutton_color1")); diff --git a/src/remmina_pref_dialog.h b/src/remmina_pref_dialog.h index 20d35dea8..18319c629 100644 --- a/src/remmina_pref_dialog.h +++ b/src/remmina_pref_dialog.h @@ -117,9 +117,11 @@ typedef struct _RemminaPrefDialog { GtkButton * button_keyboard_decrease_font; GtkButton * button_keyboard_search_text; GtkLabel * label_terminal_cursor_color; + GtkLabel * label_terminal_bold_color; GtkLabel * label_terminal_normal_colors; GtkLabel * label_terminal_bright_colors; GtkColorButton * colorbutton_cursor; + GtkColorButton * colorbutton_bold; GtkColorButton * colorbutton_color0; GtkColorButton * colorbutton_color1; GtkColorButton * colorbutton_color2; diff --git a/src/remmina_ssh_plugin.c b/src/remmina_ssh_plugin.c index db6b82788..b821897ca 100644 --- a/src/remmina_ssh_plugin.c +++ b/src/remmina_ssh_plugin.c @@ -444,8 +444,10 @@ remmina_plugin_ssh_set_vte_pref(RemminaProtocolWidget *gp) pango_font_description_from_string(remmina_pref.vte_font)); #endif } -#if VTE_CHECK_VERSION(0, 50, 0) - REMMINA_DEBUG ("vte_terminal_set_allow_bold not set as deprecated"); + +#if VTE_CHECK_VERSION (0, 51, 3) + REMMINA_DEBUG ("Using vte_terminal_set_bold_is_bright instead of vte_terminal_set_allow_bold as deprecated"); + vte_terminal_set_bold_is_bright(VTE_TERMINAL(gpdata->vte), remmina_pref.vte_allow_bold_text); #else vte_terminal_set_allow_bold(VTE_TERMINAL(gpdata->vte), remmina_pref.vte_allow_bold_text); #endif @@ -867,6 +869,7 @@ remmina_plugin_ssh_init(RemminaProtocolWidget *gp) #if VTE_CHECK_VERSION(0, 38, 0) GdkRGBA cp[PALETTE_SIZE]; GdkRGBA cursor_color; + GdkRGBA bold_color; /* * custom colors reside inside of the 'theme' subdir of the remmina config folder (.config/remmina/theme) @@ -919,6 +922,7 @@ remmina_plugin_ssh_init(RemminaProtocolWidget *gp) gdk_rgba_parse(&foreground_color, color_pref.foreground); gdk_rgba_parse(&background_color, color_pref.background); gdk_rgba_parse(&cursor_color, color_pref.cursor); + gdk_rgba_parse(&bold_color, color_pref.bold); gdk_rgba_parse(&cp[0], color_pref.color0); gdk_rgba_parse(&cp[1], color_pref.color1); @@ -952,42 +956,49 @@ remmina_plugin_ssh_init(RemminaProtocolWidget *gp) gdk_rgba_parse(&foreground_color, "#ffffff"); gdk_rgba_parse(&background_color, "#000000"); gdk_rgba_parse(&cursor_color, "#ffffff"); + gdk_rgba_parse(&bold_color, "#ffffff"); remminavte.palette = linux_palette; break; case TANGO: gdk_rgba_parse(&foreground_color, "#eeeeec"); gdk_rgba_parse(&background_color, "#2e3436"); gdk_rgba_parse(&cursor_color, "#8ae234"); + gdk_rgba_parse(&bold_color, "#eeeeec"); remminavte.palette = tango_palette; break; case GRUVBOX: gdk_rgba_parse(&foreground_color, "#ebdbb2"); gdk_rgba_parse(&background_color, "#282828"); gdk_rgba_parse(&cursor_color, "#d3869b"); + gdk_rgba_parse(&bold_color, "#ffffff"); remminavte.palette = gruvbox_palette; break; case SOLARIZED_DARK: gdk_rgba_parse(&foreground_color, "#839496"); gdk_rgba_parse(&background_color, "#002b36"); gdk_rgba_parse(&cursor_color, "#93a1a1"); + gdk_rgba_parse(&bold_color, "#819090"); remminavte.palette = solarized_dark_palette; break; case SOLARIZED_LIGHT: gdk_rgba_parse(&foreground_color, "#657b83"); gdk_rgba_parse(&background_color, "#fdf6e3"); gdk_rgba_parse(&cursor_color, "#586e75"); + gdk_rgba_parse(&bold_color, "#475b62"); remminavte.palette = solarized_light_palette; break; case XTERM: gdk_rgba_parse(&foreground_color, "#000000"); gdk_rgba_parse(&background_color, "#ffffff"); gdk_rgba_parse(&cursor_color, "#000000"); + gdk_rgba_parse(&bold_color, "#000000"); remminavte.palette = xterm_palette; break; case CUSTOM: gdk_rgba_parse(&foreground_color, remmina_pref.color_pref.foreground); gdk_rgba_parse(&background_color, remmina_pref.color_pref.background); gdk_rgba_parse(&cursor_color, remmina_pref.color_pref.cursor); + gdk_rgba_parse(&bold_color, remmina_pref.color_pref.bold); gdk_rgba_parse(&cp[0], remmina_pref.color_pref.color0); gdk_rgba_parse(&cp[1], remmina_pref.color_pref.color1); @@ -1025,6 +1036,8 @@ remmina_plugin_ssh_init(RemminaProtocolWidget *gp) vte_terminal_set_color_foreground(VTE_TERMINAL(vte), &foreground_color); vte_terminal_set_color_background(VTE_TERMINAL(vte), &background_color); vte_terminal_set_color_cursor(VTE_TERMINAL(vte), &cursor_color); + vte_terminal_set_color_bold(VTE_TERMINAL(vte), &bold_color); + #else /* VTE <= 2.90 doesn’t support GdkRGBA so we must convert GdkRGBA to GdkColor */ foreground_gdkcolor.red = (guint16)(foreground_color.red * 0xFFFF); |