After successfully compiling and installing gvim 8.0.16 from source with gtk3 support on CentOS 7, I managed to set some style in ~/.config/gtk-3.0/gtk-css
. For instance, the background of widgets above the edit window can be customized like so:
@define-color bg_color #ffd4a1;
* {
background-color: @bg_color;
}
This adjustment worked well for me. However, there are still some appearance details that I'd like to tweak, such as adding a 1px border around popup menus. The challenge arises when trying to find the appropriate rule to implement border: 1px solid black;
since accessing the complete application's widget tree seems elusive.
In the past, with X11, I would have utilized editres(1)
to obtain the comprehensive widget tree. Unfortunately, GTK programs do not support the editres protocol. Instead, it seems that the "GTK+ Inspector" is the equivalent tool. By running gvim with GTK_DEBUG=interactive gvim
, I attempted to use the inspector but found it difficult to extract meaningful hierarchy information. The "Objects" tab only displayed "GtkSettings 0x219cb50" without much clarity. Even selecting a gvim widget with the cross-hair didn't yield any results. Ideally, I would expect to locate the GtkApplication top-level widget for further exploration. What am I overlooking?