简体   繁体   English

小部件背景色是否为系统颜色?

[英]Widget background color in system color?

how can I set the color of a widget(VBox in particular) to the same color as are default dialogs on Windows? 如何将小部件(尤其是VBox)的颜色设置为与Windows上默认对话框的颜色相同? It seems to work properly automatically on Linux, but on Windows the widget is a different shade of gray. 它似乎可以在Linux上自动正常运行,但是在Windows上,该小部件是另一种灰色阴影。 It is placed as a custom widget to GtkPrintOperation, and it looks awful because of the color 它作为GtkPrintOperation的自定义窗口小部件放置,并且由于颜色而显得糟糕

GtkBox doesn't have any window, GtkBox is just a container that arranges the widgets inside, for you to change the background of a widget has to check first if the widget is using his own window, and then go through it. GtkBox没有任何窗口,GtkBox只是一个在内部排列小部件的容器,要更改小部件的背景,必须先检查小部件是否使用自己的窗口,然后再通过它。 Here you should look at this . 在这里你应该看看这个 Besides that, after you are clear of what you want, there's a bunch of samples around google. 除此之外,在您明确想要的内容之后,Google周围还会有很多示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM