Hello community,

here is the log from the commit of package kImageAnnotator for openSUSE:Factory 
checked in at 2020-02-28 15:21:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kImageAnnotator (Old)
 and      /work/SRC/openSUSE:Factory/.kImageAnnotator.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kImageAnnotator"

Fri Feb 28 15:21:26 2020 rev:3 rq:780176 version:0.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/kImageAnnotator/kImageAnnotator.changes  
2020-02-14 16:41:07.467711134 +0100
+++ 
/work/SRC/openSUSE:Factory/.kImageAnnotator.new.26092/kImageAnnotator.changes   
    2020-02-28 15:21:30.145912806 +0100
@@ -1,0 +2,15 @@
+Wed Feb 26 13:55:16 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 0.2.1
+  Fixes:
+  * Edit border around text box doesn't disappear when done with
+    editing.
+  * Edit border not shown under Windows when NoFillNoBorder
+    selected for Text Tool.
+  * Drawing text tool rect from right to left and bottom top create
+    no rect.
+  * Text Tool FillType selection not saved.
+  * Icons not scaled with HiDPI.
+  * Text Cursor not show on Linux.
+
+-------------------------------------------------------------------

Old:
----
  kImageAnnotator-0.2.0.tar.gz

New:
----
  kImageAnnotator-0.2.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kImageAnnotator.spec ++++++
--- /var/tmp/diff_new_pack.2YVT6s/_old  2020-02-28 15:21:30.697913930 +0100
+++ /var/tmp/diff_new_pack.2YVT6s/_new  2020-02-28 15:21:30.697913930 +0100
@@ -16,10 +16,10 @@
 #
 
 
-%define sover   0_2_0
+%define sover   0_2_1
 %define libname libkImageAnnotator%{sover}
 Name:           kImageAnnotator
-Version:        0.2.0
+Version:        0.2.1
 Release:        0
 Summary:        Tool for annotating images
 License:        GPL-2.0-or-later
@@ -28,7 +28,7 @@
 Source:         
https://github.com/DamirPorobic/kImageAnnotator/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
-BuildRequires:  kColorPicker-devel
+BuildRequires:  kColorPicker-devel >= 0.1.1
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(Qt5Test)
 BuildRequires:  pkgconfig(Qt5Widgets)

++++++ kImageAnnotator-0.2.0.tar.gz -> kImageAnnotator-0.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/CHANGELOG.md 
new/kImageAnnotator-0.2.1/CHANGELOG.md
--- old/kImageAnnotator-0.2.0/CHANGELOG.md      2020-02-09 21:01:43.000000000 
+0100
+++ new/kImageAnnotator-0.2.1/CHANGELOG.md      2020-02-21 22:51:32.000000000 
+0100
@@ -1,5 +1,14 @@
 # Change log
 
