Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kColorPicker for openSUSE:Factory 
checked in at 2021-03-19 16:40:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kColorPicker (Old)
 and      /work/SRC/openSUSE:Factory/.kColorPicker.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kColorPicker"

Fri Mar 19 16:40:43 2021 rev:4 rq:879689 version:0.1.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/kColorPicker/kColorPicker.changes        
2020-06-21 18:55:46.710833137 +0200
+++ /work/SRC/openSUSE:Factory/.kColorPicker.new.2401/kColorPicker.changes      
2021-03-19 16:40:45.249919502 +0100
@@ -1,0 +2,7 @@
+Sat Mar 13 11:30:15 UTC 2021 - ecsos <[email protected]>
+
+- Update to 0.1.5
+  * Fix tests
+- Change sover from 0_1_4 to 0 because of rpmlint error.
+
+-------------------------------------------------------------------

Old:
----
  kColorPicker-0.1.4.tar.gz

New:
----
  kColorPicker-0.1.5.tar.gz

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

Other differences:
------------------
++++++ kColorPicker.spec ++++++
--- /var/tmp/diff_new_pack.BulPwz/_old  2021-03-19 16:40:45.937920430 +0100
+++ /var/tmp/diff_new_pack.BulPwz/_new  2021-03-19 16:40:45.937920430 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package kColorPicker
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,10 +16,10 @@
 #
 
 
-%define sover   0_1_4
+%define sover   0
 %define libname libkColorPicker%{sover}
 Name:           kColorPicker
-Version:        0.1.4
+Version:        0.1.5
 Release:        0
 Summary:        Qt based Color Picker with popup menu
 License:        GPL-2.0-or-later

++++++ kColorPicker-0.1.4.tar.gz -> kColorPicker-0.1.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kColorPicker-0.1.4/CMakeLists.txt 
new/kColorPicker-0.1.5/CMakeLists.txt
--- old/kColorPicker-0.1.4/CMakeLists.txt       2020-06-14 23:11:10.000000000 
+0200
+++ new/kColorPicker-0.1.5/CMakeLists.txt       2021-01-24 20:16:40.000000000 
+0100
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.5)
-project(kColorPicker LANGUAGES CXX VERSION 0.1.4)
+project(kColorPicker LANGUAGES CXX VERSION 0.1.5)
 
 set(QT_MIN_VERSION "5.9.4")
 
@@ -18,6 +18,8 @@
 include(GNUInstallDirs)
 include(FeatureSummary)
 
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
 add_subdirectory(src)
 
 if (BUILD_EXAMPLE)
@@ -56,7 +58,8 @@
                                          ARCHIVE_OUTPUT_DIRECTORY 
${CMAKE_CURRENT_BINARY_DIR}/lib
                                          LIBRARY_OUTPUT_DIRECTORY 
${CMAKE_CURRENT_BINARY_DIR}/lib
                                          RUNTIME_OUTPUT_DIRECTORY 
