diff --git a/data/filedefs/filetypes.common b/data/filedefs/filetypes.common index f0992e326e..7c56e90e0c 100644 --- a/data/filedefs/filetypes.common +++ b/data/filedefs/filetypes.common @@ -24,8 +24,8 @@ fold_symbol_highlight=fold_symbol_highlight current_line=current_line # translucency for the current line(first argument) and the selection (second argument) -# values between 0 and 256 are accepted. Note for Windows 95, 98 and ME users: -# keep this value at 256 to disable translucency otherwise Geany might crash +# values between 0 and 255 are accepted. Note for Windows 95, 98 and ME users: +# keep this value at 255 to disable translucency otherwise Geany might crash translucency=256;256 # style for a highlighted line (e.g when using Goto line or goto tag) @@ -39,9 +39,12 @@ marker_search=marker_search # style for a marked line (e.g when using the "Toggle Marker" keybinding (Ctrl-M)) marker_mark=marker_mark -# translucency for the line marker(first argument) and the search marker (second argument) +# translucency (0-255) for the line marker (first argument) and the user marker (second argument) marker_translucency=256;256 +# translucency (0-255) for the search marker's outline (first argument) and background (second argument) +marker_search_translucency=50;60 + # colour of the caret(the blinking cursor), only first and third argument is interpreted # set the third argument to true to change the caret into a block caret caret=caret diff --git a/doc/geany.txt b/doc/geany.txt index 593453cea2..286f011a16 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -4573,14 +4573,11 @@ line_wrap_indent translucency Translucency for the current line (first argument) and the selection - (second argument). Values between 0 and 256 are accepted. - - Note for Windows 95, 98 and ME users: - keep this value at 256 to disable translucency otherwise Geany might crash. + (second argument). Values between 0 and 255 (inclusive) are accepted. Only the first and second arguments are interpreted. - *Example:* ``translucency=256;256;false;false`` + *Example:* ``translucency=255;255`` marker_line The style for a highlighted line (e.g when using Goto line or goto symbol). @@ -4589,7 +4586,7 @@ marker_line Only the first and second arguments are interpreted. - *Example:* ``marker_line=0x000000;0xffff00;false;false`` + *Example:* ``marker_line=0x000000;0xffff00`` marker_search The style for a marked search results (when using "Mark" in Search dialogs). @@ -4599,6 +4596,15 @@ marker_search *Example:* ``marker_search=0x000000;0xb8f4b8;false;false`` +marker_search_translucency + Translucency for the search marker's outline (first argument) and + background (second argument). Values between 0 and 255 (inclusive) are + accepted. + + Only the first and second arguments are interpreted. + + *Example:* ``marker_search_translucency=127;64`` + marker_mark The style for a marked line (e.g when using the "Toggle Marker" keybinding (Ctrl-M)). The foreground color (first argument) is only used @@ -4606,18 +4612,15 @@ marker_mark Only the first and second arguments are interpreted. - *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false`` + *Example:* ``marker_mark=0x000000;0xb8f4b8`` marker_translucency - Translucency for the line marker (first argument) and the search marker - (second argument). Values between 0 and 256 are accepted. - - Note for Windows 95, 98 and ME users: - keep this value at 256 to disable translucency otherwise Geany might crash. + Translucency for the line marker (first argument) and the user marker + (second argument). Values between 0 and 255 (inclusive) are accepted. Only the first and second arguments are interpreted. - *Example:* ``marker_translucency=256;256;false;false`` + *Example:* ``marker_translucency=255;255`` line_height Amount of space to be drawn above and below the line's baseline. @@ -4626,7 +4629,7 @@ line_height Only the first and second arguments are interpreted. - *Example:* ``line_height=0;0;false;false`` + *Example:* ``line_height=0;0`` calltips The style for coloring the calltips. The first two arguments diff --git a/src/highlighting.c b/src/highlighting.c index f7cb63db7b..236202ce9e 100644 --- a/src/highlighting.c +++ b/src/highlighting.c @@ -93,6 +93,7 @@ enum /* Geany common styling */ GCS_TRANSLUCENCY, GCS_MARKER_LINE, GCS_MARKER_SEARCH, + GCS_MARKER_SEARCH_TRANSLUCENCY, GCS_MARKER_MARK, GCS_MARKER_TRANSLUCENCY, GCS_LINE_HEIGHT, @@ -576,6 +577,8 @@ static void styleset_common_init(GKeyFile *config, GKeyFile *config_home) 256, 256, &common_style_set.styling[GCS_TRANSLUCENCY]); get_keyfile_int(config, config_home, "styling", "marker_translucency", 256, 256, &common_style_set.styling[GCS_MARKER_TRANSLUCENCY]); + get_keyfile_int(config, config_home, "styling", "marker_search_translucency", + 50, 60, &common_style_set.styling[GCS_MARKER_SEARCH_TRANSLUCENCY]); get_keyfile_int(config, config_home, "styling", "line_height", 0, 0, &common_style_set.styling[GCS_LINE_HEIGHT]); @@ -657,7 +660,8 @@ static void styleset_common(ScintillaObject *sci, guint ft_id) SSM(sci, SCI_INDICSETSTYLE, GEANY_INDICATOR_SEARCH, INDIC_ROUNDBOX); SSM(sci, SCI_INDICSETFORE, GEANY_INDICATOR_SEARCH, invert(common_style_set.styling[GCS_MARKER_SEARCH].background)); - SSM(sci, SCI_INDICSETALPHA, GEANY_INDICATOR_SEARCH, 60); + SSM(sci, SCI_INDICSETALPHA, GEANY_INDICATOR_SEARCH, common_style_set.styling[GCS_MARKER_SEARCH_TRANSLUCENCY].background); + SSM(sci, SCI_INDICSETOUTLINEALPHA, GEANY_INDICATOR_SEARCH, common_style_set.styling[GCS_MARKER_SEARCH_TRANSLUCENCY].foreground); /* Snippet cursor indicator, when inserting snippets with multiple * cursor positions. */