[plasmalnf] Improve screenshot view
- make screenies smaller - use view-preview to indicate no-screenshot-specified
This commit is contained in:
parent
10e71bab30
commit
f2aeecf546
@ -10,6 +10,8 @@ calamares_add_plugin( plasmalnf
|
||||
PlasmaLnfPage.cpp
|
||||
PlasmaLnfJob.cpp
|
||||
ThemeWidget.cpp
|
||||
RESOURCES
|
||||
page_plasmalnf.qrc
|
||||
UI
|
||||
page_plasmalnf.ui
|
||||
LINK_PRIVATE_LIBRARIES
|
||||
|
@ -37,10 +37,15 @@ ThemeWidget::ThemeWidget(const ThemeInfo& info, QWidget* parent)
|
||||
|
||||
layout->addWidget( m_check, 1 );
|
||||
|
||||
constexpr QSize image_size{240, 160};
|
||||
constexpr QSize image_size{120, 80};
|
||||
|
||||
QPixmap image( info.imagePath );
|
||||
if ( image.isNull() )
|
||||
if ( info.imagePath.isEmpty() )
|
||||
{
|
||||
// Image can't possibly be valid
|
||||
image = QPixmap( ":/view-preview.png" );
|
||||
}
|
||||
else if ( image.isNull() )
|
||||
{
|
||||
// Not found or not specified, so convert the name into some (horrible, likely)
|
||||
// color instead.
|
||||
|
Loading…
Reference in New Issue
Block a user