Using https://repology.org/metapackage/flameshot/badges it's possible for users to see what version of flameshot are available in the package ecosystem. This badge is nested in an expandable div so it doesn't overwhelm the README with its size. This commit also fixes a minor typo
FYI HTML was used instead of markdown due to the markdown not being displayed.
Some tooltips were written as imperatives ("Set foo to bar"), others
were written as simple present ("Performs foo action"). All should now
be consistently written in imperative form (unless I missed any…).
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.
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>
* 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.
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
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.
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
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.
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.
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