Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Carl Colijn on November 21, 2011, 04:27:38 pm
-
Hi all,
I've worked on a small patch to get some better usability when working with inverted colour schemes (white on black). It's really only a few lines, but they do wonders ;)
The changes affect the text logger (white on red text is now also 'inverted' when needed), the HTML logger (no hard-coded colours anymore but now also BlendTextColour), and the VC71 and FireFox2 notebook styles (the tabs now use the correct colour for the tab texts).
The other two notebook styles (used directly from wxWidgets) still do not play nice, since that'll need a wxWidgets source update.
Hope this patch makes it through, so I can keep using the new Code::Blocks versions in stead of my previously patched 8.02 source - I really want to upgrade by now ;)
-
Can you show screen shots with and without the patch?
-
Sure; I've used the (modified) MS VC7 notebook theme, but the FireFox one behaves identically.
Without the patch, regular colour scheme:
(http://www.twologs.com/share/without-regular.png)
Without the patch, inverted colour scheme:
(http://www.twologs.com/share/without-inverse.png)
With the patch, regular colour scheme:
(http://www.twologs.com/share/with-regular.png)
With the patch, inverted colour scheme:
(http://www.twologs.com/share/with-inverse.png)
-
On a related note: in the past I already submitted two similar patches, then for the 8.02 version. Since the relevant code base has changed dramatically since then, these patches are nowhere near useable anymore. They're patch #002337 and #002336; I think the best thing to do with them is to delete/reject them so they don't clutter the patch list.
They did bring in an extra settings window so you could set the colours to be used in the loggers (front and back), but the new code base uses BlendTextColour which also Just Works and requires no settings management.
-
One question: How can I temporarily have a black theme (on Windows 7) without loosing anything? In fact I never played with themes... :shock:
-
Hi Morten,
When in Windows 7, right-click on an empty spot on the desktop, and select "Personalize" from the context menu; the "Personalize" dialog will pop up. There's a scrollable control in that dialog listing all predefined themes; somewhere at the bottom of the list are the "Basic and high-contrast" themes. I always select "High contrast #1".
If you are using an already modified theme then this theme will be listed on top of the list under "My themes" or such. If it's not saved, then you can right-click it and select "Save theme" first before switching to another theme (just to be on the safe side).
So far I've found nowadays Code::Blocks goes along with high contrast themes pretty well, apart from the notebook tabs and the dockable window title bars. The colour of the latter can be set via the settings, so no fix is needed there.
Note though that some other apps do not play nice with high contrast themes; my Kaspersky virus scanner e.g. insists on using it's own custom window drawing using white as background, but uses the Windows system text colour (in my case pale yellow) to show text; quite unreadable thank you very much ;) In version 8.02 Code::Block's logger windows used to be like this (background from system colours == black in my case, and text colour hard-coded to black, dark blue and dark red), but nowadays in the text loggers any non-standard text colour is first BlendTextColoured which fixes this nicely.
I also alterd the HTML logger window code just to be safe, but I suspect there are no HTML loggers in use anymore?
-
When in Windows 7, right-click on an empty spot on the desktop, and select "Personalize" from the context menu; the "Personalize" dialog will pop up. There's a scrollable control in that dialog listing all predefined themes; somewhere at the bottom of the list are the "Basic and high-contrast" themes. I always select "High contrast #1".
OK - I'll try once I find the time...
I also alterd the HTML logger window code just to be safe, but I suspect there are no HTML loggers in use anymore?
Sure there is. The build log (if saved) is HTML. You can open the build log itself inside C::B in a HTML viewer.
-
OK, I'm testing this patch and I'll commit it after some time.
Morten have you tried it with a dark theme on windows?
-
OK, I'm testing this patch and I'll commit it after some time.
Morten have you tried it with a dark theme on windows?
Yes, it works - you got the go from my side.
-
One think I'm noticing is that if there is an error the red color is not that red, but a bit whitened.
Is this the same on your machine?
-
Is this the same on your machine?
Not here (Windows). I have enough errors and thy are al read. ;-)
-
OK, the patch is in svn, thank you Carl :)
-
Thanks oBFusCATed! From now on I can simply update SVN without having to merge my changes. Or even just grab the nightlies I guess? Until I start brooding on a new patch, that is ;)