+## Release 0.2.1
+* Fixed: Edit border around text box doesn't disappear when done with editing. 
([#71](https://github.com/ksnip/kImageAnnotator/issues/71))
+* Fixed: Edit border not shown under Windows when NoFillNoBorder selected for 
Text Tool. ([#72](https://github.com/ksnip/kImageAnnotator/issues/72))
+* Fixed: When adding text with background under Windows a filled rect is show 
in top left corner. ([#73](https://github.com/ksnip/kImageAnnotator/issues/73))
+* Fixed: Drawing text tool rect from right to left and bottom top create no 
rect. ([#76](https://github.com/ksnip/kImageAnnotator/issues/76))
+* Fixed: Text Tool FillType selection not saved. 
([#75](https://github.com/ksnip/kImageAnnotator/issues/75))
+* Fixed: Icons not scaled with HiDPI. 
([#77](https://github.com/ksnip/kImageAnnotator/issues/77))
+* Fixed: Text Cursor not show on Linux. 
([#70](https://github.com/ksnip/kImageAnnotator/issues/70))
+
 ## Release 0.2.0
 * New: Add image item and interface for adding them externally. 
([#45](https://github.com/ksnip/kImageAnnotator/issues/45))
 * New: Edit text box content. 
([#51](https://github.com/ksnip/kImageAnnotator/issues/51))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/CMakeLists.txt 
new/kImageAnnotator-0.2.1/CMakeLists.txt
--- old/kImageAnnotator-0.2.0/CMakeLists.txt    2020-02-09 21:01:43.000000000 
+0100
+++ new/kImageAnnotator-0.2.1/CMakeLists.txt    2020-02-21 22:51:32.000000000 
+0100
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.5)
-project(kImageAnnotator LANGUAGES CXX VERSION 0.2.0)
+project(kImageAnnotator LANGUAGES CXX VERSION 0.2.1)
 
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -21,7 +21,7 @@
 include(GNUInstallDirs)
 include(FeatureSummary)
 
-set(KCOLORPICKER_MIN_VERSION "0.1.0")
+set(KCOLORPICKER_MIN_VERSION "0.1.1")
 find_package(kColorPicker ${KCOLORPICKER_MIN_VERSION} REQUIRED)
 
 set(BASEPATH "${CMAKE_CURRENT_SOURCE_DIR}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/README.md 
new/kImageAnnotator-0.2.1/README.md
--- old/kImageAnnotator-0.2.0/README.md 2020-02-09 21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/README.md 2020-02-21 22:51:32.000000000 +0100
@@ -1,7 +1,7 @@
 # kImageAnnotator [![Build 
Status](https://travis-ci.org/ksnip/kImageAnnotator.svg?branch=master)](https://travis-ci.org/ksnip/kImageAnnotator)
 Tool for annotating images
 
-Version 0.2.0
+Version 0.2.1
 
 
 ![kImageAnnotator](https://imgur.com/HguleRO.png "kImageAnnotator")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/CMakeLists.txt 
new/kImageAnnotator-0.2.1/src/CMakeLists.txt
--- old/kImageAnnotator-0.2.0/src/CMakeLists.txt        2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/CMakeLists.txt        2020-02-21 
22:51:32.000000000 +0100
@@ -67,6 +67,7 @@
        ${CMAKE_CURRENT_SOURCE_DIR}/annotations/misc/AnnotationContextMenu.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/annotations/misc/NumberManager.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/backend/Config.cpp
+       ${CMAKE_CURRENT_SOURCE_DIR}/common/provider/ScaledSizeProvider.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/common/helper/CursorHelper.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/common/helper/KeyHelper.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/common/helper/MathHelper.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/annotations/items/AbstractAnnotationRect.cpp 
new/kImageAnnotator-0.2.1/src/annotations/items/AbstractAnnotationRect.cpp
--- old/kImageAnnotator-0.2.0/src/annotations/items/AbstractAnnotationRect.cpp  
2020-02-09 21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/annotations/items/AbstractAnnotationRect.cpp  
2020-02-21 22:51:32.000000000 +0100
@@ -25,6 +25,7 @@
 {
        mRect = new QRectF();
        mRect->setTopLeft(startPosition);
+       mRect->setBottomRight(startPosition);
 }
 
 AbstractAnnotationRect::AbstractAnnotationRect(const AbstractAnnotationRect 
&other) : AbstractAnnotationItem(other)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/annotations/items/AnnotationText.cpp 
new/kImageAnnotator-0.2.1/src/annotations/items/AnnotationText.cpp
--- old/kImageAnnotator-0.2.0/src/annotations/items/AnnotationText.cpp  
2020-02-09 21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/annotations/items/AnnotationText.cpp  
2020-02-21 22:51:32.000000000 +0100
@@ -68,13 +68,18 @@
        // Paint border
        AbstractAnnotationRect::paint(painter, style, widget);
 
-       auto textArea = mRect->normalized();
-       if (mIsInEditMode) {
+       auto textArea = mRect->toRect();
+       if (mIsInEditMode && textArea.isValid()) {
                setupEditModeOutlinePen();
+               painter->setBrush(Qt::NoBrush);
                painter->setPen(mEditModeOutlinePen);
                painter->drawRect(textArea);
        }
 
+       // Workaround for issue #70 -> Cursor not drawn with with Qt 5.9
+       painter->setBrush(QColor(255,255,255,10));
+       painter->drawRect(*mRect);
+
        // Paint text
        painter->setPen(properties()->textColor());
        auto margin = properties()->width();
@@ -89,6 +94,7 @@
                auto blockPosition = block.position();
                auto blockLength = block.length();
                QTextLayout textLayout(block);
+               textLayout.setCacheEnabled(true);
                textLayout.setFont(textProperties()->font());
                auto blockHeight = 0;
                textLayout.setCacheEnabled(true);
@@ -109,13 +115,18 @@
 
                textLayout.draw(painter, QPoint(0, boxHeight));
 
-               if (mTextCursor.isVisible() && (mTextCursor.position() >= 
blockPosition && mTextCursor.position() < blockPosition + blockLength)) {
-                       textLayout.drawCursor(painter, QPointF(0, boxHeight), 
mTextCursor.position() - blockPosition, 1);
+               if (mTextCursor.isVisible() && isCursorInBlock(blockPosition, 
blockLength)) {
+                       textLayout.drawCursor(painter, QPointF(1, boxHeight), 
mTextCursor.position() - blockPosition, 2);
                }
                boxHeight += blockHeight;
        }
 }
 
+bool AnnotationText::isCursorInBlock(int blockPosition, int blockLength) const
+{
+       return mTextCursor.position() >= blockPosition && 
mTextCursor.position() < blockPosition + blockLength;
+}
+
 void AnnotationText::finish()
 {
        enableEditing();
@@ -136,7 +147,7 @@
 void AnnotationText::setupEditModeOutlinePen()
 {
        mEditModeOutlinePen.setColor(Qt::white);
-       mEditModeOutlinePen.setWidthF(0.5);
+       mEditModeOutlinePen.setWidthF(1);
        mEditModeOutlinePen.setStyle(Qt::DotLine);
 }
 
@@ -186,13 +197,16 @@
 void AnnotationText::adjustRect()
 {
        prepareGeometryChange();
-       auto newRect = getTextRect();
-       if (newRect.width() > mRect->width()) {
-               mRect->setWidth(newRect.width());
+       auto newRect = getTextRect().normalized();
+       auto currentRect = mRect->normalized();
+       if (newRect.width() > currentRect.width()) {
+               currentRect.setWidth(newRect.width());
        }
-       if (newRect.height() > mRect->height()) {
-               mRect->setHeight(newRect.height());
+       if (newRect.height() > currentRect.height()) {
+               currentRect.setHeight(newRect.height());
        }
+       mRect->setRect(currentRect.x(), currentRect.y(), currentRect.width(), 
currentRect.height());
+
        updateShape();
 }
 
@@ -203,10 +217,7 @@
        connect(&mKeyInputHelper, &KeyInputHelper::remove, this, 
&AnnotationText::removeText);
        connect(&mKeyInputHelper, &KeyInputHelper::paste, this, 
&AnnotationText::pasteText);
        connect(&mKeyInputHelper, &KeyInputHelper::escape, this, 
&AnnotationText::escape);
-       connect(&mTextCursor, &TextCursor::tick, [this]()
-       {
-               prepareGeometryChange();
-       });
+       connect(&mTextCursor, &TextCursor::tick, [this]() { 
prepareGeometryChange(); });
 }
 
 QRect AnnotationText::getTextRect() const
@@ -226,6 +237,7 @@
     mTextCursor.start();
     mIgnoreShortcutsFilter.apply();
     mIsInEditMode = true;
+    prepareGeometryChange();
 }
 
 void AnnotationText::disableEditing()
@@ -233,6 +245,7 @@
     mTextCursor.stop();
     mIgnoreShortcutsFilter.remove();
     mIsInEditMode = false;
+       prepareGeometryChange();
 }
 
 TextPropertiesPtr AnnotationText::textProperties() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/annotations/items/AnnotationText.h 
new/kImageAnnotator-0.2.1/src/annotations/items/AnnotationText.h
--- old/kImageAnnotator-0.2.0/src/annotations/items/AnnotationText.h    
2020-02-09 21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/annotations/items/AnnotationText.h    
2020-02-21 22:51:32.000000000 +0100
@@ -73,6 +73,7 @@
        void pasteText();
        void escape();
        void adjustRect();
+       bool isCursorInBlock(int blockPosition, int blockLength) const;
 };
 
 } // namespace kImageAnnotator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/common/provider/ScaledSizeProvider.cpp 
new/kImageAnnotator-0.2.1/src/common/provider/ScaledSizeProvider.cpp
--- old/kImageAnnotator-0.2.0/src/common/provider/ScaledSizeProvider.cpp        
1970-01-01 01:00:00.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/common/provider/ScaledSizeProvider.cpp        
2020-02-21 22:51:32.000000000 +0100
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2020 Damir Porobic <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ScaledSizeProvider.h"
+
+namespace kImageAnnotator {
+
+QSize ScaledSizeProvider::getScaledSize(const QSize &size)
+{
+       return { static_cast<int>(size.width() * getXScaleFactor()), 
static_cast<int>(size.height() * getYScaleFactor()) };
+}
+
+qreal ScaledSizeProvider::getXScaleFactor()
+{
+       auto desktopWidget = QApplication::desktop();
+       return desktopWidget->logicalDpiX() / getReferenceDpiValue();
+}
+
+int ScaledSizeProvider::getScaledWidth(int width)
+{
+       return static_cast<int>(width * getXScaleFactor());
+}
+
+qreal ScaledSizeProvider::getYScaleFactor()
+{
+       auto desktopWidget = QApplication::desktop();
+       return desktopWidget->logicalDpiY() / getReferenceDpiValue();
+}
+
+qreal ScaledSizeProvider::getReferenceDpiValue()
+{
+       return 96.0;
+}
+
+} // namespace kImageAnnotator
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/common/provider/ScaledSizeProvider.h 
new/kImageAnnotator-0.2.1/src/common/provider/ScaledSizeProvider.h
--- old/kImageAnnotator-0.2.0/src/common/provider/ScaledSizeProvider.h  
1970-01-01 01:00:00.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/common/provider/ScaledSizeProvider.h  
2020-02-21 22:51:32.000000000 +0100
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2020 Damir Porobic <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KIMAGEANNOTATOR_SCALEDSIZEPROVIDER_H
+#define KIMAGEANNOTATOR_SCALEDSIZEPROVIDER_H
+
+#include <QApplication>
+#include <QDesktopWidget>
+
+namespace kImageAnnotator {
+
+class ScaledSizeProvider
+{
+public:
+       static QSize getScaledSize(const QSize &size);
+       static int getScaledWidth(int width);
+
+private:
+       static qreal getXScaleFactor();
+       static qreal getYScaleFactor();
+       static qreal getReferenceDpiValue();
+};
+
+} // namespace kImageAnnotator
+
+#endif //KIMAGEANNOTATOR_SCALEDSIZEPROVIDER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/gui/annotator/AnnotationSettings.cpp 
new/kImageAnnotator-0.2.1/src/gui/annotator/AnnotationSettings.cpp
--- old/kImageAnnotator-0.2.0/src/gui/annotator/AnnotationSettings.cpp  
2020-02-09 21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/gui/annotator/AnnotationSettings.cpp  
2020-02-21 22:51:32.000000000 +0100
@@ -40,6 +40,7 @@
        delete mFillTypePicker;
        delete mFirstNumberPicker;
        delete mBlurRadiusPicker;
+       delete mToolLayout;
 }
 
 void AnnotationSettings::editItem(AbstractAnnotationItem *item)
@@ -52,6 +53,7 @@
 void AnnotationSettings::loadFromItem(const AbstractAnnotationItem *item)
 {
        auto properties = item->properties();
+       mWidgetConfigurator.setCurrentTool(item->toolType());
        mColorPicker->setColor(properties->color());
        mTextColorPicker->setColor(properties->textColor());
        mWidthPicker->setNumber(properties->width());
@@ -64,14 +66,13 @@
        if(blurProperties != nullptr) {
                mBlurRadiusPicker->setNumber(blurProperties->radius());
        }
-       mWidgetConfigurator.setCurrentTool(item->toolType());
 }
 
 void AnnotationSettings::activateSelectTool()
 {
        mEditExistingItem = false;
-       mToolPicker->setTool(ToolTypes::Select);
        mWidgetConfigurator.setCurrentTool(ToolTypes::Select);
+       mToolPicker->setTool(ToolTypes::Select);
 }
 
 ToolTypes AnnotationSettings::toolType() const
@@ -82,6 +83,7 @@
 void AnnotationSettings::initGui()
 {
        mMainLayout = new QVBoxLayout();
+       mToolLayout = new QHBoxLayout();
        mToolPicker = new ToolPicker();
        mColorPicker = new 
ColorPicker(IconLoader::load(QStringLiteral("color.svg")), tr("Color"));
        mWidthPicker = new 
NumberPicker(IconLoader::load(QStringLiteral("width.svg")), tr("Width"));
@@ -94,7 +96,8 @@
        mBlurRadiusPicker = new 
NumberPicker(IconLoader::load(QStringLiteral("blur.svg")), tr("Blur Radius"));
        mBlurRadiusPicker->setRange(1, 20);
 
-       mMainLayout->addWidget(mToolPicker);
+       mToolLayout->addWidget(mToolPicker);
+       mMainLayout->addLayout(mToolLayout);
        mMainLayout->addSpacing(20);
        mMainLayout->addWidget(mColorPicker);
        mMainLayout->addWidget(mWidthPicker);
@@ -134,13 +137,13 @@
 
 void AnnotationSettings::loadFromConfig(ToolTypes tool)
 {
+       mWidgetConfigurator.setCurrentTool(tool);
        mColorPicker->setColor(mConfig->toolColor(tool));
        mTextColorPicker->setColor(mConfig->toolTextColor(tool));
        mWidthPicker->setNumber(mConfig->toolWidth(tool));
        mFillTypePicker->setFillType(mConfig->toolFillType(tool));
        mFontSizePicker->setNumber(mConfig->toolFontSize(tool));
        mBlurRadiusPicker->setNumber(mConfig->blurRadius());
-       mWidgetConfigurator.setCurrentTool(tool);
 }
 
 void AnnotationSettings::toolTypeChanged(ToolTypes toolType)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/gui/annotator/AnnotationSettings.h 
new/kImageAnnotator-0.2.1/src/gui/annotator/AnnotationSettings.h
--- old/kImageAnnotator-0.2.0/src/gui/annotator/AnnotationSettings.h    
2020-02-09 21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/gui/annotator/AnnotationSettings.h    
2020-02-21 22:51:32.000000000 +0100
@@ -54,6 +54,7 @@
 
 private:
        QVBoxLayout *mMainLayout;
+       QHBoxLayout *mToolLayout;
        ToolPicker *mToolPicker;
        ColorPicker *mColorPicker;
        NumberPicker *mWidthPicker;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/gui/cropper/CropWidget.cpp 
new/kImageAnnotator-0.2.1/src/gui/cropper/CropWidget.cpp
--- old/kImageAnnotator-0.2.0/src/gui/cropper/CropWidget.cpp    2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/gui/cropper/CropWidget.cpp    2020-02-21 
22:51:32.000000000 +0100
@@ -21,10 +21,11 @@
 
 namespace kImageAnnotator {
 
-CropWidget::CropWidget(kImageAnnotator::AnnotationArea *annotationArea) : 
mAnnotationArea(annotationArea),
-                                                                          
mKeyHelper(new KeyHelper()),
-                                                                          
mCropSelectionHandler(new CropSelectionHandler(annotationArea)),
-                                                                          
mCropView(new CropView(annotationArea, mCropSelectionHandler, mKeyHelper))
+CropWidget::CropWidget(kImageAnnotator::AnnotationArea *annotationArea) :
+       mAnnotationArea(annotationArea),
+    mKeyHelper(new KeyHelper()),
+    mCropSelectionHandler(new CropSelectionHandler(annotationArea)),
+    mCropView(new CropView(annotationArea, mCropSelectionHandler, mKeyHelper))
 {
        initCropSelectionHandler();
        initKeyHelper();
@@ -81,7 +82,7 @@
 
        mPositionXLineEdit = new QLineEdit();
        mPositionXLineEdit->setValidator(new QIntValidator(0, 9999, 
mPositionXLineEdit));
-       mPositionXLineEdit->setFixedSize(40, 
mPositionXLineEdit->minimumSizeHint().height());
+       
mPositionXLineEdit->setFixedSize(ScaledSizeProvider::getScaledWidth(40), 
mPositionXLineEdit->minimumSizeHint().height());
        connect(mPositionXLineEdit, &QLineEdit::textEdited, this, 
&CropWidget::xChanged);
        mPanelLayout->addWidget(mPositionXLineEdit, 0, Qt::AlignCenter);
 
@@ -90,7 +91,7 @@
 
        mPositionYLineEdit = new QLineEdit();
        mPositionYLineEdit->setValidator(new QIntValidator(0, 9999, 
mPositionYLineEdit));
-       mPositionYLineEdit->setFixedSize(40, 
mPositionYLineEdit->minimumSizeHint().height());
+       
mPositionYLineEdit->setFixedSize(ScaledSizeProvider::getScaledWidth(40), 
mPositionYLineEdit->minimumSizeHint().height());
        connect(mPositionYLineEdit, &QLineEdit::textEdited, this, 
&CropWidget::yChanged);
        mPanelLayout->addWidget(mPositionYLineEdit, 0, Qt::AlignCenter);
 
@@ -99,7 +100,7 @@
 
        mWidthLineEdit = new QLineEdit();
        mWidthLineEdit->setValidator(new QIntValidator(0, 9999, 
mWidthLineEdit));
-       mWidthLineEdit->setFixedSize(40, 
mWidthLineEdit->minimumSizeHint().height());
+       mWidthLineEdit->setFixedSize(ScaledSizeProvider::getScaledWidth(40), 
mWidthLineEdit->minimumSizeHint().height());
        connect(mWidthLineEdit, &QLineEdit::textEdited, this, 
&CropWidget::widthChanged);
        mPanelLayout->addWidget(mWidthLineEdit, 0, Qt::AlignCenter);
 
@@ -108,7 +109,7 @@
 
        mHeightLineEdit = new QLineEdit();
        mHeightLineEdit->setValidator(new QIntValidator(0, 9999, 
mHeightLineEdit));
-       mHeightLineEdit->setFixedSize(40, 
mHeightLineEdit->minimumSizeHint().height());
+       mHeightLineEdit->setFixedSize(ScaledSizeProvider::getScaledWidth(40), 
mHeightLineEdit->minimumSizeHint().height());
        connect(mHeightLineEdit, &QLineEdit::textEdited, this, 
&CropWidget::heightChanged);
        mPanelLayout->addWidget(mHeightLineEdit, 0, Qt::AlignCenter);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/gui/cropper/CropWidget.h 
new/kImageAnnotator-0.2.1/src/gui/cropper/CropWidget.h
--- old/kImageAnnotator-0.2.0/src/gui/cropper/CropWidget.h      2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/gui/cropper/CropWidget.h      2020-02-21 
22:51:32.000000000 +0100
@@ -31,6 +31,7 @@
 #include "CropSelectionHandler.h"
 #include "src/annotations/core/AnnotationArea.h"
 #include "src/common/helper/KeyHelper.h"
+#include "src/common/provider/ScaledSizeProvider.h"
 
 namespace kImageAnnotator {
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/widgets/ColorPicker.cpp 
new/kImageAnnotator-0.2.1/src/widgets/ColorPicker.cpp
--- old/kImageAnnotator-0.2.0/src/widgets/ColorPicker.cpp       2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/ColorPicker.cpp       2020-02-21 
22:51:32.000000000 +0100
@@ -52,11 +52,11 @@
        mLayout->setContentsMargins(0, 0, 0, 0);
 
        mLabel = new QLabel();
-       mLabel->setPixmap(icon.pixmap(QSize(20, 20)));
+       
mLabel->setPixmap(icon.pixmap(ScaledSizeProvider::getScaledSize(QSize(20, 
20))));
        mLabel->setToolTip(tooltip);
 
        mkColorPicker = new KColorPicker();
-       mkColorPicker->setFixedSize(Constants::SettingsWidgetSize);
+       
mkColorPicker->setFixedSize(ScaledSizeProvider::getScaledSize(Constants::SettingsWidgetSize));
        mkColorPicker->setFocusPolicy(Qt::NoFocus);
        mkColorPicker->setToolTip(tooltip);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/widgets/ColorPicker.h 
new/kImageAnnotator-0.2.1/src/widgets/ColorPicker.h
--- old/kImageAnnotator-0.2.0/src/widgets/ColorPicker.h 2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/ColorPicker.h 2020-02-21 
22:51:32.000000000 +0100
@@ -27,6 +27,7 @@
 #include <kColorPicker/KColorPicker.h>
 
 #include "src/common/constants/Constants.h"
+#include "src/common/provider/ScaledSizeProvider.h"
 
 using kColorPicker::KColorPicker;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/widgets/CustomSpinBox.h 
new/kImageAnnotator-0.2.1/src/widgets/CustomSpinBox.h
--- old/kImageAnnotator-0.2.0/src/widgets/CustomSpinBox.h       2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/CustomSpinBox.h       2020-02-21 
22:51:32.000000000 +0100
@@ -29,7 +29,7 @@
 Q_OBJECT
 public:
        explicit CustomSpinBox(QWidget *parent = nullptr);
-       ~CustomSpinBox() = default;
+       ~CustomSpinBox() override = default;
        void setValueSilent(int value);
 
 signals:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/widgets/CustomToolButton.cpp 
new/kImageAnnotator-0.2.1/src/widgets/CustomToolButton.cpp
--- old/kImageAnnotator-0.2.0/src/widgets/CustomToolButton.cpp  2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/CustomToolButton.cpp  2020-02-21 
22:51:32.000000000 +0100
@@ -25,7 +25,7 @@
 {
        setCheckable(true);
        setAutoRaise(true);
-       setIconSize(QSize(24, 24));
+       setIconSize(ScaledSizeProvider::getScaledSize(QSize(24, 24)));
        setFocusPolicy(Qt::NoFocus);
        setPopupMode(QToolButton::DelayedPopup);
        connect(this, &CustomToolButton::triggered, this, 
&CustomToolButton::setActiveAction);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/widgets/CustomToolButton.h 
new/kImageAnnotator-0.2.1/src/widgets/CustomToolButton.h
--- old/kImageAnnotator-0.2.0/src/widgets/CustomToolButton.h    2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/CustomToolButton.h    2020-02-21 
22:51:32.000000000 +0100
@@ -23,6 +23,8 @@
 #include <QToolButton>
 #include <QAction>
 
+#include "src/common/provider/ScaledSizeProvider.h"
+
 namespace kImageAnnotator {
 
 class CustomToolButton : public QToolButton
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/widgets/CustomToolButtonAction.cpp 
new/kImageAnnotator-0.2.1/src/widgets/CustomToolButtonAction.cpp
--- old/kImageAnnotator-0.2.0/src/widgets/CustomToolButtonAction.cpp    
2020-02-09 21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/CustomToolButtonAction.cpp    
2020-02-21 22:51:32.000000000 +0100
@@ -37,7 +37,7 @@
 void CustomToolButtonAction::updateDefaultWidget()
 {
        mText->setText(toolTip());
-       mImage->setPixmap(icon().pixmap(QSize(20, 20)));
+       
mImage->setPixmap(icon().pixmap(ScaledSizeProvider::getScaledSize(QSize(20, 
20))));
        mMenuItem->setToolTip(toolTip());
 
        setDefaultWidget(mMenuItem);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kImageAnnotator-0.2.0/src/widgets/CustomToolButtonAction.h 
new/kImageAnnotator-0.2.1/src/widgets/CustomToolButtonAction.h
--- old/kImageAnnotator-0.2.0/src/widgets/CustomToolButtonAction.h      
2020-02-09 21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/CustomToolButtonAction.h      
2020-02-21 22:51:32.000000000 +0100
@@ -25,6 +25,8 @@
 #include <QHBoxLayout>
 #include <QWidget>
 
+#include "src/common/provider/ScaledSizeProvider.h"
+
 namespace kImageAnnotator {
 
 class CustomToolButtonAction : public QWidgetAction
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/widgets/FillTypePicker.cpp 
new/kImageAnnotator-0.2.1/src/widgets/FillTypePicker.cpp
--- old/kImageAnnotator-0.2.0/src/widgets/FillTypePicker.cpp    2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/FillTypePicker.cpp    2020-02-21 
22:51:32.000000000 +0100
@@ -73,15 +73,15 @@
        mLayout->setContentsMargins(0, 0, 0, 0);
 
        mLabel = new QLabel();
-       mLabel->setPixmap(icon.pixmap(QSize(20, 20)));
+       
mLabel->setPixmap(icon.pixmap(ScaledSizeProvider::getScaledSize(QSize(20, 
20))));
        mLabel->setToolTip(tooltip);
 
        mComboBox = new QComboBox(this);
 
        insertItem(FillTypes::BorderAndFill, 
QStringLiteral("fillType_borderAndFill.svg"), tr("Border and Fill"));
        insertItem(FillTypes::BorderAndNoFill, 
QStringLiteral("fillType_borderAndNoFill.svg"), tr("Border and No Fill"));
-       mComboBox->setFixedSize(Constants::SettingsWidgetSize);
-       mComboBox->setIconSize(QSize(25, 25));
+       
mComboBox->setFixedSize(ScaledSizeProvider::getScaledSize(Constants::SettingsWidgetSize));
+       mComboBox->setIconSize(ScaledSizeProvider::getScaledSize(QSize(25, 
25)));
        mComboBox->setToolTip(tooltip);
        mComboBox->setFocusPolicy(Qt::NoFocus);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/widgets/FillTypePicker.h 
new/kImageAnnotator-0.2.1/src/widgets/FillTypePicker.h
--- old/kImageAnnotator-0.2.0/src/widgets/FillTypePicker.h      2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/FillTypePicker.h      2020-02-21 
22:51:32.000000000 +0100
@@ -28,6 +28,7 @@
 #include "src/common/constants/Constants.h"
 #include "src/common/enum/FillTypes.h"
 #include "src/common/helper/IconLoader.h"
+#include "src/common/provider/ScaledSizeProvider.h"
 
 namespace kImageAnnotator {
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/widgets/NumberPicker.cpp 
new/kImageAnnotator-0.2.1/src/widgets/NumberPicker.cpp
--- old/kImageAnnotator-0.2.0/src/widgets/NumberPicker.cpp      2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/NumberPicker.cpp      2020-02-21 
22:51:32.000000000 +0100
@@ -46,11 +46,11 @@
        mLayout->setContentsMargins(0, 0, 0, 0);
 
        mLabel = new QLabel();
-       mLabel->setPixmap(icon.pixmap(QSize(20, 20)));
+       
mLabel->setPixmap(icon.pixmap(ScaledSizeProvider::getScaledSize(QSize(20, 
20))));
        mLabel->setToolTip(tooltip);
 
        mSpinBox = new CustomSpinBox(this);
-       mSpinBox->setFixedSize(Constants::SettingsWidgetSize);
+       
mSpinBox->setFixedSize(ScaledSizeProvider::getScaledSize(Constants::SettingsWidgetSize));
        mSpinBox->setMinimum(1);
        mSpinBox->setMaximum(20);
        mSpinBox->setFocusPolicy(Qt::NoFocus);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kImageAnnotator-0.2.0/src/widgets/NumberPicker.h 
new/kImageAnnotator-0.2.1/src/widgets/NumberPicker.h
--- old/kImageAnnotator-0.2.0/src/widgets/NumberPicker.h        2020-02-09 
21:01:43.000000000 +0100
+++ new/kImageAnnotator-0.2.1/src/widgets/NumberPicker.h        2020-02-21 
22:51:32.000000000 +0100
@@ -27,6 +27,7 @@
 
 #include "CustomSpinBox.h"
 #include "src/common/constants/Constants.h"
+#include "src/common/provider/ScaledSizeProvider.h"
 
 namespace kImageAnnotator {
 


Reply via email to