From 7f9968eb43263225f9c11cf48ce2b84b0179b149 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Fri, 27 Jan 2017 19:19:53 -0800 Subject: [PATCH 1/9] Improve GTK+3 theme loading - Merge geany-3.0.css into geany.css - Load geany-3.20.css to override if runtime version dictates - Load geany.css from app->configdir if it exists. --- data/Makefile.am | 1 - data/geany-3.0.css | 10 ------- data/geany-3.20.css | 2 -- data/geany.css | 9 +++++++ src/ui_utils.c | 66 ++++++++++++++++++++++++--------------------- 5 files changed, 45 insertions(+), 43 deletions(-) delete mode 100644 data/geany-3.0.css diff --git a/data/Makefile.am b/data/Makefile.am index 51dedcc876..4b291f8eaf 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -115,7 +115,6 @@ nobase_dist_pkgdata_DATA = \ if GTK3 nobase_dist_pkgdata_DATA += \ - geany-3.0.css \ geany-3.20.css \ geany.css else diff --git a/data/geany-3.0.css b/data/geany-3.0.css deleted file mode 100644 index 5420974599..0000000000 --- a/data/geany-3.0.css +++ /dev/null @@ -1,10 +0,0 @@ -@import "geany.css"; - -/* make close button on the editor's tabs smaller */ -#geany-close-tab-button { - -GtkWidget-focus-padding: 0; - -GtkWidget-focus-line-width: 0; - -GtkButton-default-border: 0; - -GtkButton-default-outside-border: 0; - -GtkButton-inner-border: 0; -} diff --git a/data/geany-3.20.css b/data/geany-3.20.css index 5cbde30097..7d3a702825 100644 --- a/data/geany-3.20.css +++ b/data/geany-3.20.css @@ -1,5 +1,3 @@ -@import "geany.css"; - /* make close button on the editor's tabs smaller */ #geany-close-tab-button { outline-offset: 0; diff --git a/data/geany.css b/data/geany.css index 1c1f4cf986..9559ef3c3d 100644 --- a/data/geany.css +++ b/data/geany.css @@ -40,3 +40,12 @@ #geany-terminal-dirty { color: #ff0000; } + +/* make close button on the editor's tabs smaller */ +#geany-close-tab-button { + -GtkWidget-focus-padding: 0; + -GtkWidget-focus-line-width: 0; + -GtkButton-default-border: 0; + -GtkButton-default-outside-border: 0; + -GtkButton-inner-border: 0; +} diff --git a/src/ui_utils.c b/src/ui_utils.c index 702a3453ae..aff58bc7fd 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2472,46 +2472,52 @@ void ui_init_builder(void) } -static void init_custom_style(void) -{ #if GTK_CHECK_VERSION(3, 0, 0) - const struct { - guint version; - const gchar *file; - } css_files[] = { - /* - * Keep these from newest to oldest, - * and make sure 0 remains last - */ - { 20, "geany-3.20.css" }, - { 0, "geany-3.0.css" }, - }; - guint gtk_version = gtk_get_minor_version(); - gsize i = 0; - gchar *css_file; - GtkCssProvider *css = gtk_css_provider_new(); +static void load_css_theme(const gchar *fn, guint priority) +{ + GtkCssProvider *provider = gtk_css_provider_new(); GError *error = NULL; - /* gtk_version will never be smaller than 0 */ - while (css_files[i].version > gtk_version) - ++i; - - css_file = g_build_filename(app->datadir, css_files[i].file, NULL); - if (! gtk_css_provider_load_from_path(css, css_file, &error)) + if (! gtk_css_provider_load_from_path(provider, fn, &error)) { g_warning("Failed to load custom CSS: %s", error->message); g_error_free(error); + return; } - else + + gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), + GTK_STYLE_PROVIDER(provider), priority); + geany_debug("Loaded GTK+ CSS theme '%s'", fn); + + g_object_unref(provider); +} +#endif + + +// see setup_gtk2_styles() in libmain.c for GTK+ 2-specific theme initialization +static void init_custom_style(void) +{ +#if GTK_CHECK_VERSION(3, 0, 0) + gchar *theme_fn; + + // load the main geany.css file from system data dir + theme_fn = g_build_filename(app->datadir, "geany.css", NULL); + load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + g_free(theme_fn); + + // if runtime GTK+ version is >= 3.20 then override with some needed version-specific changes + if (gtk_check_version(3, 20, 0) == NULL) { - gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), - GTK_STYLE_PROVIDER(css), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + theme_fn = g_build_filename(app->datadir, "geany-3.20.css", NULL); + load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + g_free(theme_fn); } - g_object_unref(css); - g_free(css_file); -#else - /* see setup_gtk2_styles() in main.c */ + // if the user provided a geany.css file in their config dir, try and load that + theme_fn = g_build_filename(app->configdir, "geany.css", NULL); + if (g_file_test(theme_fn, G_FILE_TEST_EXISTS)) + load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_USER); + g_free(theme_fn); #endif } From cc393cf7c58dd25015389dc0b783d6209283dfc8 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Fri, 27 Jan 2017 20:55:00 -0800 Subject: [PATCH 2/9] Add initial documentation for GTK+ CSS theming --- doc/geany.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/geany.txt b/doc/geany.txt index 670b540f1b..82b583defb 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -494,6 +494,17 @@ An example of a simple ``.gtkrc-2.0``:: widget "GeanyPrefsDialog" style "geanyStyle" +Customizing Geany's appearance using GTK+ 3 CSS +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When Geany is built against GTK+ 3.0 or greater, the widget themes are +provided by CSS files. After the normal GTK+ theme loading, Geany then +loads some CSS files from its system-wide data directory needed for +normal operation, and then if a file named ``geany.css`` exists in the +user's Geany configuration directory (usually ``~/.config/geany``) it +is loaded to override the previously loaded CSS files. + + Documents --------- From 9912f65a1e667401fff72b6070dda1a981ac9802 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Fri, 27 Jan 2017 21:19:20 -0800 Subject: [PATCH 3/9] Add geany.css file to the `Tools->Configuration Files` menu Also mark such config files as changed if they don't already exist to force the user to save or discard any newly created config files. --- src/ui_utils.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/ui_utils.c b/src/ui_utils.c index aff58bc7fd..31012bee6c 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2097,7 +2097,9 @@ static void on_config_file_clicked(GtkWidget *widget, gpointer user_data) if (g_file_test(global_file, G_FILE_TEST_EXISTS)) g_file_get_contents(global_file, &global_content, NULL, NULL); - document_new_file(utf8_filename, ft, global_content); + // open or create the document and mark it as changed if it didn't already exist + GeanyDocument *doc = document_new_file(utf8_filename, ft, global_content); + document_set_text_changed(doc, ! g_file_test(file_name, G_FILE_TEST_EXISTS)); utils_free_pointers(4, utf8_filename, base_name, global_file, global_content, NULL); } @@ -2495,7 +2497,7 @@ static void load_css_theme(const gchar *fn, guint priority) // see setup_gtk2_styles() in libmain.c for GTK+ 2-specific theme initialization -static void init_custom_style(void) +static void init_default_style(void) { #if GTK_CHECK_VERSION(3, 0, 0) gchar *theme_fn; @@ -2512,9 +2514,17 @@ static void init_custom_style(void) load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_free(theme_fn); } +#endif +} + +static void init_user_style(void) +{ +#if GTK_CHECK_VERSION(3, 0, 0) + gchar *theme_fn; // if the user provided a geany.css file in their config dir, try and load that theme_fn = g_build_filename(app->configdir, "geany.css", NULL); + ui_add_config_file_menu_item(theme_fn, NULL, NULL); if (g_file_test(theme_fn, G_FILE_TEST_EXISTS)) load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_USER); g_free(theme_fn); @@ -2524,7 +2534,7 @@ static void init_custom_style(void) void ui_init(void) { - init_custom_style(); + init_default_style(); init_recent_files(); @@ -2572,6 +2582,10 @@ void ui_init(void) ui_init_toolbar_widgets(); init_document_widgets(); create_config_files_menu(); + + // after UI is initialized, apply user's custom CSS (if it exists) + // to override other CSS styles + init_user_style(); } From b53143a12c074abc23271a8d9a7470f9f8d37102 Mon Sep 17 00:00:00 2001 From: Rakksor Date: Wed, 25 Jan 2017 06:25:32 +0100 Subject: [PATCH 4/9] Allow customizing message window using GTK+ themes --- data/geany.css | 11 ++++++++++ data/geany.gtkrc | 17 ++++++++++++++++ src/msgwindow.c | 53 ++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 73 insertions(+), 8 deletions(-) diff --git a/data/geany.css b/data/geany.css index 9559ef3c3d..f9d8e290f0 100644 --- a/data/geany.css +++ b/data/geany.css @@ -36,6 +36,17 @@ color: #007f00; } +/* compiler message colors */ +#geany-compiler-error { + color: #ff0000; +} +#geany-compiler-context { + color: #880000; +} +#geany-compiler-message { + color: #0000D0; +} + /* red "Terminal" label when terminal dirty */ #geany-terminal-dirty { color: #ff0000; diff --git a/data/geany.gtkrc b/data/geany.gtkrc index 28a07812ad..2fe55f80ed 100644 --- a/data/geany.gtkrc +++ b/data/geany.gtkrc @@ -50,5 +50,22 @@ widget "*.geany-document-status-changed" style "geany-document-status-changed-st widget "*.geany-document-status-disk-changed" style "geany-document-status-disk-changed-style" widget "*.geany-document-status-readonly" style "geany-document-status-readonly-style" +# compiler message colors +style "geany-compiler-error-style" { + fg[NORMAL] = "#ffff00000000" + fg[ACTIVE] = "#ffff00000000" +} +style "geany-compiler-context-style" { + fg[NORMAL] = "#888800000000" + fg[ACTIVE] = "#888800000000" +} +style "geany-compiler-message-style" { + fg[NORMAL] = "#00000000D000" + fg[ACTIVE] = "#00000000D000" +} +widget "*.geany-compiler-error" style "geany-compiler-error-style" +widget "*.geany-compiler-context" style "geany-compiler-context-style" +widget "*.geany-compiler-message" style "geany-compiler-message-style" + # red "Terminal" label when terminal dirty widget "*.geany-terminal-dirty" style "geany-document-status-changed-style" diff --git a/src/msgwindow.c b/src/msgwindow.c index 3a5e2c4000..5d7395de35 100644 --- a/src/msgwindow.c +++ b/src/msgwindow.c @@ -83,6 +83,11 @@ enum }; +static GdkColor color_error = {0, 65535, 0, 0}; +static GdkColor color_context = {0, 65535 / 2, 0, 0}; +static GdkColor color_message = {0, 0, 0, 0xD000}; + + static void prepare_msg_tree_view(void); static void prepare_status_tree_view(void); static void prepare_compiler_tree_view(void); @@ -112,6 +117,40 @@ void msgwin_set_messages_dir(const gchar *messages_dir) } +GdkColor load_color(gchar *color_name) { + GdkColor color; + +#if GTK_CHECK_VERSION(3, 0, 0) + GdkRGBA rgba_color; + GtkWidgetPath *path = gtk_widget_path_new(); + GtkStyleContext *ctx = gtk_style_context_new(); + + gtk_widget_path_append_type(path, GTK_TYPE_WINDOW); + gtk_widget_path_iter_set_name(path, -1, color_name); + gtk_style_context_set_screen(ctx, gdk_screen_get_default()); + gtk_style_context_set_path(ctx, path); + gtk_style_context_get_color(ctx, gtk_style_context_get_state(ctx), &rgba_color); + + color.red = 0xffff * rgba_color.red; + color.green = 0xffff * rgba_color.green; + color.blue = 0xffff * rgba_color.blue; + + gtk_widget_path_unref(path); + g_object_unref(ctx); +#else + gchar *path = g_strconcat("*.", color_name, NULL); + + GtkSettings *settings = gtk_settings_get_default(); + GtkStyle *style = gtk_rc_get_style_by_paths(settings, path, NULL, GTK_TYPE_WIDGET); + color = style->fg[GTK_STATE_NORMAL]; + + g_free(path); +#endif + + return color; +} + + void msgwin_init(void) { msgwindow.notebook = ui_lookup_widget(main_widgets.window, "notebook_info"); @@ -130,6 +169,10 @@ void msgwin_init(void) ui_widget_modify_font_from_string(msgwindow.scribble, interface_prefs.msgwin_font); g_signal_connect(msgwindow.scribble, "populate-popup", G_CALLBACK(on_scribble_populate), NULL); + + color_error = load_color("geany-compiler-error"); + color_context = load_color("geany-compiler-context"); + color_message = load_color("geany-compiler-message"); } @@ -262,19 +305,13 @@ static void prepare_compiler_tree_view(void) /*g_signal_connect(selection, "changed", G_CALLBACK(on_msg_tree_selection_changed), NULL);*/ } - -static const GdkColor color_error = {0, 65535, 0, 0}; - static const GdkColor *get_color(gint msg_color) { - static const GdkColor dark_red = {0, 65535 / 2, 0, 0}; - static const GdkColor blue = {0, 0, 0, 0xD000}; /* not too bright ;-) */ - switch (msg_color) { case COLOR_RED: return &color_error; - case COLOR_DARK_RED: return &dark_red; - case COLOR_BLUE: return &blue; + case COLOR_DARK_RED: return &color_context; + case COLOR_BLUE: return &color_message; default: return NULL; } } From 7e34edd6b5a37e199a0756ccabda2a84395a4282 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Fri, 27 Jan 2017 22:19:31 -0800 Subject: [PATCH 5/9] Improve GTK+3 CSS docs a bit State which classes are meant to be overridden by themes. --- doc/geany.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/geany.txt b/doc/geany.txt index 82b583defb..30e9010e70 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -497,12 +497,22 @@ An example of a simple ``.gtkrc-2.0``:: Customizing Geany's appearance using GTK+ 3 CSS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When Geany is built against GTK+ 3.0 or greater, the widget themes are -provided by CSS files. After the normal GTK+ theme loading, Geany then -loads some CSS files from its system-wide data directory needed for -normal operation, and then if a file named ``geany.css`` exists in the -user's Geany configuration directory (usually ``~/.config/geany``) it -is loaded to override the previously loaded CSS files. +To override GTK+ CSS styles, you can use traditional mechanisms or you +can create a file named ``geany.css`` in the user configuration directory +(usually ``~/.config/geany``) which will be loaded after other CSS styles +are applied to allow overriding the default styles. + +Geany offers a number of CSS classes which can be overridden to taylor its +appearence. Among the more interesting include: + +* ``geany-compiler-context`` - the style used for build command output surrounding errors +* ``geany-compiler-error`` - the style used for build command errors +* ``geany-compiler-message`` - the style other output encountered while running build command +* ``geany-document-status-changed`` - the style for document tab labels when the document is changed +* ``geany-document-status-disk-changed`` - the style for document tab labels when the file on disk has changed +* ``geany-document-status-readyonly``` - the style for document tab labels when the document is read-only +* ``geany-search-entry-no-match`` - the style of find/replace diaog entries when no match is found +* ``geany-terminal-dirty`` - the style for the message window Terminal tab label when the terminal output has changed. Documents From 92bfbfe9ddcdb34d5369864668a8ffcef7f2c295 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Sat, 28 Jan 2017 17:29:23 -0800 Subject: [PATCH 6/9] Go back to conditionally loading geany-3.0.css It can't be merged into geany.css since GTK+ CSS parser doesn't ignore invalid properties when prefixed with vendor extension (ie. -Gtk). --- data/Makefile.am | 1 + data/geany-3.0.css | 8 +++++++ data/geany.css | 9 ------- src/ui_utils.c | 58 ++++++++++++++++++++++++++++++---------------- 4 files changed, 47 insertions(+), 29 deletions(-) create mode 100644 data/geany-3.0.css diff --git a/data/Makefile.am b/data/Makefile.am index 4b291f8eaf..51dedcc876 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -115,6 +115,7 @@ nobase_dist_pkgdata_DATA = \ if GTK3 nobase_dist_pkgdata_DATA += \ + geany-3.0.css \ geany-3.20.css \ geany.css else diff --git a/data/geany-3.0.css b/data/geany-3.0.css new file mode 100644 index 0000000000..b425254724 --- /dev/null +++ b/data/geany-3.0.css @@ -0,0 +1,8 @@ +/* make close button on the editor's tabs smaller */ +#geany-close-tab-button { + -GtkWidget-focus-padding: 0; + -GtkWidget-focus-line-width: 0; + -GtkButton-default-border: 0; + -GtkButton-default-outside-border: 0; + -GtkButton-inner-border: 0; +} diff --git a/data/geany.css b/data/geany.css index f9d8e290f0..f22a8f9734 100644 --- a/data/geany.css +++ b/data/geany.css @@ -51,12 +51,3 @@ #geany-terminal-dirty { color: #ff0000; } - -/* make close button on the editor's tabs smaller */ -#geany-close-tab-button { - -GtkWidget-focus-padding: 0; - -GtkWidget-focus-line-width: 0; - -GtkButton-default-border: 0; - -GtkButton-default-outside-border: 0; - -GtkButton-inner-border: 0; -} diff --git a/src/ui_utils.c b/src/ui_utils.c index 31012bee6c..8f787a90f2 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2493,13 +2493,11 @@ static void load_css_theme(const gchar *fn, guint priority) g_object_unref(provider); } -#endif // see setup_gtk2_styles() in libmain.c for GTK+ 2-specific theme initialization -static void init_default_style(void) +static void init_css_styles(void) { -#if GTK_CHECK_VERSION(3, 0, 0) gchar *theme_fn; // load the main geany.css file from system data dir @@ -2507,34 +2505,54 @@ static void init_default_style(void) load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_free(theme_fn); - // if runtime GTK+ version is >= 3.20 then override with some needed version-specific changes - if (gtk_check_version(3, 20, 0) == NULL) + // load themes to handle breakage between various GTK+ versions + const struct { - theme_fn = g_build_filename(app->datadir, "geany-3.20.css", NULL); - load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - g_free(theme_fn); + guint min_version; + guint max_version; + const gchar *file; } -#endif + css_files[] = + { + { 20, G_MAXUINT, "geany-3.20.css" }, + { 0, 19, "geany-3.0.css" }, + }; + + guint gtk_version = gtk_get_minor_version(); + for (guint i = 0; i < G_N_ELEMENTS(css_files); i++) + { + if (gtk_version >= css_files[i].min_version && + gtk_version <= css_files[i].max_version) + { + theme_fn = g_build_filename(app->datadir, css_files[i].file, NULL); + load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + g_free(theme_fn); + } + } + + // if the user provided a geany.css file in their config dir, try and load that + theme_fn = g_build_filename(app->configdir, "geany.css", NULL); + if (g_file_test(theme_fn, G_FILE_TEST_EXISTS)) + load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_USER); + g_free(theme_fn); } -static void init_user_style(void) +static void add_css_config_file_item(void) { -#if GTK_CHECK_VERSION(3, 0, 0) gchar *theme_fn; - // if the user provided a geany.css file in their config dir, try and load that theme_fn = g_build_filename(app->configdir, "geany.css", NULL); ui_add_config_file_menu_item(theme_fn, NULL, NULL); - if (g_file_test(theme_fn, G_FILE_TEST_EXISTS)) - load_css_theme(theme_fn, GTK_STYLE_PROVIDER_PRIORITY_USER); g_free(theme_fn); -#endif } +#endif // GTK3 void ui_init(void) { - init_default_style(); +#if GTK_CHECK_VERSION(3, 0, 0) + init_css_styles(); +#endif init_recent_files(); @@ -2581,11 +2599,11 @@ void ui_init(void) ui_init_toolbar_widgets(); init_document_widgets(); - create_config_files_menu(); - // after UI is initialized, apply user's custom CSS (if it exists) - // to override other CSS styles - init_user_style(); + create_config_files_menu(); +#if GTK_CHECK_VERSION(3, 0, 0) + add_css_config_file_item(); +#endif } From be44ce8b9430ccfd3ca953c45a6a6b3564f92a55 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Sat, 28 Jan 2017 17:37:03 -0800 Subject: [PATCH 7/9] Don't mark unedited config files as changed They probably should be marked as changed since they don't exist on disk yet, but for the time being leave it how it was. --- src/ui_utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ui_utils.c b/src/ui_utils.c index 8f787a90f2..811d6d156e 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2097,9 +2097,7 @@ static void on_config_file_clicked(GtkWidget *widget, gpointer user_data) if (g_file_test(global_file, G_FILE_TEST_EXISTS)) g_file_get_contents(global_file, &global_content, NULL, NULL); - // open or create the document and mark it as changed if it didn't already exist - GeanyDocument *doc = document_new_file(utf8_filename, ft, global_content); - document_set_text_changed(doc, ! g_file_test(file_name, G_FILE_TEST_EXISTS)); + document_new_file(utf8_filename, ft, global_content); utils_free_pointers(4, utf8_filename, base_name, global_file, global_content, NULL); } From 1b45a2560c3d771fac4eb8a7e0c0ec11a81a5539 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Sat, 28 Jan 2017 17:39:41 -0800 Subject: [PATCH 8/9] Fix misuse of CSS ID vs class in manual --- doc/geany.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/geany.txt b/doc/geany.txt index 30e9010e70..06d544aa82 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -502,7 +502,7 @@ can create a file named ``geany.css`` in the user configuration directory (usually ``~/.config/geany``) which will be loaded after other CSS styles are applied to allow overriding the default styles. -Geany offers a number of CSS classes which can be overridden to taylor its +Geany offers a number of CSS IDs which can be used to taylor its appearence. Among the more interesting include: * ``geany-compiler-context`` - the style used for build command output surrounding errors From 0bb5b7f98860a475afd2c04e65903cb145986372 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Sat, 28 Jan 2017 17:56:44 -0800 Subject: [PATCH 9/9] Minor colour value tweaks Based on feedback from @b4n --- data/geany.css | 2 +- data/geany.gtkrc | 4 ++-- src/msgwindow.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/geany.css b/data/geany.css index f22a8f9734..f4e9f0b68d 100644 --- a/data/geany.css +++ b/data/geany.css @@ -41,7 +41,7 @@ color: #ff0000; } #geany-compiler-context { - color: #880000; + color: #7f0000; } #geany-compiler-message { color: #0000D0; diff --git a/data/geany.gtkrc b/data/geany.gtkrc index 2fe55f80ed..15add70174 100644 --- a/data/geany.gtkrc +++ b/data/geany.gtkrc @@ -56,8 +56,8 @@ style "geany-compiler-error-style" { fg[ACTIVE] = "#ffff00000000" } style "geany-compiler-context-style" { - fg[NORMAL] = "#888800000000" - fg[ACTIVE] = "#888800000000" + fg[NORMAL] = "#7f7f00000000" + fg[ACTIVE] = "#7f7f00000000" } style "geany-compiler-message-style" { fg[NORMAL] = "#00000000D000" diff --git a/src/msgwindow.c b/src/msgwindow.c index 5d7395de35..dd73d615cb 100644 --- a/src/msgwindow.c +++ b/src/msgwindow.c @@ -83,8 +83,8 @@ enum }; -static GdkColor color_error = {0, 65535, 0, 0}; -static GdkColor color_context = {0, 65535 / 2, 0, 0}; +static GdkColor color_error = {0, 0xFFFF, 0, 0}; +static GdkColor color_context = {0, 0x7FFF, 0, 0}; static GdkColor color_message = {0, 0, 0, 0xD000};