Results 1 to 2 of 2

Thread: Problems rendering small border-image in Windows

  1. #1
    Join Date
    Dec 2011
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Problems rendering small border-image in Windows

    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.

    windows.pngScreen Shot 2013-03-13 at 11.09.15 AM.png
    The images aren't scaled at all, they are 13x13px PNGs, and here is my QSS code:

    Qt Code:
    1.  
    2. border-image: url(img/led-blue-off.png);
    3. border: 0px transparent;
    4. min-height: 13px;
    5. max-height: 13px;
    6. min-width: 13px;
    7. max-width: 13px;
    8. }
    To copy to clipboard, switch view to plain text mode 

    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!

  2. #2
    Join Date
    Dec 2011
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problems rendering small border-image in Windows

    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.

Similar Threads

  1. QScrollArea border rendering problem
    By Annihilator in forum Qt Programming
    Replies: 3
    Last Post: 3rd April 2012, 22:08
  2. SVG rendering problems and doubs
    By GuS in forum Qt Programming
    Replies: 3
    Last Post: 5th October 2009, 00:47
  3. How can we compare if one big image contains a small image?
    By learning_qt in forum Qt Programming
    Replies: 1
    Last Post: 13th March 2009, 10:20
  4. Webkit/QWebView rendering for small screen
    By mdvernick in forum Qt Programming
    Replies: 2
    Last Post: 12th September 2008, 18:26
  5. Performance problems with small pixmap
    By RThaden in forum Qt Programming
    Replies: 4
    Last Post: 9th July 2008, 16:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.