Re: dark theme
andrew strain <[email protected]> Fri, 5 May 2023 10:42:47 -0700 (PDT)
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Neil, I had quite a struggle defining and importing the dark mode status variable in different files and even tried moving concerned functions to ColourMapper.h/cxx but I kept getting mostly 'multiple definition' compilation errors, and ultimately failed. The way I see it dark mode in its very essence requires a non-literal interpretation of config colour strings. If that interpretation can not happen within the function which converts the colour strings to Scintilla colour type on properties refresh, then all the various colour data would need to be chased up and converted after properties refresh, somehow. Around scite version 2.20 I had hacked the colour(alpha)fromstring functions to adapt to state to enable darkmode, contrast, and saturation adjustment. If there was any hack to allow it now, I would think it worthwhile to create a darkmode but the StyleDefinition object someways seems to guard against it. Best wishes, Andrew On Thursday, 4 May 2023 at 23:43:59 UTC+1 Neil Hodgson wrote: > Andrew: > > > Sorry, more succinctly: ColourRGB() and ColourRGBA() perform a very > simple clear job. ColourFromString and ColourAlphaFromString are not > necessarily so generic, eg. they could be name ColourFromProperties and > they could interpret text from properties circumspectly. > > ColourFromProperties would carry some notion of context. ColourFromString > is an isolated leaf function with no context dependence. > > Performing the colour transformation in both ColourFromString and > ColourAlphaFromString is repetition. Any transformation should be a > separate function or method. > > It is fine to hack a demonstration but not a finished feature. > > 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/0683a6ff-2924-4ddf-858c-e6183b987362n%40googlegroups.com.