[vlc-devel] [PATCH] qt/pref: fix toolbar icon or text beeing cropped on Hi-DPI displays

Francois Cartegnie fcvlcdev at free.fr
Thu Sep 14 11:57:57 CEST 2017


Le 13/09/2017 à 14:48, pierre a écrit :
> On Wednesday, September 13, 2017 2:18:08 PM CEST Francois Cartegnie wrote:
>> Le 13/09/2017 à 14:10, pierre a écrit :
>>>     QToolButton* btnOk = new QToolButton();
>>>     //icon.png is 64x64
>>>     btnOk->setIcon(QIcon(":/img/icon.png"));
>>>     btnOk->setIconSize(QSize(40, 40));
>>>     btnOk->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
>>>     btnOk->setText("not cropped");
>>>     
>>>     QToolButton* btnKo = new QToolButton();
>>>     btnKo->setIcon(QIcon(":/img/icon.png"));
>>>     btnKo->setIconSize(QSize(120, 40));
>>>     btnKo->setText("cropped");
>>>     btnKo->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
>>

To me it looks like a bug in Qt reading/dealing with QIcon sizes
https://bugreports.qt.io/browse/QTBUG-44486

-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list