Gnome扩展:在悬停时更改St.Icon图像?

时间:2017-08-14 01:03:37

标签: gnome gnome-shell gnome-shell-extensions

所以任务很简单,但不适合我 - 绿色Gnome Extensions Development noob。当然我用Google搜索了这个,但没有找到可以在这里提供帮助的东西。

extension.js:

https://pastebin.com/TqDVp8Yz - 因为“你的帖子主要是代码”。

stylesheet.css中:

.poppy-button {
    background-size: 20px;
    width: 20px;
    height: 20px;
    background-image: url("Resources/poppy.svg");
}

.poppy-button:active,
.poppy-button:focus,
.poppy-button:checked,
.poppy-button:hover {
    background-image: url("Resources/poppy-active.svg");
}

1 个答案:

答案 0 :(得分:2)

我会避免使用CSS并连接到“enter-event”和“leave-event”信号,因为所有StWidget元素也都是ClutterActors。

EVALUATE(
    SELECTCOLUMNS(
        SUMMARIZE(
            'BreakTable',
            'BreakTable'[Column1],
            'BreakTable'[Column2],
            'BreakTable'[DateColumn1], 
        ),
        "Column1", [Column1],
        "Column2", [Column2],
        "DateColumn1", FORMAT([DateColumn1],"YourFormatHere"), --Format your DateColumn here
        "BreakCount",FORMAT('BreakTable'[BreakCount],"#,##0")
    )
)

另一方面,如果您在StIcon上将“track-hover”设置为true,那么您的CSS可能会有效。

Pro-Amateur-Tip:将“gjs”标记添加到您的问题中,为Gnome Shell扩展提供更多帮助。

相关问题