aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/EditView.cxx2
-rw-r--r--src/Indicator.cxx2
-rw-r--r--src/XPM.cxx8
-rw-r--r--win32/PlatWin.cxx6
4 files changed, 9 insertions, 9 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index e9e369e79..e4e82fd75 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -1674,7 +1674,7 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi
} else {
if (indicator.sacNormal.style == INDIC_TEXTFORE) {
if (indicator.Flags() & SC_INDICFLAG_VALUEFORE)
- textFore = indicatorValue & SC_INDICVALUEMASK;
+ textFore = ColourDesired(indicatorValue & SC_INDICVALUEMASK);
else
textFore = indicator.sacNormal.fore;
}
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index 3551e7202..5e229039e 100644
--- a/src/Indicator.cxx
+++ b/src/Indicator.cxx
@@ -28,7 +28,7 @@ static PRectangle PixelGridAlign(const PRectangle &rc) {
void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const {
StyleAndColour sacDraw = sacNormal;
if (Flags() & SC_INDICFLAG_VALUEFORE) {
- sacDraw.fore = value & SC_INDICVALUEMASK;
+ sacDraw.fore = ColourDesired(value & SC_INDICVALUEMASK);
}
if (drawState == drawHover) {
sacDraw = sacHover;
diff --git a/src/XPM.cxx b/src/XPM.cxx
index a446724fb..f83c3d6a8 100644
--- a/src/XPM.cxx
+++ b/src/XPM.cxx
@@ -89,7 +89,7 @@ void XPM::Init(const char *const *linesForm) {
if (!linesForm)
return;
- std::fill(colourCodeTable, std::end(colourCodeTable), 0);
+ std::fill(colourCodeTable, std::end(colourCodeTable), ColourDesired(0));
const char *line0 = linesForm[0];
width = atoi(line0);
line0 = NextField(line0);
@@ -148,16 +148,16 @@ void XPM::Draw(Surface *surface, const PRectangle &rc) {
void XPM::PixelAt(int x, int y, ColourDesired &colour, bool &transparent) const {
if (pixels.empty() || (x<0) || (x >= width) || (y<0) || (y >= height)) {
- colour = 0;
+ colour = ColourDesired(0);
transparent = true;
return;
}
int code = pixels[y * width + x];
transparent = code == codeTransparent;
if (transparent) {
- colour = 0;
+ colour = ColourDesired(0);
} else {
- colour = ColourFromCode(code).AsLong();
+ colour = ColourFromCode(code);
}
}
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 90433201e..8e06b7f4c 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -666,7 +666,7 @@ void SurfaceGDI::BrushColor(ColourDesired back) {
brushOld = 0;
}
// Only ever want pure, non-dithered brushes
- ColourDesired colourNearest = ::GetNearestColor(hdc, back.AsLong());
+ ColourDesired colourNearest = ColourDesired(::GetNearestColor(hdc, back.AsLong()));
brush = ::CreateSolidBrush(colourNearest.AsLong());
brushOld = static_cast<HBRUSH>(::SelectObject(hdc, brush));
}
@@ -2987,11 +2987,11 @@ DynamicLibrary *DynamicLibrary::Load(const char *modulePath) {
}
ColourDesired Platform::Chrome() {
- return ::GetSysColor(COLOR_3DFACE);
+ return ColourDesired(::GetSysColor(COLOR_3DFACE));
}
ColourDesired Platform::ChromeHighlight() {
- return ::GetSysColor(COLOR_3DHIGHLIGHT);
+ return ColourDesired(::GetSysColor(COLOR_3DHIGHLIGHT));
}
const char *Platform::DefaultFont() {