mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fallback to a text close button if we can't load the svg image
If the svg plugin is missing the user can't see where the close button is
This commit is contained in:
parent
3a6fb91327
commit
f183fc1dd2
@ -87,11 +87,19 @@ YACReader::WhatsNewDialog::WhatsNewDialog(QWidget *parent)
|
||||
auto closeButton = new QPushButton(this);
|
||||
closeButton->setFlat(true);
|
||||
closeButton->setStyleSheet("background-color:transparent;");
|
||||
closeButton->setIcon(QPixmap(":/images/custom_dialog/custom_close_button.svg"));
|
||||
closeButton->setIconSize(QSize(44, 44));
|
||||
closeButton->setFixedSize(44, 44);
|
||||
|
||||
closeButton->move(656, 20);
|
||||
auto closeIcon = QPixmap(":/images/custom_dialog/custom_close_button.svg");
|
||||
if (!closeIcon.isNull()) {
|
||||
closeButton->setIcon(QPixmap(":/images/custom_dialog/custom_close_button.svg"));
|
||||
closeButton->setIconSize(QSize(44, 44));
|
||||
closeButton->setFixedSize(44, 44);
|
||||
closeButton->move(656, 20);
|
||||
} else {
|
||||
closeButton->setText(tr("Close"));
|
||||
auto font = closeButton->font();
|
||||
font.setPointSize(16);
|
||||
closeButton->setFont(font);
|
||||
closeButton->move(616, 20);
|
||||
}
|
||||
|
||||
scrollArea->setFixedSize(720, 640);
|
||||
setFixedSize(720, 640);
|
||||
|
Loading…
Reference in New Issue
Block a user