Search code examples
gtk3custom-titlebar

gtk3 GtkWindow title bar color


Using gtk3, how can I change the default GtkWindow titlebar color? Would it involve GtkStyleContext? I've only used GtkCssProvider.


Solution

  • You can't change the titlebar color from GTK. The titlebar is drawn by the window manager, and GTK doesn't "know" anything about it. You can only communicate with the window manager through "hints", such as whether the window should have a titlebar or what string should be displayed there, but the window manager is free to ignore them.