Commit Graph

219 Commits

Author SHA1 Message Date
Jeremy Borgman
2c99e97ed7 Fix more c++ 20 deprecations 2025-06-06 14:35:04 -05:00
borgmanJeremy
2732eb375c Port to QT6 on MacOs (#3977) 2025-06-04 18:41:55 -05:00
Jeremy Borgman
533c811016 fix missing header on ubuntu 22.04, apply clang-format, working on CI 2025-06-03 20:05:54 -05:00
El Thoro
88d6e14246 Replace QTextCodec with QStringDecoder/Encoder (#3965) 2025-06-01 12:10:08 -05:00
El Thoro
277eb2f437 Fixing deprecation for future Qt 6 support (#3962)
* Replace foreach

* Replace QRegExp with QRegularExpression

* Replace QApplication::fontMetrics

* Replace QColor::isValidColor

* Replace canConvert(QVariant)

* Replace QString::midRef and QCharRef

* Add TODO for replacing QDesktopWidget for Qt 6

* Add TODO for replacing QTextCodec for Qt 6

* Fix QWidget::enterEvent for Qt 6

* qRegisterMetaTypeStreamOperators done automatically in Qt 6

* Fix QWidget::mapToGlobal for Qt 6

* Migrate QDesktopWidget replacement from old qt6 branch

* Drop Qt 5 support
2025-05-31 12:42:40 -05:00
Harsh Narayan Jha
76f8067b2d Add useGrimAdapter option to the config window (#3943) 2025-05-21 14:01:26 -05:00
lvhung
e9817d8a81 Implement reverse arrow (#2144) (#3477) 2025-05-14 06:41:52 -05:00
donutAnees
be54ae9c0d Add Shortcut to Cancel current selection (#3751)
This PR adds the ability to close the selection using the Ctrl + Backspace
key combination, addressing issue #3319. The new shortcut
allows users to quickly exit the selection mode without relying on mouse
interactions.
2025-05-11 12:39:29 -05:00
borgmanJeremy
f7923936f2 fix clang-format for another PR (#3931) 2025-05-10 17:21:08 -05:00
j4k0xb
a293034a50 Add option to disable abort notification (#3610) 2025-05-10 16:08:23 -05:00
Anwarul Islam
de11a36967 refactor: move general configuration tab to ConfigWindow first (#3655) 2025-05-10 16:08:09 -05:00
Oleksandr Honcharov
f4cde19c63 Fix the known issue of saving JPEG to clipboard on macOS (#3724) 2025-05-04 07:26:32 -05:00
Y5
7236570ca2 Optionally confirm to quit after pressing Escape (#3758)
* config: add `showQuitPrompt` option

Signed-off-by: y5c4l3 <y5c4l3@proton.me>

* capturewidget: optionally show prompt on quit

Signed-off-by: y5c4l3 <y5c4l3@proton.me>

* capturewidget: apply theme in quit prompt

Signed-off-by: y5c4l3 <y5c4l3@proton.me>

---------

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
2025-05-02 15:42:57 -05:00
Aman Gupta
61a6074bec delete current tool command name corrected (#3348) 2025-02-01 21:09:56 +02:00
Kit PANG
f5f2e53489 Fix full/screen capture use last region (#3364)
* Fix full capture use last region

* Limit use last region to gui capture only

* Update config use last region wordings

* Preserve current translations for config use last region wordings
2023-10-10 02:07:50 +02:00
Mike Phillips
c97c3aa546 Add JPEG Quality Option (#3285)
* fixes #3188 (#3254)

Add JPEG quality option

Signed-off-by: Mike Phillips <mdphillips375@gmail.com>

Revert "Add JPEG quality option"

This reverts commit 046497d8273a69ea1cc0f134a996a5ada818ed8c.

* Add JPEG Quality Option

* Fix local variable name

* JPEG Quality: Add .ini example and minor fixes.

* JPEG Quality: Add .ini example and minor fixes.

* Fix Formatting

---------

Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
2023-09-16 13:48:59 +02:00
El Thoro
f7e41f4d70 Cppcheck and clazy warning fixes (#2821)
* Cppcheck and clazy warning fixes

* Clang-format

* Revert QRect call by value

* Revert QPoint call by value

* Revert complained renamings

---------

Co-authored-by: Haris Gušić <harisgusic.dev@gmail.com>
2023-01-29 16:01:02 +01:00
borgmanJeremy
134117b558 Fix checkbox not initializing properly (#2940) 2022-10-06 12:29:08 -05:00
Dhruv Maroo
d2b38f962c Improve resizing in flameshot (#2931)
* Allow symmetrical resizing using arrow keys when pressing ctrl

* Add feature to preserve aspect ratio while resizing selection window

* Format according to clang-format
2022-10-03 12:33:20 -05:00
borgmanJeremy
bd3431a9f5 Always show post upload actions (#2640) 2022-07-24 09:18:09 -05:00
Alaskra
d05764997d add cmake option DISABLE_UPDATE_CHECKER (#2793)
* add cmake option DISABLE_UPDATE_CHECKER

* add cmake option DISABLE_UPDATE_CHECKER to compile out
updatechecker

* format code use `clang-format -i $(git ls-files "*.cpp" "*.h")`

* fallback wrong code format

* replace `add_definitions` with `add_compile_definitions`
2022-07-24 09:15:13 -05:00
borgmanJeremy
88f5c4745c cleaned up some PR formatting / names, removed old size indicator (#2778)
* cleaned up some PR formatting / names, removed old size indicator

* fixed clang format

* fixed clang format
2022-07-11 20:03:00 -05:00
Mikko Vedru
3898636544 Improve order and descriptions of Settings/General items (#2777)
* Improve descriptions in Settings/General

* Order Settings/General list more logically

- Startup items in the beginning
- Running and graphical items then
- Combined actions grouped together
etc
2022-07-10 19:27:10 -05:00
wd5gnr
e68183451e Add integrated WXH display and options (#2766) 2022-07-10 13:55:40 -05:00
thehunmonkgroup
13c034c1e4 rename Imgur API Key to Imgur Application Client ID (#2719) 2022-06-28 16:09:52 -05:00
borgmanJeremy
5f751a2b7e Added missing strings to translation files (#2682)
* Added missing strings to translation files

* Added missing strings to translation files
2022-06-18 09:13:06 -05:00
borgmanJeremy
46801d933a Added the ability to cache the last region (#2615)
* Added the ability to cache the last region

* adding cli option

* addressed typo comments and applied clang-format
2022-06-01 09:18:54 -05:00
vozdeckyl
de95c357de get rid of the empty string in the options (#2552) 2022-05-01 09:16:47 -05:00
borgmanJeremy
c01ffeccf0 Allow users to override imgur key (#2503)
* Allow users to override imgur key

* Remove debug statements
2022-03-30 15:15:54 -05:00
Haris Gušić
54690d5be8 Major Controller refactor (#2295)
* Change Controller interface to mimic the CLI

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove obsolete handleCaptureTaken

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Extract system tray icon into separate class

The implementation is not complete and full of bugs

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove Controller::handleCaptureFailed

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix a QObject connection

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Controller: remove unused includes

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Make check for updates work again

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Move functionality to daemon and tray icon

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Rename SystemTray to TrayIcon

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add missing trayicon.* files

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add missing QDesktopWidget

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix syntax errors

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add missing include

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Include missing QOperatingSystemVersion on Mac

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Move update checking to daemon

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove obsolete method Controller::doLater

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Some cleanup

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Rename Controller to Flameshot

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Final touches

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2022-03-25 09:47:21 -05:00
borgmanJeremy
53698bca6f Fix double clic (#2432)
* ensure copy only happens with left double click

* Added option to enable and disable copy on double click.

* Only show double click shortcut if it is enabled
2022-02-16 19:28:14 -06:00
Dearsh Oberoi
b4188f7ec8 Improve Colorpicker (#2403)
* Fix

* update preset functionality added

* dynamic radius

* added drag to swap

* Refactor

* Fix Bug
2022-02-12 18:04:20 -06:00
borgmanJeremy
0ac48f5c4b Clang tidy (#2372)
* Added missing braces

* applied some clang modernize

* clarified auto pointer

* clang-tidy
2022-02-06 12:12:09 -06:00
Mehrad Mahmoudian
3c2a2f98cf Improve tooltips texts (#2377)
* Adds links to sponsors in README

* Adds AnonAddy to the sponsor list

* minor modification on the tooltip text of some config options

* adds tooltip text for magnifier config options

* clang-format
2022-02-06 12:11:55 -06:00
SilasDo
cf08755c8b Added magnifier for more precise selections (#2219)
* added a magnifierwidget

* added option to show magnifier and added option to switch to square shaped magnifier

* integrated magnifierwidget into capture

this could probably be done in a nicer way.
right now the magnifier wont show if you select via the move tool.

Co-authored-by: Silas Dohm <silas@sdohm.xyz>
2022-02-05 19:51:28 -06:00
Dearsh Oberoi
259e438f96 Customizable ColorPicker (#2202)
* Added spinbox, refactored colorpicker

* Added add preset functionality

* Added delete preset

* Refactored code

* Fix
2022-01-30 13:03:07 -06:00
Haris Gušić
417a1534cf Introduce a config resolver (#2244)
* Add config resolver

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Enable resolver even when using systray

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix bugs

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Do not show resolver for shortcut conflicts

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix build error on MacOS and Windows

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add missing translations

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Replace variable i with row

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Improve presentation

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Disambiguate shortcuts and general settings

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Wrap some strings in tr

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Update tooltips in ConfigResolver

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2022-01-13 16:01:56 -06:00
Yurii Puchkov
493e0d8801 fix - crash on Windows if "setSaveAsFileExtension" is defined in the configuration file (#2204)
Co-authored-by: Yuriy Puchkov <yuriy.puchkov@namecheap.com>
2021-12-30 10:37:07 -06:00
Haris Gušić
06eb7acdd3 Fix QLayout warning in 'flameshot config' (#2198)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-12-27 22:40:05 +01:00
borgmanJeremy
960710206e fixing segfault on windows (#2180) 2021-12-22 11:24:40 -06:00
Haris Gušić
36b3bd9639 Implement abstract logger (#2174)
* AbstractLogger base implementation

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Switch most system notifications to AbstractLogger

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Make CLI parser use AbstractLogger

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix annoying QPainter warning in QtColorWidgets

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove obsolete TODOs

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix failing windows build

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add missing #include <cassert>

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-12-21 11:59:08 -06:00
Yurii Puchkov
bd4fc0047a Add option for using large color palette on right button click (#2171)
(cherry picked from commit 403a6474e7e8afeb7920fe39c8312481c21d0d1b)

Co-authored-by: Yuriy Puchkov <yuriy.puchkov@namecheap.com>
2021-12-21 08:27:13 -06:00
Haris Gušić
233c765b1f Reduce dependence on D-Bus (#2003)
* Handle captures without sigslots

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Set {app,organization}Name and version consistently

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Make 'full' dbus-free

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Move CaptureRequest::exportCapture to Controller

We need to wait until the upload widget (or similar widgets) have
finished before exiting. This must be done using a signal. The problem
is that CaptureRequest can't be guaranteed to survive until the widget
has finished what it's doing.

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Use QApplication with the 'full' subcommand

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Do unto 'screen' as we did to 'full'

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add FlameshotDaemon singleton class

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Support clipboard hosting for both pixmaps and text

* Fix upload handling

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Do not show tray icon if not daemon

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Clean up handling of pin task

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove annoying Qt warning messages

The messages were caused by the color wheel.

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix small bug in Controller::exportCapture

* Fix --raw output

* Make 'gui' dbus-independent

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix accept on select bug

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix compile error on Windows

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Make it work on Windows

* Remove obsolete function in main.cpp

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Make 'launcher' work without dbus

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* clang-format, sigh

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Enable CLI parsing on MacOS

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Make 'config' work without dbus

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Small refactor of capture request handling

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove obsolete DBusUtils

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove unused D-Bus sigslots

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove D-Bus methods openConfig, autostartEnabled and trayIconEnabled

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove D-Bus method requestCapture

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Remove CaptureRequest id mechanism

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix 'launcher' crash

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Handle clipboard notifications properly

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add 'autoCloseIdleDaemon' option

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Document FlameshotDaemon class

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Make 'flameshot gui' run in single-application mode

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add `allowmultipleGuiInstances` config option

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix endless loop with multiple GUI instances

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Move upload confirmation dialog where it belongs

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Add the new config options to the GUI as well

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix failing build on Windows

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Handle persistence on MacOS

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* fixed notifications on macos

* Fixed display on macos

* Reformat tests/action_options.sh

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix infinite recursion in tests/action_options.sh

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

Co-authored-by: Dearsh Oberoi <59907159+deo002@users.noreply.github.com>
Co-authored-by: Jeremy Borgman <borgman.jeremy@pm.me>
2021-12-08 22:18:39 +01:00
Yurii Puchkov
203b5baab6 Added UploaderManager for further multiple Storage for images support (#2142)
Co-authored-by: Yuriy Puchkov <yuriy.puchkov@namecheap.com>
2021-12-07 17:19:32 -06:00
borgmanJeremy
8ab1ac0eaa Bumping Qt-Color-Widgets (#2052)
* Bumping Qt-Color-Widgets

* changing Qt Color Widget CMAKE setup
2021-11-20 20:44:58 -06:00
LHBosssss
2283b3e783 Enable Screenshot & Screenshot history shortcut changing in MACOS (#2098)
* Enable Screenshot & Screenshot history shortcut changing in MACOS
From issue #1259 and my experience, I've fix and test this feature in my Hackintosh. So now you can change shortcut to take screenshot and show screenshot history (require restart flameshot).
- Default key to take screenshot is "Cmd + Shift + X", screenshot history is "Option + Shift + X".
- Added new translate text "Require restart flameshot".

* - Change message text for screenshot shortcut

* - Format code using clang-format

Co-authored-by: adrienpixodeo <adrien@pixodeo.net>
2021-11-20 20:44:39 -06:00
borgmanJeremy
f675123e0a working on monochrome icon (#2071)
* working on monochrome icon

* Update pipeline

* adjusted icns to be monochrome

* Added 1045 monochrome
2021-11-17 14:28:16 -06:00
Dearsh Oberoi
df5d99321a Added confirmation for Upload (#2037) 2021-11-08 13:33:50 -06:00
Dearsh Oberoi
de7eeb4d64 Right click to open panel and select tool (#2008)
* Right click to open panel and select tool

* Renamed slots
2021-10-27 10:40:32 +02:00
Benja Appel
067f4a1914 Add default file extension configuration (#1995)
* Add default file extension configuration

* Format fix

* Implement ValueHandler for setSaveAsFileExtension

* Fix formatting issues

* Add format to properScreenshotPath call

* Fix SaveFileExtension::check

* Fix format

* Move extension layout to Save Path group
2021-10-25 19:24:46 +02:00