Commit Graph

251 Commits

Author SHA1 Message Date
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
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
ce336a6a70 Found some copy paste code and cleaned it up (#2124) 2021-11-30 10:09:55 -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
borgmanJeremy
53cc11ac58 adjusted layout of side bar to center slider (#2093) 2021-11-19 18:47: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
Clayton
f25d58b6db Allows color form elements to wrap, sets minimum width to thickness s… (#2068)
* Allows color form elements to wrap, sets minimum width to thickness slider.

* Uses named constant variable for slider width
2021-11-15 11:40:14 -06:00
Haris Gušić
6432490c31 Add --region option (#2013)
* Fix empty help message bug

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

* Add --region option

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

* Fix: initial selection even without --region

* Enable 'full --region'

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

* Enable 'screen --region'

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

* Allow negative width/height

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

* Fix screen intersection bug

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

* Change output format of --print-geometry

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-11-08 22:59:46 +01:00
Dearsh Oberoi
df5d99321a Added confirmation for Upload (#2037) 2021-11-08 13:33:50 -06:00
Sergey Zolotarev
065aa98ce4 Fix some compile warnings in macOS build (#2027)
* Fix some compile warnings in macOS build

* Update macOS Info.plist template
2021-11-01 09:59:51 +01: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
Haris Gušić
a487fb0257 Fix shortcut conflict when one is a default (#1989)
* Fix config checking on startup

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

* Handle conflicts when one shortcut is a default

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

* Fix bugs

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

* Refactor slot in ShortcutsWidget for consistency

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

* Update shortcut table on config file change

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

* Fix bounded int bug in config

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

* Revert changes manually

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

* Reimplement ConfigHandler::shortcut and setShortcut

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

* Handle Return/Numpad-Enter equivalently

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

* Re-enable user-configured Imgur upload shortcut

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

* Document copyAndCloseAfterUpload config option

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-24 16:48:30 +02:00
Haris Gušić
988dcab9de Add --pin, --upload, --accept-on-select to CLI (#1970)
* Add --pin option

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

* Add --upload option

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

* Add --accept-on-select option

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

* Fix failing build on MacOS

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

* Clean up option variable names in main

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

* Remove missing --path error

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

* Add tests for action options

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

* Fix file extension config option

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

* Fix --print-geometry bug

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

* Replace Qt::endl with "\n"

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

* Fix copy/upload task clipboard conflict

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

* Fix endless loop when using --raw and --delay

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

* Fix bug in upload handling

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

* Show dialog after upload if --clipboard is set

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

* Fix failing build on Mac and Win

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-20 11:48:54 -05:00
Mehrad Mahmoudian
94ed574f35 Minor fix and modification on selectable tests in dialogs (#1990)
* makes text of the imgur upload selectable

* fix the mouse to I shape for selectable texts
2021-10-20 12:50:07 +02:00
Haris Gušić
534f05b238 Refactor tool size handling (#1969)
* Add ConfigHandler::toolSize and setToolSize

* Refactor thickness (now toolSize) in CaptureWidget

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

* Fix update of tool size while object is drawn

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

* Rename thickness to tool size across the board

Tool size is the generic term. Depending on the selected tool,
different specialized names are used. This has always been the case
in the config.

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

* Reorder circle count tool

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

* clang-format

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-20 00:01:35 +02:00
Haris Gušić
b05b028861 Miscellaneous small fixes (#1972)
* m_captureWindow->activateWindow(), raise()

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

* Revert "m_captureWindow->activateWindow(), raise()"

This reverts commit 36320aa38a9584864a5fab32a2ce4872ff5ad072.

* screen --number: indicate 0-indexation

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

* Fix color update bug

Also refactored SidePanelWidget sigslots related to color change.

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

* Stop creating empty flameshot.conf file

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-17 17:38:16 +02:00
Haris Gušić
0854fa8b84 Change help message from static to a CaptureWidget attribute
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-12 22:25:44 +02:00
Haris Gušić
4df2447b3e Show dyanamic panel shortcut in help message
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-12 17:50:03 +02:00
Haris Gušić
5b815e83d3 Reappear help message when selection hidden
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-12 13:35:57 +02:00
Haris Gušić
0b31fcf4cb Change ColorGrabWidget overlay message
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-11 22:46:06 +02:00
Haris Gušić
6f132b77c6 Disappear OverlayMessage on select
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-11 22:46:06 +02:00
Haris Gušić
d89fe10079 Change overlay message style
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-11 22:46:00 +02:00
Haris Gušić
d17d200a28 Merge branch 'master' into capture_requests
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-11 21:11:20 +02:00
Haris Gušić
82096a6301 Fix capture launched from system tray
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-11 21:04:04 +02:00
Haris Gušić
454e8f887a Workaround for focus problem (#1958)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-10 20:27:23 -05:00
Haris Gušić
1d334d372b Disable remaining action buttons when accept is active
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-09 20:42:53 +02:00
Haris Gušić
b650231fa5 Improve tool object performance (#1954)
* Update tool object thickness in real time

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

* Fix update when drawing with modifier key

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

* Rename updateToolMousePreview to updateTool

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

* Fix update bug when changing tool size

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 15:24:27 -05:00
Haris Gušić
f0adfabd47 Fix failing builds
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 22:08:35 +02:00
Haris Gušić
1e78d74e94 Fix Enter shortcut bug
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 19:11:23 +02:00
Haris Gušić
6d29e133d3 Remove irrelevant shortcut descriptions
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 19:11:22 +02:00
Haris Gušić
1f2afebaa5 Add standardized OverlayMessage
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 19:11:22 +02:00
Haris Gušić
f2c5641046 Remove irrelevant buttons
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 19:11:22 +02:00
Haris Gušić
d39737fd46 Refactor CaptureTool::pressed and derivatives
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 19:11:22 +02:00
Haris Gušić
60d2d8c33d Stop special treatment of some buttons
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 19:11:22 +02:00
Haris Gušić
85352ff72f Add accept button to CaptureWidget
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 19:11:22 +02:00
Haris Gušić
a96c3302e9 Add accept tool
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-10-08 19:11:22 +02:00