${CMAKE_CURRENT_BINARY_DIR}/bin
-                                         SOVERSION ${PROJECT_VERSION}
+                                         VERSION ${PROJECT_VERSION}
+                                         SOVERSION 0
                                          )
 
 install(TARGETS kColorPicker
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kColorPicker-0.1.4/README.md 
new/kColorPicker-0.1.5/README.md
--- old/kColorPicker-0.1.4/README.md    2020-06-14 23:11:10.000000000 +0200
+++ new/kColorPicker-0.1.5/README.md    2021-01-24 20:16:40.000000000 +0100
@@ -1,7 +1,7 @@
 # kColorPicker [![Build 
Status](https://travis-ci.org/ksnip/kColorPicker.svg?branch=master)](https://travis-ci.org/ksnip/kColorPicker)
 QToolButton with color popup menu with lets you select a color. The popup 
features a color dialog button which can be used to add custom colors to the 
popup menu.
 
-Version 0.1.4
+Version 0.1.5
 
 ![kColorPicker](https://i.imgur.com/VkhUvFa.png "kColorPicker")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kColorPicker-0.1.4/src/CMakeLists.txt 
new/kColorPicker-0.1.5/src/CMakeLists.txt
--- old/kColorPicker-0.1.4/src/CMakeLists.txt   2020-06-14 23:11:10.000000000 
+0200
+++ new/kColorPicker-0.1.5/src/CMakeLists.txt   2021-01-24 20:16:40.000000000 
+0100
@@ -5,6 +5,7 @@
         ${CMAKE_CURRENT_SOURCE_DIR}/buttons/AbstractPopupMenuButton.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/buttons/ColorButton.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/buttons/ColorDialogButton.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/common/ScaledSizeProvider.cpp
         )
 
 set(KCOLORPICKER_SRCS ${KCOLORPICKER_SRCS} PARENT_SCOPE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kColorPicker-0.1.4/src/PopupMenu.cpp 
new/kColorPicker-0.1.5/src/PopupMenu.cpp
--- old/kColorPicker-0.1.4/src/PopupMenu.cpp    2020-06-14 23:11:10.000000000 
+0200
+++ new/kColorPicker-0.1.5/src/PopupMenu.cpp    2021-01-24 20:16:40.000000000 
+0100
@@ -76,7 +76,7 @@
 
 ColorButton *PopupMenu::createButton(const QColor &color)
 {
-       auto icon = IconCreator::createIcon(color, QSize(25, 25));
+       auto icon = IconCreator::createIcon(color, 
ScaledSizeProvider::scaledSize(QSize(25, 25)));
        auto button = new ColorButton(icon, color);
        return button;
 }
@@ -116,7 +116,7 @@
 
 void PopupMenu::addColorDialogButton()
 {
-       auto icon = QIcon(QStringLiteral(":/icons/ellipsis"));
+       auto icon = QIcon(QLatin1String(":/icons/ellipsis"));
        mColorDialogButton = new ColorDialogButton(icon);
        connect(mColorDialogButton, &AbstractPopupMenuButton::colorSelected, 
this, &PopupMenu::colorSelected);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kColorPicker-0.1.4/src/buttons/AbstractPopupMenuButton.cpp 
new/kColorPicker-0.1.5/src/buttons/AbstractPopupMenuButton.cpp
--- old/kColorPicker-0.1.4/src/buttons/AbstractPopupMenuButton.cpp      
2020-06-14 23:11:10.000000000 +0200
+++ new/kColorPicker-0.1.5/src/buttons/AbstractPopupMenuButton.cpp      
2021-01-24 20:16:40.000000000 +0100
@@ -22,7 +22,7 @@
 namespace kColorPicker {
 
 AbstractPopupMenuButton::AbstractPopupMenuButton(const QIcon &icon) :
-       mHoverColor(QColor(QStringLiteral("#add8e6")))
+       mHoverColor(QColor(QLatin1String("#add8e6")))
 {
        setIcon(icon);
        setFixedSize(iconSize() + QSize(8, 8));
@@ -36,7 +36,7 @@
        styleOption.initFrom(this);
        auto rect = event->rect();
        auto scaleRatio = devicePixelRatioF();
-       auto buttonRect = QRectF(rect.x() + (2 / scaleRatio), rect.y() + (2 / 
scaleRatio), rect.width() - 3, rect.height() - 3);
+       auto buttonRect = QRectF(rect.x() + (2 / scaleRatio), rect.y() + (2 / 
scaleRatio), rect.width() - 5, rect.height() - 5);
 
        if(styleOption.state & QStyle::State_MouseOver)
        {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kColorPicker-0.1.4/src/buttons/AbstractPopupMenuButton.h 
new/kColorPicker-0.1.5/src/buttons/AbstractPopupMenuButton.h
--- old/kColorPicker-0.1.4/src/buttons/AbstractPopupMenuButton.h        
2020-06-14 23:11:10.000000000 +0200
+++ new/kColorPicker-0.1.5/src/buttons/AbstractPopupMenuButton.h        
2021-01-24 20:16:40.000000000 +0100
@@ -25,6 +25,8 @@
 #include <QPaintEvent>
 #include <QStyleOption>
 
+#include "src/common/ScaledSizeProvider.h"
+
 namespace kColorPicker {
 
 class AbstractPopupMenuButton : public QToolButton
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kColorPicker-0.1.4/src/common/ScaledSizeProvider.cpp 
new/kColorPicker-0.1.5/src/common/ScaledSizeProvider.cpp
--- old/kColorPicker-0.1.4/src/common/ScaledSizeProvider.cpp    1970-01-01 
01:00:00.000000000 +0100
+++ new/kColorPicker-0.1.5/src/common/ScaledSizeProvider.cpp    2021-01-24 
20:16:40.000000000 +0100
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2021 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 3 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 kColorPicker {
+
+QSize ScaledSizeProvider::scaledSize(const QSize &size)
+{
+       return size * scaleFactor();
+}
+
+qreal ScaledSizeProvider::scaleFactor()
+{
+       static auto scaleFactor = getScaleFactor();
+       return scaleFactor;
+}
+
+qreal ScaledSizeProvider::getScaleFactor()
+{
+#if defined(__linux__)
+       if(isGnomeEnvironment()) {
+               auto screen = QApplication::primaryScreen();
+               auto logicalDotsPerInch = (int) screen->logicalDotsPerInch();
+               auto physicalDotsPerInch = (int) screen->physicalDotsPerInch();
+               return (qreal)logicalDotsPerInch / (qreal)physicalDotsPerInch;
+       }
+#endif
+
+       return 1;
+}
+
+#if defined(__linux__)
+bool ScaledSizeProvider::isGnomeEnvironment()
+{
+       auto currentDesktop = QString(qgetenv("XDG_CURRENT_DESKTOP"));
+       return currentDesktop.contains(QLatin1String("gnome"), 
Qt::CaseInsensitive)
+                  || currentDesktop.contains(QLatin1String("unity"), 
Qt::CaseInsensitive);
+}
+#endif
+
+} // namespace kColorPicker
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kColorPicker-0.1.4/src/common/ScaledSizeProvider.h 
new/kColorPicker-0.1.5/src/common/ScaledSizeProvider.h
--- old/kColorPicker-0.1.4/src/common/ScaledSizeProvider.h      1970-01-01 
01:00:00.000000000 +0100
+++ new/kColorPicker-0.1.5/src/common/ScaledSizeProvider.h      2021-01-24 
20:16:40.000000000 +0100
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2021 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 3 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 KCOLORPICKER_SCALEDSIZEPROVIDER_H
+#define KCOLORPICKER_SCALEDSIZEPROVIDER_H
+
+#include <QSize>
+
+#if defined(__linux__)
+#include <QApplication>
+#include <QScreen>
+#endif
+
+namespace kColorPicker {
+
+class ScaledSizeProvider
+{
+public:
+       static QSize scaledSize(const QSize &size);
+
+private:
+       static qreal scaleFactor();
+       static qreal getScaleFactor();
+
+#if defined(__linux__)
+       static bool isGnomeEnvironment();
+#endif
+
+       ScaledSizeProvider() = default;
+       ~ScaledSizeProvider() = default;
+};
+
+} // namespace kColorPicker
+
+#endif //KCOLORPICKER_SCALEDSIZEPROVIDER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kColorPicker-0.1.4/tests/buttons/ColorButtonTest.h 
new/kColorPicker-0.1.5/tests/buttons/ColorButtonTest.h
--- old/kColorPicker-0.1.4/tests/buttons/ColorButtonTest.h      2020-06-14 
23:11:10.000000000 +0200
+++ new/kColorPicker-0.1.5/tests/buttons/ColorButtonTest.h      2021-01-24 
20:16:40.000000000 +0100
@@ -22,9 +22,11 @@
 
 #include <QtTest>
 
-#include "../../src/buttons/ColorButton.h"
+#include "src/buttons/ColorButton.h"
+#include "src/common/ScaledSizeProvider.h"
 
 using kColorPicker::ColorButton;
+using kColorPicker::ScaledSizeProvider;
 
 class ColorButtonTest : public QObject
 {

Reply via email to