Fix issue #289: unable to use StockIcons in Gtk ListView
This commit is contained in:
Родитель
75eedee6ab
Коммит
3525e18541
|
@ -404,12 +404,14 @@ namespace Xwt.GtkBackend
|
|||
Gdk.CairoHelper.SetSourcePixbuf (ctx, img, 0, 0);
|
||||
|
||||
#pragma warning disable 618
|
||||
using (var pattern = (Cairo.SurfacePattern)ctx.Source) {
|
||||
if (idesc.Size.Width > img.Width || idesc.Size.Height > img.Height) {
|
||||
// Fixes blur issue when rendering on an image surface
|
||||
pattern.Filter = Cairo.Filter.Fast;
|
||||
} else
|
||||
pattern.Filter = Cairo.Filter.Good;
|
||||
using (var pattern = ctx.Source as Cairo.SurfacePattern) {
|
||||
if (pattern != null) {
|
||||
if (idesc.Size.Width > img.Width || idesc.Size.Height > img.Height) {
|
||||
// Fixes blur issue when rendering on an image surface
|
||||
pattern.Filter = Cairo.Filter.Fast;
|
||||
} else
|
||||
pattern.Filter = Cairo.Filter.Good;
|
||||
}
|
||||
}
|
||||
#pragma warning restore 618
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче