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>
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
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
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.
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.
This will make easier to see and edit colors in the settings file.
The format is defined by QColor::HexRgb
Fixes#142https://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
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.
If the user presses the Cancel button using the QFileDialog::getSaveFileName() modal file dialog, it will return null string.
Adding this condition will prevent to show an error when trying to write to disk using an invalid filename.
closes#11
Add an initial version of the text tool.
This commit adds:
- Basic text tool.
- On demand thickness and color update.
- Generalized logic for future widget based tools.