NC/Number of fixes, details in commits (#1620)

* fix - General Configuration widget has big spaces between last few options

(cherry picked from commit 48b9135a8d654a388fd4d0a266e9097456d00ab7)

* Set limit for Latest Uploads Max Size to 50

(cherry picked from commit ef1d83529c5e33ec3819820f3231e5c503aebf61)

* Completely reworked undo/redo stack with fixes (object that was created after deleted one disappears when undo last object creating and deleting the first one and try to undo deletion)

(cherry picked from commit 8d8c0b0d4a5ba8ecd7dc1c367c220642975c95d1)

* - Save font on new text object creation
- Remove unused variable context.circleCount

(cherry picked from commit 26f7bf620849c68062838d503f8731feea8d4987)

* Code refactoring - remove unused m_context.widgetDimensions

(cherry picked from commit 76abc09ce07a71ae42f1826a5a1e1e35902960d5)

* Make font size other tools thickness independent

(cherry picked from commit 5633799fb07acaa50cae5373953e40fa85f700bc)

* fix - Font parameters doesn't disappear in panel on click text item in it

(cherry picked from commit 8322cbb1acae75c77d4c24b74bc366ba93497d46)

* fix - Save thickness if no tool selected

(cherry picked from commit 862f2f4806a0c8d1309daae6a3371f6bd2fc5e5c)

* fix - Line thickness has not required padding after saving configuration, code refactoring remove number of unused '#define PADDING_VALUE'

(cherry picked from commit 294c89ad4fc9d1230942f8b7aa0a13deff7ab1eb)

Co-authored-by: Yuriy Puchkov <yuriy.puchkov@namecheap.com>
This commit is contained in:
Yurii Puchkov
2021-05-14 20:47:36 +03:00
committed by GitHub
parent b07028cb9b
commit 5213aaf21c
20 changed files with 172 additions and 131 deletions

View File

@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
#include "texttool.h"
#include "src/utils/confighandler.h"
#include "textconfig.h"
#include "textwidget.h"
@@ -11,7 +12,12 @@
TextTool::TextTool(QObject* parent)
: CaptureTool(parent)
, m_size(1)
{}
{
QString fontFamily = ConfigHandler().fontFamily();
if (!fontFamily.isEmpty()) {
m_font.setFamily(ConfigHandler().fontFamily());
}
}
TextTool::~TextTool()
{
@@ -253,6 +259,9 @@ void TextTool::updateText(const QString& s)
void TextTool::updateFamily(const QString& s)
{
m_font.setFamily(s);
if (m_textOld.isEmpty()) {
ConfigHandler().setFontFamily(m_font.family());
}
if (m_widget) {
m_widget->setFont(m_font);
}