Author Topic: Small accessibility patch  (Read 9230 times)

Offline Carl Colijn

  • Multiple posting newcomer
  • *
  • Posts: 11
    • TwoLogs - a natural choice!
Small accessibility patch
« 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 ;)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Small accessibility patch
« Reply #1 on: November 21, 2011, 04:42:58 pm »
Can you show screen shots with and without the patch?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Carl Colijn

  • Multiple posting newcomer
  • *
  • Posts: 11
    • TwoLogs - a natural choice!
Re: Small accessibility patch
« Reply #2 on: November 21, 2011, 05:43:54 pm »
Sure; I've used the (modified) MS VC7 notebook theme, but the FireFox one behaves identically.

Without the patch, regular colour scheme:
   

Without the patch, inverted colour scheme:
   

With the patch, regular colour scheme:
   

With the patch, inverted colour scheme:
   

Offline Carl Colijn

  • Multiple posting newcomer
  • *
  • Posts: 11
    • TwoLogs - a natural choice!
Re: Small accessibility patch
« Reply #3 on: November 21, 2011, 05:55:20 pm »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Small accessibility patch
« Reply #4 on: November 22, 2011, 08:35:44 pm »
One question: How can I temporarily have a black theme (on Windows 7) without loosing anything? In fact I never played with themes... :shock:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Carl Colijn

  • Multiple posting newcomer
  • *
  • Posts: 11
    • TwoLogs - a natural choice!
Re: Small accessibility patch
« Reply #5 on: November 23, 2011, 09:33:34 am »
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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Small accessibility patch
« Reply #6 on: November 23, 2011, 10:37:02 am »
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Small accessibility patch
« Reply #7 on: December 05, 2011, 02:24:04 pm »
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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Small accessibility patch
« Reply #8 on: December 05, 2011, 08:33:30 pm »
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Small accessibility patch
« Reply #9 on: December 05, 2011, 10:51:32 pm »
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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Small accessibility patch
« Reply #10 on: December 06, 2011, 04:23:27 pm »
Is this the same on your machine?
Not here (Windows). I have enough errors and thy are al read. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Small accessibility patch
« Reply #11 on: December 29, 2011, 05:45:54 pm »
OK, the patch is in svn, thank you Carl :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Carl Colijn

  • Multiple posting newcomer
  • *
  • Posts: 11
    • TwoLogs - a natural choice!
Re: Small accessibility patch
« Reply #12 on: December 30, 2011, 12:28:29 pm »
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 ;)