Skip to content

Commit

Permalink
Add style 'line_height' to increase the line height.
Browse files Browse the repository at this point in the history
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3935 ea778897-0a13-0410-b9d1-a72fbfd435f5
  • Loading branch information
eht16 committed Jul 8, 2009
1 parent 83804ab commit 443ee99
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Expand Up @@ -4,6 +4,8 @@
Rework the GIO based file monitoring code. Now it is used only
to indicate a possible change of the file, the real check if the
file has been changed is performed by stat().
* data/filetypes.common, doc/geany.txt, src/highlighting.c:
Add style 'line_height' to increase the line height.


2009-07-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Expand Down
5 changes: 5 additions & 0 deletions data/filetypes.common
Expand Up @@ -88,6 +88,11 @@ line_wrap_visuals=3;0;false;false
# 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
line_wrap_indent=0;1;false;false

# only first and second argument is interpreted
# first argument: amount of space to be drawn above the line's baseline
# second argument: amount of space to be drawn below the line's baseline
line_height=0;0;false;false

[settings]
# which characters should be skipped when moving (or included when deleting) to word boundaries
# should always include space and tab (\s\t)
Expand Down
9 changes: 9 additions & 0 deletions doc/geany.txt
Expand Up @@ -3330,6 +3330,15 @@ marker_translucency

*Example:* ``marker_translucency=256;256;false;false``

line_height
Amount of space to be drawn above and below the line's baseline.
The first argument defines the amount of space to be drawn above the line, the second
argument defines the amount of space to be drawn below.

Only the first and second argument is interpreted.

*Example:* ``line_height=0;0;false;false``


[settings] Section
``````````````````
Expand Down
9 changes: 9 additions & 0 deletions src/highlighting.c
Expand Up @@ -83,6 +83,7 @@ enum /* Geany common styling */
GCS_MARKER_LINE,
GCS_MARKER_SEARCH,
GCS_MARKER_TRANSLUCENCY,
GCS_LINE_HEIGHT,
GCS_MAX
};

Expand Down Expand Up @@ -580,6 +581,10 @@ static void styleset_common_init(gint ft_id, GKeyFile *config, GKeyFile *config_
256, 256, &tmp_style);
common_style_set.styling[GCS_MARKER_TRANSLUCENCY].foreground = tmp_style.foreground;
common_style_set.styling[GCS_MARKER_TRANSLUCENCY].background = tmp_style.background;
get_keyfile_int(config, config_home, "styling", "line_height",
0, 0, &tmp_style);
common_style_set.styling[GCS_LINE_HEIGHT].foreground = tmp_style.foreground;
common_style_set.styling[GCS_LINE_HEIGHT].background = tmp_style.background;
}

common_style_set.invert_all = interface_prefs.highlighting_invert_all =
Expand All @@ -601,6 +606,10 @@ static void styleset_common(ScintillaObject *sci)
else
SSM(sci, SCI_SETCARETSTYLE, CARETSTYLE_LINE, 0);

/* line height */
SSM(sci, SCI_SETEXTRAASCENT, common_style_set.styling[GCS_LINE_HEIGHT].foreground, 0);

This comment has been minimized.

Copy link
@andy5995

andy5995 Jun 23, 2019

Contributor

I don't see where these members (foreground and background) are declared. ?

This comment has been minimized.

Copy link
@elextr

elextr Jun 23, 2019

Member

gint foreground; /**< Foreground text colour, in @c 0xBBGGRR format. */

SSM(sci, SCI_SETEXTRADESCENT, common_style_set.styling[GCS_LINE_HEIGHT].background, 0);

/* colourise the current line */
SSM(sci, SCI_SETCARETLINEBACK, invert(common_style_set.styling[GCS_CURRENT_LINE].background), 0);
/* bold=enable current line */
Expand Down

0 comments on commit 443ee99

Please sign in to comment.