upgrade to version 5.5.39
(cherry picked from commit 340625264aeeb4470953a351e66b39aeca7cbe68)
This commit is contained in:
parent
7ad60a5726
commit
24986a811b
91
0001-fix.patch
Normal file
91
0001-fix.patch
Normal file
@ -0,0 +1,91 @@
|
||||
From 519a2ad6985fafb8b84c32c7a2005fe989d96fcc Mon Sep 17 00:00:00 2001
|
||||
From: shaojun <wangshaojun@uniontech.com>
|
||||
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
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
From a71fcac57c7e3e4247ed433f67f6bd5e8ca09d6e Mon Sep 17 00:00:00 2001
|
||||
From: weidong <weidong@uniontech.com>
|
||||
Date: Thu, 23 Sep 2021 21:32:32 +0800
|
||||
From 728deb493fa305b53f7fcb00d74e93f5ad756f13 Mon Sep 17 00:00:00 2001
|
||||
From: leeffo <liweiganga@uniontech.com>
|
||||
Date: Mon, 31 Jul 2023 10:12:51 +0800
|
||||
Subject: [PATCH] Fix wm-chooser error in openeuler
|
||||
|
||||
Signed-off-by: weidong <weidong@uniontech.com>
|
||||
---
|
||||
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;
|
||||
Binary file not shown.
BIN
dde-session-ui-5.5.39.tar.gz
Normal file
BIN
dde-session-ui-5.5.39.tar.gz
Normal file
Binary file not shown.
@ -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 <liweiganga@uniontech.com> - 5.5.39-1
|
||||
- upgrade to version 5.5.39
|
||||
|
||||
* Thu Mar 30 2023 liweiganga <liweiganga@uniontech.com> - 5.4.35.2-1
|
||||
- update: update to 5.4.35.2
|
||||
|
||||
|
||||
BIN
vendor.tar.gz
BIN
vendor.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user