kiran-flameshot/0003-fix-ButtonHandler-fix-issue-that-program-will-stick-.patch
wangyucheng 9f34ade01b fix(ButtonHandler): fix issue that program will stick when multi screen
- 修复当多屏模式下,不同分辨率时,截图截在大分辨率相比小分辨率多出来的那一部分时应用卡住的问题(#17107, #17108)
2023-10-10 15:26:53 +08:00

68 lines
3.1 KiB
Diff

From a6530e31cbf761bb6930f43c838decea6cc017aa Mon Sep 17 00:00:00 2001
From: wangyucheng <wangyucheng@kylinsec.com.cn>
Date: Tue, 10 Oct 2023 14:43:33 +0800
Subject: [PATCH] fix(ButtonHandler): fix issue that program will stick when
multi screen
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复当多屏模式下,不同分辨率时,截图截在大分辨率相比小分辨率多出来的那一部分时应用卡住的问题(#17107, #17108)
---
src/widgets/capture/buttonhandler.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/widgets/capture/buttonhandler.cpp b/src/widgets/capture/buttonhandler.cpp
index 867a2f2..7f12709 100644
--- a/src/widgets/capture/buttonhandler.cpp
+++ b/src/widgets/capture/buttonhandler.cpp
@@ -126,10 +126,10 @@ void ButtonHandler::updatePosition(const QRect &selection) {
}
// ElemIndicator, elemsAtCorners
QVector<QPoint> positions = horizontalPoints(center, addCounter, true);
- //moveButtonsToPoints(positions, elemIndicator);
+ moveButtonsToPoints(positions, elemIndicator);
}
// Add buttons at the right side of the seletion
- /*if (!m_blockedRight && elemIndicator < vecLength) {
+ if (!m_blockedRight && elemIndicator < vecLength) {
int addCounter = buttonsPerCol;
addCounter = qBound(0, addCounter, vecLength - elemIndicator);
@@ -137,9 +137,9 @@ void ButtonHandler::updatePosition(const QRect &selection) {
m_selection.center().y());
QVector<QPoint> positions = verticalPoints(center, addCounter, false);
moveButtonsToPoints(positions, elemIndicator);
- }*/
+ }
// Add buttons at the top of the seletion
- /* if (!m_blockedTop && elemIndicator < vecLength) {
+ if (!m_blockedTop && elemIndicator < vecLength) {
int addCounter = buttonsPerRow + elemCornersTop;
addCounter = qBound(0, addCounter, vecLength - elemIndicator);
QPoint center = QPoint(m_selection.center().x(),
@@ -149,9 +149,9 @@ void ButtonHandler::updatePosition(const QRect &selection) {
}
QVector<QPoint> positions = horizontalPoints(center, addCounter, false);
moveButtonsToPoints(positions, elemIndicator);
- }*/
+ }
// Add buttons at the left side of the seletion
- /*if (!m_blockedLeft && elemIndicator < vecLength) {
+ if (!m_blockedLeft && elemIndicator < vecLength) {
int addCounter = buttonsPerCol;
addCounter = qBound(0, addCounter, vecLength - elemIndicator);
@@ -159,7 +159,7 @@ void ButtonHandler::updatePosition(const QRect &selection) {
m_selection.center().y());
QVector<QPoint> positions = verticalPoints(center, addCounter, true);
moveButtonsToPoints(positions, elemIndicator);
- }*/
+ }
// If there are elements for the next cycle, increase the size of the
// base area
if (elemIndicator < vecLength && !(m_allSidesBlocked)) {
--
2.33.0