Page 1 of 2
Current line box
Posted: Sat Nov 05, 2022 4:05 pm
by IanOfYork
Textpad version 8.13 shows the current line in the file by displaying a box of dashed lines.
How do I disable the box completely and just use the background colour to highlight the current line?
Posted: Sat Nov 05, 2022 4:29 pm
by ben_josephs
In Configure | Preferences... | Document Classes | <Class> | Colors
or View | Document Properties | Colors,
choose Item: Current Line (7th entry),
set Foreground to whatever colour you want
and Background to the same colour as Window background (1st entry; normally white).
Posted: Sat Nov 05, 2022 5:41 pm
by IanOfYork
Yes that helps slightly, but changing the foreground colour to match the background colour just reduces how bad it looks, it does not remove the box.
Is there any way to disable / expunge / remove the box altogether?
Posted: Sat Nov 05, 2022 5:48 pm
by bbadmin
Try setting the foreground to light yellow and the background to light gray.
Explain why the box is a problem
Posted: Sun Nov 06, 2022 11:46 am
by IanOfYork
Yes that helps visually, but changing the colour of the box does not remove the box.
With a standard fixed width 10 point font - such as "Consolas" or "Courier New" - the bottom edge of the box overwrites underscore characters and makes them look like spaces. When writing code, this is a serious problem.
The effect can be mitigated by altering the font size, but 11 point "Consolas" is just too large for my screen. Changing the font can also work, but 10 point "Liberation Mono" is not very clean. 10 point "Lucida Console" has the opposite effect - the box blanks the top of tall characters. 11 point "Lucida Console" loses the tail of descenders as well as the tops.
So, I need to completely stop the box being displayed at all.
Is there any option to do that - however "dirty"?
The correct fix would be to add an option to the Document Class to disable the box effect.
A viable fix would be to make the box height (and vertical position) adjust to the current font height, so that the box edges are always positioned in the whitespace between the lines. Then we could select the box colour so that it is effectively hidden without losing parts of the characters.
Posted: Sun Nov 06, 2022 12:39 pm
by ak47wong
Here's the trick:
- Set the Background colour to whatever you want the highlight to be.
- Set the Foreground colour to the same colour as the background.
- In the Foreground colour drop-down, click More Colors.
- On the Custom tab, change one of the Red, Green or Blue values by 32.
For example, if you set the background colour to 255, 255, 128, you can set the foreground colour to either 255, 255, 96 or 255, 255, 160 and the dotted lines will be imperceptible.
I noticed this doesn't help your problem if you use Courier New; the dotted box still overwrites underscore characters. But Consolas 10 point seems to be okay.
Posted: Sun Nov 06, 2022 1:25 pm
by bbadmin
This issue is an artefact of code that TextPad has had since 1995 to handle old monitors which could only display 16 or 256 colors. That code has now been excised, so setting the same foreground and background colors suppresses the box, as intended. This will be available soon. Hope nobody still has such a monitor!
Awesome
Posted: Mon Nov 07, 2022 5:49 pm
by IanOfYork
Thanks!!
Looking forward to that next release, so that I can switch the font back...
Posted: Wed Nov 09, 2022 6:31 am
by Mr. Code Monkey
Yes, please prioritize removing the dashed outline. It's seriously cramping my work flow; very annoying.
And thanks, ak47wong. That workaround does help.
Posted: Wed Nov 09, 2022 8:27 am
by ak47wong
Did you miss the announcement yesterday? The new version (8.14.0) fixes the problem. I think this is set a record in how quickly a TextPad bug has been fixed.
Posted: Wed Nov 09, 2022 10:15 am
by Mr. Code Monkey
No it did not fix the problem. The release notes said: "When the foreground and background colors were the same, the current line should not have been highlighted with a box."
I updated TextPad and the problem was still there. Setting *BOTH* foreground and background to the highlight color worked around it -- but that makes no sense and it's only when I saw this thread that I tried it.
Normally foreground color would imply text color -- meaning that having FG and BG the same would render the text invisible, like in HTML and every other text editor.
The correct fix is for the box not to show at all. Or to be switchable via a separate option than the "highlight line" option.
It's even worse that the "highlight the line" option is global, but the color kludge-around must be done in each document class.
Posted: Wed Nov 09, 2022 11:21 am
by bbadmin
You have misunderstood how this works for current line highlighting. If the foreground and background colors are different, the background of the current line will be painted with the selected background color and a dotted line will be drawn around it in the foreground color. The dotted line will not be drawn if both colors are the same. If you don't want any highlighting, set both colors to the window background color.
Posted: Wed Nov 09, 2022 12:16 pm
by Mr. Code Monkey
I want highlighting (color) but no box. I'm glad that that is once again possible, but the FB/BG stuff is counter-intuitive and non-standard -- hence the "misunderstanding". (Which is really a design/documentation/help error.)
But at least this thread is here now, so other people will have an easier time working around the problems.
Magic
Posted: Wed Nov 16, 2022 12:24 pm
by IanOfYork
I too dislike "magic" side-effects like this.
It would be safer / friendlier / better to have a tick-box option associated with the class to turn off the box effect.
However, 8.13 was updated very quickly, the magic work-around does work and the forum does have information about resolving the issue.
Posted: Fri Nov 18, 2022 2:40 pm
by WayneCa
The last version of TextPad I used before upgrading to 8.14.0 was 8.12.0. My FG/BG colors are white/black respectively. My line hilite color has been a charcoal gray since version 7. This is the first time I've had the dashed outline around the current line. Selected lines are still the way I want them, but the current line has that awful dashed outline around it. Please add a property that allows us to disable that outline.