Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Brace matching color customization

Katy's profile image Katy posted 7 years ago in General Permalink
Hi there,

I know this not a big deal for most people, but for me it is. I'm using an inverted color scheme, that is, light text on dark background, and the light blue color used for brace matching is effectively hiding the brace. I've attached a screenshot.

Any chance of adding an option for that in the SQL Tab from the Preferences dialog?

Code wise shouldn't be too difficult, all the supporting code is already there.


Thanks a lot,
Mircea.
1 attachment(s):
  • screenshot
Katy's profile image Katy posted 7 years ago Permalink
Forgot the "from" in the screenshot, stop laughing :p
ansgar's profile image ansgar posted 7 years ago Permalink
There is just so many options already in the preferences dialog.

What about auto-detecting the color for bracket background highlighting, by using the inverse color of the brackets color?
Katy's profile image Katy posted 7 years ago Permalink
Define "inverse color". That's not as easy as it sounds.
On the other hand, you already have a syntax highlighting mechanism in place, why not using it for brace match coloring? That's how every IDE is doing it. And, frankly, that's what it is, a syntax highlighting option. It would be just an extra option in that combobox you have for SQL elements. I've attached a screenshot, just to be clear about my idea.

Instead of determining the color by some weird algorithm, just take it from the syntax highlighting options. Easy-peasy-lemon-squeezy :)
1 attachment(s):
  • screenshot
Katy's profile image Katy posted 7 years ago Permalink
And even if you implement some color inversion algorithm, it will give you some average results. Example: what's the inverse color of black? One would say white. Yet, the strongest contrast as perceived by human eye is between black and yellow, not black and white.
Katy's profile image Katy posted 7 years ago Permalink
Also, using a color inversion algorithm might get a result conflicting with the color of the caret. Plus, you also change the color of the opening brace, which IMHO is a bad choice. The way I see it, it would be much better to give the user the possibility to tinker with the background color, without any other alteration :)
ansgar's profile image ansgar posted 7 years ago Permalink
Agree. Inversing black to white would make the highlighting invisible on a white background.
Code modification/commit from ansgarbecker, 7 years ago, revision 5014
Make brace matching color customizable, via Tools > Preferences > SQL. See http://www.heidisql.com/forum.php?t=19934
ansgar's profile image ansgar posted 7 years ago Permalink
Done in r5014
Katy's profile image Katy posted 7 years ago Permalink
You're awesome. Here goes another 10 EURsmileGreat project, great support.
ansgar's profile image ansgar posted 7 years ago Permalink
Thanks a lot! :)

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.