Commit Graph

489 Commits

Author SHA1 Message Date
lupoDharkael
415b059fb2 Fix #311
Flameshot was unable to start new captures after saving with
    Ctrl+s while having a text area active from the Text tool.
    This was caused by the overloaded call to close() which
    was deleting the text area instead of closing the capture
    and the consequent call of the destructor. That caused an
    always active capture session.
2018-09-13 15:35:49 +02:00
SeedPuller
07fe16f8b3 Update README.md (#343) 2018-09-11 00:13:33 +02:00
Carlos Hernandez
936d935864 Update snap files (#340)
* Update snap files and sync with deb

* Change snap grade to devel
2018-09-07 01:44:44 +02:00
Alfredo Ramos
dd24ca0eeb README cleanup (#339) 2018-09-05 22:53:56 +02:00
Dharkael
1d7186a2f0 Fix icon in README 2018-08-20 17:04:52 +02:00
Ahmed Zetao Yang
aee5c03ae7 Some improvements (#320)
* Remove surplus '-'

* Move logo to center position & add some badges
2018-08-20 16:55:12 +02:00
Boyuan Yang
2c0ec850f3 flameshot.svg: Use more strict grammar to fix preview on GitHub (#319) 2018-08-20 16:54:40 +02:00
Boyuan Yang
36c62f6e81 infowindow: Pop up infowindow at screen center (#318)
Currently info window will pop up at the topleft corner of the screen,
which is rather bothering. This patch will move the window to
screen center when popped up.

Since QGuiApplication::ScreenAt() is introduced since Qt 5.10, the
code will only take effect when compiled against Qt >= 5.10.

Signed-off-by: Boyuan Yang <073plan@gmail.com>
2018-08-19 18:33:00 +02:00
Ahmed Zetao Yang
52d9815450 Some Fixes for updating to v0.6.0 (#317)
* Fix name specification of packages

* Update rpm .spec file

* Update to v0.6.0
2018-08-18 17:04:40 +02:00
Dharkael
7643e53615 Update issue templates 2018-08-17 16:45:18 +02:00
lupoDharkael
106488b00a Update to v0.6 2018-08-17 14:17:40 +02:00
Boyuan Yang
0f2ae9fab6 flameshot.pro: Install icons into $prefix/share/icons/hicolor/ instead of $prefix/share/pixmaps (#309)
* flameshot.pro: Install SVG icon into $prefix/share/icons/hicolor/scalable/apps instead of $prefix/share/pixmaps

While #293 somehow solves the icon problem, it is not the best solution.
According to Freedesktop.org Icon Theme Specification
(https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html):

    Directory Layout

    [...]
    By default, apps should look in $HOME/.icons (for backwards compatibility),
    in $XDG_DATA_DIRS/icons and in /usr/share/pixmaps (in that order).
    [...]
    In order to have a place for third party applications to install their icons
    there should always exist a theme called "hicolor".

While using /pixmaps/ directory ensures the least priority in search
icons, the directory name itself "pixmaps" does not suite our actual
situation (provided that "flameshot.svg" is a scalable icon, not a *pixmap*).
I suggest that we place this icon into the "hicolor" theme (aka fallback theme)
in /icons/ directory under "scalable/apps/" subdirectory.

Proposed changes:

  1. Install flameshot.svg under
     $prefix/share/icons/hicolor/scalable/apps/
     instad of
     $prefix/share/pixmaps/ .

  2. Rename qmake "icon" target into "appsvgicon" target so that the
     name "icon" may still be used in the future for other tasks.

  3. The embedded rpm spec file is updated accordingly.

Signed-off-by: Boyuan Yang <073plan@gmail.com>

* img/app/flameshot.png: Use 128x128 size instead of 100x100

Converted using inkscape:

inkscape -z -e flameshot.png -w 128 -h 128 flameshot.svg

* img: Add hicolor subdir for installation under /usr/share/icons/hicolor/*

* flameshot.pro: Use wildcard to install hicolor icon dir

The embedded rpm spec file is updated too.
2018-08-12 12:05:36 +02:00
Jiachen Yang
59d88dd2de fix auto locale detection (#308)
Current implementation QLocale::system.language() will not correctly
differs Simplified Chinese with Traditional Chinese, which is causing
problems to load translations for zh_TW. This fix the problem by
following the documentation here:
https://doc.qt.io/qt-5/qtranslator.html#load-1
2018-08-12 11:39:42 +02:00
Boyuan Yang
8d782c2c47 appdata: Minor tweak on project_license line (Fix AppStream warning) (#310)
From https://appstream.debian.org/sid/main/issues/flameshot.html :

* metainfo-validation-issue
Validation of the metainfo file found a problem:
SPDX license ID 'GPLv3+' is unknown.

According to https://spdx.org/licenses/ , the correct identifier
for GPLv3+ is "GPL-3.0-or-later" now. This commit would make
that replacement.

Signed-off-by: Boyuan Yang <073plan@gmail.com>
2018-08-12 11:39:18 +02:00
Alfredo Ramos
b0000f8dcd Retry the commands if they timeout (#306) 2018-08-11 20:27:57 +02:00
Peter Cai
ae9d18ce9e blur: fix HiDPI awareness (#305)
When copying from a QPixmap, the rectangle area should be scaled according to `devicePixelRatio`.

This fixes #300.
2018-08-11 11:44:32 +02:00
Ahmed Zetao Yang
c980df1589 Update travis ci (#304)
Ubuntu 18.04 & Fedora 28 support
2018-08-10 11:32:37 +02:00
orschiro
27be72f81a Added French translation (#301) 2018-08-07 17:34:42 +02:00
Alfredo Ramos
046170d970 Upload packages only after a successful build (#294)
This reduces build time but this change was primarily made to place the commands to its right place.

This also did a small fix in the travis/linux_script.sh file to use paths defined in variables instead of using the hard-coded ones.
2018-07-31 10:55:39 +02:00
Alfredo Ramos
104e51d294 Change icon path (#293)
It now installs the image in any of the following paths, depending if CONFIG+=packaging was set in the qmake command.

/usr/local/share/pixmaps/
/usr/share/pixmaps

* Fix path for RPM packages
2018-07-31 10:54:36 +02:00
Alfredo Ramos
25790dbda8 Remove unneeded BASEDIR variable (#292)
qmake already generates a INSTALL_ROOT variable that can be used to
install in a custom directory.
2018-07-30 21:46:48 +02:00
Alfredo Ramos
7ba02666d1 Fix most of the issues reported by cppcheck (#290) 2018-07-29 00:17:50 +02:00
Alfredo Ramos
228c4f15e5 Use absolute locations in translation files (#288)
They provide context when using Qt Liguist, as it shows the source code where it is being used.

Also replaced QT (capital T) with Qt, as the latter is the correct name.
2018-07-28 00:03:02 +02:00
Boyuan Yang
fd99234bba README.md: Add info about flameshot in Debian 9 (#287) 2018-07-27 12:15:32 +02:00
Alfredo Ramos
d09580b873 Optimize and use SVG images where possible (#281)
SVG images have been optimized with svgo, this will slightly reduce package size though the main reason for this was to remove unneeded markup.

Image paths have been changed and merged, now the directory tree looks like this:

img
├── app
├── material
│   ├── black
│   └── white
└── preview

The reason to merge the paths is to avoid duplicate files for buttons and configuration.

SVG icons are used by default now, PNG images have not been deleted from the images directory, but they were deleted from the graphics.qrc resource file.

All image paths were updated accordingly, except in the tray icon, I could not make it work using the SVG image.
2018-07-24 00:43:01 +02:00
Alfredo Ramos
9748ae015e Fix image file saving (#279)
This change ensures that the file name contains the PNG extension.

Currently the screenshots are saved as PNG only, so this only checks if the absolute path contains .png, it does not check the file suffix (QFileInfo).

Fixes #278
2018-07-23 11:15:39 +02:00
Peter Cai
21670e3344 screengrabber: fix devicePixelRatio detection (#277) 2018-07-22 15:30:52 +02:00
Aylinux
1f6ac475c7 Update Internationalization_tr.ts (#276) 2018-07-21 01:31:29 +02:00
Alfredo Ramos
b301880872 Update Spanish translation and cleanup (#268)
* Fix TextTool warning

It throws the following warning:

src/tools/text/texttool.cpp:50: Class TextTool lacks Q_OBJECT macro

* Add missing translations

* Remove obsolete translations

lupdate -no-obsolete flameshot.pro
2018-07-07 22:37:32 +02:00
Boyuan Yang
ecdd3b2e45 Fix typo; Refresh translation; Update zh-CN translation (#267)
* Fix typos found by codespell

* redotool: Mark description string as translatable

* Refresh translation; Update zh_CN translation again
2018-07-07 14:23:24 +02:00
Danilo Egêa Gondolfo
df3958e43a Use defined(Q_OS_LINUX) || defined(Q_OS_UNIX) where applicable to support BSD OSs. (#264) 2018-07-01 13:45:49 +02:00
Alfredo Ramos
c75c9aa7f8 Set keyboard shortcuts to read-only (#261)
Currently keyboard shortcuts cannot be changed, double clicking a cell in the Information window only changes the text, not the shortcut.

This could help to avoid user confusion, and should be reverted once the application adds an option to change keyboard shortcuts.
2018-06-29 16:23:14 +02:00
Alfredo Ramos
979f7f6546 Minor fixes in Travis CI tests (#262)
chmod command should be executed before any other script in the travis directory
2018-06-29 16:15:32 +02:00
lupoDharkael
b0326bcb6c Update Spanish translation 2018-06-26 18:23:22 +02:00
Alfredo Ramos
2efc082599 Remove hard-coded Imgur client_id (#253)
This will allow users to set their own Imgur client_id passing the IMGUR_CLIENT_ID variable to qmake.

If the users does not set this variable, it will fallback to the default value.
2018-06-15 00:14:26 +02:00
Daniel Napora
2ef3ea8f0d Polish translation update (#248) 2018-06-15 00:11:05 +02:00
Giuseppe Burtini
a0616fa970 Fix typo (#250)
http://www.dictionary.com/browse/selection
2018-06-10 22:26:28 +02:00
Alfredo Ramos
a56a58aea9 Store settings colors in hexadecimal format (#243)
This will make easier to see and edit colors in the settings file.

The format is defined by QColor::HexRgb

Fixes #142

https://doc.qt.io/qt-5/qcolor.html#NameFormat-enum

* Add config colors validation

If the user adds an invalid hexadecimal colors, defined default colors will be used instead
2018-06-07 14:23:41 +02:00
Alfredo Ramos
dfef8347e0 Travis CI tests improvements (#236) 2018-06-04 16:06:56 +02:00
Boyuan Yang
e5c028ad29 translations: Update zh_CN translation (#237) 2018-06-01 12:01:15 +02:00
Alfredo Ramos
e271014253 Fix README.md (#235) 2018-06-01 10:49:40 +02:00
lupoDharkael
0481c7cc9d Fix initial index in font family combo box 2018-05-28 19:22:24 +02:00
lupoDharkael
c5498ff385 Integrate Pin widget with user defined colors 2018-05-26 18:55:05 +02:00
lupoDharkael
49227fac43 Solve cppcheck warnings 2018-05-26 18:38:06 +02:00
lupoDharkael
dcaa2e321f Add text configuration in panel 2018-05-26 17:59:44 +02:00
lupoDharkael
cf7066a33e Add cancel information in grab color button 2018-05-23 12:55:26 +02:00
Dharkael
6ab7321dc2 Update release.md 2018-05-23 12:50:34 +02:00
lupoDharkael
33377d50d5 Toggle panel with Space while grabbing a color 2018-05-19 00:55:11 +02:00
lupoDharkael
a8bb555c12 Fix negative selection geometry bug
normalize only swaps the sides if width() or height() is < 0,
but we need it to happen when it is <=0 because with QRect's
normalized method we get negative geometry and that causes a bug
when we position the buttons.
2018-05-17 22:14:02 +02:00
lupoDharkael
12faddff8b Revert: Prevent alt+tab from stealing keyboard
Using grabKeyboard() is not a good solution as it breaks
the text tool and causes other problems.
2018-05-17 20:56:13 +02:00