Gtk3 CSS背景图片不会逐像素显示

时间:2018-04-22 07:08:53

标签: css background-image gtk3

我正在制作一个Gtk3主题,并且无法获得小的背景图像以显示。我希望它们按原样显示,逐像素显示,不缩放,反别名等。

为了缩小问题,我制作了一个文件〜/ .themes / test / gtk-3.2 / gtk.css

仅包含:

combobox button arrow
{
    min-width:15px;
    min-height:6px;
    background-image:url("comboBoxBeam.png");
    background-size: 15px 6px;
    background-repeat: no-repeat;
    background-position: center;
    margin:0px;
    padding:0px;
}

并启动了awf-gtk3或gtk3-widget-factory。在下图中,您可以看到以下屏幕抓取:

1)原始的comboBoxBeam.png 2)使用上述gtk.css文件在awf-gtk3应用程序中显示的图像 3)使用此gtk.css文件(高度为5而不是6)在awf-gtk3中显示的图像:

combobox button arrow
{
    min-width:15px;
    min-height:5px;
    background-image:url("comboBoxBeam.png");
    background-size: 15px 5px;
    background-repeat: no-repeat;
    background-position: center;
    margin:0px;
    padding:0px;
}

2)图像显示高度为7且模糊 在3)图像显示清晰和给定的大小,但原始大小是1像素更大

如何以原样为单位逐像素地显示图像?

(Xubuntu 17.10,gtk版本3.22)

Gtk3 background-image rendering

0 个答案:

没有答案
相关问题