aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-02-04 08:04:06 +1100
committerNeil <nyamatongwe@gmail.com>2015-02-04 08:04:06 +1100
commite6a18bc3f4113f4c59ec698d568a1a82f98787b4 (patch)
treeb1d2438908119a5599d8db60973740cce6c7f866 /src/ViewStyle.cxx
parent5c45424014f7967591fb4dd5a449d4e5bad539f2 (diff)
downloadscintilla-mirror-e6a18bc3f4113f4c59ec698d568a1a82f98787b4.tar.gz
Implement hover style and colour for indicators.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index b60905caf..864356bc1 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -101,8 +101,11 @@ ViewStyle::ViewStyle(const ViewStyle &source) {
markers[mrk] = source.markers[mrk];
}
CalcLargestMarkerHeight();
+ indicatorsDynamic = 0;
for (int ind=0; ind<=INDIC_MAX; ind++) {
indicators[ind] = source.indicators[ind];
+ if (indicators[ind].IsDynamic())
+ indicatorsDynamic++;
}
selColours = source.selColours;
@@ -197,6 +200,7 @@ void ViewStyle::Init(size_t stylesSize_) {
indicators[2] = Indicator(INDIC_PLAIN, ColourDesired(0xff, 0, 0));
technology = SC_TECHNOLOGY_DEFAULT;
+ indicatorsDynamic = 0;
lineHeight = 1;
lineOverlap = 0;
maxAscent = 1;
@@ -318,6 +322,11 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) {
FontRealised *fr = Find(styles[k]);
styles[k].Copy(fr->font, *fr);
}
+ indicatorsDynamic = 0;
+ for (int ind = 0; ind <= INDIC_MAX; ind++) {
+ if (indicators[ind].IsDynamic())
+ indicatorsDynamic++;
+ }
maxAscent = 1;
maxDescent = 1;
FindMaxAscentDescent();