Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package dtkwidget for openSUSE:Factory checked in at 2021-09-20 23:32:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dtkwidget (Old) and /work/SRC/openSUSE:Factory/.dtkwidget.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dtkwidget" Mon Sep 20 23:32:26 2021 rev:12 rq:919524 version:5.5.17.1 Changes: -------- --- /work/SRC/openSUSE:Factory/dtkwidget/dtkwidget.changes 2021-08-18 08:56:06.330961246 +0200 +++ /work/SRC/openSUSE:Factory/.dtkwidget.new.1899/dtkwidget.changes 2021-09-20 23:33:25.863194174 +0200 @@ -1,0 +2,5 @@ +Tue Sep 14 02:29:47 UTC 2021 - Hillwood Yang <hillw...@opensuse.org> + +- Add fix-deepin-reader.patch, fix print for deepin-reader + +------------------------------------------------------------------- New: ---- fix-deepin-reader.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dtkwidget.spec ++++++ --- /var/tmp/diff_new_pack.sipKzq/_old 2021-09-20 23:33:26.439194885 +0200 +++ /var/tmp/diff_new_pack.sipKzq/_new 2021-09-20 23:33:26.443194890 +0200 @@ -33,6 +33,10 @@ Patch0: dtkwidget-fix-lost-pkgconfig.patch # PATCH-FIX-UPSTEAM fix-return-type.patch hillw...@opensuse.org - fix a return type error Patch1: fix-return-type.patch +# PATCH-FIX-UPSTEAM fix-return-type.patch +# Fix print window for deepin-reader +# https://github.com/linuxdeepin/dtkwidget/commit/cedbe540bdcfb5672f97763abb8cf1f79439ec4c +Patch2: fix-deepin-reader.patch BuildRequires: fdupes BuildRequires: gtest BuildRequires: dtkcommon @@ -80,9 +84,7 @@ %lang_package %prep -%setup -q -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 # sed -i 's/lrelease/qt5/g' tools/translate_generation.* %build ++++++ fix-deepin-reader.patch ++++++ >From cedbe540bdcfb5672f97763abb8cf1f79439ec4c Mon Sep 17 00:00:00 2001 From: Chen Bin <chen...@uniontech.com> Date: Tue, 3 Aug 2021 16:01:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=89=93=E5=8D=B0=E9=A2=84=E8=A7=88):=20?= =?UTF-8?q?=E5=86=85=E9=83=A8=E6=8E=A7=E4=BB=B6=E7=9A=84=E9=81=AE=E7=9B=96?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=AF=B9=E8=AF=9D=E6=A1=86=E6=97=A0=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ?????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????DDialog????????????????????????????????? ??????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????? ?????????????????? ????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????? ????????? Log: ????????????UI???????????? Change-Id: I3792a87cc3f8f56c163751d9e42d094e054a240b --- src/widgets/dprintpreviewdialog.cpp | 22 ++++++++++++---------- src/widgets/dprintpreviewwidget.cpp | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/widgets/dprintpreviewdialog.cpp b/src/widgets/dprintpreviewdialog.cpp index a83d3370..07080399 100644 --- a/src/widgets/dprintpreviewdialog.cpp +++ b/src/widgets/dprintpreviewdialog.cpp @@ -18,6 +18,7 @@ #include "dfilechooseredit.h" #include "dslider.h" #include "dtoolbutton.h" +#include "dtitlebar.h" #include <DScrollArea> #include <DScrollBar> @@ -112,18 +113,19 @@ void DPrintPreviewDialogPrivate::startup() void DPrintPreviewDialogPrivate::initui() { Q_Q(DPrintPreviewDialog); + DWidget *mainWidget = new DWidget(q); mainWidget->setObjectName("mainwidget"); - - DWidget *titleWidget = new DWidget(q); - titleWidget->setObjectName("titlewidget"); - mainWidget->setAutoFillBackground(true); + mainWidget->lower(); - DPalette pa = DPaletteHelper::instance()->palette(titleWidget); + DTitlebar *titlebar = q->findChild<DTitlebar *>(); + Q_ASSERT(titlebar); + titlebar->setAutoFillBackground(true); + + DPalette pa = DPaletteHelper::instance()->palette(titlebar); pa.setBrush(DPalette::Background, pa.base()); - DPaletteHelper::instance()->setPalette(titleWidget, pa); - titleWidget->setAutoFillBackground(true); + DPaletteHelper::instance()->setPalette(titlebar, pa); QHBoxLayout *mainlayout = new QHBoxLayout(); mainlayout->setContentsMargins(QMargins(0, 0, 0, 0)); @@ -2423,17 +2425,17 @@ void DPrintPreviewDialog::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); Q_D(DPrintPreviewDialog); - this->findChild<DWidget *>("titlewidget")->setGeometry(0, 0, this->width(), 50); + this->findChild<DWidget *>("mainwidget")->setGeometry(0, 0, this->width(), this->height()); double per = static_cast<double>(this->width()) / static_cast<double>(851); if (per >= 1.2) { this->findChild<DWidget *>("rightWidget")->setMaximumWidth(452 * 1.2); this->findChild<DWidget *>("leftWidget")->setMaximumWidth(this->width() - 20 - 10 - 452 * 1.2); - this->findChild<DBackgroundGroup *>("backGround")->setItemSpacing(10); + d->back->setItemSpacing(10); } else { this->findChild<DWidget *>("rightWidget")->setMaximumWidth(452 * per); this->findChild<DWidget *>("leftWidget")->setMaximumWidth(this->width() - 20 - 2 - 452 * per); - this->findChild<DBackgroundGroup *>("backGround")->setItemSpacing(2); + d->back->setItemSpacing(2); } } diff --git a/src/widgets/dprintpreviewwidget.cpp b/src/widgets/dprintpreviewwidget.cpp index 49ddb001..115dd6ca 100644 --- a/src/widgets/dprintpreviewwidget.cpp +++ b/src/widgets/dprintpreviewwidget.cpp @@ -2015,9 +2015,9 @@ void DPrintPreviewWidget::themeTypeChanged(DGuiApplicationHelper::ColorType them { Q_D(DPrintPreviewWidget); if (DGuiApplicationHelper::DarkType == themeType) - d->scene->setBackgroundBrush(QColor(0, 0, 0, 3)); + d->graphicsView->setBackgroundBrush(QColor(0, 0, 0, 42)); else - d->scene->setBackgroundBrush(QColor(255, 255, 255, 5)); + d->graphicsView->setBackgroundBrush(QColor(255, 255, 255, 120)); } DPrinter::DPrinter(QPrinter::PrinterMode mode)