aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-14 14:02:39 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-14 14:02:39 +1000
commitd6136af6d39ae06b4b0b51bd4576338015722591 (patch)
treedd7ece130f6405ddfda06a3289a258ea0b3557af /src/EditView.cxx
parent17d2d5c793eaa95b170684213b18ff2e3f5ce291 (diff)
downloadscintilla-mirror-d6136af6d39ae06b4b0b51bd4576338015722591.tar.gz
Add elements for hot spots SC_ELEMENT_HOT_SPOT_ACTIVE and
SC_ELEMENT_HOT_SPOT_ACTIVE_BACK.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r--src/EditView.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 7797236c8..e76921139 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -871,8 +871,8 @@ static ColourAlpha TextBackground(const EditModel &model, const ViewStyle &vsDra
(i >= ll->edgeColumn) &&
(i < ll->numCharsBeforeEOL))
return vsDraw.theEdge.colour;
- if (inHotspot && vsDraw.hotspotColours.back)
- return *vsDraw.hotspotColours.back;
+ if (inHotspot && vsDraw.ElementColour(SC_ELEMENT_HOT_SPOT_ACTIVE_BACK))
+ return vsDraw.ElementColour(SC_ELEMENT_HOT_SPOT_ACTIVE_BACK)->Opaque();
if (background && (styleMain != STYLE_BRACELIGHT) && (styleMain != STYLE_BRACEBAD)) {
return *background;
} else {
@@ -1930,11 +1930,11 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi
const int styleMain = ll->styles[i];
ColourAlpha textFore = vsDraw.styles[styleMain].fore;
const Font *textFont = vsDraw.styles[styleMain].font.get();
- //hotspot foreground
+ // Hot-spot foreground
const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc);
if (inHotspot) {
- if (vsDraw.hotspotColours.fore)
- textFore = *vsDraw.hotspotColours.fore;
+ if (vsDraw.ElementColour(SC_ELEMENT_HOT_SPOT_ACTIVE))
+ textFore = *vsDraw.ElementColour(SC_ELEMENT_HOT_SPOT_ACTIVE);
}
if (vsDraw.indicatorsSetFore) {
// At least one indicator sets the text colour so see if it applies to this segment
@@ -2074,8 +2074,8 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi
PRectangle rcUL = rcSegment;
rcUL.top = rcUL.top + vsDraw.maxAscent + 1;
rcUL.bottom = rcUL.top + 1;
- if (vsDraw.hotspotColours.fore)
- surface->FillRectangleAligned(rcUL, Fill(*vsDraw.hotspotColours.fore));
+ if (vsDraw.ElementColour(SC_ELEMENT_HOT_SPOT_ACTIVE))
+ surface->FillRectangleAligned(rcUL, Fill(*vsDraw.ElementColour(SC_ELEMENT_HOT_SPOT_ACTIVE)));
else
surface->FillRectangleAligned(rcUL, Fill(textFore));
} else if (vsDraw.styles[styleMain].underline) {