public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/flameshot/files/, media-gfx/flameshot/
@ 2020-05-28 18:37 Maxim Koltsov
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Koltsov @ 2020-05-28 18:37 UTC (permalink / raw
  To: gentoo-commits

commit:     c8519f723d963b46b3ff2137d9ac7d498af94a57
Author:     Pavel Kalugin <38429428+pavel-the-best <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Mon May 25 18:48:18 2020 +0000
Commit:     Maxim Koltsov <maksbotan <AT> gentoo <DOT> org>
CommitDate: Thu May 28 18:36:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8519f72

media-gfx/flameshot: new package

Signed-off-by: Pavel Kalugin <paul.kalug <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/15968
Signed-off-by: Maxim Koltsov <maksbotan <AT> gentoo.org>

 media-gfx/flameshot/Manifest                       |  1 +
 ...meshot-0.6.0-unbundle-qtsingleapplication.patch | 47 +++++++++++++++++++
 media-gfx/flameshot/flameshot-0.6.0.ebuild         | 53 ++++++++++++++++++++++
 media-gfx/flameshot/metadata.xml                   | 12 +++++
 4 files changed, 113 insertions(+)

diff --git a/media-gfx/flameshot/Manifest b/media-gfx/flameshot/Manifest
new file mode 100644
index 00000000000..bf5fbbbba36
--- /dev/null
+++ b/media-gfx/flameshot/Manifest
@@ -0,0 +1 @@
+DIST flameshot-0.6.0.tar.gz 641561 BLAKE2B f9e87373d84c1a841f70cd9c13b504865a0ef23d0fb29848f2270171459afe9c6852e12c712ebdc7cf3cfc62214d7b7507b85cf21838d0ebed33bee1e39f4aad SHA512 194127032ab0f62a6ba2698688e11b2d4e6f0e04a282144f5fbb6c232eeebc71371af2d55abbb6e98b8649dee036e6f0a6ef55710e4321a60fd5ac6e453ab975

diff --git a/media-gfx/flameshot/files/flameshot-0.6.0-unbundle-qtsingleapplication.patch b/media-gfx/flameshot/files/flameshot-0.6.0-unbundle-qtsingleapplication.patch
new file mode 100644
index 00000000000..7973aa1d06c
--- /dev/null
+++ b/media-gfx/flameshot/files/flameshot-0.6.0-unbundle-qtsingleapplication.patch
@@ -0,0 +1,47 @@
+diff -ruN a/flameshot.pro b/flameshot.pro
+--- a/flameshot.pro	2020-05-25 21:16:54.044214597 +0300
++++ b/flameshot.pro	2020-05-25 21:25:03.808676488 +0300
+@@ -18,7 +18,7 @@
+     QT  += dbus
+ }
+ 
+-CONFIG += c++11 link_pkgconfig
++CONFIG += c++11 link_pkgconfig qtsingleapplication
+ 
+ #CONFIG += packaging   # Enables "make install" for packaging paths
+ 
+@@ -63,7 +63,6 @@
+ 
+ DEFINES += QT_DEPRECATED_WARNINGS
+ 
+-include(src/third-party/singleapplication/singleapplication.pri)
+ include(src/third-party/Qt-Color-Widgets//color_widgets.pri)
+ 
+ DEFINES += QAPPLICATION_CLASS=QApplication
+diff -ruN a/src/main.cpp b/src/main.cpp
+--- a/src/main.cpp	2020-05-25 21:16:54.055215952 +0300
++++ b/src/main.cpp	2020-05-25 21:25:35.095744395 +0300
+@@ -16,13 +16,13 @@
+ //     along with Flameshot.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ #include "src/core/controller.h"
+-#include "singleapplication.h"
+ #include "src/utils/filenamehandler.h"
+ #include "src/utils/confighandler.h"
+ #include "src/cli/commandlineparser.h"
+ #include "src/utils/systemnotification.h"
+ #include "src/utils/pathinfo.h"
+ #include "src/core/capturerequest.h"
++#include <QtSingleApplication>
+ #include <QApplication>
+ #include <QTranslator>
+ #include <QTextStream>
+@@ -44,7 +44,7 @@
+ 
+     // no arguments, just launch Flameshot
+     if (argc == 1) {
+-        SingleApplication app(argc, argv);
++        QtSingleApplication app(argc, argv);
+ 
+         QTranslator translator;
+         QStringList trPaths = PathInfo::translationsPaths();

diff --git a/media-gfx/flameshot/flameshot-0.6.0.ebuild b/media-gfx/flameshot/flameshot-0.6.0.ebuild
new file mode 100644
index 00000000000..e3d9daac1c7
--- /dev/null
+++ b/media-gfx/flameshot/flameshot-0.6.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop qmake-utils xdg-utils
+
+DESCRIPTION="Powerful yet simple to use screenshot software"
+HOMEPAGE="https://flameshot.js.org"
+SRC_URI="https://github.com/lupoDharkael/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="FreeArt GPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+	dev-qt/qtcore:5
+	dev-qt/qtgui:5
+	dev-qt/qtsingleapplication[qt5(+),X]
+	dev-qt/qtwidgets:5
+	dev-qt/qtsvg:5
+	dev-qt/qtnetwork:5
+	dev-qt/qtdbus:5
+	sys-apps/dbus
+"
+RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${P}-unbundle-qtsingleapplication.patch" )
+
+src_prepare() {
+	rm -r src/third-party/singleapplication || die
+	default
+}
+
+src_configure() {
+	eqmake5 "CONFIG+=packaging"
+}
+
+src_install() {
+	emake INSTALL_ROOT="${D}" install
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+	xdg_icon_cache_update
+	xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+	xdg_icon_cache_update
+	xdg_mimeinfo_database_update
+}

diff --git a/media-gfx/flameshot/metadata.xml b/media-gfx/flameshot/metadata.xml
new file mode 100644
index 00000000000..49f9e82790b
--- /dev/null
+++ b/media-gfx/flameshot/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>paul.kalug@gmail.com</email>
+		<name>Pavel Kalugin</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/flameshot/files/, media-gfx/flameshot/
@ 2020-05-30 22:24 Andreas Sturmlechner
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2020-05-30 22:24 UTC (permalink / raw
  To: gentoo-commits

commit:     e21afcf5a4083064234f4d4d1906164986a85bdc
Author:     Pavel Kalugin <paul.kalug <AT> gmail <DOT> com>
AuthorDate: Fri May 29 08:41:32 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 30 22:22:48 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e21afcf5

media-gfx/flameshot: Fix build with Qt 5.15

Closes: https://bugs.gentoo.org/725930
Signed-off-by: Pavel Kalugin <paul.kalug <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16001
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../flameshot-0.6.0-missing-include-fix.patch      | 22 ++++++++++++++++++++++
 media-gfx/flameshot/flameshot-0.6.0.ebuild         |  5 ++++-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/media-gfx/flameshot/files/flameshot-0.6.0-missing-include-fix.patch b/media-gfx/flameshot/files/flameshot-0.6.0-missing-include-fix.patch
new file mode 100644
index 00000000000..f6b2ea457cb
--- /dev/null
+++ b/media-gfx/flameshot/files/flameshot-0.6.0-missing-include-fix.patch
@@ -0,0 +1,22 @@
+diff -ru a/src/third-party/Qt-Color-Widgets/src/color_wheel.cpp b/src/third-party/Qt-Color-Widgets/src/color_wheel.cpp
+--- a/src/third-party/Qt-Color-Widgets/src/color_wheel.cpp	2020-05-29 22:47:56.183333313 +0300
++++ b/src/third-party/Qt-Color-Widgets/src/color_wheel.cpp	2020-05-29 22:52:19.147998709 +0300
+@@ -24,6 +24,7 @@
+ #include <cmath>
+ #include <QMouseEvent>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QLineF>
+ #include <QDragEnterEvent>
+ #include <QMimeData>
+diff -ru a/src/tools/arrow/arrowtool.h b/src/tools/arrow/arrowtool.h
+--- a/src/tools/arrow/arrowtool.h	2020-05-29 22:47:56.184333329 +0300
++++ b/src/tools/arrow/arrowtool.h	2020-05-29 22:48:25.688787364 +0300
+@@ -19,6 +19,7 @@
+ 
+ #include "src/tools/abstracttwopointtool.h"
+ #include <QPainter>
++#include <QPainterPath>
+ 
+ class ArrowTool : public AbstractTwoPointTool {
+     Q_OBJECT

diff --git a/media-gfx/flameshot/flameshot-0.6.0.ebuild b/media-gfx/flameshot/flameshot-0.6.0.ebuild
index e3d9daac1c7..08fa91211c6 100644
--- a/media-gfx/flameshot/flameshot-0.6.0.ebuild
+++ b/media-gfx/flameshot/flameshot-0.6.0.ebuild
@@ -25,7 +25,10 @@ DEPEND="
 	sys-apps/dbus
 "
 RDEPEND="${DEPEND}"
-PATCHES=( "${FILESDIR}/${P}-unbundle-qtsingleapplication.patch" )
+PATCHES=(
+	"${FILESDIR}/${P}-unbundle-qtsingleapplication.patch"
+	"${FILESDIR}/${P}-missing-include-fix.patch"
+)
 
 src_prepare() {
 	rm -r src/third-party/singleapplication || die


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/flameshot/files/, media-gfx/flameshot/
@ 2021-04-30  7:19 Joonas Niilola
  0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2021-04-30  7:19 UTC (permalink / raw
  To: gentoo-commits

commit:     23db2bfabfb85b73d30cbced60000ef62cd61f3c
Author:     Pavel Kalugin <pavel <AT> pavelthebest <DOT> me>
AuthorDate: Wed Apr 28 19:04:47 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Apr 30 07:19:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23db2bfa

media-gfx/flameshot: version bump to 0.9.0

- unbundle qtsingleapplication
- add spdlog to dependencies
- use xdg instead of xdg-utils to avoid boilerplate
- sort license names alphabetically

Closes: https://bugs.gentoo.org/777414
Suggested-by: shiz01 <shiz01 <AT> tutanota.com>
Signed-off-by: Pavel Kalugin <pavel <AT> pavelthebest.me>
Closes: https://github.com/gentoo/gentoo/pull/20584
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/flameshot/Manifest                       |  1 +
 ...meshot-0.9.0-unbundle-qtsingleapplication.patch | 96 ++++++++++++++++++++++
 media-gfx/flameshot/flameshot-0.9.0.ebuild         | 50 +++++++++++
 3 files changed, 147 insertions(+)

diff --git a/media-gfx/flameshot/Manifest b/media-gfx/flameshot/Manifest
index bf5fbbbba36..33e42fb44c6 100644
--- a/media-gfx/flameshot/Manifest
+++ b/media-gfx/flameshot/Manifest
@@ -1 +1,2 @@
 DIST flameshot-0.6.0.tar.gz 641561 BLAKE2B f9e87373d84c1a841f70cd9c13b504865a0ef23d0fb29848f2270171459afe9c6852e12c712ebdc7cf3cfc62214d7b7507b85cf21838d0ebed33bee1e39f4aad SHA512 194127032ab0f62a6ba2698688e11b2d4e6f0e04a282144f5fbb6c232eeebc71371af2d55abbb6e98b8649dee036e6f0a6ef55710e4321a60fd5ac6e453ab975
+DIST flameshot-0.9.0.tar.gz 7659641 BLAKE2B 38151bf333802ccbaa6c2292799958fe4c75f5a978eea9b2314c5eb264fb569cfcce73afac79b80423686d3a10ec54300ad4cacd3be9a6c6e58c72f59c23fb46 SHA512 888422cd66b7c90cd6da0e824a2c12c0ca7e3cfdfd0a0499868acf9609e6c3a0977f816c656690fa101971b98a3f560cf7849b93079c091b25155360cb20ea11

diff --git a/media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch b/media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch
new file mode 100644
index 00000000000..20e8f6bb5f3
--- /dev/null
+++ b/media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch
@@ -0,0 +1,96 @@
+diff -ruN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	2021-04-28 20:19:06.995353847 +0300
++++ b/CMakeLists.txt	2021-04-28 21:06:25.811315173 +0300
+@@ -86,7 +86,17 @@
+ set(QAPPLICATION_CLASS
+         QApplication
+         CACHE STRING "Inheritance class for SingleApplication")
+-add_subdirectory(external/singleapplication)
++
++if(USE_EXTERNAL_SINGLEAPPLICATION)
++  # look for external QtSingleApplication
++  # package dev-qt/qtsingleapplication provides no symlink to current version
++  set(qtsingleapplication_libs libQt5Solutions_SingleApplication-2.6 Qt5Solutions_SingleApplication-2.6)
++  find_library(QTSINGLEAPPLICATION_LIBRARY NAMES ${qtsingleapplication_libs})
++  message(STATUS "Using external SingleApplication library")
++else()
++  add_subdirectory(external/singleapplication)
++  set(QTSINGLEAPPLICATION_LIBRARY SingleApplication::SingleApplication)
++endif()
+ 
+ if(USE_EXTERNAL_SPDLOG)
+   find_package(spdlog REQUIRED)
+diff -ruN a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt	2021-04-28 20:19:07.048354525 +0300
++++ b/src/CMakeLists.txt	2021-04-28 21:07:44.651559479 +0300
+@@ -107,7 +107,7 @@
+ 
+ target_sources(
+         flameshot
+-        PRIVATE # ${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication/singleapplication.cpp
++        PRIVATE
+         ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/src/color_utils.cpp
+         ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/src/color_wheel.cpp
+         ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/include/color_wheel.hpp
+@@ -120,7 +120,6 @@
+         flameshot
+         PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../>
+         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
+-        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication/>
+         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/include>
+         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../dbus/>
+         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cli>
+@@ -153,6 +152,15 @@
+         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/widgets/capture>
+         $<INSTALL_INTERFACE:include/mylib>)
+ 
++if (USE_EXTERNAL_SINGLEAPPLICATION)
++    add_compile_definitions(USE_EXTERNAL_SINGLEAPPLICATION=1)
++else ()
++    target_include_directories(
++        flameshot
++        PUBLIC
++        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication>)
++endif()
++
+ target_link_libraries(
+         flameshot
+         project_warnings
+@@ -161,7 +169,7 @@
+         Qt5::DBus
+         Qt5::Network
+         Qt5::Widgets
+-        SingleApplication::SingleApplication
++        ${QTSINGLEAPPLICATION_LIBRARY}
+         spdlog::spdlog
+ )
+ 
+diff -ruN a/src/main.cpp b/src/main.cpp
+--- a/src/main.cpp	2021-04-28 20:19:07.051354563 +0300
++++ b/src/main.cpp	2021-04-28 20:59:32.921808263 +0300
+@@ -1,7 +1,12 @@
+ // SPDX-License-Identifier: GPL-3.0-or-later
+ // SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
+ 
+-#include "singleapplication.h"
++#ifndef USE_EXTERNAL_SINGLEAPPLICATION
++    #include "singleapplication.h"
++#else
++    #include "QtSolutions/qtsingleapplication.h"
++#endif
++
+ #include "src/cli/commandlineparser.h"
+ #include "src/config/styleoverride.h"
+ #include "src/core/capturerequest.h"
+@@ -65,7 +70,11 @@
+ 
+     // no arguments, just launch Flameshot
+     if (argc == 1) {
++#ifndef USE_EXTERNAL_SINGLEAPPLICATION
+         SingleApplication app(argc, argv);
++#else
++        QtSingleApplication app(argc, argv);
++#endif
+         QApplication::setStyle(new StyleOverride);
+ 
+         QTranslator translator, qtTranslator;

diff --git a/media-gfx/flameshot/flameshot-0.9.0.ebuild b/media-gfx/flameshot/flameshot-0.9.0.ebuild
new file mode 100644
index 00000000000..2f6c1bbbe3f
--- /dev/null
+++ b/media-gfx/flameshot/flameshot-0.9.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake desktop xdg
+
+DESCRIPTION="Powerful yet simple to use screenshot software"
+HOMEPAGE="https://flameshot.org https://github.com/flameshot-org/flameshot"
+SRC_URI="https://github.com/flameshot-org/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 FreeArt GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+	dev-qt/qtcore:5
+	dev-qt/qtgui:5
+	=dev-qt/qtsingleapplication-2.6*[qt5(+),X]
+	dev-qt/qtwidgets:5
+	dev-qt/qtsvg:5
+	dev-qt/qtnetwork:5
+	dev-qt/qtdbus:5
+	sys-apps/dbus
+	dev-libs/spdlog
+"
+BDEPEND="
+	dev-qt/linguist-tools:5
+"
+RDEPEND="${DEPEND}"
+PATCHES=(
+	"${FILESDIR}/${P}-unbundle-qtsingleapplication.patch"
+)
+
+src_prepare() {
+	rm -r external/spdlog || die
+	rm -r external/singleapplication || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DUSE_EXTERNAL_SPDLOG=1
+		-DUSE_EXTERNAL_SINGLEAPPLICATION=1
+	)
+
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/flameshot/files/, media-gfx/flameshot/
@ 2025-10-10 19:00 Andreas Sturmlechner
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2025-10-10 19:00 UTC (permalink / raw
  To: gentoo-commits

commit:     c6e84ad8f64c774e0a5bb9889bf6b91298ab0bed
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 10 18:58:33 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Oct 10 18:59:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6e84ad8

media-gfx/flameshot: Fix IUSE wayland runtime issues

Bug: https://bugs.gentoo.org/954005
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/flameshot-13.1.0-fix-wayland.patch       | 190 +++++++++++++++++++++
 media-gfx/flameshot/flameshot-13.1.0-r1.ebuild     |  63 +++++++
 2 files changed, 253 insertions(+)

diff --git a/media-gfx/flameshot/files/flameshot-13.1.0-fix-wayland.patch b/media-gfx/flameshot/files/flameshot-13.1.0-fix-wayland.patch
new file mode 100644
index 000000000000..216306e02dc0
--- /dev/null
+++ b/media-gfx/flameshot/files/flameshot-13.1.0-fix-wayland.patch
@@ -0,0 +1,190 @@
+Source: https://github.com/flameshot-org/flameshot/pull/4169
+
+From 06f41a86cc91d53d68871fcdc67053239ff1e87b Mon Sep 17 00:00:00 2001
+From: Yurii Puchkov <panpuchkov@gmail.com>
+Date: Sat, 30 Aug 2025 16:36:17 +0300
+Subject: [PATCH] fix: Screen positions in multi-monitor configuration when
+ devicePixelRatio is other than one (#4169)
+
+* fix: screen positions in multi-monitor configuration when devicePixelRatio is other than one (Xorg and probably Windows, Wayland is not fixed)
+
+* fix: poor screenshot quality with the scale > 1.0
+
+* fix(win): tool-buttons location
+
+(cherry picked from commit 52be77f401b107b6c8d06dc2b5485f3b00b18d40)
+
+---------
+
+Co-authored-by: Yuriy Puchkov <yuriy.puchkov@namecheap.com>
+---
+ src/utils/screengrabber.cpp           | 28 +++++++++++--------------
+ src/widgets/capture/buttonhandler.cpp |  6 +++---
+ src/widgets/capture/capturewidget.cpp | 30 ++++++++++++++++++++-------
+ 3 files changed, 38 insertions(+), 26 deletions(-)
+
+diff --git a/src/utils/screengrabber.cpp b/src/utils/screengrabber.cpp
+index cdbc598497..d787ace48b 100644
+--- a/src/utils/screengrabber.cpp
++++ b/src/utils/screengrabber.cpp
+@@ -137,6 +137,7 @@ void ScreenGrabber::freeDesktopPortal(bool& ok, QPixmap& res)
+     }
+ #endif
+ }
++
+ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
+ {
+     ok = true;
+@@ -210,24 +211,16 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
+     // multi-monitor setups where screens have different positions/heights.
+     // This fixes the dual monitor offset bug and handles edge cases where
+     // the desktop bounding box includes virtual space.
++    QScreen* primaryScreen = QGuiApplication::primaryScreen();
++    QRect r = primaryScreen->geometry();
+     QPixmap desktop(geometry.size());
+     desktop.fill(Qt::black); // Fill with black background
+-
+-    QPainter painter(&desktop);
+-    for (QScreen* screen : QGuiApplication::screens()) {
+-        QRect screenGeom = screen->geometry();
+-        QPixmap screenCapture = screen->grabWindow(
+-          wid, 0, 0, screenGeom.width(), screenGeom.height());
+-
+-        // Calculate position relative to desktop top-left
+-        QPoint relativePos = screenGeom.topLeft() - geometry.topLeft();
+-        painter.drawPixmap(relativePos, screenCapture);
+-    }
+-    painter.end();
+-
+-    // Set device pixel ratio based on the primary screen
+-    desktop.setDevicePixelRatio(
+-      QApplication::primaryScreen()->devicePixelRatio());
++    desktop =
++      primaryScreen->grabWindow(wid,
++                                -r.x() / primaryScreen->devicePixelRatio(),
++                                -r.y() / primaryScreen->devicePixelRatio(),
++                                geometry.width(),
++                                geometry.height());
+     return desktop;
+ #endif
+ }
+@@ -281,6 +274,9 @@ QRect ScreenGrabber::desktopGeometry()
+         // Qt6 fix: Don't divide by devicePixelRatio for multi-monitor setups
+         // This was causing coordinate offset issues in dual monitor
+         // configurations
++        // But it still has a screen position in real pixels, not logical ones
++        qreal dpr = screen->devicePixelRatio();
++        scrRect.moveTo(QPointF(scrRect.x() / dpr, scrRect.y() / dpr).toPoint());
+         geometry = geometry.united(scrRect);
+     }
+     return geometry;
+diff --git a/src/widgets/capture/buttonhandler.cpp b/src/widgets/capture/buttonhandler.cpp
+index 4a003714c1..4624fdcfad 100644
+--- a/src/widgets/capture/buttonhandler.cpp
++++ b/src/widgets/capture/buttonhandler.cpp
+@@ -64,7 +64,7 @@ size_t ButtonHandler::size() const
+ 
+ // updatePosition updates the position of the buttons around the
+ // selection area. Ignores the sides blocked by the end of the screen.
+-// When the selection is too small it works on a virtual selection with
++// When the selection is too small, it works on a virtual selection with
+ // the original in the center.
+ void ButtonHandler::updatePosition(const QRect& selection)
+ {
+@@ -122,7 +122,7 @@ void ButtonHandler::updatePosition(const QRect& selection)
+               horizontalPoints(center, addCounter, true);
+             moveButtonsToPoints(positions, elemIndicator);
+         }
+-        // Add buttons at the right side of the selection
++        // Add buttons to the right side of the selection
+         if (!m_blockedRight && elemIndicator < vecLength) {
+             int addCounter = buttonsPerCol;
+             addCounter = qBound(0, addCounter, vecLength - elemIndicator);
+@@ -146,7 +146,7 @@ void ButtonHandler::updatePosition(const QRect& selection)
+               horizontalPoints(center, addCounter, false);
+             moveButtonsToPoints(positions, elemIndicator);
+         }
+-        // Add buttons at the left side of the selection
++        // Add buttons to the left side of the selection
+         if (!m_blockedLeft && elemIndicator < vecLength) {
+             int addCounter = buttonsPerCol;
+             addCounter = qBound(0, addCounter, vecLength - elemIndicator);
+diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp
+index 4cb3b2c6e7..a152bb352c 100644
+--- a/src/widgets/capture/capturewidget.cpp
++++ b/src/widgets/capture/capturewidget.cpp
+@@ -13,11 +13,8 @@
+ #include "abstractlogger.h"
+ #include "copytool.h"
+ #include "src/config/cacheutils.h"
+-#include "src/config/generalconf.h"
+ #include "src/core/flameshot.h"
+ #include "src/core/qguiappcurrentscreen.h"
+-#include "src/tools/toolfactory.h"
+-#include "src/utils/colorutils.h"
+ #include "src/utils/screengrabber.h"
+ #include "src/utils/screenshotsaver.h"
+ #include "src/utils/systemnotification.h"
+@@ -32,9 +29,7 @@
+ #include <QApplication>
+ #include <QCheckBox>
+ #include <QDateTime>
+-#include <QDebug>
+ #include <QFontMetrics>
+-#include <QLabel>
+ #include <QMessageBox>
+ #include <QPaintEvent>
+ #include <QPainter>
+@@ -150,6 +145,7 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
+         QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen();
+         move(currentScreen->geometry().x(), currentScreen->geometry().y());
+         resize(currentScreen->size());
++// LINUX
+ #else
+ // Call cmake with -DFLAMESHOT_DEBUG_CAPTURE=ON to enable easier debugging
+ #if !defined(FLAMESHOT_DEBUG_CAPTURE)
+@@ -161,6 +157,18 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
+         move(desktopGeom.topLeft());
+         resize(desktopGeom.size());
+ #endif
++        // Need to move to the top left screen
++        QPoint topLeft(0, INT_MAX);
++        for (QScreen* const screen : QGuiApplication::screens()) {
++            qreal dpr = screen->devicePixelRatio();
++            QPoint topLeftScreen = screen->geometry().topLeft() / dpr;
++            if (topLeftScreen.x() == 0) {
++                if (topLeftScreen.y() < topLeft.y()) {
++                    topLeft.setY(topLeftScreen.y());
++                }
++            }
++        }
++        move(topLeft);
+ #endif
+     }
+     QVector<QRect> areas;
+@@ -182,6 +190,7 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
+         r.moveTo(0, 0);
+         areas.append(r);
+ #else
++        // LINUX & WINDOWS
+         for (QScreen* const screen : QGuiApplication::screens()) {
+             QRect r = screen->geometry();
+             r.moveTo(r.x() / screen->devicePixelRatio(),
+@@ -259,8 +268,15 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
+                 OverlayMessage::instance()->update();
+             });
+ 
+-    OverlayMessage::init(this,
+-                         QGuiAppCurrentScreen().currentScreen()->geometry());
++    // Qt6 has only sizes in logical values, position is in physical values.
++    // Move Help message to the logical pixel with devicePixelRatio.
++    QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen();
++    QRect currentScreenGeometry = currentScreen->geometry();
++    qreal currentScreenDpr = currentScreen->devicePixelRatio();
++    currentScreenGeometry.moveTo(
++      int(currentScreenGeometry.x() / currentScreenDpr),
++      int(currentScreenGeometry.y() / currentScreenDpr));
++    OverlayMessage::init(this, currentScreenGeometry);
+ 
+     if (m_config.showHelp()) {
+         initHelpMessage();

diff --git a/media-gfx/flameshot/flameshot-13.1.0-r1.ebuild b/media-gfx/flameshot/flameshot-13.1.0-r1.ebuild
new file mode 100644
index 000000000000..f217f2e0fead
--- /dev/null
+++ b/media-gfx/flameshot/flameshot-13.1.0-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2021-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QTCW_COMMIT=8491078434b24cba295b5e41cc0d2a94c7049a5b # why ...
+inherit cmake flag-o-matic xdg
+
+DESCRIPTION="Powerful yet simple to use screenshot software"
+HOMEPAGE="https://flameshot.org https://github.com/flameshot-org/flameshot"
+SRC_URI="https://github.com/flameshot-org/flameshot/archive/v${PV}.tar.gz -> ${P}.tar.gz
+https://gitlab.com/mattbas/Qt-Color-Widgets/-/archive/${QTCW_COMMIT}/${PN}-qtcolorwidgets-${QTCW_COMMIT:0:8}.tar.bz2"
+
+LICENSE="Apache-2.0 Free-Art-1.3 GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="wayland"
+
+DEPEND="
+	dev-libs/kdsingleapplication
+	dev-qt/qtbase:6[dbus,gui,network,widgets]
+	dev-qt/qtsvg:6
+	sys-apps/dbus
+	wayland? ( kde-frameworks/kguiaddons:6 )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	dev-qt/qttools:6[linguist]
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-wayland.patch" ) # bug #954005
+
+src_prepare() {
+	# bundles https://gitlab.com/mattbas/Qt-Color-Widgets ...
+	mkdir external || die
+	mv "${WORKDIR}"/Qt-Color-Widgets-${QTCW_COMMIT} external/Qt-Color-Widgets || die
+
+	# safety
+	sed -e "s/include(FetchContent)/# & # no we don't/" -i CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	# -Werror=strict-aliasing
+	# https://bugs.gentoo.org/859613
+	# https://github.com/flameshot-org/flameshot/issues/3531
+	#
+	# Do not trust with LTO either
+	append-flags -fno-strict-aliasing
+	filter-lto
+
+	local mycmakeargs=(
+		-DENABLE_CACHE=0
+		-DDISABLE_UPDATE_CHECKER=ON
+		-DUSE_KDSINGLEAPPLICATION=ON
+		-DUSE_BUNDLED_KDSINGLEAPPLICATION=OFF
+		-DQTCOLORWIDGETS_BUILD_STATIC_LIBS=ON
+		-DUSE_WAYLAND_CLIPBOARD=$(usex wayland)
+	)
+
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-10 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10 19:00 [gentoo-commits] repo/gentoo:master commit in: media-gfx/flameshot/files/, media-gfx/flameshot/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2021-04-30  7:19 Joonas Niilola
2020-05-30 22:24 Andreas Sturmlechner
2020-05-28 18:37 Maxim Koltsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox