Date: Wednesday, August 12, 2020 @ 20:44:01 Author: felixonmars Revision: 676741
archrelease: copy trunk to community-x86_64 Added: deepin-session-shell/repos/community-x86_64/PKGBUILD (from rev 676740, deepin-session-shell/trunk/PKGBUILD) Deleted: deepin-session-shell/repos/community-x86_64/PKGBUILD deepin-session-shell/repos/community-x86_64/logo-size.patch -----------------+ PKGBUILD | 82 +++++++++++++++++++++++--------------------------- logo-size.patch | 88 ------------------------------------------------------ 2 files changed, 38 insertions(+), 132 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2020-08-12 20:43:51 UTC (rev 676740) +++ PKGBUILD 2020-08-12 20:44:01 UTC (rev 676741) @@ -1,44 +0,0 @@ -# Maintainer: Felix Yan <felixonm...@archlinux.org> -# Contributor: Josip Ponjavic <josipponjavic at gmail dot com> -# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com> - -pkgname=deepin-session-shell -pkgver=5.3.0.3 -pkgrel=2 -pkgdesc='Deepin desktop-environment - session-shell module' -arch=('x86_64') -url="https://github.com/linuxdeepin/dde-session-shell" -license=('GPL3') -depends=('deepin-daemon' 'deepin-qt5integration' 'deepin-wallpapers' 'gsettings-qt' 'liblightdm-qt5' - 'startdde') -makedepends=('cmake' 'ninja' 'qt5-tools') -conflicts=('deepin-session-ui<5') -provides=('lightdm-deepin-greeter') -groups=('deepin') -source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-session-shell/archive/$pkgver.tar.gz" - logo-size.patch) -sha512sums=('d9a9a20a82a5fe62adff843e151ffb54198f8f900993398b71fda85d25d0d16dceb8f0964177b587fe285ef24f7b8a3528bf71342b4a576c0df6f68f368d4ad1' - '1997730152b00f45e897062a5cd073f362f4ae5cc970c555db159d7f951d6bd9ad2ed2125f26da8b846c4a8b67eeac41dcf619e7552396ad5b2c7e6cb8ee6266') - -prepare() { - cd dde-session-shell-$pkgver - patch -p1 -i ../logo-size.patch - sed -i '/darrowrectangle/d' CMakeLists.txt src/widgets/widgets.pri - sed -i '1i#include <QPainterPath>' src/widgets/useravatar.cpp - - # We don't have common-auth on Arch - sed -i 's/common-auth/system-login/' src/libdde-auth/authagent.cpp -} - -build() { - cd dde-session-shell-$pkgver - cmake . -GNinja -DCMAKE_INSTALL_PREFIX=/usr - ninja -} - -package() { - cd dde-session-shell-$pkgver - DESTDIR="$pkgdir" ninja install - - chmod +x "$pkgdir"/usr/bin/deepin-greeter -} Copied: deepin-session-shell/repos/community-x86_64/PKGBUILD (from rev 676740, deepin-session-shell/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2020-08-12 20:44:01 UTC (rev 676741) @@ -0,0 +1,38 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Josip Ponjavic <josipponjavic at gmail dot com> +# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com> + +pkgname=deepin-session-shell +pkgver=5.3.0.4 +pkgrel=1 +pkgdesc='Deepin desktop-environment - session-shell module' +arch=('x86_64') +url="https://github.com/linuxdeepin/dde-session-shell" +license=('GPL3') +depends=('deepin-daemon' 'deepin-qt5integration' 'deepin-wallpapers' 'gsettings-qt' 'liblightdm-qt5' + 'startdde') +makedepends=('cmake' 'ninja' 'qt5-tools') +conflicts=('deepin-session-ui<5') +provides=('lightdm-deepin-greeter') +groups=('deepin') +source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-session-shell/archive/$pkgver.tar.gz") +sha512sums=('80dbee657cf0f468361b0f7d7d4e3a1e7d1cfd75112571f2fa515828dda9105b08951eb99c7ee3c14ea97f287f278c58ace9bbf1112271486445144963a3b1a9') + +prepare() { + cd dde-session-shell-$pkgver + # We don't have common-auth on Arch + sed -i 's/common-auth/system-login/' src/libdde-auth/authagent.cpp +} + +build() { + cd dde-session-shell-$pkgver + cmake . -GNinja -DCMAKE_INSTALL_PREFIX=/usr + ninja +} + +package() { + cd dde-session-shell-$pkgver + DESTDIR="$pkgdir" ninja install + + chmod +x "$pkgdir"/usr/bin/deepin-greeter +} Deleted: logo-size.patch =================================================================== --- logo-size.patch 2020-08-12 20:43:51 UTC (rev 676740) +++ logo-size.patch 2020-08-12 20:44:01 UTC (rev 676741) @@ -1,88 +0,0 @@ -diff --git a/src/global_util/public_func.cpp b/src/global_util/public_func.cpp -index d293f27..629036f 100644 ---- a/src/global_util/public_func.cpp -+++ b/src/global_util/public_func.cpp -@@ -42,7 +42,7 @@ - - using namespace std; - --QPixmap loadPixmap(const QString &file) -+QPixmap loadPixmap(const QString &file, const QSize& size) - { - - if(!QFile::exists(file)){ -@@ -54,11 +54,11 @@ QPixmap loadPixmap(const QString &file) - - QPixmap pixmap; - -- if (!qFuzzyCompare(ratio, devicePixel)) { -+ if (!qFuzzyCompare(ratio, devicePixel) || size.isValid()) { - QImageReader reader; - reader.setFileName(qt_findAtNxFile(file, devicePixel, &ratio)); - if (reader.canRead()) { -- reader.setScaledSize(reader.size() * (devicePixel / ratio)); -+ reader.setScaledSize((size.isNull() ? reader.size() : reader.size().scaled(size, Qt::KeepAspectRatio)) * (devicePixel / ratio)); - pixmap = QPixmap::fromImage(reader.read()); - pixmap.setDevicePixelRatio(devicePixel); - } -diff --git a/src/global_util/public_func.h b/src/global_util/public_func.h -index 4066a52..200cc9d 100644 ---- a/src/global_util/public_func.h -+++ b/src/global_util/public_func.h -@@ -33,7 +33,7 @@ - #include <QSettings> - #include <QString> - --QPixmap loadPixmap(const QString &file); -+QPixmap loadPixmap(const QString &file, const QSize& size = QSize()); - - /** - * @brief 获取图像共享内存 -diff --git a/src/widgets/logowidget.cpp b/src/widgets/logowidget.cpp -index 33bd6c6..5bc3108 100644 ---- a/src/widgets/logowidget.cpp -+++ b/src/widgets/logowidget.cpp -@@ -37,9 +37,12 @@ - - DCORE_USE_NAMESPACE - --const QPixmap systemLogo() -+#define PIXMAP_WIDTH 128 -+#define PIXMAP_HEIGHT 132 /* SessionBaseWindow */ -+ -+const QPixmap systemLogo(const QSize& size) - { -- return loadPixmap(DSysInfo::distributionOrgLogo(DSysInfo::Distribution, DSysInfo::Transparent, ":img/logo.svg")); -+ return loadPixmap(DSysInfo::distributionOrgLogo(DSysInfo::Distribution, DSysInfo::Transparent, ":img/logo.svg"), size); - } - - LogoWidget::LogoWidget(QWidget* parent) -@@ -53,10 +56,17 @@ void LogoWidget::initUI() { - // setFixedSize(240, 40); - - m_logoLabel = new QLabel(); -- QPixmap logo = systemLogo(); -- m_logoLabel->setPixmap(logo); -+ -+ m_logoLabel->setPixmap( -+ []() -> QPixmap { -+ const QPixmap& p = systemLogo(QSize()); -+ const bool result = p.width() < PIXMAP_WIDTH && p.height() < PIXMAP_HEIGHT; -+ return result -+ ? p -+ : systemLogo(QSize(PIXMAP_WIDTH, PIXMAP_HEIGHT)); -+ }()); -+ - m_logoLabel->setObjectName("Logo"); -- m_logoLabel->setFixedSize(logo.size().rwidth(), logo.size().rheight()); - //修复社区版deepin的显示不全的问题 2020/04/11 - m_logoLabel->setScaledContents(true); - -@@ -75,6 +85,7 @@ void LogoWidget::initUI() { - m_logoLayout->addSpacing(48); - m_logoLayout->addWidget(m_logoLabel); - m_logoLayout->addWidget(m_logoVersionLabel, 0, Qt::AlignTop); -+ m_logoLayout->addStretch(); - - setLayout(m_logoLayout); -