Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:15.0:Ports
sddm
0001-Support-for-theme-supplied-default-avatars...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Support-for-theme-supplied-default-avatars.patch of Package sddm
From 2f079338408dfead4ba0e3e424a4d84a6bdf6019 Mon Sep 17 00:00:00 2001 From: Sogatori <Sogatori@users.noreply.github.com> Date: Sun, 4 Mar 2018 00:42:28 +0100 Subject: [PATCH 1/6] Support for theme supplied default avatars This patch adds support for custom default avatars under $ThemeDir/themeName/faces. This will make sddm use an avatar icon that is provided by the theme and is consistent with its look. --- src/greeter/UserModel.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/greeter/UserModel.cpp b/src/greeter/UserModel.cpp index ebc1819..c790336 100644 --- a/src/greeter/UserModel.cpp +++ b/src/greeter/UserModel.cpp @@ -52,7 +52,10 @@ namespace SDDM { UserModel::UserModel(QObject *parent) : QAbstractListModel(parent), d(new UserModelPrivate()) { const QString facesDir = mainConfig.Theme.FacesDir.get(); - const QString defaultFace = QStringLiteral("file://%1/.face.icon").arg(facesDir); + const QString themeDir = mainConfig.Theme.ThemeDir.get(); + const QString currentTheme = mainConfig.Theme.Current.get(); + const QString themeDefaultFace = QStringLiteral("%1/%2/faces/.face.icon").arg(themeDir).arg(currentTheme); + const QString defaultFace = QStringLiteral("%1/.face.icon").arg(facesDir); struct passwd *current_pw; while ((current_pw = getpwent()) != nullptr) { @@ -91,7 +94,10 @@ namespace SDDM { user->needsPassword = strcmp(current_pw->pw_passwd, "") != 0; // search for face icon - user->icon = defaultFace; + if (QFile::exists(themeDefaultFace)) + user->icon = QStringLiteral("file://%1").arg(themeDefaultFace); + else + user->icon = QStringLiteral("file://%1").arg(defaultFace); // add user d->users << user; -- 2.16.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor