bugGNU Octave - Bugs: bug #62984, Option to set 'current line...

 
 

bug #62984: Option to set 'current line highlight color' for Editor has disappeared since 7.x

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Mon 29 Aug 2022 09:55:45 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 25 Oct 2022 10:59:15 PM UTC, comment #19: 
Nicholas Jankowski <nrjank>
Group Member
Tue 25 Oct 2022 09:32:12 PM UTC, comment #18: 

This works fine now.
Only thing is I spotted a typo in Torsten's latest cset edccb7c1c8ec ("edtior" instead of "editor")

Philip Nienhuis <philipnienhuis>
Group Member
Mon 17 Oct 2022 07:06:19 PM UTC, comment #17: 


> Would it be helpful to have a short hint at the "highlight current line" checkbox

Might be a good idea, yet with some persistence the actual location can be found. I suppose my search action stemmed from reminiscences of where it used to be located, IOW a personal thing.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 17 Oct 2022 05:23:30 PM UTC, comment #16: 

I have placed it there becuase it's selection heavily depends on the chosen back- and foreground colors and on the selected color mode. The checkbox for the latter is also at the bottom of the preferences tab.

Would it be helpful to have a short hint at the "highlight current line" checkbox referring to the styles below?

Torsten Lilge <ttl>
Group Member
Sun 16 Oct 2022 05:01:35 PM UTC, comment #15: 

Looks good now Torsten, thanks very much.

Initially I had trouble finding the actual color setting; I searched above in the Editor setting screen next to the "highlight current line  setting" but the actual color is chosen much lower, near all the color settings.
Maybe this can be improved at some later time, but ATM I find it good enough.

Philip Nienhuis <philipnienhuis>
Group Member
Sat 15 Oct 2022 01:58:48 PM UTC, comment #14: 

Patch with new key for the user pref pushed with http://hg.savannah.gnu.org/hgweb/octave/rev/2ec8fbbcd053

Torsten Lilge <ttl>
Group Member
Sat 15 Oct 2022 01:33:50 PM UTC, comment #13: 

I have just discovered that I should change the key of the restored user pref for the color. Otherwise, an 6.x octave version might use the new default, which is magenta (representing automatically computed). I am going to prepare a patch.

Torsten Lilge <ttl>
Group Member
Sat 15 Oct 2022 11:40:57 AM UTC, comment #12: 

The rest took less time than expected. I have pushed the patch to the default branch with cset http://hg.savannah.gnu.org/hgweb/octave/rev/d3231a604a62

If everything works as expected and if desired, we can graft it to the stable branch.

Torsten Lilge <ttl>
Group Member
Fri 14 Oct 2022 07:49:25 PM UTC, comment #11: 

The patch is in work. However, I only have little time for coding at the moment.

Torsten Lilge <ttl>
Group Member
Fri 14 Oct 2022 07:17:33 AM UTC, comment #10: 

This probably won't make it before Octave 7 will be released.
Setting release to dev.

Markus Mützel <mmuetzel>
Group administrator
Mon 05 Sep 2022 04:02:28 PM UTC, comment #9: 


> However, I can reinstate this preference with colors for each mode or (255,0,255) for determining the color automatically.

Thanks, would be very nice. Maybe first a separate patch to try it out & give feedback?

Philip Nienhuis <philipnienhuis>
Group Member
Fri 02 Sep 2022 10:50:42 AM UTC, comment #8: 

I have remove the settings while introducing the second color mode (dark mode) where the current line background would had to be adjusted manually when switching the mode.

However, I can reinstate this preference with colors for each mode or (255,0,255) for determining the color automatically.

Torsten Lilge <ttl>
Group Member
Fri 02 Sep 2022 08:58:05 AM UTC, comment #7: 

The line highlight color is very noticeably darker than the background color of the toolbars on my monitors (to give a reference).

I agree that changing the monitor settings per program is not a solution to anything. I was just suspecting that other programs might benefit as well from monitor settings that allow to distinguish colors that should be well distinguishable (at least in theory for most people)...

Markus Mützel <mmuetzel>
Group administrator
Thu 01 Sep 2022 06:53:20 PM UTC, comment #6: 

Contrast and gamma settings are already optimal for most if not all other SW in use and apart from that I don't think it's the way to go to having to adapt them each time for just one program.

Did you try with some fairly dense text sections? It may be just an age thing (I'm almost at retirement age) but especially there it would be nice to have some flexibility.

I'd simply like to have some way to set the highlight background color to some personal preference. Too bad I didn't note earlier on that this option had been removed, and IMO fairly silently at that.
E.g., in the Variable Editor and Command pane this choice still exists, also with alternative color setting.

Philip Nienhuis <philipnienhuis>
Group Member
Thu 01 Sep 2022 06:24:39 AM UTC, comment #5: 


> I had a look in the cset Markus mentioned; I'm wondering how difficult it would be to reinstate the line background setting.


In case it should be reinstated, it should probably move from its old position to an entry in the table further down on that tab. It would probably be necessary to define different colors for the primary and secondary color scheme.

The line highlight is pretty visible on the monitors I tested with. Maybe, you could try to adjust the contrast (or gamma?) settings of your monitor in case it is hardly distinguishable for you.

Markus Mützel <mmuetzel>
Group administrator
Wed 31 Aug 2022 08:49:33 PM UTC, comment #4: 


> @Philip: Which colors do you use as background and foreground in the editor?

The default ones: black on white. The background color is light gray, but I usually prefer some light blue as light gray doesn't stand out in sections with long "busy" lines.

I had a look in the cset Markus mentioned; I'm wondering how difficult it would be to reinstate the line background setting.
But currently I just don't have time for that :-(

Philip Nienhuis <philipnienhuis>
Group Member
Wed 31 Aug 2022 07:56:32 PM UTC, comment #3: 

Removing this user preference was a deliberate action as the background color of the current line is now "interpolated" between the background and foreground color in order to give a reasonable color regardless the back- and foreground color the user has selected. Obviously, it does not always lead to a reasonable color ...

The algorithm is in interpolate_color () in gui-utils.cc (comment in gui-utils.h https://hg.savannah.gnu.org/hgweb/octave/file/ad9822dedef8/libgui/src/gui-utils.h).

@Philip: Which colors do you use as background and foreground in the editor?

Torsten Lilge <ttl>
Group Member
Wed 31 Aug 2022 07:51:34 PM UTC, comment #2: 

Thanks, yeah I see it here:

:
* file-editor-tab.cc (file_edito_tab): read lexer settings
  depending on the current color mode, determine color of current
  line depending on background color (no more user pref)
:


IMO a bit unfortunate; the current background color doesn't stand out clearly on my monitor.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 31 Aug 2022 02:04:10 PM UTC, comment #1: 

Afaict, that option was removed as part of this changeset that added the option of a secondary (dark) color scheme (see the changes to libgui/src/m-editor/file-editor-tab.cc):
https://hg.savannah.gnu.org/hgweb/octave/rev/5384bb4efc51

That might have been deliberate. Let's wait for Torsten's take.

Markus Mützel <mmuetzel>
Group administrator
Mon 29 Aug 2022 09:55:45 PM UTC, original submission:  

(Hopefully) title says it all.
See attached screenshot of Octave-6.4.0's Preferences pane|Editor tab, where the color for the current line in the Editor could still be user-selected.
As of 7.1.0 this option has disappeared and these days the current line has a light gray background.  Too bad as on some of the monitors I use this background color is hard to distinguish quickly.

Was this a deliberate action? If so, should I set "Item Group" to "Feature request"?

(cc'ing Torsten)

Philip Nienhuis <philipnienhuis>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  • -email is unavailable- added by philipnienhuis
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-25 nrjank StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-10-15 ttl StatusConfirmed Ready For Test
    2022-10-14 mmuetzel Release7.1.0 dev
    2022-08-31 mmuetzel Item GroupOther Feature Request
        StatusNone Confirmed
    2022-08-29 philipnienhuis Attached File- Added Pref_Editor_currline_color.png, #53632
        Carbon-Copy- Added ttl

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code