This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155959 - Avoid Hard Coded Colors in NetBeans and its modules
Summary: Avoid Hard Coded Colors in NetBeans and its modules
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@platform
Keywords: A11Y
: 155958 (view as bug list)
Depends on:
Reported: 2008-12-22 19:24 UTC by mjr_1974
Modified: 2009-09-07 10:39 UTC (History)
0 users

See Also:
Exception Reporter:

Screenshot of normal view with adjusted colour scheme (9.02 KB, image/png)
2009-08-28 02:19 UTC, dfisk_o
Screenshot with all text hilited with adjusted colour scheme (10.26 KB, image/png)
2009-08-28 02:20 UTC, dfisk_o

Note You need to log in before you can comment on or make changes to this bug.
Description mjr_1974 2008-12-22 19:24:44 UTC
I found font and background colors hard typed in NetBeans. All the colors with no exception should be based on the
active Look and Feel. Even I posted the bugs in each of those modules, it will be better if you take this as a general
design guideline. Changing the Look and Feel is easy, but most of the times this leads to having useless features just
because it is impossible to read the UIs.
Comment 1 mjr_1974 2008-12-22 19:36:02 UTC
*** Issue 155958 has been marked as a duplicate of this issue. ***
Comment 2 dfisk_o 2009-08-28 02:19:22 UTC
Created attachment 86762 [details]
Screenshot of normal view with adjusted colour scheme
Comment 3 dfisk_o 2009-08-28 02:20:05 UTC
Created attachment 86763 [details]
Screenshot with all text hilited with adjusted colour scheme
Comment 4 dfisk_o 2009-08-28 02:22:40 UTC
There seems to be a bug when adjusting the colour of the identifiers in NetBeants 6.5 . I have not tried any other
versions. It seems to be related to hard-coded colours in the interface.

My environment is:
Linux hostname 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 19:25:34 UTC 2009 x86_64 GNU/Linux
Product Version: NetBeans IDE 6.5 (Build 090407)
Java: 1.6.0_0; OpenJDK 64-Bit Server VM 14.0-b08
System: Linux version 2.6.28-15-generic running on amd64; UTF-8; en_US (nb)

Problem description:
It seems that adjusting the foreground choice for "Identifier" colour properties affects the foreground only in certain
cases, and in other cases it is set to "inherited". This is especially noticeable when the main background colour is set
to black. Attached are two screenshots. screenshot0 shows what the following text looks like normally, with the later
following preferences applied.
  For clarity, screenshot1 shows how it looks when I have selected all of the text. You'll see that the foreground
colour for "testClass" is different from "variable" and also is different from "__construct". The background colour for
all of these items is changed via the config line mentioned below.
  Additionally you will note that the opening and closing "<?php ... ?> have their foreground colour set to black as
well, which should definitely not be the case. It appears that their background is set via the "default" colour adjustment.

Here is the example code:
class testClass {
   private $variable = '5';

   function __construct($args){
      $this->variable = '6';

I believe that this is the line that adjusts the colour:
<fontcolor bgColor="ff484868" foreColor="green" name="identifier"/>

This is the XML file in which I believe these preferences are stored:

Here is my entire file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors settings 1.1//EN"
    <fontcolor name="error" waveUnderlined="red"/>
    <fontcolor foreColor="ffce7b00" name="char"/>
    <fontcolor foreColor="ff1249f8" name="keyword"/>
    <fontcolor foreColor="black" name="whitespace"/>
    <fontcolor default="keyword" name="markup-element"/>
    <fontcolor foreColor="ff017883" name="number"/>
    <fontcolor name="operator"/>
    <fontcolor default="identifier" foreColor="ff009900" name="field"/>
    <fontcolor bgColor="black" foreColor="orange" name="default"/>
    <fontcolor foreColor="ffce7b00" name="string"/>
    <fontcolor default="default" foreColor="ff027f7f" name="entity-reference">
        <font style="bold"/>
    <fontcolor default="string" name="markup-attribute-value"/>
    <fontcolor default="identifier" name="method"/>
    <fontcolor foreColor="ff969696" name="comment"/>
    <fontcolor bgColor="ff484868" foreColor="green" name="identifier"/>
    <fontcolor name="separator"/>
    <fontcolor default="field" name="markup-attribute"/>
Comment 5 Peter Pis 2009-09-07 10:39:50 UTC
Reassigning to platform for further evaluation.