Rainie3535 / sigil

Automatically exported from code.google.com/p/sigil
GNU General Public License v3.0
0 stars 0 forks source link

Code View/CSS should allow colors to be configurable in Preferences #1248

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Operating System: Windows 7 64-bit
Sigil Version: 0.5.0
Qt version: 4.7.4

Description: Code View does not pass basic accessibility guidelines for people 
who have a vision impairment and need to have a black or dark background colour

There are many people with differing and varying visual impairments who need to 
use a High Contrast black-background colour theme. Software should usually 
honour the system appearance settings set for the OS, and generally the Sigil 
UI does this quite well.

Unfortunately, because the syntax highlighting colours are non-configurable - 
with a black background, the css and xhtml in the Code View is not legible.

I am such a user. My eyesight is 100% perfect, but I have a light sensitivity 
problem with my vision - so I need to use a black background. Many people have 
a similar need. I can't use this excellent software, because I can't change the 
colour of the syntax highlighting to be able to see the text. I use lots of 
editors (for Java software development) and this one is the only one I've 
encountered for which you can't change the colours of the text.

Please make the syntax highlighting in the Code View configurable, otherwise 
you are cutting out many people with various vision disabilities from using 
your good software.

Original issue reported on code.google.com by niccig...@gmail.com on 8 Feb 2012 at 12:59

GoogleCodeExporter commented 9 years ago
I asked on your forum at MobileRead if this can be configured through tweaking 
some underlying config file (I know already that this can't be done in the 
Preferences). I was informed that the syntax colouring can't be changed. How is 
this possible, surely it's not hardcoded? :-O

Original comment by niccig...@gmail.com on 8 Feb 2012 at 1:10

GoogleCodeExporter commented 9 years ago
> How is this possible, surely it's not hardcoded?

It is. The editor is a custom component and accessibility is not a priority.

Original comment by john@nachtimwald.com on 9 Feb 2012 at 12:12

GoogleCodeExporter commented 9 years ago

Original comment by john@nachtimwald.com on 9 Feb 2012 at 12:12

GoogleCodeExporter commented 9 years ago
John, 

I understand that getting bugs fixed for existing features is of high priority. 
I think however, that accessibility - especially the basic ability to be able 
to cope with other UI background colours - should be a foundational priority in 
UI design in the first place. Enabling the user to change the UI colours should 
be a foundational and basic requirement.

Note that the rest of the Sigil UI handles a black background quite well, but 
it's the code view that lets it down in this regard.

I would be happy in investigating in fixing this problem for myself, even if 
not a high priority for others. Please would you give me some information on 
which editor component is being used and some pointers to where this component 
is included in the code.

Many thanks in advance

Glen

Original comment by niccig...@gmail.com on 20 Feb 2012 at 12:53

GoogleCodeExporter commented 9 years ago
I've just re-read your answer. I understand now that it's a custom editor 
component. I revise my previous request to - please would you point me to the 
code for this custom editor component and where it hooks into the rest of the 
UI?

Then I can either try to refactor the code to read the syntax colouring from a 
config file, or as a short-term solution just hack it for my own purposes so I 
can change the colours for myself.

Thanks

Glen

Original comment by niccig...@gmail.com on 20 Feb 2012 at 1:01

GoogleCodeExporter commented 9 years ago
Color selection for highlighting is in 
http://code.google.com/p/sigil/source/browse/src/Sigil/Misc/XHTMLHighlighter.cpp

Color selection for the line number area as well as font size in 
http://code.google.com/p/sigil/source/browse/src/Sigil/ViewEditors/CodeViewEdito
r.cpp

See ResetFont in CodeViewEditor.cpp for where the font face is set.

Original comment by john@nachtimwald.com on 20 Feb 2012 at 1:22

GoogleCodeExporter commented 9 years ago
Excellent! Thanks for your help

Original comment by niccig...@gmail.com on 23 Feb 2012 at 11:31

GoogleCodeExporter commented 9 years ago
Issue 1331 has been merged into this issue.

Original comment by meme90...@gmail.com on 26 Mar 2012 at 8:16

GoogleCodeExporter commented 9 years ago
Original title: Code View does not pass basic accessibility guidelines for 
people who have a vision impairment and use a black background.

Code View / CSS / TOC / NCX now allows colours to be set for font, foreground, 
background, and highlighting.

Original comment by daveheil...@gmail.com on 24 Aug 2012 at 6:21