[arch-commits] Commit in deepin-session-shell/repos/community-x86_64 (4 files)

Felix Yan felixonmars at archlinux.org
Wed Jul 22 19:25:26 UTC 2020


    Date: Wednesday, July 22, 2020 @ 19:25:26
  Author: felixonmars
Revision: 664895

archrelease: copy trunk to community-x86_64

Added:
  deepin-session-shell/repos/community-x86_64/PKGBUILD
    (from rev 664894, deepin-session-shell/trunk/PKGBUILD)
  deepin-session-shell/repos/community-x86_64/icon-size.patch
    (from rev 664894, deepin-session-shell/trunk/icon-size.patch)
Deleted:
  deepin-session-shell/repos/community-x86_64/PKGBUILD
  deepin-session-shell/repos/community-x86_64/icon-size.patch

-----------------+
 PKGBUILD        |   89 ++++++++++++--------------
 icon-size.patch |  184 +++++++++++++++++++++++++++---------------------------
 2 files changed, 136 insertions(+), 137 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-22 19:25:06 UTC (rev 664894)
+++ PKGBUILD	2020-07-22 19:25:26 UTC (rev 664895)
@@ -1,45 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
-# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
-
-pkgname=deepin-session-shell
-pkgver=5.1.0.10
-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"
-        icon-size.patch)
-sha512sums=('1e8703ddc0988a13ea8129db21207f93896b24475fe081d0b382dde599cf6007c6209dcd8d18033c8006e3d31d65381789c62ec1a2200818eb721ee43001c885'
-            'bfd3b15a5dce361eea2f8ced63a240edbbc19096a372963dc788d45faa372f841db2b2a6f29cb87aebadc00c921d56a99b21cec951e595acf220c8fc687395b6')
-
-prepare() {
-  cd dde-session-shell-$pkgver
-  patch -p1 -i ../icon-size.patch
-  sed -i '/darrowrectangle/d' CMakeLists.txt src/widgets/widgets.pri
-  sed -i 's/include "darrowrectangle.h"/include <darrowrectangle.h>/' src/widgets/errortooltip.h
-  sed -i '/#include <QFile>/a #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 664894, deepin-session-shell/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-07-22 19:25:26 UTC (rev 664895)
@@ -0,0 +1,44 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
+# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
+
+pkgname=deepin-session-shell
+pkgver=5.1.0.12
+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"
+        icon-size.patch)
+sha512sums=('9d863271e731a5cff37718acfa69e03f5e46814e848ea2decff56273f5b9f686d457d40c7cd0e86dd19fb2584e343d123a28acbde257848d77f5c3cb36c06afe'
+            'bfd3b15a5dce361eea2f8ced63a240edbbc19096a372963dc788d45faa372f841db2b2a6f29cb87aebadc00c921d56a99b21cec951e595acf220c8fc687395b6')
+
+prepare() {
+  cd dde-session-shell-$pkgver
+  patch -p1 -i ../icon-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
+}

Deleted: icon-size.patch
===================================================================
--- icon-size.patch	2020-07-22 19:25:06 UTC (rev 664894)
+++ icon-size.patch	2020-07-22 19:25:26 UTC (rev 664895)
@@ -1,92 +0,0 @@
-diff --git a/src/global_util/public_func.cpp b/src/global_util/public_func.cpp
-index 1875727..8d74073 100644
---- a/src/global_util/public_func.cpp
-+++ b/src/global_util/public_func.cpp
-@@ -27,7 +27,7 @@
- #include <QFile>
- #include "constants.h"
- 
--QPixmap loadPixmap(const QString &file)
-+QPixmap loadPixmap(const QString &file, const QSize& size)
- {
- 
-    if(!QFile::exists(file)){
-@@ -39,11 +39,11 @@
- 
-     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 93da78f..ee5751e 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());
- 
- template <typename T>
- T findValueByQSettings(const QStringList &configFiles,
-diff --git a/src/widgets/logowidget.cpp b/src/widgets/logowidget.cpp
-index 820dc3b..32b2a97 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)
-@@ -50,12 +53,16 @@ LogoWidget::LogoWidget(QWidget* parent)
- }
- 
- void LogoWidget::initUI() {
--//    setFixedSize(240, 40);
--
-     m_logoLabel = new QLabel();
--    m_logoLabel->setPixmap(systemLogo());
-+    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(128, 48);
-     //修复社区版deepin的显示不全的问题 2020/04/11
-     m_logoLabel->setScaledContents(true);
- 
-diff --git a/src/widgets/useravatar.cpp b/src/widgets/useravatar.cpp
-index d18f0d4..2566eba 100644
---- a/src/widgets/useravatar.cpp
-+++ b/src/widgets/useravatar.cpp
-@@ -27,6 +27,7 @@
- #include "dthememanager.h"
- #include <QUrl>
- #include <QFile>
-+#include <QPainterPath>
- 
- UserAvatar::UserAvatar(QWidget *parent, bool deleteable) :
-     QPushButton(parent), m_deleteable(deleteable)

Copied: deepin-session-shell/repos/community-x86_64/icon-size.patch (from rev 664894, deepin-session-shell/trunk/icon-size.patch)
===================================================================
--- icon-size.patch	                        (rev 0)
+++ icon-size.patch	2020-07-22 19:25:26 UTC (rev 664895)
@@ -0,0 +1,92 @@
+diff --git a/src/global_util/public_func.cpp b/src/global_util/public_func.cpp
+index 1875727..8d74073 100644
+--- a/src/global_util/public_func.cpp
++++ b/src/global_util/public_func.cpp
+@@ -27,7 +27,7 @@
+ #include <QFile>
+ #include "constants.h"
+ 
+-QPixmap loadPixmap(const QString &file)
++QPixmap loadPixmap(const QString &file, const QSize& size)
+ {
+ 
+    if(!QFile::exists(file)){
+@@ -39,11 +39,11 @@
+ 
+     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 93da78f..ee5751e 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());
+ 
+ template <typename T>
+ T findValueByQSettings(const QStringList &configFiles,
+diff --git a/src/widgets/logowidget.cpp b/src/widgets/logowidget.cpp
+index 820dc3b..32b2a97 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)
+@@ -50,12 +53,16 @@ LogoWidget::LogoWidget(QWidget* parent)
+ }
+ 
+ void LogoWidget::initUI() {
+-//    setFixedSize(240, 40);
+-
+     m_logoLabel = new QLabel();
+-    m_logoLabel->setPixmap(systemLogo());
++    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(128, 48);
+     //修复社区版deepin的显示不全的问题 2020/04/11
+     m_logoLabel->setScaledContents(true);
+ 
+diff --git a/src/widgets/useravatar.cpp b/src/widgets/useravatar.cpp
+index d18f0d4..2566eba 100644
+--- a/src/widgets/useravatar.cpp
++++ b/src/widgets/useravatar.cpp
+@@ -27,6 +27,7 @@
+ #include "dthememanager.h"
+ #include <QUrl>
+ #include <QFile>
++#include <QPainterPath>
+ 
+ UserAvatar::UserAvatar(QWidget *parent, bool deleteable) :
+     QPushButton(parent), m_deleteable(deleteable)


More information about the arch-commits mailing list