about-distro: effectively revert e0082512ae

the favicon is too small and the icon returned by
KMimeType::favIconForUrl() is overlayed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-04-24 14:04:52 +03:00
parent 31374558b8
commit 35339c37b9
3 changed files with 11 additions and 17 deletions

View file

@ -15,5 +15,12 @@ target_link_libraries(kcm_about_distro
${KDE4_SOLID_LIBS}
)
install(TARGETS kcm_about_distro DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
install(FILES about-distro.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR})
install(
TARGETS kcm_about_distro
DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
)
install(
FILES about-distro.desktop
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
)

View file

@ -27,7 +27,6 @@
#include <KDebug>
#include <KIcon>
#include <KPluginFactory>
#include <KMimeType>
#include <solid/device.h>
#include <solid/processor.h>
@ -90,20 +89,7 @@ void Module::load()
{
OSRelease os;
QString logoString;
if (!os.logo.isEmpty()) {
kDebug() << "using logo from OS information" << os.logo;
logoString = os.logo;
} else if (!os.homeUrl.isEmpty()) {
kDebug() << "checking home URL for icon" << os.homeUrl;
logoString = KMimeType::favIconForUrl(KUrl(os.homeUrl));
}
if (logoString.isEmpty()) {
kDebug() << "fallback to start-here-kde icon";
logoString = QLatin1String("start-here-kde");
}
QPixmap logoPixmap = KIcon(logoString).pixmap(128, 128);
QPixmap logoPixmap = KIcon(os.logo).pixmap(128, 128);
ui->logoLabel->setPixmap(logoPixmap);
ui->nameVersionLabel->setText(os.prettyName);

View file

@ -50,6 +50,7 @@ OSRelease::OSRelease()
// fallback values are being used or not.
// Set default values for non-optional fields.
logo = QLatin1String("start-here-kde");
struct utsname utsName;
::uname(&utsName);
prettyName = QString::fromLatin1(utsName.sysname);