gtk3 GtkWindow标题栏颜色 [英] gtk3 GtkWindow title bar color

查看:352
本文介绍了gtk3 GtkWindow标题栏颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用gtk3,如何更改默认的GtkWindow标题栏颜色?它会涉及GtkStyleContext吗?我只用过GtkCssProvider.

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

推荐答案

您不能从GTK更改标题栏颜色.标题栏是由窗口管理器绘制的,而GTK并不知道"任何有关它的信息.您只能通过提示"与窗口管理器进行通信,例如窗口是否应该有标题栏或应该在其中显示什么字符串,但是窗口管理器可以随意忽略它们.

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.

这篇关于gtk3 GtkWindow标题栏颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