I searched through the VSCode Docs, but was unable to locate any useful documentation that explained what the properties that highlight the background colors for the widget demonstrated in the image below.
What VSCode Theme property modifies the "View Problem" dialogue's background color?
After two hours of isolating individual properties and trying to diagnose the issue, I can confirm that the property that controls the background color of VSCode's "View Problem" dialog is called: 'editorMarkerNavigation.background'.
I hope this helps others in the future.
So this isn't a problems widget, its a navigation widget, and it helps to communicate important statuses in the current script you have loaded into the editor. It attempts to help you find and locate issues. I find that it is most useful when used inside of a very large code base. It doesn't just relay what problems exist, it can show errors, info, & warnings too.
So the property you suggested colors the majority of the background, but part of the widget is a header, and to change the background color of the header you will also need to use "editorMarkerNavigationError.headerBackground".
This is the full property list for "Marker Navigation Widget".
// #file "./themes/your-vscode-theme.json"
{
"editorMarkerNavigationInfo.headerBackground": #000000,
"editorMarkerNavigation.background": #000000,
"editorMarkerNavigationError.background": #000000,
"editorMarkerNavigationInfo.background": #000000,
"editorMarkerNavigationWarning.background": #000000,
"editorMarkerNavigationWarning.headerBackground": #000000
}
Related
In the SAPUI5 control explorer in the busy dialog section there is mention of a sap.m.sample.BusyDialogLight.C control. Essentially this is an unframed dialog with the busy indicator 3-blue blobs image over it. I intend to use this whilst long JSON fetches are running.
My version of OpenUI5 which is v1.40.10 does not have a file or folder with that name in the sap.m.* folders. It only has sap.m.BusyDialog.js which I read (dbg version) and see no obvious mention of a light model.
So can anyone tell me if there is actually a BusyDialogLight control and how to define it?
This is just the controller which handles the view. The name used there is the same as in the view's controllerName attribute. And light is in this context just the BusyDialog without text and buttons.
I'm trying to make GTK-based applications look more compact by customizing a theme, as suggested by an answer for my other question.
I reduced some values I saw in the gtkrc and it got better, but not enough.
I want to shrink it further:
How to do it?
Are there any tools helps me to adjust various paddings or at least show me the exhaustive list of properties I can set in gtkrc? Is there a document with full list of properties can be in gtkrc?
You can try gtkparasite, which is a Firebug-like for GTK+. You have to run it as:
$ GTK_MODULES=gtkparasite my_program
And then you can inspect the properties of each widget, change its values, etc. In the web page you will also see a screencast on how to use it.
I'm trying to get a Gtk::Spinner object to display while calculations are in progress but nothing appears to be happening. The snippet of code looks like...
{
Gtk::Spinner spinner;
spinner.start ();
// do some work...
spinner.stop ();
}
I'd have thought the spinner needed to know which dialogue it appears over but I can't see any way of feeding that into the object. Does anyone know where I could find a worked example? I can find the Gtk documentation in many places, but that isn't helping much.
In short, here is a quick checklist if Gtk::Spinner is not appearing on screen:
Make sure librsvg is installed.
Check if your currently active Gtk theme has an image file with base name "process-working-symbolic" (e.g. /path/to/your/theme/icons/scalable-up-to-32/status/process-working-symbolic.svg).
In your app code: Make sure you added the spinner object to some parent widget / container: vbox.pack_start(spinner, Gtk::PACK_SHRINK);
In your app code: Ensure all widgets are actually made visible: show_all_children();
In your app code: Finally you need to call spinner.start() for the widget to actually appear and spin on screen.
In detail:
The actual Gtk spinner widget code (see function gtk_spinner_class_init() in gtkspinner.c) is not doing any drawing on its own. In fact its code is very little. All it does is adding CSS code to the gtk widget:
it assigns the CSS class "spinner" to the widget
and it automatically adds and removes the CSS pseudo-class "checked" whenever the widget's boolean gtk property "active" changes.
So the actual look (icon) and the animation is defined by your current theme's CSS file. E.g. in Gtk's default theme's gtk-contained.css file you find the following:
spinner {
background: none;
opacity: 0;
-gtk-icon-source: -gtk-icontheme("process-working-symbolic");
};
Which means it will automatically search for an appropriate image file with base name "process-working-symbolic" in the theme's "icons" directory tree. And the actual spinning animation is defined in the same CSS file by this:
spinner:checked {
opacity: 1;
animation: spin 1s linear infinite;
};
In most other themes these CSS code portions for the spinner widget are pretty much identical.
Now here is a common problem with this: in most themes the spinner image is an SVG file (e.g. typically "process-working-symbolic.svg"), but the stock Gdk pixbuf loaders do not support the SVG format at all. They support a variety of other image file formats, but for actually allowing Gdk/Gtk to load .svg files you need to install a third-party pixbuf loader capable to do so like librsvg.
Alternative:
In case you cannot or don't want to bother to install an SVG capable Gdk pixbuf loader like librsvg, then you can also simply add image file(s) with the same base name, but in another file format like "process-working-symbolic.png" to your theme's icons directory tree. So either draw or download some spinner picture then scale it and place them several times to the resolutions listed in your theme's "icons" directory, e.g.:
/THEMEDIR/icons/8x8/status/process-working-symbolic.png
/THEMEDIR/icons/16x16/status/process-working-symbolic.png
/THEMEDIR/icons/22x22/status/process-working-symbolic.png
/THEMEDIR/icons/24x24/status/process-working-symbolic.png
/THEMEDIR/icons/32x32/status/process-working-symbolic.png
/THEMEDIR/icons/64x64/status/process-working-symbolic.png
/THEMEDIR/icons/256x256/status/process-working-symbolic.png
/THEMEDIR/icons/512x512/status/process-working-symbolic.png
Also you should know: Whenever you do spinner.start() the spinner icon immediately appears on screen, but even on a decent machine it typically takes almost a second before the spinner starts its animation.
Did you call
spinner.show ();
and add it to some window?
Moreover, your calculations may block the UI, so it is not updated. Call
while (Gtk::Main::events_pending ())
Gtk::Main::iteration ();
once in a while.
To change the mouse cursor to "busy" you can do the following:
Glib::RefPtr<Gdk::Window> window = dialog.get_window();
if(window) {
window->set_cursor(Gdk::Cursor(Gdk::WATCH));
Gdk::flush();
}
To change it back, do
window->set_cursor();
instead.
Disclaimer: I usually work with GTK in C, and have translated this on the fly...
I am trying to create GTK Widget like shows in following Images
Is it possible to create it in GTK+ under C,
I tried using GtkExpander but it is not working out ...
Can any one Help....
Stripping the arrow is quite trivial. Just append the following code to you $HOME/.gtkrc-2.0 (or create it if not found):
style "pradeep" {
GtkExpander::expander-size = 0
GtkExpander::expander-spacing = 0
}
widget "*.GtkExpander" style "pradeep"
This is done by customizing the appearance using resource files. You can get the same result programmatically by changing the GtkExpander style properties.
Furthermore, you can connect your own callback to its "activate" signal and switch the background color of the widget whenever is active or not. And a lot more...
Just remember someone loves to have a consistent user interface.
If what you want is to duplicate the look, then there are two very inefficient solutions to the problem:
Write your own GTK theme engine (see Murrine or Clearlooks).
Replace your entire program by a GtkDrawingArea widget and use Cairo to draw exactly the look you want. You'll be on your own then, though, so you'll have to write all your widget placement algorithms, buttons, expanders, menus, and whatnot, from scratch.
GTK isn't really meant for this sort of thing. The whole point of GTK is that you design your user interface with the standard widgets, and they just work with whatever theme, language, or accessibility technologies your users need to use. If you design your own look and there's no way to change it, then someone with color blindness or poor eyesight won't be able to use it. Or the text will get all misaligned if someone uses your application in another language. Or at the very least, maybe someone just likes a black desktop with white lettering, and your application will stick out and look really ugly on that user's computer. If you really need to make it look exactly that way, then probably GTK isn't the right tool for you.
How to change background color of GtkTextView? I tried with normal widget set bg functionality but gtk is just changing border color of GtkText View.
Plus can some some please explain me with simple example, that how to change Text Color/Font/Text Size in GtkTextView (Whole text in GtkTextView)?
I fond some examples but they are not working..
Thnaks,
PP.
gtk_widget_override_background_color()
This the GTK 3.x+ way (until GTK 3.16). From
https://developer.gnome.org/gtk3/unstable/GtkWidget.html#gtk-widget-modify-base
"gtk_widget_modify_base has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead"
UPDATE: thegtknerd notes that this method too is now deprecated and it has been since 3.16.
gtk_widget_modify_base()
http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#gtk-widget-modify-base
As of gtk3, I believe the proper way to do that is through CSS. Register a gtk style sheet though GtkCssProvider, then you can write this CSS:
textview text {
background-color: #theme_bg_color;
}
We can see the relevant CSS nodes in the documentation for GtkTextView. In this case I put #theme_bg_color which is an adwaita CSS variable, but you can as well put anything that goes in a usual CSS file, like red or #ff0000.