系统颜色中的小部件背景颜色?
如何将小部件(特别是 VBox)的颜色设置为与 Windows 上的默认对话框相同的颜色?它似乎在 Linux 上自动正常工作,但在 Windows 上,该小部件是不同的灰色阴影。 它作为 GtkPrintOperation 的自定义小部件放置,并且由于颜色而看起来很糟糕
how can I set the color of a widget(VBox in particular) to the same color as are default dialogs on Windows? It seems to work properly automatically on Linux, but on Windows the widget is a different shade of gray.
It is placed as a custom widget to GtkPrintOperation, and it looks awful because of the color
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GtkBox 没有任何窗口,GtkBox 只是一个在内部排列小部件的容器,要更改小部件的背景必须首先检查该小部件是否使用自己的窗口,然后再遍历它。在这里你应该看看这个。
除此之外,当你明确自己想要什么后,谷歌周围有一堆示例。
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. Here you should look at this.
Besides that, after you are clear of what you want, there's a bunch of samples around google.