!9 修复滚动bug,修复覆盖未提示bug,wayland窗口未最大化不复现
Merge pull request !9 from 范昱辰/openkylin/yangtze
This commit is contained in:
parent
b52540b505
commit
4656b5b047
|
@ -1,3 +1,14 @@
|
|||
kylin-scanner (3.2.1-0k1.3) yangtze; urgency=medium
|
||||
|
||||
* BUG号:#I5XFGZ 【平板模式】【扫描】已扫描多张图片,左侧预览图可以左右拖动
|
||||
#I5XHFF 【wayland】【扫描】【平板模式】偶现打开扫描后窗口未最大化
|
||||
#I72NVO 【文件管理器】扫描文件名称相同时,没有弹出已存在,你想覆盖它吗?的弹窗
|
||||
* 需求号:无
|
||||
* 其他改动说明: 无
|
||||
* 其他改动影响域:无
|
||||
|
||||
-- fanyuchen <fanyuchen@kylinos.cn> Thu, 24 Aug 2023 16:58:43 +0800
|
||||
|
||||
kylin-scanner (3.2.1-0k1.2) yangtze; urgency=medium
|
||||
|
||||
* BUG号:#I7ESSU 【扫描】在识别扫描仪时按enter扫描应用闪退
|
||||
|
|
|
@ -0,0 +1,143 @@
|
|||
From: =?utf-8?b?6IyD5pix6L6w?= <fanyuchen@kylinos.cn>
|
||||
Date: Fri, 25 Aug 2023 02:38:01 +0000
|
||||
Subject: =?utf-8?b?ITkg5L+u5aSN5rua5YqoYnVn77yM5L+u5aSN6KaG55uW5pyq5o+Q56S6?=
|
||||
=?utf-8?b?YnVn77yMd2F5bGFuZOeql+WPo+acquacgOWkp+WMluS4jeWkjeeOsCBNZXJnZSBw?=
|
||||
=?utf-8?b?dWxsIHJlcXVlc3QgITkgZnJvbSDojIPmmLHovrAvb3Blbmt5bGluL3lhbmd0emU=?=
|
||||
|
||||
---
|
||||
src/include/common.h | 1 +
|
||||
src/leftimagehandlesuccesspagewidget.cpp | 1 -
|
||||
src/thumbnailwidget.cpp | 56 ++++++++++++--------------------
|
||||
src/thumbnailwidget.h | 2 +-
|
||||
4 files changed, 23 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/src/include/common.h b/src/include/common.h
|
||||
index 00fe7ff..a376b23 100644
|
||||
--- a/src/include/common.h
|
||||
+++ b/src/include/common.h
|
||||
@@ -63,6 +63,7 @@
|
||||
|
||||
/******** ThumbnailWidget ********/
|
||||
#define ThumbnailWidgetMinimumWidth 68
|
||||
+#define ThumbnailWidgetTabletMinimumWidth 78
|
||||
#define ThumbnailIconSize QSize(40, 40)
|
||||
#define ThumbnailShadowColor QColor(5,15,25,133)
|
||||
#define ThumbnailShadowRadiu 20
|
||||
diff --git a/src/leftimagehandlesuccesspagewidget.cpp b/src/leftimagehandlesuccesspagewidget.cpp
|
||||
index 126fd51..f9078df 100644
|
||||
--- a/src/leftimagehandlesuccesspagewidget.cpp
|
||||
+++ b/src/leftimagehandlesuccesspagewidget.cpp
|
||||
@@ -44,7 +44,6 @@ void LeftImageHandleSuccessPageWidget::setupGui()
|
||||
// m_leftImageHandleSuccessPageHLayout->addStretch();
|
||||
m_leftImageHandleSuccessPageHLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
-
|
||||
setLayout(m_leftImageHandleSuccessPageHLayout);
|
||||
|
||||
}
|
||||
diff --git a/src/thumbnailwidget.cpp b/src/thumbnailwidget.cpp
|
||||
index 64557d0..3b9486b 100644
|
||||
--- a/src/thumbnailwidget.cpp
|
||||
+++ b/src/thumbnailwidget.cpp
|
||||
@@ -14,27 +14,17 @@ ThumbnailWidget::ThumbnailWidget(QWidget *parent) : QListView(parent)
|
||||
|
||||
}
|
||||
|
||||
-//void ThumbnailWidget::paintEvent(QPaintEvent *event)
|
||||
-//{
|
||||
-// Q_UNUSED(event);
|
||||
-// QPainter p(this);
|
||||
-// p.setRenderHint(QPainter::Antialiasing);
|
||||
-// QPainterPath rectPath;
|
||||
-// rectPath.addRoundedRect(this->rect(), 0, 0);
|
||||
-// QStyleOption opt;
|
||||
-// opt.init(this);
|
||||
-
|
||||
-// QColor mainColor;
|
||||
-// mainColor = opt.palette.color(QPalette::Base);
|
||||
-
|
||||
-// p.fillPath(rectPath,QBrush(mainColor));
|
||||
-//}
|
||||
void ThumbnailWidget::setupGui()
|
||||
{
|
||||
setAutoFillBackground(true);
|
||||
setBackgroundRole(QPalette::Base);
|
||||
|
||||
- this->setFixedWidth(ThumbnailWidgetMinimumWidth);
|
||||
+ bool isPCMode = GlobalUserSignal::getInstance()->getCurrentMode();
|
||||
+ if(isPCMode){
|
||||
+ this->setFixedWidth(ThumbnailWidgetMinimumWidth);
|
||||
+ }else{
|
||||
+ this->setFixedWidth(ThumbnailWidgetTabletMinimumWidth);
|
||||
+ }
|
||||
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
this->verticalScrollBar()->setProperty("drawScrollBarGroove",false);
|
||||
@@ -49,8 +39,8 @@ void ThumbnailWidget::setupGui()
|
||||
|
||||
setAcceptDrops(false);
|
||||
setFocusPolicy(Qt::NoFocus);
|
||||
- setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
-
|
||||
+ this->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
+ this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
}
|
||||
|
||||
void ThumbnailWidget::initConnect()
|
||||
@@ -63,23 +53,7 @@ void ThumbnailWidget::initConnect()
|
||||
}
|
||||
void ThumbnailWidget::themeChange()
|
||||
{
|
||||
-// QPalette pal(palette());
|
||||
-// if (isDarkTheme()) {
|
||||
-// this->setStyleSheet("QListView{outline:none;background:rgba(38,38, 38, 1);border-radius: 0px;}"
|
||||
-// "QListView::item{margin:0 1px 0 1px;background:rgba(38, 38, 38, 0.8);border-radius: 6px; }"
|
||||
-// "QListView::item:selected{border:1px solid #3790FA;background:rgba(38, 38, 38, 0.8);}"
|
||||
-// "QListView::item:hover{background:rgba(55, 144, 250, 0.5);}");
|
||||
-//// pal.setColor(QPalette::Background, QColor(64, 64, 64));
|
||||
-// } else {
|
||||
-// this->setStyleSheet("QListView{outline:none;background:rgba(255,255, 255, 1);border-radius: 0px;}"
|
||||
-// "QListView::item{margin:0 1px 0 1px;background:rgba(255, 255, 255, 0.8);border-radius: 6px; }"
|
||||
-// "QListView::item:selected{border:1px solid #3790FA;background:rgba(255, 255, 255, 0.8);}"
|
||||
-// "QListView::item:hover{background:rgba(55, 144, 250, 0.5);}");
|
||||
-
|
||||
-//// pal.setColor(QPalette::Background, QColor(240, 240, 240));
|
||||
-// }
|
||||
-// setAutoFillBackground(true);
|
||||
-// setPalette(pal);
|
||||
+
|
||||
}
|
||||
bool ThumbnailWidget::isDarkTheme()
|
||||
{
|
||||
@@ -91,6 +65,18 @@ bool ThumbnailWidget::isDarkTheme()
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+
|
||||
+void ThumbnailWidget::resizeEvent(QResizeEvent *event)
|
||||
+{
|
||||
+ bool isPCMode = GlobalUserSignal::getInstance()->getCurrentMode();
|
||||
+ if(isPCMode){
|
||||
+ this->setFixedWidth(ThumbnailWidgetMinimumWidth);
|
||||
+ }else{
|
||||
+ this->setFixedWidth(ThumbnailWidgetTabletMinimumWidth);
|
||||
+ }
|
||||
+ QListView::resizeEvent(event);
|
||||
+}
|
||||
+
|
||||
void ThumbnailWidget::initSettings()
|
||||
{
|
||||
showThumbnailIcon();
|
||||
diff --git a/src/thumbnailwidget.h b/src/thumbnailwidget.h
|
||||
index 85950db..6c89342 100644
|
||||
--- a/src/thumbnailwidget.h
|
||||
+++ b/src/thumbnailwidget.h
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
void initSettings();
|
||||
void themeChange();
|
||||
bool isDarkTheme();
|
||||
-
|
||||
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
|
||||
|
||||
protected:
|
||||
// void paintEvent(QPaintEvent *event) override;
|
|
@ -1,2 +1,3 @@
|
|||
0001-7-bug-I7BHDG.patch
|
||||
0002-8-bug-I7ESSU-enter.patch
|
||||
0003-9-bug-bug-wayland.patch
|
||||
|
|
Loading…
Reference in New Issue