PDA

View Full Version : Problems rendering small border-image in Windows



droneone
13th March 2013, 17:15
Hi all,

I'm having an issue with rendering a small border-image on Windows only using Qt 4.8.1, it renders properly on all other OSes, and I'm wondering if there's something I'm missing.

See attached images, the Windows one has vertical lines through it that look quite bad, but the OSX one looks perfect.

88178818
The images aren't scaled at all, they are 13x13px PNGs, and here is my QSS code:


QPushButton {

border-image: url(img/led-blue-off.png);
border: 0px transparent;
min-height: 13px;
max-height: 13px;
min-width: 13px;
max-width: 13px;
}

I've tried numerous options for border-image, with no real effect (other than distorting the image).

Any thoughts on how to resolve this? It's only a problem with these circular images, other images in the 15x15 to 13x20 range work perfectly.

TIA!

droneone
14th March 2013, 17:05
Just an update on this, I've determined that I am actually using 130x130 px images, as using native 13x13 looks quite terrible on its own.

I've exhausted every option I can come up with for scaling down circles via border-image (any circle scaled down to less than 30 or so px has this issue for me on Windows) that don't look terrible, and have simply given up and used a 13x13 image for Windows builds only (which look bad in comparison). I'm game for any advice on how to get the scaling to work properly, but otherwise this hack seems to be the only functional solution.