aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-12 09:13:07 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-12 09:13:07 +1000
commit2feaeaf738851055a79ffcfb9027a3637610faca (patch)
tree6039c295b12073a5269ac667bbb886cf440d737b /src/ViewStyle.h
parent5468995af334359c04625dbd374658bbf91b0449 (diff)
downloadscintilla-mirror-2feaeaf738851055a79ffcfb9027a3637610faca.tar.gz
Switch caret line background colour to SC_ELEMENT_CARET_LINE_BACK element and
add SetCaretLineLayer. Older caret line APIs SCI_SETCARETLINEVISIBLE, SCI_SETCARETLINEBACK, SCI_SETCARETLINEBACKALPHA now discouraged.
Diffstat (limited to 'src/ViewStyle.h')
-rw-r--r--src/ViewStyle.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/ViewStyle.h b/src/ViewStyle.h
index 13c489aa2..9f3cae123 100644
--- a/src/ViewStyle.h
+++ b/src/ViewStyle.h
@@ -73,14 +73,10 @@ struct SelectionAppearance {
};
struct CaretLineAppearance {
- // Colour of caret line
- ColourAlpha background;
- // Whether to show the caret line
- bool show;
+ // Whether to draw on base layer or over text
+ Layer layer;
// Also show when non-focused
bool alwaysShow;
- // Translucency. SC_ALPHA_NOALPHA: draw selection background beneath text
- int alpha;
// Non-0: draw a rectangle around line instead of filling line. Value is pixel width of frame
int frame;
};
@@ -222,7 +218,7 @@ public:
bool ValidStyle(size_t styleIndex) const noexcept;
void CalcLargestMarkerHeight() noexcept;
int GetFrameWidth() const noexcept;
- bool IsLineFrameOpaque(bool caretActive, bool lineContainsCaret) const noexcept;
+ bool IsLineFrameOpaque(bool caretActive, bool lineContainsCaret) const;
std::optional<ColourAlpha> Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const;
bool SelectionBackgroundDrawn() const noexcept;
bool SelectionTextDrawn() const;