Commit Graph

286 Commits

Author SHA1 Message Date
iacore
dff3fe8ccd Fix: make it compile with DISABLE_UPDATE_CHECKER (#3294) 2023-08-20 22:42:07 +02:00
L Batalha
694adbbc84 size indicator: fix disabling, refactor, improve performance (#3059) 2023-08-20 22:39:57 +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
Joshua-cla
685d0ee84b Snap to grid (#3016)
* Add widget to side panel

* Draw grid

* snap tool to grid

* Update french translation

* Format code with clang-format

Co-authored-by: joshua <joshua@qelectrotech.org>
2022-12-20 18:54:31 +01:00
Dhruv Maroo
e9cd132a0e Add spin box to display the tool size value in the side panel (#2932) 2022-10-05 09:10:47 -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
El Thoro
2eef14a14d Fix OpenWith on Windows (#1309) (#2801)
* Fix OpenWith on Windows (#1309)

* Clang-format and function name fix

* Clang-format
2022-10-02 08:11:08 -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
dsticks
57c8e8d893 Capture tool button looks at copy on double-click config setting and … (#2806)
* Capture tool button looks at copy on double-click config setting and sets button description accordingly.

* Ran clang-format on capturetoolbutton.cpp for code formatting.
2022-07-18 18:30:33 -05:00
wd5gnr
caf90215b4 Fixes --region to respect display scaling (#2788) 2022-07-17 10:23:25 -05:00
borgmanJeremy
d4b39c2aaa Swap size widget arguments to match --region (#2782) 2022-07-11 20:31:43 -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
wd5gnr
e68183451e Add integrated WXH display and options (#2766) 2022-07-10 13:55:40 -05:00
borgmanJeremy
e319beff62 Fix magnify windows (#2746)
* Fixed issue with magnifier on windows where screen numbers were not monotonically increasing

* clang format

* fixed dos line endings

* remove qt debug
2022-07-02 13:06:41 -05:00
borgmanJeremy
de5241dd4e Fix size not appearing on size tool when started from launcher (#2734)
* Fix size not appearing on size tool when started from launcher

* clang format
2022-06-29 19:22:13 -05:00
Alaskra
44b19a90e1 fix issue about externalWidget launchapp (#2698) 2022-06-29 17:59:57 -05:00
borgmanJeremy
37c4ab4f2a Revert "Another way to fix Launchapp unexpectly close (#2675)" (#2691)
This reverts commit adb58e247b.
2022-06-20 09:13:45 -05:00
Alaskra
adb58e247b Another way to fix Launchapp unexpectly close (#2675)
* fix unexpected close when launch external app

* update

* another way to fix launchapp crash

* format
2022-06-18 09:18:59 -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
Haris Gušić
98c1b029e3 Fix CloseOnLastWindow caused by tool change (#2645)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2022-06-03 12:27:54 -05:00
vozdeckyl
7a57268ca3 Dev bubble pointers (#2638)
* adding a simple line as a test

* replacing line with pointer

* remove commented out lines

* code format

* fixed the 'QPainterPath path' error

* make pointers more pointy

* comment and variable name

Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
2022-06-01 19:29:25 -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
Haris Gušić
0116740e54 Fix selection offset (#2630)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2022-05-31 09:56:52 -05:00
borgmanJeremy
9763513a25 Added the ability to define a region for a screen shot in the launcher (#2208) 2022-05-03 19:43:52 -05:00
Haris Gušić
03af9d807c Remove extra timer shots when moving selection with keyboard (#2545)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2022-04-13 19:54:35 -05:00
borgmanJeremy
e1b55d310f fix another issue with slider (#2533) 2022-04-07 10:30:51 -05:00
borgmanJeremy
50db18451c Fix sidebar slider not resizing (#2530) 2022-04-07 08:04:32 -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
a6144df367 Fix alignment bug and applied many clang format warnings (#2448)
* Fix alignment bug and applied many clang format warnings

* removed nodiscard from slot
2022-02-23 06:33:58 -06:00
borgmanJeremy
aa6b5eac93 allow final actions when printing geometry (#2444) 2022-02-18 12:30:10 -06:00
borgmanJeremy
424b7fba37 applied some clang modernize (#2435) 2022-02-16 21:15:25 -06: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
bcb4041e0e allow numpad numers to resize and fix text artifacting on large resize (#2386) 2022-02-07 08:19:43 -06:00
borgmanJeremy
74db680505 fix bug on macos with save dialog (#2379)
* fix bug on macos with save dialog

* refactored Saver to not be a class since there are no member variables

* removed useless comment
2022-02-06 17:51:51 -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
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
Andrea
4affa92b91 Fixed crash selecting texttool (#2369) 2022-02-05 09:12:01 -06:00
borgmanJeremy
42917930ca Upload history UI (#2345)
* Refactored upload history widget to use qt ui files. Cleaned up clang
tidy warnings. Remove copied to clipboard notified.

* fixed some irregularities with the layout

* fixing forward declaration
2022-01-31 15:21:00 -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
Affir Vega
1cc5a26292 Created basic layer movement functionality (up, down) (#2108)
* Created basic layer movement functionality (up, down)

* Replaced `and` and `or` with `&&` and `||`, added constructor initialization

* Added move icons. Added that moving layers pushes state to undo stack.

* Cleaned svgs.

* Circle counter doesn't change nubmer when reordered anymore

* Changed move arrow SVGs

* Make down arrow in size with up arrow, fix white colors from #feffff to #fff

* SVGs in unitilypanel for buttons now choose color depending on color theme

* Refactor tool removing code, removed fixme, fixed bug with minimal circleCount

* Set minimal width for buttons

Co-authored-by: Feskow Vega <affirvega@krutt.org>
2022-01-29 15:32:09 -06:00
borgmanJeremy
af1b895fe2 Rewrote launcher to use a qt designer file. Removed some code related to (#2338)
dragging the launcher corner as it didnt seem to do anything. Cleaned up
clang format suggestions.
2022-01-29 12:06:34 -06:00
borgmanJeremy
3553deab9c reworked info window (#2333)
* reworked info window

* clang format
2022-01-28 13:07:26 -06:00
Haris Gušić
c13270b7e5 Fix broken colorgrabber (#2226)
* Fix broken colorgrabber on macOS

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

* Fix ColorGrabWidget on Windows

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2022-01-10 16:38:24 -06:00
Haris Gušić
883e55c52d Fix flameshot not exiting when it should (#2223)
* Remove unused methods from Controller

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

* Fix flameshot exit bug

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

* Remove unnecessary code

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

* Some more refactoring

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2022-01-04 08:02:06 -06:00
borgmanJeremy
da5d71c23c Fixed an issue where the magnifier did not account for hiDPI on retina screens (#2187) 2021-12-24 14:36:39 -06:00
borgmanJeremy
ca70be773a remove SPD logging framework in favor of abstract logger (#2178) 2021-12-21 13:33:07 -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
a9b56911f8 fix - reset the margin of the selected annotation on pin/save/copy/upload operations (#2170)
Co-authored-by: Yuriy Puchkov <yuriy.puchkov@namecheap.com>
2021-12-20 13:26:24 -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