Commit Graph

1424 Commits

Author SHA1 Message Date
Haris Gušić
9147d4ea03 Implement tool thickness via keyboard (#1882)
* Implement changing tool size by keyboard

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

* Fix very poor performance when changing thickness

* Make thickness get saved to config

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-09-11 12:57:43 -05:00
Yurii Puchkov
23cf19308b The "copy to clipboard" button keeps the margin of the selected annotation #1879 (#1881)
Co-authored-by: Yuriy Puchkov <yuriy.puchkov@namecheap.com>
2021-09-11 12:55:13 -05:00
Haris Gušić
accfeee022 Fix debug option for capture mode (#1884)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-09-11 12:54:38 -05:00
Haris Gušić
d8d428f568 Move TYPE_INVERT to bottom of enum (#1880)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-09-10 09:04:47 -05:00
James Tai
ec70df1067 Fix edit buttons appearing inside selection (#1856)
* Fix edit buttons appearing inside selection

* Reformat files
2021-09-01 06:48:19 -05:00
crackcat
df20c7ec8f Add a tool to take an inverted screenshot (#1849)
* Add invert tool to build commands

* Add icons for invert tool

* Integrate invert tool

* Add shortcut for invert tool

* Add invert tool

* Add translation for invert tool

* Run clang-format

* Update tool to invert a region instead of everything

* Update shortcut for invert tool

* Update button order of inverter and counter

* Update translations for invert tool

* Run clang-format

* Revert "Update translations for invert tool"

This reverts commit c1fd5a162be6c64b26790d53eab3749b3a124bcf.

* Revert "Add translation for invert tool"

This reverts commit b0c1da5f36e844fa8b5f1492f5f507d85bb7aa7b.

* Update drawSearchArea to match pixelate

* Update invert icon to one from Material Design

Co-authored-by: crackcat <>
2021-09-01 06:45:20 -05:00
Haris Gušić
29c7a5f781 Fix selection bug introduced in ac3e9189 (#1860)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-31 15:00:58 -05:00
Haris Gušić
e4f067b86d Fix wrong default config export path (#1848)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-30 11:11:52 -05:00
Haris Gušić
d54a515574 Make CLI and GUI version info match (#1853)
`flameshot --version` now includes the git commit hash, same as the
About window.

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-30 08:39:59 -05:00
Ahmed Zetao Yang
69a43fb791 fix: rpm spec file adjustments (#1851)
* fix bogus date in %changelog
* add check for metainfo & desktop
2021-08-30 08:39:17 -05:00
Karl Horky
b779752841 Add macOS + Windows global hotkeys (#1845)
Closes https://github.com/flameshot-org/flameshot/issues/1593
2021-08-30 08:38:47 -05:00
Haris Gušić
b4c6778a56 Fall back to default shortcuts (#1843)
* Fall back to default keyboard shortcuts

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

* Add missing shortcuts and clean up

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

* Remove obsolete method ConfigHandler::shortcuts

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-24 12:57:22 -05:00
Soc Virnyl S. Estela
4b26b28493 Update docs on wlroots based Wayland compositors (#1832)
* Update docs on wlroots based Wayland compositors

* Add note about clipboard bugs
2021-08-24 10:29:20 -05:00
Haris Gušić
ac3e918960 Some tweaks to the capture GUI (#1841)
* Don't show buttons if selection is inactive

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

* Move tool creates new selection if not visible

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

* Make thickness adjustment methods uniform

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

* Hide  cursor while changing thickness

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-24 10:28:48 -05:00
Haris Gušić
22c9ea1f47 Do not interpret empty --path as current dir (#1838)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-24 10:27:44 -05:00
Haris Gušić
41ca51bc10 Improve screenshot path handling (#1815)
* Make --path work correctly with relative paths

Relative paths are taken relative to the working directory of the calling
command, not relative to the daemon's working directory.

* Allow file paths in --path and refactor

* Remove some redundancy

These actions are already performed in the respective functions in
FlameshotDBusAdapter.

* Tweak --path error checker a bit more

* Rework FileNameHandler and update references

The class now has a much simpler interface.

- Screenshot paths are now universally determined by the function
  properScreenshotPath
- Some unreferenced methods have been removed
- The documentation of properScreenshotPath documents the changes well.

* Add crude tests for --path

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>

* Add a test for invalid path

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

* Make tests clearer

Thanks to @mmahmoudian for his review and contribution.

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

* Fix bug in properScreenshotPath

Auto-numeration did not work when the screenshot was automatically
saved when copied to clipboard.

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

* Fall back to default pictures location

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

* Revert "Remove some redundancy"

This was not redundancy. I had actually introduced a bug with this.

This reverts commit 011ef737564892e494518443e6b80ccf3d286ae1.

* Change default path only on interactive save

Previously, the default save path was changed every time a screenshot
was saved. Now, that only happens when it gets saved from the GUI.

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

* Change --path help text

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

* Allow other image formats

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-20 13:10:12 -05:00
Haris Gušić
584bcd7f6c Add --clipboard to gui subcommand (#1829)
* Add --clipboard to gui subcommand

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

* Prevent duplicate notification

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-20 13:09:06 -05:00
Ahmed Zetao Yang
39afd66650 chore(CI): update linux distrubitions (#1825)
* feat(CI): build packages for debian 11

* chore(CI): update linux distrubitions

* remove fedora 32
2021-08-19 16:09:55 -05:00
Haris Gušić
2f08798072 Show shortcuts in CaptureToolButton tooltips (#1811)
* Show shortcuts in CaptureToolButton tooltips

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

* Change size indicator tooltip to reduce ambiguity
2021-08-08 12:58:19 -05:00
Haris Gušić
908d918716 Refactor code related to CaptureWidget (#1801)
* Make CaptureWidget::initShortcuts uniform

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

* Disable window flags in debug builds

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

* Remove pointer in extendedRect parameter

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

* Move color initialization to the constructor

* Rename updateButtons to initButtons

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

* Rename handleButtonSignal to handleToolSignal

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

* Remove useless code in pixmap()

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

* Remove obsolete comment

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

* Move processTool definition inline

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

* Merge painter, aliasing and process into a function

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

* Fix inconsistent (non)usage of emit

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

* Rename nameID to type

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

* Remove some redundancy in confighandler.cpp

- In `getButtons`: instead of re-adding all the buttons manually, now
  the buttons are taken from
  `CaptureToolButton::getIterableButtonTypes()` and those we want
  unchecked are removed.
- Changed some parts to use `fromButtonToInt` instead of re-implementing
  it inline each time

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

* Revert "Disable window flags in debug builds"

This reverts commit 2adb583359bc0a1fd2d335f2d0e88299a4d1dd65.

* Disable window flags in debug builds

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-08 12:57:40 -05:00
Haris Gušić
a117464862 Minor improvements to app launcher (#1806)
* Pressing escape closes AppLauncherWidget

* Activate external widget

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

* clang-format

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-07 09:39:18 -05:00
Weblate (bot)
af14acd75a Translations update from Weblate (#1802)
* Translated using Weblate (Spanish)

Currently translated at 45.8% (121 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/es/

* Translated using Weblate (French)

Currently translated at 83.7% (221 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fr/

* Translated using Weblate (Persian)

Currently translated at 78.7% (208 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 78.7% (208 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 82.9% (219 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 82.9% (219 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 89.0% (235 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 89.0% (235 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 92.0% (243 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 92.0% (243 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 93.9% (248 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Persian)

Currently translated at 93.9% (248 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

* Translated using Weblate (Italian)

Currently translated at 100.0% (264 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/it/

* Translated using Weblate (Hebrew)

Currently translated at 88.2% (233 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/he/

* Translated using Weblate (Persian)

Currently translated at 100.0% (264 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

Co-authored-by: borgman.jeremy <borgman.jeremy@pm.me>
Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
Co-authored-by: Eshagh Shahedany <eshagh094@gmail.com>
Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
Co-authored-by: Avi Markovitz <avi.markovitz@gmail.com>
2021-08-07 09:27:19 -05:00
Haris Gušić
1c4f3bdb39 Enable shortcuts with buttons invisible (#1580) (#1800)
* Make `ShortcutsWidget` load all shortcuts

`ShortcutsWidget" now loads shortcuts for all capture widgets,
regardless of enabled state in 'Interface settings'.

Also removed unnecessary indirection which made the API confusing:

- Removed `ConfigHandler::setShortcutsDefault` which was only called
  once on a temporary `ConfigHandler` and hence had no effect

- Removed function `ConfigHandler::shortcuts`

- `ShortcutsWidget` now calls `ConfigShortcuts::captureShortcutsDefault`
  directly instead of through `ConfigHandler::shortcuts`

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

* Enable shortcuts for hidden buttons

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

* Fix crash if ButtonHandler has no buttons

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

* obligatory clang-format

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-04 11:03:19 -05:00
Jeremy Borgman
852b8c3fb7 resolved weblate merge conflict 2021-08-03 20:46:49 -05:00
Ivan
04cfab4f4d fix: Code typo (#1799) 2021-08-03 20:41:23 -05:00
Eshagh Shahedany
4ec01f1ed8 Translated using Weblate (Persian)
Currently translated at 73.8% (195 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/
2021-08-03 07:33:44 +02:00
Haris Gušić
b2ecb70e38 Fix checkboxes in General Config (#1543) (#1793)
* GeneralConf.cpp: Remove redundant initializations

Removed unnecessary setChecked and setValue calls in init* methods which
get called inside updateComponents anyway. Also added missing function
calls in updateComponents. This has exposed more bugs.

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

* Merge updateComponents and setActualFormData

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

* Fix useJpgForClipboard checkbox

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

* Fix crash when 'Automatic updates' is checked

The config window used to crash when 'Automatic updates' check box was
interacted with, if the application started with the system tray
disabled.

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

* Some cleanup

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-02 08:56:09 -05:00
Haris Gušić
2608d1ecc0 Fix issue #1794 (#1795)
Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-08-02 08:00:27 -05:00
Weblate (bot)
5d1a636e85 Translations update from Weblate (#1792)
* Added translation using Weblate (Persian)

* Translated using Weblate (Persian)

Currently translated at 7.9% (21 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/

Co-authored-by: Eshagh Shahedany <eshagh094@gmail.com>
2021-08-01 10:13:07 -05:00
borgmanJeremy
bf8804d0e8 Remove imgur image title (#1791) 2021-07-31 15:04:02 -05:00
borgmanJeremy
3cad8084c7 Allow saving to any supported image format (#1790) 2021-07-31 15:03:49 -05:00
Eshagh Shahedany
1b388be0b6 Translated using Weblate (Persian)
Currently translated at 7.9% (21 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/fa/
2021-07-31 21:48:12 +02:00
Eshagh Shahedany
3d5076ced8 Added translation using Weblate (Persian) 2021-07-31 21:48:12 +02:00
borgmanJeremy
58248c9776 Added button to config menu to allow users to copy system version info. (#1756) 2021-07-31 09:41:06 -05:00
Haris Gušić
8ba06b7292 Fix #1697 and #1726 (#1782)
* Fix #1697 and #1726

Changed ConfigWindow to inherit QWidget and moved QTabWidget to be an
attribute. setMinimumSize is no longer necessary in ConfigWindow.

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

* Create scroll area around checkboxes

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

* Do not truncate tab bar anymore

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

* Set parent widget to prevent a memory leak

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
2021-07-30 20:56:00 -05:00
Weblate (bot)
216d2a13a5 Translated using Weblate (Galician) (#1788)
Currently translated at 40.9% (108 of 264 strings)

Translation: Flameshot/Flameshot
Translate-URL: https://hosted.weblate.org/projects/flameshot/flameshot/gl/

Co-authored-by: gbrea <guilhe_gz@hotmail.com>
2021-07-30 20:02:04 -05:00
Weblate (bot)
a46c3b7da9 Translations update from Weblate (#1787) 2021-07-29 16:54:07 -05:00
John Jago
f1975be102 fix: link to issue reporting (#1779)
The page must have been moved because the previous link is 404. I replaced the
link with the correct one.
2021-07-29 08:33:45 -05:00
Chua Hou
fbfad24a65 Fix save file name with '.'s in it (#1773)
Using QFileInfo::baseName() discards everything after the first ., so
filenames like 1.2.3.4.png would be changed to 1.png. (See #1722).

Changing this to QFileInfo::completeBaseName() only discards the suffix,
so we have 1.2.3.4.jpg becoming 1.2.3.4.png, for example.
2021-07-29 08:10:35 -05:00
Vitaly Zaitsev
1031980ed1 Automatically set the correct path to the Flameshot executable (#1775)
* Automatically set the correct path to the Flameshot executable.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>

* Export CMake project settings.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>

* Fixed AppImage and Snap builds.
2021-07-29 08:09:31 -05:00
Boyuan Yang
920f2c92de desktop: Specify StartupWMClass (#1763)
Specifying correct StartupWMClass could prevent duplicated icons from
appearing on GNOME platform.
2021-07-29 08:08:27 -05:00
Vitaly Zaitsev
0b56f96573 Use Qt native version string comparansion. (#1776)
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
2021-07-29 08:08:02 -05:00
Jeremy Borgman
4e406ec80f prepare for v0.10.1 release 2021-07-25 10:31:43 -05:00
borgmanJeremy
0cc91b20f1 Remove imgur hotkey (#1753) 2021-07-25 08:22:58 -05:00
borgmanJeremy
4c9a7c66a4 Changed upload hotkey from Enter to CTRL+U (#1747) 2021-07-24 07:58:43 -05:00
Ferenc Papp
cb19fce355 Update Internationalization_hu.ts (#1724) 2021-07-23 18:15:40 -05:00
Mehrad Mahmoudian
eff6757b37 Fix the FAQ URL in README (#1744) 2021-07-23 18:06:54 -05:00
Boyuan Yang
fbada715af Fix nullptr reference when trayicon is disabled (#1742) 2021-07-22 18:55:57 -05:00
Ahmed Zetao Yang
f0e4349288 fix(CI): build appimage in container (#1729) 2021-07-21 10:09:00 -05:00
Chua Hou
1f8573e913 Fix broken FAQ link in bug report template (#1731) 2021-07-21 07:16:25 -05:00