Re: dark theme

"'Neil Hodgson' via scite-interest" <[email protected]> Thu, 4 May 2023 12:47:47 +1000
Newsgroups gmane.editors.scite.general
Message-ID <[email protected]>
Andrew:

> A bit bamboozled here by cpp's structure. I have `bool invertBrightness` declared in SciTEBase.h and set to false in SciTEBasec.cpp  and in SciTEProps.cxx it is set and compiles fine in void SciTEBase::SetPropertiesInitial. But I am trying to patch the transform into the methods in StyleDefinition.cxx  SA::Colour ColourFromString(  and the RGBA version of that function. But 'invertBrightness' was not declared in this scope.

   Changing ColourFromString may appear an attractive way to affect things globally but its bad modularity - ColourFromString performs a very simple job. You could modify callers to ColourFromString which will have access to SciTEBase or modify the output side sending data to scintilla like in SciTEBase::SetOneStyle.

> If I can get the formulas running then I should be able to calibrate them to work reasonably well, I can use a longer version if its required to work on the perl syntax and tricky cases. I have used it alot to switch between daylight and after hours mood. I do not see anywhere else to put the transformation than those string conversion functions in StyleDefinition, perhaps it could go somewhere into Scintilla itself ?

   Scintilla works with colours a lot so each ColourRGBA instance would have to be modified which would be a significant amount of work. It's a bit similar to the old palette code which had to use a limited range (16 or 256 commonly) of available colours to cover the desired colours. Palette support was difficult to maintain and a source of bugs. A colour transform could be added to drawing surfaces in platform layers but that would need to be implemented for each platform.

   Scintilla itself contains an InvertedLight function but it is only for printing in SC_PRINT_INVERTLIGHT mode used when the screen is set to a dark background but the user doesn't want to waste ink. 

   Neil

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/CD1AF570-EE2D-48BA-971A-D9F5A2CA3D47%40me.com.