如何使用x资源删除x窗口程序中小部件的边框?

时间:2023-01-06 19:31:12

I would like to change the ugly default looking of gv's GUI. I used editres to get the x resource tree of gv and tried to remove borders of buttons using the following settings:

我想改变gv的GUI的丑陋默认看法。我使用editres来获取gv的x资源树,并尝试使用以下设置删除按钮的边框:

GV.control.MButton.borderWidth: 0
GV.control.MButton.borderColor: white

None of them works. Later on I figured out the relevant resource might be:

它们都不起作用。后来我发现相关资源可能是:

GV.control.MButton.unsetFrameStyle: sunken/raised/ledged

The 3 options sunken, raised, ledged do change the style of the frame. But I cannot find an option that makes the frame a simple line or just disappear.

凹陷,凸起,凸起的3个选项确实改变了框架的风格。但我找不到一个让框架变成简单线条或只是消失的选项。

Seems gv is based on Xaw3d (I am not sure). I don't know whether these resources are provided by Xlib, Xt, Xaw or just by gv itself. It is unlikely that they are gv specific. If they are provided by Xlib, Xt or Xaw, I could change lookings of similar x window programs the same way once I found the right resources and options to set.

似乎gv基于Xaw3d(我不确定)。我不知道这些资源是由Xlib,Xt,Xaw还是仅由gv本身提供的。它们不太可能具有特定的gv。如果它们是由Xlib,Xt或Xaw提供的,那么一旦找到合适的资源和选项,我就能以相同的方式更改类似x窗口程序的外观。

So my question would be how to find the right x resources and options to remove borders of an x widget?

所以我的问题是如何找到正确的x资源和选项来删除x小部件的边框?

PS: editres provides only the resource list but not the options list. appres and listres show a very short list of resource settings if I use them for gv.

PS:editres仅提供资源列表,但不提供选项列表。如果我将它们用于gv,那么appres和listres会显示一个非常短的资源设置列表。

2 个解决方案

#1


2  

The Wikipedia article on Xt provides some helpful context. You're looking for information on configuring Xaw's widgets, although there may be some relevant configuration in Xt.

关于Xt的*文章提供了一些有用的背景。您正在寻找有关配置Xaw小部件的信息,尽管Xt中可能存在一些相关配置。

#2


2  

The following settings remove 3D effect

以下设置删除3D效果

GV.control.MButton.bottomShadowContrast: 0
GV.control.MButton.topShadowContrast: 0

The following setting changes the shadow width

以下设置更改阴影宽度

GV.control.MButton.shadowWidth: 1

1 is the smallest value it takes. 0 does not work. Now there is only a thin line left. Not exactly what I want, but better than nothing.

1是它所需的最小值。 0不起作用。现在只剩下一条细线。不完全是我想要的,但总比没有好。

I figured it out by randomly changing resources inside editres. It would be nice if someone could provide links to relevant documentations.

我通过随机更改editres中的资源来解决这个问题。如果有人可以提供相关文档的链接,那就太好了。

#1


2  

The Wikipedia article on Xt provides some helpful context. You're looking for information on configuring Xaw's widgets, although there may be some relevant configuration in Xt.

关于Xt的*文章提供了一些有用的背景。您正在寻找有关配置Xaw小部件的信息,尽管Xt中可能存在一些相关配置。

#2


2  

The following settings remove 3D effect

以下设置删除3D效果

GV.control.MButton.bottomShadowContrast: 0
GV.control.MButton.topShadowContrast: 0

The following setting changes the shadow width

以下设置更改阴影宽度

GV.control.MButton.shadowWidth: 1

1 is the smallest value it takes. 0 does not work. Now there is only a thin line left. Not exactly what I want, but better than nothing.

1是它所需的最小值。 0不起作用。现在只剩下一条细线。不完全是我想要的,但总比没有好。

I figured it out by randomly changing resources inside editres. It would be nice if someone could provide links to relevant documentations.

我通过随机更改editres中的资源来解决这个问题。如果有人可以提供相关文档的链接,那就太好了。