如何在gtkrc中捕获GTK焦点状态?

发布于 2024-09-28 23:43:18 字数 350 浏览 1 评论 0原文

GTK+ 2.x 具有以下状态:NORMAL、PRELIGHT、ACTIVE、INSENSITIVE、SELECTED,用于 GTK 主题,我可以执行诸如...

bg[NORMAL] = "#f6f6f6"

.. 在 中更改背景颜色之类的操作正常状态。

另外,我可以通过更改 PRELIGHT 状态图像来更改按钮的背景图像(当鼠标悬停在按钮上时)。

但是当用户使用 TAB 箭头循环焦点时(即当按钮周围出现虚线矩形时),我无法找到更改按钮背景的方法。我想使用 gtkrc 中的主题来做到这一点,这可能吗?

GTK+ 2.x has the follow states: NORMAL, PRELIGHT, ACTIVE, INSENSITIVE, SELECTED for use in GTK themes and I can do things like...

bg[NORMAL] = "#f6f6f6"

.. to change background color when in NORMAL state.

Also, I can change the background image of a button (when the mouse is over it) by changing the PRELIGHT state image.

But I was not able to find a way to change the button background when the user cycle the focus using the TAB arrow (ie. when a dashed rectangle appears around the button). I want to do this using themes in gtkrc, is this possible ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伏妖词 2024-10-05 23:43:18

我不这么认为。 RC 文件文档 甚至没有提到“焦点” ”,所以我认为不可能以这种方式来确定主题。

I don't think so. The RC file documentation doesn't even mention "focus", so I don't think it's possible to theme that in this way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文