diff --git a/media-gfx/flameshot/additional-files/flameshot.png b/media-gfx/flameshot/additional-files/flameshot.png deleted file mode 100644 index 30efb8d4d..000000000 Binary files a/media-gfx/flameshot/additional-files/flameshot.png and /dev/null differ diff --git a/media-gfx/flameshot/additional-files/icons.zip b/media-gfx/flameshot/additional-files/icons.zip new file mode 100644 index 000000000..6c300784c Binary files /dev/null and b/media-gfx/flameshot/additional-files/icons.zip differ diff --git a/media-gfx/flameshot/flameshot-11.0.0.recipe b/media-gfx/flameshot/flameshot-12.1.0.recipe similarity index 91% rename from media-gfx/flameshot/flameshot-11.0.0.recipe rename to media-gfx/flameshot/flameshot-12.1.0.recipe index bd5b09fde..94db1699d 100644 --- a/media-gfx/flameshot/flameshot-11.0.0.recipe +++ b/media-gfx/flameshot/flameshot-12.1.0.recipe @@ -11,11 +11,11 @@ COPYRIGHT="2022 lupoDharkael" LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="https://github.com/flameshot-org/flameshot/archive/refs/tags/v$portVersion.tar.gz" -CHECKSUM_SHA256="4cd158719031e97c97ecb6db1c14dd8ded44bf531c062bce496fc63be18bc2cf" +CHECKSUM_SHA256="c82c05d554e7a6d810aca8417ca12b21e4f74864455ab4ac94602668f85ac22a" PATCHES="flameshot-$portVersion.patchset" ADDITIONAL_FILES=" flameshot.rdef.in - flameshot.png + icons.zip " ARCHITECTURES="all !x86_gcc2" @@ -50,7 +50,7 @@ BUILD_PREREQUIRES=" PATCH() { - cp -f $sourceDir/../../additional-files/flameshot.png $sourceDir/data/img/app/flameshot.png + unzip -o $sourceDir/../../additional-files/icons.zip -d $sourceDir/data/img } BUILD() diff --git a/media-gfx/flameshot/patches/flameshot-11.0.0.patchset b/media-gfx/flameshot/patches/flameshot-12.1.0.patchset similarity index 77% rename from media-gfx/flameshot/patches/flameshot-11.0.0.patchset rename to media-gfx/flameshot/patches/flameshot-12.1.0.patchset index 521506eb5..e16a81257 100644 --- a/media-gfx/flameshot/patches/flameshot-11.0.0.patchset +++ b/media-gfx/flameshot/patches/flameshot-12.1.0.patchset @@ -1,11 +1,11 @@ -From 39ee1e6ed2a73d9fe7859cc2de2f5eeca683f45a Mon Sep 17 00:00:00 2001 +From 717a12238ad3428d0ff0ec91a5ca6357942e3829 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 11 May 2022 21:31:12 +1000 +Date: Sat, 8 Oct 2022 21:23:08 +1000 Subject: Add support for autolaunch diff --git a/src/utils/confighandler.cpp b/src/utils/confighandler.cpp -index 42f5310..381db29 100644 +index 657e896..c077d05 100644 --- a/src/utils/confighandler.cpp +++ b/src/utils/confighandler.cpp @@ -26,7 +26,10 @@ @@ -20,7 +20,7 @@ index 42f5310..381db29 100644 QString path = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, "autostart/", QStandardPaths::LocateDirectory) + -@@ -260,6 +263,15 @@ void ConfigHandler::setStartupLaunch(const bool start) +@@ -261,6 +264,15 @@ void ConfigHandler::setStartupLaunch(const bool start) qWarning() << "Unable to change login items, error:" << process.readAll(); } @@ -37,28 +37,28 @@ index 42f5310..381db29 100644 QString path = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + -- -2.30.2 +2.36.1 -From 35973492e97b7875a819fac30553fded018940f9 Mon Sep 17 00:00:00 2001 +From ac483e7cd2930695d9348dcee9c694df6a5b7b73 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 11 May 2022 21:32:10 +1000 +Date: Sat, 8 Oct 2022 21:24:00 +1000 Subject: DBus autostart diff --git a/src/main.cpp b/src/main.cpp -index 90a4a80..ec76cff 100644 +index fd2768b..b92b122 100644 --- a/src/main.cpp +++ b/src/main.cpp -@@ -23,6 +23,7 @@ +@@ -24,6 +24,7 @@ #include #include #include +#include - #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) #include "abstractlogger.h" -@@ -99,6 +100,27 @@ int main(int argc, char* argv[]) + #include "src/core/flameshotdbusadapter.h" +@@ -105,6 +106,27 @@ int main(int argc, char* argv[]) #else QtSingleApplication app(argc, argv); #endif @@ -86,7 +86,7 @@ index 90a4a80..ec76cff 100644 QApplication::setStyle(new StyleOverride); QTranslator translator, qtTranslator; -@@ -137,10 +159,30 @@ int main(int argc, char* argv[]) +@@ -143,10 +165,30 @@ int main(int argc, char* argv[]) dbus.registerObject(QStringLiteral("/"), c); dbus.registerService(QStringLiteral("org.flameshot.Flameshot")); #endif @@ -118,7 +118,7 @@ index 90a4a80..ec76cff 100644 * CLI parsing | * ------------*/ diff --git a/src/utils/filenamehandler.cpp b/src/utils/filenamehandler.cpp -index 3bc5295..562a5a8 100644 +index ffee256..b465b7e 100644 --- a/src/utils/filenamehandler.cpp +++ b/src/utils/filenamehandler.cpp @@ -14,6 +14,7 @@ FileNameHandler::FileNameHandler(QObject* parent) @@ -127,7 +127,7 @@ index 3bc5295..562a5a8 100644 auto err = AbstractLogger::error(AbstractLogger::Stderr); +#ifndef __HAIKU__ try { - std::locale::global(std::locale("")); + std::locale::global(std::locale()); } catch (std::exception& e) { @@ -22,6 +23,7 @@ FileNameHandler::FileNameHandler(QObject* parent) @@ -138,44 +138,43 @@ index 3bc5295..562a5a8 100644 QString FileNameHandler::parsedPattern() -- -2.30.2 +2.36.1 -From a6663600eef45942877c654d6fe2638797d91ab3 Mon Sep 17 00:00:00 2001 +From 09f7924931c41d73285efb76453ed1f531ce06a4 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 11 May 2022 21:32:54 +1000 +Date: Sat, 8 Oct 2022 21:24:54 +1000 Subject: Don't use tray icon from theme -diff --git a/src/core/controller.cpp b/src/core/controller.cpp -index 7221e84..53e3b52 100644 ---- a/src/core/controller.cpp -+++ b/src/core/controller.cpp -@@ -522,8 +522,7 @@ void Controller::enableTrayIcon() - #else - m_trayIcon->setContextMenu(m_trayIconMenu); +diff --git a/src/widgets/trayicon.cpp b/src/widgets/trayicon.cpp +index 3221118..9de7b5b 100644 +--- a/src/widgets/trayicon.cpp ++++ b/src/widgets/trayicon.cpp +@@ -33,7 +33,7 @@ TrayIcon::TrayIcon(QObject* parent) + setContextMenu(m_menu); #endif -- QIcon trayIcon = + QIcon icon = - QIcon::fromTheme("flameshot-tray", QIcon(GlobalValues::iconPathPNG())); -+ QIcon trayIcon = QIcon(":img/app/flameshot.png"); - m_trayIcon->setIcon(trayIcon); ++ QIcon(":img/app/flameshot.png"); + setIcon(icon); #if defined(Q_OS_MACOS) -- -2.30.2 +2.36.1 -From 3568a9333bce959e82b5d856f4c27fdd849dcd01 Mon Sep 17 00:00:00 2001 +From be249bad99a0d01ad8effb1904b2465e3fab8659 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 11 May 2022 21:34:50 +1000 +Date: Sat, 8 Oct 2022 21:25:18 +1000 Subject: Link with libbe.so diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 97af4e9..5a46c1d 100644 +index 2dd49c3..0c48cfb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -197,6 +197,13 @@ if (APPLE) +@@ -223,6 +223,13 @@ if (APPLE) ) endif () @@ -190,17 +189,17 @@ index 97af4e9..5a46c1d 100644 set(USE_OPENSSL FALSE) if (ENABLE_OPENSSL) -- -2.30.2 +2.36.1 -From 1851c2f675025ce2658187fd1c2a4388cd825ff1 Mon Sep 17 00:00:00 2001 +From 52f2021c99334274353e0634dc91b1c4f7cb64f8 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 11 May 2022 21:36:19 +1000 +Date: Sat, 8 Oct 2022 21:26:03 +1000 Subject: Style tune diff --git a/src/config/buttonlistview.cpp b/src/config/buttonlistview.cpp -index 54d5f44..0b83487 100644 +index 6d042f0..db949c3 100644 --- a/src/config/buttonlistview.cpp +++ b/src/config/buttonlistview.cpp @@ -36,7 +36,7 @@ void ButtonListView::initButtonList() @@ -213,7 +212,7 @@ index 54d5f44..0b83487 100644 this->palette().color(QWidget::foregroundRole()); m_buttonItem->setForeground(foregroundColor); diff --git a/src/config/shortcutswidget.cpp b/src/config/shortcutswidget.cpp -index 8415044..b6882a1 100644 +index 74a0fba..92a7674 100644 --- a/src/config/shortcutswidget.cpp +++ b/src/config/shortcutswidget.cpp @@ -22,6 +22,10 @@ @@ -233,10 +232,10 @@ index 8415044..b6882a1 100644 -#if defined(Q_OS_MACOS) +#if defined(Q_OS_MACOS) || defined(Q_OS_HAIKU) - QTableWidgetItem* item = - new QTableWidgetItem(nativeOSHotKeyText(key_sequence)); + auto* item = new QTableWidgetItem(nativeOSHotKeyText(key_sequence)); #else -@@ -229,3 +233,19 @@ const QString& ShortcutsWidget::nativeOSHotKeyText(const QString& text) + QTableWidgetItem* item = new QTableWidgetItem(key_sequence); +@@ -230,3 +234,19 @@ const QString& ShortcutsWidget::nativeOSHotKeyText(const QString& text) return m_res; } #endif @@ -279,10 +278,29 @@ index 638bff3..c3314c2 100644 #endif ConfigHandler m_config; diff --git a/src/tools/pin/pinwidget.cpp b/src/tools/pin/pinwidget.cpp -index 7d6e949..ca05915 100644 +index 160e900..4981c6c 100644 --- a/src/tools/pin/pinwidget.cpp +++ b/src/tools/pin/pinwidget.cpp -@@ -21,7 +21,7 @@ PinWidget::PinWidget(const QPixmap& pixmap, +@@ -18,7 +18,11 @@ + #include + + namespace { ++#ifndef __HAIKU__ + constexpr int MARGIN = 7; ++#else ++constexpr int MARGIN = 1; ++#endif + constexpr int BLUR_RADIUS = 2 * MARGIN; + constexpr qreal STEP = 0.03; + constexpr qreal MIN_SIZE = 100.0; +@@ -31,12 +35,14 @@ PinWidget::PinWidget(const QPixmap& pixmap, + , m_pixmap(pixmap) + , m_layout(new QVBoxLayout(this)) + , m_label(new QLabel()) ++#ifndef __HAIKU__ + , m_shadowEffect(new QGraphicsDropShadowEffect(this)) ++#endif + { setWindowIcon(QIcon(GlobalValues::iconPath())); setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint); // set the bottom widget background transparent @@ -291,35 +309,22 @@ index 7d6e949..ca05915 100644 setAttribute(Qt::WA_DeleteOnClose); ConfigHandler conf; -@@ -32,14 +32,17 @@ PinWidget::PinWidget(const QPixmap& pixmap, - const int margin = this->margin(); - m_layout->setContentsMargins(margin, margin, margin, margin); +@@ -44,12 +50,12 @@ PinWidget::PinWidget(const QPixmap& pixmap, + m_hoverColor = conf.contrastUiColor(); + m_layout->setContentsMargins(MARGIN, MARGIN, MARGIN, MARGIN); +- +#ifndef __HAIKU__ - m_shadowEffect = new QGraphicsDropShadowEffect(this); m_shadowEffect->setColor(m_baseColor); - m_shadowEffect->setBlurRadius(2 * margin); + m_shadowEffect->setBlurRadius(BLUR_RADIUS); m_shadowEffect->setOffset(0, 0); setGraphicsEffect(m_shadowEffect); - +#endif - m_label = new QLabel(); m_label->setPixmap(m_pixmap); -+ m_label->setFrameStyle(QFrame::Box | QFrame::Plain); -+ m_label->setLineWidth(margin); m_layout->addWidget(m_label); - new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this, SLOT(close())); -@@ -73,7 +76,7 @@ PinWidget::PinWidget(const QPixmap& pixmap, - - int PinWidget::margin() const - { -- return 7; -+ return 1; - } - - void PinWidget::wheelEvent(QWheelEvent* e) -@@ -91,12 +94,12 @@ void PinWidget::wheelEvent(QWheelEvent* e) +@@ -136,12 +142,12 @@ bool PinWidget::scrollEvent(QWheelEvent* event) void PinWidget::enterEvent(QEvent*) { @@ -335,10 +340,10 @@ index 7d6e949..ca05915 100644 void PinWidget::mouseDoubleClickEvent(QMouseEvent*) diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp -index c34a5f1..7ff28bd 100644 +index 4282159..4e3b752 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp -@@ -40,6 +40,10 @@ +@@ -41,6 +41,10 @@ #include #include @@ -349,7 +354,7 @@ index c34a5f1..7ff28bd 100644 #define MOUSE_DISTANCE_TO_START_MOVING 3 // CaptureWidget is the main component used to capture the screen. It contains -@@ -365,6 +369,10 @@ void CaptureWidget::handleButtonLeftClick(CaptureToolButton* b) +@@ -377,6 +381,10 @@ void CaptureWidget::handleButtonLeftClick(CaptureToolButton* b) void CaptureWidget::initHelpMessage() { @@ -360,7 +365,7 @@ index c34a5f1..7ff28bd 100644 QList> keyMap; if (keyMap.isEmpty()) { keyMap << QPair(tr("Mouse"), tr("Select screenshot area")); -@@ -378,6 +386,10 @@ void CaptureWidget::initHelpMessage() +@@ -390,6 +398,10 @@ void CaptureWidget::initHelpMessage() QString shortcut = ConfigHandler().shortcut( QVariant::fromValue(toolType).toString()); shortcut.replace("Return", "Enter"); @@ -372,5 +377,5 @@ index c34a5f1..7ff28bd 100644 keyMap << QPair(shortcut, tool->description()); } -- -2.30.2 +2.36.1