diff --git a/0001-fix.patch b/0001-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..928effd81268e3f1bb19d5019cc7210f68bed8f4 --- /dev/null +++ b/0001-fix.patch @@ -0,0 +1,91 @@ +From 519a2ad6985fafb8b84c32c7a2005fe989d96fcc Mon Sep 17 00:00:00 2001 +From: shaojun +Date: Wed, 22 Feb 2023 13:42:53 +0800 +Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=BD=E6=A0=87=E8=B6=85=E5=A4=A7?= + =?UTF-8?q?=E5=AD=97=E7=AC=A6=E9=9B=86=E6=96=87=E5=AD=97=E6=98=BE=E7=A4=BA?= + =?UTF-8?q?=E4=B8=8D=E5=85=A8=E9=97=AE=E9=A2=98?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +修改字体计算高度方法 + +Log: +Bug: https://pms.uniontech.com/bug-view-187789.html +Influence: 通知中心和通知界面在不同字体下的布局。 +Change-Id: I463948052b64becad4c623a22a043b6f72642d4c +--- + dde-osd/notification/appbodylabel.cpp | 14 ++++++++++---- + dde-osd/notification/appbodylabel.h | 1 + + 2 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/dde-osd/notification/appbodylabel.cpp b/dde-osd/notification/appbodylabel.cpp +index 071b1ff4..fecbb84f 100644 +--- a/dde-osd/notification/appbodylabel.cpp ++++ b/dde-osd/notification/appbodylabel.cpp +@@ -19,6 +19,10 @@ AppBodyLabel::AppBodyLabel(QWidget *parent) + , m_alignment(Qt::AlignVCenter) + { + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); ++ ++ connect(qApp, &QGuiApplication::fontChanged, this, [&] { ++ m_fontHeight = fontMetrics().size(Qt::TextSingleLine, text()).height(); ++ }); + } + + void AppBodyLabel::setText(const QString &text) +@@ -32,6 +36,8 @@ void AppBodyLabel::setText(const QString &text) + #endif + + m_text = text; ++ m_fontHeight = fontMetrics().size(Qt::TextSingleLine, text).height(); ++ + updateLineCount(); + update(); + } +@@ -96,12 +102,12 @@ static int drawText(QPainter *painter, const QRectF &rect, int lineHeight, QText + + QSize AppBodyLabel::sizeHint() const + { +- return QSize(width(), fontMetrics().height() * m_lineCount); ++ return QSize(width(), m_fontHeight * m_lineCount); + } + + QSize AppBodyLabel::minimumSizeHint() const + { +- QSize size(width(), fontMetrics().height()); ++ QSize size(width(), m_fontHeight); + + return size; + } +@@ -162,7 +168,7 @@ void AppBodyLabel::paintEvent(QPaintEvent *event) + layout.setTextOption(option); + + QRect rect(this->rect()); +- int lineHeight = fontMetrics().height(); ++ int lineHeight = m_fontHeight; + int lineCount = m_lineCount; + + while (lineCount > 1 && lineCount * lineHeight > height()) { +@@ -185,5 +191,5 @@ void AppBodyLabel::updateLineCount() + + layout.setTextOption(option); + +- m_lineCount = drawText(nullptr, QRectF(QPointF(0, 0), QSizeF(width(), INT_MAX)), fontMetrics().height(), &layout, Qt::ElideNone); ++ m_lineCount = drawText(nullptr, QRectF(QPointF(0, 0), QSizeF(width(), INT_MAX)), m_fontHeight, &layout, Qt::ElideNone); + } +diff --git a/dde-osd/notification/appbodylabel.h b/dde-osd/notification/appbodylabel.h +index e05ea9b8..991bc136 100644 +--- a/dde-osd/notification/appbodylabel.h ++++ b/dde-osd/notification/appbodylabel.h +@@ -42,6 +42,7 @@ private: + QString m_text; + int m_lineCount = 0; + Qt::Alignment m_alignment; ++ int m_fontHeight = 0; + }; + + #endif // APPBODYLABEL_H +-- +2.20.1 + diff --git a/0001-Fix-wm-chooser-error-in-openeuler.patch b/0002-Fix-wm-chooser-error-in-openeuler.patch similarity index 71% rename from 0001-Fix-wm-chooser-error-in-openeuler.patch rename to 0002-Fix-wm-chooser-error-in-openeuler.patch index b4f8309263c87d2760a6ff9c6cd8a406e79aca33..3fec95eff7ad2ee0863522deed4a87f147d491d2 100644 --- a/0001-Fix-wm-chooser-error-in-openeuler.patch +++ b/0002-Fix-wm-chooser-error-in-openeuler.patch @@ -1,18 +1,17 @@ -From a71fcac57c7e3e4247ed433f67f6bd5e8ca09d6e Mon Sep 17 00:00:00 2001 -From: weidong -Date: Thu, 23 Sep 2021 21:32:32 +0800 +From 728deb493fa305b53f7fcb00d74e93f5ad756f13 Mon Sep 17 00:00:00 2001 +From: leeffo +Date: Mon, 31 Jul 2023 10:12:51 +0800 Subject: [PATCH] Fix wm-chooser error in openeuler -Signed-off-by: weidong --- dde-wm-chooser/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dde-wm-chooser/main.cpp b/dde-wm-chooser/main.cpp -index c956566..01ea4d9 100644 +index 4cdfe7c..7723652 100644 --- a/dde-wm-chooser/main.cpp +++ b/dde-wm-chooser/main.cpp -@@ -82,10 +82,10 @@ int main(int argc, char *argv[]) +@@ -65,10 +65,10 @@ int main(int argc, char *argv[]) if (parser.isSet(config)) { const DSysInfo::DeepinType DeepinType = DSysInfo::deepinType(); bool IsServerSystem = DSysInfo::DeepinServer == DeepinType; diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 38ae6ad96d6f7b1536e9c3d8feb0fd662d0debc8..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# dde-session-ui - -#### Description -dde session ui - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 95dc0b8d20cc46fb4c41ebb2fd0208433ff92dbd..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# dde-session-ui - -#### 介绍 -dde session ui - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/dde-session-ui-5.4.35.2.tar.gz b/dde-session-ui-5.4.35.2.tar.gz deleted file mode 100644 index 10d645c011a3ae8692ab8f15b3a9c5173afb6b8d..0000000000000000000000000000000000000000 Binary files a/dde-session-ui-5.4.35.2.tar.gz and /dev/null differ diff --git a/dde-session-ui-5.5.39.tar.gz b/dde-session-ui-5.5.39.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0dd83c11658da80b51c750ca2b8026bad5bbd064 Binary files /dev/null and b/dde-session-ui-5.5.39.tar.gz differ diff --git a/dde-session-ui.spec b/dde-session-ui.spec index 272240ec93072c2eaa3cc374cce9a709d5d8bcf0..ff68b0b4d8f397a9d9fee15f2351f0baa9e74441 100644 --- a/dde-session-ui.spec +++ b/dde-session-ui.spec @@ -1,13 +1,14 @@ Name: dde-session-ui -Version: 5.4.35.2 +Version: 5.5.39 Release: 1 Summary: Deepin desktop-environment - Session UI module License: GPLv3 URL: https://github.com/linuxdeepin/%{name} -Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.gz Source1: vendor.tar.gz -Patch0: 0001-Fix-wm-chooser-error-in-openeuler.patch +Patch0: 0001-fix.patch +#Patch1: 0001-Fix-wm-chooser-error-in-openeuler.patch BuildRequires: gcc-c++ BuildRequires: deepin-gettext-tools @@ -23,6 +24,9 @@ BuildRequires: pkgconfig(xext) BuildRequires: qt5-devel BuildRequires: dtkcore-devel >= 5.1 BuildRequires: dde-dock-devel +BuildRequires: make +BuildRequires: cmake +BuildRequires: gtest-devel Requires: dde-daemon Requires: startdde @@ -48,32 +52,27 @@ This project include those sub-project: %prep %autosetup -p1 sed -i 's|default_background.jpg|default.png|' widgets/fullscreenbackground.cpp -sed -i 's|lib|libexec|' \ - misc/applications/deepin-toggle-desktop.desktop* \ - dde-osd/dde-osd_autostart.desktop \ - dde-osd/com.deepin.dde.osd.service \ - dde-osd/notification/files/com.deepin.dde.*.service* \ - dde-osd/dde-osd.pro \ +sed -i 's|lib/deepin-daemon|libexec/deepin-daemon|' \ + dde-osd/files/com.deepin.dde.Notification.service \ + dde-osd/files/com.deepin.dde.freedesktop.Notification.service \ + dde-osd/files/com.deepin.dde.osd.service \ + dde-osd/files/dde-osd.desktop \ dde-welcome/com.deepin.dde.welcome.service \ - dde-welcome/dde-welcome.pro \ - dde-bluetooth-dialog/dde-bluetooth-dialog.pro \ - dde-touchscreen-dialog/dde-touchscreen-dialog.pro \ dde-warning-dialog/com.deepin.dde.WarningDialog.service \ - dde-warning-dialog/dde-warning-dialog.pro \ - dde-suspend-dialog/dde-suspend-dialog.pro \ - dnetwork-secret-dialog/dnetwork-secret-dialog.pro \ - dde-lowpower/dde-lowpower.pro -sed -i 's|/usr/lib/dde-dock|/usr/lib64/dde-dock|' dde-notification-plugin/notifications/notifications.pro + CMakeLists.txt +sed -i 's|lib/dde-dock|%{_libdir}/dde-dock|' CMakeLists.txt tar -xf %{SOURCE1} %build export GOPATH=%{_builddir}/%{name}-%{version}/vendor:$GOPATH export PATH=%{_qt5_bindir}:$PATH -%qmake_qt5 PREFIX=%{_prefix} PKGTYPE=rpm +mkdir build && cd build +%cmake .. %make_build %install +cd build %make_install INSTALL_ROOT=%{buildroot} %post @@ -86,12 +85,16 @@ sed -i "s|#greeter-session.*|greeter-session=lightdm-deepin-greeter|g" /etc/ligh %{_bindir}/dmemory-warning-dialog %{_libexecdir}/deepin-daemon/* %{_datadir}/%{name}/ -%{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/icons/hicolor/scalable/devices/computer.svg %{_datadir}/dbus-1/services/*.service %{_libdir}/dde-dock/plugins/libnotifications.so %{_prefix}/share/glib-2.0/schemas/com.deepin.dde.dock.module.notifications.gschema.xml +%{_datadir}/applications/dde-* %changelog +* Mon Jul 31 2023 leeffo - 5.5.39-1 +- upgrade to version 5.5.39 + * Thu Mar 30 2023 liweiganga - 5.4.35.2-1 - update: update to 5.4.35.2 diff --git a/vendor.tar.gz b/vendor.tar.gz index 683429d309012ae6305aa89c8a1380a8fac1df73..6b45a62f0f75465bd8d5e750039c1628dd0f64a8 100644 Binary files a/vendor.tar.gz and b/vendor.tar.gz differ