!15 fix(ButtonHandler): fix issue that program will stick when multi screen
From: @wangyucheng1 Reviewed-by: @tangjie02 Signed-off-by: @tangjie02
This commit is contained in:
commit
9b68e7ea6e
@ -0,0 +1,67 @@
|
||||
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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: kiran-flameshot
|
||||
Version: 2.2.2
|
||||
Release: 4
|
||||
Release: 5
|
||||
|
||||
# Main code: GPLv3
|
||||
# Logo: Free Art License v1.3
|
||||
@ -16,6 +16,7 @@ URL: https://github.com/lupoDharkael/flameshot
|
||||
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch0: 0001-fix-translate-add-some-translation.patch
|
||||
Patch1: 0002-feature-add-windows-capture-mode.patch
|
||||
Patch2: 0003-fix-ButtonHandler-fix-issue-that-program-will-stick-.patch
|
||||
|
||||
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
@ -79,6 +80,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/*.*
|
||||
|
||||
%changelog
|
||||
* Tue Oct 10 2023 wangyucheng <wangyucheng@kylinsec.om.cn> - 2.2.2-5
|
||||
- KYOS-F: fix(ButtonHandler): fix issue that program will stick when multi screen (#17107, #17108)
|
||||
|
||||
* Tue Apr 25 2023 wangyucheng <wangyucheng@kylinsec.om.cn> - 2.2.2-4
|
||||
- KYOS-F: add windows capture mode
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user