From 794c599d481e46dbf9a5251a57fafb528b3fff2d Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 22 Mar 2021 12:56:26 +1100 Subject: Replace multiple mode setting calls on Surface with SetMode as this is extensible. For CallTip, GTK and Qt hardcode BidiR2L to false as they don't support bidirectional, its the same as current, and the BidiR2L state on EditModel isn't easily accessible. --- gtk/ScintillaGTK.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 50e46ecc8..312ad1f94 100755 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2980,8 +2980,7 @@ gboolean ScintillaGTK::DrawCT(GtkWidget *widget, cairo_t *cr, CallTip *ctip) { try { std::unique_ptr surfaceWindow(Surface::Allocate(SC_TECHNOLOGY_DEFAULT)); surfaceWindow->Init(cr, widget); - surfaceWindow->SetUnicodeMode(SC_CP_UTF8 == ctip->codePage); - surfaceWindow->SetDBCSMode(ctip->codePage); + surfaceWindow->SetMode(SurfaceMode(ctip->codePage, false)); ctip->PaintCT(surfaceWindow.get()); surfaceWindow->Release(); } catch (...) { @@ -2997,8 +2996,7 @@ gboolean ScintillaGTK::ExposeCT(GtkWidget *widget, GdkEventExpose * /*ose*/, Cal std::unique_ptr surfaceWindow(Surface::Allocate(SC_TECHNOLOGY_DEFAULT)); cairo_t *cr = gdk_cairo_create(WindowFromWidget(widget)); surfaceWindow->Init(cr, widget); - surfaceWindow->SetUnicodeMode(SC_CP_UTF8 == ctip->codePage); - surfaceWindow->SetDBCSMode(ctip->codePage); + surfaceWindow->SetMode(SurfaceMode(ctip->codePage, false)); ctip->PaintCT(surfaceWindow.get()); surfaceWindow->Release(); cairo_destroy(cr); -- cgit v1.2.3