aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-06-15 09:59:00 +1000
committernyamatongwe <unknown>2011-06-15 09:59:00 +1000
commit3f88fe19bb5483c64e3328fb15a1195bed99ca3e (patch)
treec684d8b02545ad870899779b3e39d94deded4480
parent7dc557731710a37b3451a5404486dcf56c7b326d (diff)
downloadscintilla-mirror-3f88fe19bb5483c64e3328fb15a1195bed99ca3e.tar.gz
Fix colours appearing wrong on some systems.
-rw-r--r--gtk/PlatGTK.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index d04b9eaad..483ed06b0 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -296,9 +296,11 @@ void Palette::Allocate(Window &w) {
paletteNew[iPal].blue = entries[iPal].desired.GetBlue() * (65535 / 255);
paletteNew[iPal].pixel = entries[iPal].desired.AsLong();
}
+#ifndef USE_CAIRO
gdk_colormap_alloc_colors(gtk_widget_get_colormap(PWidget(w)),
paletteNew, allocatedLen, FALSE, TRUE,
successPalette);
+#endif
for (iPal = 0; iPal < used; iPal++) {
entries[iPal].allocated.Set(paletteNew[iPal].pixel);
}
@@ -1005,18 +1007,10 @@ void SurfaceImpl::PenColour(ColourAllocated fore) {
#ifdef USE_CAIRO
if (context) {
ColourDesired cdFore(fore.AsLong());
-#if GTK_CHECK_VERSION(3,0,0)
- // Colours appear inverted - possibly because palette no longer used
cairo_set_source_rgb(context,
cdFore.GetRed() / 255.0,
cdFore.GetGreen() / 255.0,
cdFore.GetBlue() / 255.0);
-#else
- cairo_set_source_rgb(context,
- cdFore.GetBlue() / 255.0,
- cdFore.GetGreen() / 255.0,
- cdFore.GetRed() / 255.0);
-#endif
}
#else
if (gc) {