Author Topic: Gray editor background if file is read only  (Read 6773 times)

Offline agentsmith

  • Single posting newcomer
  • *
  • Posts: 6
Gray editor background if file is read only
« on: March 16, 2006, 05:27:33 pm »
Hello!
I don't know if this is a known thing but i haven't found it anywhere on the forum (but maybe I didn't search deep enough ;) ).
Anyway, recently I noticed that if you load a read only file the editor panel background color is gray (the dark gray one that makes all text pretty unreadable ;) especially grey comments). It seems like it's being created (or reinitialized) with default settings of non-editable editor panel, because if you open Editor options dialog and accept current settings (just press ok) editor background color turns to expected snow-white.

By the way, I'm using C::B on WinXp, don't know if other versions behave the same way.

Regards :)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Gray editor background if file is read only
« Reply #1 on: March 16, 2006, 06:51:31 pm »
By the way, I'm using C::B on WinXp, don't know if other versions behave the same way.

Hello,

Which version of C::B? Did you try to change the Settings-->Environment and/or Settings-->Editor?

Best wishes,
Michael

sethjackson

  • Guest
Re: Gray editor background if file is read only
« Reply #2 on: March 16, 2006, 07:19:48 pm »
I don't know about him I did Settings -> Editor and it works the way he described.....

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Gray editor background if file is read only
« Reply #3 on: March 16, 2006, 08:27:10 pm »
I don't know if this is a known thing but i haven't found it anywhere on the forum (but maybe I didn't search deep enough ;) ).
Anyway, recently I noticed that if you load a read only file the editor panel background color is gray
That's how it should be.

if you open Editor options dialog and accept current settings (just press ok) editor background color turns to expected snow-white.
That's a bug. Don't know where it comes from right now, though... will have to look.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

  • Guest
Re: Gray editor background if file is read only
« Reply #4 on: March 16, 2006, 08:36:30 pm »
EditorConfigurationDlg::EndModal() I I belive.......

Offline agentsmith

  • Single posting newcomer
  • *
  • Posts: 6
Re: Gray editor background if file is read only
« Reply #5 on: March 16, 2006, 09:32:32 pm »
Which version of C::B?
I tried this on nightly build 15 march, but It's the same in RC2 and in many other nightly builds.

Hmm, but that's interesting, because if what i thought a bug is not a bug, and my workaround (opening and accepting edit options dialog) actually is :), at the moment when it will be repaired it would make read only files totally unreadable...  :?
Now I'm truely concerned, because without an option to change background color for r/o files (maybe in code coloring settings) one won't be able to read code.
Some version management systems force all files to be read only, except few ones wchich are being modified (checked out). And from my experience in my environment ratio of checked out (r/w) to checked in(r/o) files is about 1/1000  :shock:
Until now every time whe I loaded a file I had to re-accept editor settings dialog (well, maybe after opening a bunch of files 'cause opening editor options dialog takes a good second ;) ).
But these are only my impressions. Anyway I'm very glad working with C::B.
« Last Edit: March 16, 2006, 09:35:14 pm by agentsmith »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5177
Re: Gray editor background if file is read only
« Reply #6 on: March 16, 2006, 09:56:51 pm »
I agree on the case with version controlled files : the gray makes things less readable. Some other default would be more appropriate.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Gray editor background if file is read only
« Reply #7 on: March 16, 2006, 11:28:38 pm »
We can of course add a configuration option for that some day. Until now, I haven't even figured how to fix that bug yet, though.

I don't see the issue as so serious, as most version control systems only use write protection if you have to LOCK a file. Locking is something that is best avoided anyway.

Despite the fact that you are not meant to actually edit a write-protected file anyway (that's why it is write protected), it is perfectly readable here as it is. Maybe it's your monitor that has too low contrast?

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline agentsmith

  • Single posting newcomer
  • *
  • Posts: 6
Re: Gray editor background if file is read only
« Reply #8 on: March 17, 2006, 12:33:09 am »
It seems that color of the non-editable editor panel is derived from system colors (in winxp color of button/3d object or something like that) and I have tuned it little darker than default. Although approach of using system color is cool with default black text, but it could not be the best way with colored text (as it might blend with with similar colored text like grays in this case).
Readable or not - maybe it's just the matter of taste, even on this thread we have two opinions. I think many people (counting me) find white color to be the best even for read only files (we have also the fancy icon by the side filenames in the project panel that turns to the padlock icon if file is read only, which by the way doesn't work dynamically but it's cool anyway ;) )
If I could suggest something, I would say that letting the user to chose this color would be in my opinion the best choice.
Many thanks for the answers.

Best wishes,
Mike
« Last Edit: March 17, 2006, 12:34:53 am by agentsmith »

sethjackson

  • Guest
Re: Gray editor background if file is read only
« Reply #9 on: March 17, 2006, 01:11:52 am »
Yeah I think letting the user choose is the best way......

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5177
Re: Gray editor background if file is read only
« Reply #10 on: March 17, 2006, 07:40:05 am »
user choice is here the best:

Btw, Rational ClearCase is a very good version control system, and it keeps the files read only on the client's machine. Only if you check out (tell ClearCase : make this file editable for me) it turns off the read only flag. --> muchos muchos grey :-(

Offline agentsmith

  • Single posting newcomer
  • *
  • Posts: 6
Re: Gray editor background if file is read only
« Reply #11 on: March 17, 2006, 12:20:05 pm »
Btw, Rational ClearCase is a very good version control system, and it keeps the files read only on the client's machine. Only if you check out (tell ClearCase : make this file editable for me) it turns off the read only flag. --> muchos muchos grey :-(
Exactly