Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-02-13 05:33:55

zub
Member
Registered: 2023-01-18
Posts: 27

GtkInspector in theme development - tips, tutorials?

Does anyone know of a tutorial about how to use the GtkInspector to help with theme development?

It gets mentioned all the time, often with a link to https://docs.gtk.org/ but it is far from self explanatory. The GTK docs are huge and I don't know what in there is supposed to be relevant.

I have managed to find some useful things out of the Inspector, in it but I am always kind of just randomly clicking around. It would be helpful to understand the structure a bit better.

I am interested in workflows of how people actually use it?

I will share one tip I learned: When trying to inspect panel elements, it is easier to backup your existing panel and remove everything except the item you are looking for. It prevents a bazillion windows from opening and you don't need to wade through them to find the correct one.

Offline

#2 2023-02-13 11:40:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,900

Re: GtkInspector in theme development - tips, tutorials?

zub wrote:

I will share one tip I learned: When trying to inspect panel elements, it is easier to backup your existing panel and remove everything except the item you are looking for. It prevents a bazillion windows from opening and you don't need to wade through them to find the correct one.

Here is another way to approach this. First make sure that you have the keybinding enabled:

gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true

...then you can use the Shift+Ctrl+I (or Shift+Control+D) keyboard shortcut to bring up the inspector.

The trick for panel items, is to click or right-click the plugin to bring up the context menu and then press the keyboard shortcut. This will bring up the inspector window for just that panel item.

I am interested in workflows of how people actually use it?

I haven't come across any extensive documentation myself, its mostly "figure it out as you go along". Personally, I'm pretty much using the keyboard shortcut now to bring up the inspector, view the "Objects>CSS nodes"  section to see what widgets, elements, and styles are available, and make changes to the CSS tab to see the change live. Occasionally I look at the GTK3 docs to see if there are any special properties or styles that might might be helpful.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB