From 4a67629c459ec90e04c221f5ecf13da684af57e3 Mon Sep 17 00:00:00 2001 From: chenziying Date: Mon, 4 Sep 2023 15:16:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(bug#I728SG)=E3=80=90=E6=88=AA=E5=9B=BE?= =?UTF-8?q?=E3=80=91=E3=80=90=E6=AC=A1=E8=A6=81=E3=80=91=E5=9C=A8=E6=88=AA?= =?UTF-8?q?=E5=9B=BE=E6=8A=93=E5=8F=96=E5=8C=BA=E5=9F=9F=E5=86=85=EF=BC=8C?= =?UTF-8?q?=E5=85=89=E6=A0=87=E4=B8=8D=E6=8B=96=E5=8A=A8=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=A0=B7=E5=BC=8F=E4=BB=8D=E7=84=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=BA=E6=8A=93=E7=B4=A7=E7=9A=84=E6=89=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 11 +++++++++++ src/widgets/capture/capturewidget.cpp | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index abfe504..6488d7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +kylin-screenshot (1.0.0.1kylin1k81-ok5) yangtze; urgency=medium + + * BUG 号: + - #I728SG 【截图】【次要】在截图抓取区域内,光标不拖动区域时,样式仍然显示为抓紧的手 + * 需求号: 无 任务号:无 + * 改动说明: 无 + * 影响域 : 无 + * 其他改动说明 : 无 + + -- chenziying Mon, 4 Sep 2023 11:10:08 +0800 + kylin-screenshot (1.0.0.1kylin1k81-ok4) yangtze; urgency=medium * BUG 号: diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index a18f7a8..4542c2e 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -1489,7 +1489,8 @@ void CaptureWidget::updateCursor() } } else if (m_selection->isVisible() && m_selection->geometry().contains(m_context.mousePos)) { - setCursor(Qt::OpenHandCursor); +// setCursor(Qt::OpenHandCursor); + setCursor(Qt::ArrowCursor); } else { setCursor(Qt::CrossCursor); } From 799c63d809a8b3b9218fc8bd3a17075a130d9607 Mon Sep 17 00:00:00 2001 From: chenziying Date: Mon, 4 Sep 2023 17:53:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(bug#I72731=E3=80=90=E6=88=AA=E5=9B=BE?= =?UTF-8?q?=E3=80=91=E3=80=90=E6=AC=A1=E8=A6=81=E3=80=91=E3=80=90UKUI4.0?= =?UTF-8?q?=E3=80=91=E6=88=AA=E5=9B=BE=E5=8C=BA=E5=9F=9F=E5=8F=B3=E4=B8=8A?= =?UTF-8?q?=E8=A7=92=E4=BE=9D=E7=84=B6=E5=AD=98=E5=9C=A8=E2=80=9C=E9=92=89?= =?UTF-8?q?=E4=BD=8F=E2=80=9D=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 11 +++++++++++ src/widgets/capture/buttonhandler.cpp | 17 +++++++++++++++++ src/widgets/capture/buttonhandler.h | 1 + 3 files changed, 29 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6488d7a..8ff88f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +kylin-screenshot (1.0.0.1kylin1k81-ok6) yangtze; urgency=medium + + * BUG 号: + - #I72731【截图】【次要】【UKUI4.0】截图区域右上角依然存在“钉住”按钮 + * 需求号: 无 任务号:无 + * 改动说明: 无 + * 影响域 : 无 + * 其他改动说明 : 无 + + -- chenziying Mon, 4 Sep 2023 17:30:35 +0800 + kylin-screenshot (1.0.0.1kylin1k81-ok5) yangtze; urgency=medium * BUG 号: diff --git a/src/widgets/capture/buttonhandler.cpp b/src/widgets/capture/buttonhandler.cpp index d333e51..82a75dd 100644 --- a/src/widgets/capture/buttonhandler.cpp +++ b/src/widgets/capture/buttonhandler.cpp @@ -22,6 +22,8 @@ #include #include #include +#include +#include // ButtonHandler is a habdler for every active button. It makes easier to // manipulate the buttons as a unit. @@ -287,6 +289,15 @@ QRect ButtonHandler::intersectWithAreas(const QRect &rect) void ButtonHandler::init() { m_separator = GlobalValues::buttonBaseSize() / 2; + + QDBusInterface dbus("com.kylin.statusmanager.interface", + "/", + "com.kylin.statusmanager.interface", + QDBusConnection::sessionBus(), + nullptr); + QDBusReply tmp_val = dbus.call("get_current_tabletmode"); + m_isTabletMode = tmp_val.value(); + fprintf(stderr, "is table %s\n", m_isTabletMode ? "true" : "false"); } void ButtonHandler::resetRegionTrack() @@ -424,6 +435,11 @@ void ButtonHandler::moveButtonsToPoints( #endif case CaptureButton::TYPE_PIN: + // 平板模式下移除“钉住”按钮 + if (m_isTabletMode) { + button->setVisible(false); + } + for (const QRect &rect: allrect) { if (rect.contains(m_selection.bottomRight())) { if (m_selection.right()+GlobalValues::buttonBaseSize() @@ -566,3 +582,4 @@ QPoint ButtonHandler::move_Font_Options_Window(int x, int y) } return p; } + diff --git a/src/widgets/capture/buttonhandler.h b/src/widgets/capture/buttonhandler.h index 4e0497b..ec15c43 100644 --- a/src/widgets/capture/buttonhandler.h +++ b/src/widgets/capture/buttonhandler.h @@ -82,6 +82,7 @@ private: bool m_oneHorizontalBlocked; bool m_horizontalyBlocked; bool m_allSidesBlocked; + bool m_isTabletMode; // 平板模式 // aux methods void init();