简体   繁体   English

GTK检查器找不到小部件的一部分

[英]Gtk inspector cant find part of widget

I'm working on a Gtk3 theme using css. 我正在使用CSS开发Gtk3主题。 I want to style a dialog so I used gtkinspector to check what widgets are inside there. 我想为对话框设置样式,所以我使用gtkinspector来检查其中的小部件。 Works well, the inspector recognizes the dialog. 运行良好,检查员可以识别对话框。 But it is apparently unable to identify a border sitting around the dialog. 但显然无法识别对话框周围的边界。 (See image below). (请参见下图)。

对话框小部件周围的边框

The border around the entire widget doesnt get hilighted by the inspector. 整个窗口小部件周围的边框不会被检查人员发现。 .. so what does this consist of? ..这是什么组成的?

This is reflected in the css: if I put something like dialog * {green} in the css, everything colors green, except for the border. 这在css中得到了反映:如果我在css中放入诸如dialog * {green}之类的东西,则除了边框外,其他所有颜色均为绿色。 If I put .background {green} then the border also colors green.... 如果我将.background {green}放进去,那么边框也将变为绿色。

I tried to find 'padding' 'margin' and 'border' entries that could be causing the border, but cant seem to find any....Any ideas? 我试图找到可能导致边界的“填充”,“边距”和“边界”条目,但似乎找不到任何...。有什么想法吗?

Without code or a glade file one can't say for sure which properties are being used to add that border. 没有代码或林间空地文件,就无法确定要使用哪些属性添加边框。

The border itself isn't a widget but a GtkContainer property. 边框本身不是小部件,而是GtkContainer属性。 So you must look to the parent, GtkDialog, for the correct properties being used. 因此,您必须向父级GtkDialog寻求使用的正确属性。 Most probably its the empty border around the container child (see GtkContainer "border-width" ) but could be alignment or padding. 很有可能是容器子项周围的空白边框(请参见GtkContainer“ border-width” ),但是可以对齐或填充。

If your goal is to change the color of the background color then you should change it via GtkDialog. 如果您的目标是更改背景色的颜色,则应通过GtkDialog进行更改。

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

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