gdb tui: How to change the style of the "current line" bar? - gdb

I'm using gdb 10.2 in a gnome-terminal (on Ubuntu 20.04 running in WSL2), where gnome-terminal is configured to follow the system theme.
In tui mode, if the current line is indicated by a black bar. Function calls are formatted with black foreground text, rendering them unreadable:
Already tried
set style source off: The current line is now readable, but source color coding is now (obviously) disabled
set style function foreground white: No effect
Configure gnome terminal to not follow the system theme: The terminal switches to "dark mode": The background now becomes black, the bar turns white. The function names are readable, but the legibility of many of the differently colored things is reduced.
Possible duplicate question
At this point, disabling source highlighting is workable, but suboptimal. Tips are most welcome!

Related

Change the background color in WebStorm

I have a theme installed. I just want to make the background darker than what it is, it really helps especially because I have vision problems. I guess I need to use the "Color scheme" from options, but I really couldn't find anything to change the background.
To change the background color of the Editor tab, do the following:
File | Settings (WebStorm | Preferences on macOS)
Editor | Color Scheme | General
Make a copy of the Color Scheme (if it's a bundled one or provided by a plugin) so that you can customize it (although the IDE should do that for you automatically)
Locate Text | Default text entry and change the background color there.
An example: modified Dacrula theme with bright yellow background (yeah, looks completely unusable, but good for illustration purposes):
Please note: some languages can provide own background colors. E.g. PHP -- a typical PHP-code only file will have all code inside a single <?php tag so you may see a different background color for PHP code compared to other languages. Test and adjust it as needed.
Note #2: GUI Theme (which is about styling the rest of the IDE GUI): it always linked to some Color Scheme (so the GUI and Editor area have similar colors). When you will be switching between GUI Themes make sure to double check the applied Color Scheme as well (if you need to use your custom one).
Useful shortcut: View | Quick Switch Scheme -- it will bring a popup menu that allows quickly switching different themes and schemes.

WebStorm Terminal Color - Linux

I have a couple of issues with my terminal colors in WebStorm that I have been unable to resolve by using Settings > Editor > Color Scheme > Console Colors
I am running:
Kubunutu 20.04,
WebStorm 2021.2 64 bit for linux. Build #WS-212.1746.80
My issues are:
In the interactive console color interface, the 'console' background does not match my actual console background. Mine is dark, the interactive settings one is white. The result of this is that I am unable to see how my color selections will actually appear.
Hyperlinks in my console are displayed in the default blue (000FF), which works fine against a white background but is unreadable against a dark background. I have been unable to locate the setting for this. They do not appear to be in the console colors section. And if I go to Settings > Editor > Color Scheme > General > Hyperlinks there are plenty of options, but none of them seem to affect what goes on in the terminal.
Questions:
How do I get the console color selector background to match my actual background selection?
Where do I access the setting that determines the hyperlink color in the WebStorm terminal in Linux?
Screenshots follow:
Here you can see that my background is set to dark, but the color selector interface background is white.
And here you can see the unreadable hyperlinks that I can't read. The command to get this screen was npm fund
Here are my actual console colors:
Here you can see the hyperlink settings, with background set to yellow, and the actual hyperlinks displayed behind, demonstrating that these two things are not linked. (I refreshed the terminal display after changing the settings)

wxWidgets: wxStyledTextCtrl - Colours

Using wxWidgets wxStyledTextCtrl I cannot find a way of having the color behind the text to be anything but white. I can change the editor's background but typing in text results in black text with a white background behind the characters.
Searches and review of Scintilla's and wxWidgets docs has revealed nothing to me yet. Any suggestions? (C++, Linux Mint)
update #1: After poking around in the wxWidget source, as a test, I modified in PlatWX.cpp the SurfaceImpl::DrawTextTransparent. I added a call to set brush colour and changed hdc->SetBackgroundMode( wxBRUSHSTYLE_TRANSPARENT ) to wxBRUSHSTYLE_SOLID.
These seems to work reasonably well. However, there are added problems with whitespace. The first being the settings for white space coloring seem to be ignored. The second is a carriage return always leaves a white blank space and multiple spaces having a growing white bow (as on a ship) when holding the spacebar down.

Unusual color of text in console

today i need to print colorful text in console, but the color should be "unusual". I've found the only way to colorize text with windowh.h
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), colorNumber)
Main problem is the limited choice of colorNumber, there are only 16 colors, but it is not enough. What if i want to make text color #33F5C8? What if i want to make it transparent? How can i do it?
(nonstandard cpp tools allowed)
With ANSI you can use the following code to set a RGB based color:
\033[38;2;⟨r⟩;⟨g⟩;⟨b⟩m
To reset color after change:
\033[0m
Pay attention that the visual's console might not support it, although the CMD probably does. To check the colors, compile your program and run it using the CMD.

How to change button color?

I am developing a GUI application using Embarcadero VCL c++ IDE for windows OS. As part of this project, I have to change color of button with respect to an external state.
I understood that windows32 API will not allow to change the color of button.
Could you please suggest me, how to change button color?
Do you wish to change the background-colour of the button, or the text-colour of it?
Since windows has used visual themes for some time now, if you have commctrl loaded and include a manifest file, the button will be drawn using the default (current) theme.
Options I can see include (a) custom-drawing the background (b) changing the text-colour in the normal draw process (c) drawing the button without a theme (i.e drawing a 'flat' button).
You could simply draw a bitmap-button, changing the bitmap depending on the state of the button. You could also use a single bitmap, tinting it using the HSL or HSV colour-space, depending on the state.
As for the flat type of button, I think you can probably change it's background-colour in much the same way as you can change the colour of the text - by intervening during the standard draw process and changing the colour from 3D_FACE (or whatever it is, I forget) to whatever you'd like.
If you look at the calculator included with windows XP, you can see an example of changing the text colour.
CodeProject.com likely has a stack of articles that would help in this endeavour. :)