Accepting request 453140 from KDE:Frameworks5

Update to 5.9.0 final tars. Do not publish before tuesday.

OBS-URL: https://build.opensuse.org/request/show/453140
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/plasma5-addons?expand=0&rev=36
This commit is contained in:
Dominique Leuenberger 2017-01-31 11:25:39 +00:00 committed by Git OBS Bridge
commit 13789adf5e
6 changed files with 143 additions and 8 deletions

View File

@ -0,0 +1,57 @@
From ef3fd95a32572c20b8e8e407b45726be4a95bcfd Mon Sep 17 00:00:00 2001
From: Kai Uwe Broulik <kde@privat.broulik.de>
Date: Thu, 26 Jan 2017 16:21:09 +0100
Subject: [PATCH 1/2] [Color Picker] Add border around color if contrast to
surrounding view is too little
When picking a light color on a light panel, it might not be obvious that the color is shown there.
Add a border around the picked color if contrast is too little.
Differential Revision: https://phabricator.kde.org/D4224
---
applets/colorpicker/package/contents/ui/main.qml | 29 ++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/applets/colorpicker/package/contents/ui/main.qml b/applets/colorpicker/package/contents/ui/main.qml
index b45d00486..845391cd8 100644
--- a/applets/colorpicker/package/contents/ui/main.qml
+++ b/applets/colorpicker/package/contents/ui/main.qml
@@ -189,6 +189,35 @@ Item {
height: units.roundToIconSize(pickerIcon.height) * 0.75
radius: width / 2
color: root.recentColor
+
+ function luminance(color) {
+ if (!color) {
+ return 0;
+ }
+
+ // formula for luminance according to https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
+
+ var a = [color.r, color.g, color.b].map(function (v) {
+ return (v <= 0.03928) ? v / 12.92 :
+ Math.pow( ((v + 0.055) / 1.055), 2.4 );
+ });
+
+ return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;
+ }
+
+ border {
+ color: theme.textColor
+ width: {
+ var contrast = luminance(theme.viewBackgroundColor) / luminance(colorCircle.color) + 0.05;
+
+ // show border only if there's too little contrast to the surrounding view
+ if (contrast > 3) {
+ return 0;
+ } else {
+ return Math.round(Math.max(units.devicePixelRatio, width / 20));
+ }
+ }
+ }
}
}
}
--
2.11.0

View File

@ -0,0 +1,43 @@
From 75fd9dda750c6bc192e56ed16d34a0920bdf41df Mon Sep 17 00:00:00 2001
From: Kai Uwe Broulik <kde@privat.broulik.de>
Date: Thu, 26 Jan 2017 16:59:48 +0100
Subject: [PATCH 2/2] [Color Picker] Add contrast frame around colors in popup
This adds a frame around the color sections, makes it look a lot nicer and improves contrast.
Since here the frame takes only a minor portion of surface area compared to the circle in a panel,
I opted not to base it on luminosity, also for consistency's sake when there's 9 different colors in one view.
Differential Revision: https://phabricator.kde.org/D4298
---
applets/colorpicker/package/contents/ui/main.qml | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/applets/colorpicker/package/contents/ui/main.qml b/applets/colorpicker/package/contents/ui/main.qml
index 845391cd8..ba1920a0c 100644
--- a/applets/colorpicker/package/contents/ui/main.qml
+++ b/applets/colorpicker/package/contents/ui/main.qml
@@ -318,9 +318,18 @@ Item {
color: delegateMouse.currentColor
+ border {
+ color: theme.textColor
+ width: Math.round(units.devicePixelRatio)
+ }
+
Rectangle {
- anchors.bottom: parent.bottom
- width: parent.width
+ anchors {
+ bottom: parent.bottom
+ left: parent.left
+ right: parent.right
+ margins: rect.border.width
+ }
height: colorLabel.contentHeight + 2 * units.smallSpacing
color: theme.backgroundColor
opacity: 0.8
--
2.11.0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2dfdcc0be58550f4018c4f2d05fd2652d4b326a73a9d39d551892e4bd65333a0
size 2091012

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f5f5a65d34b5567a0b5d6bc363890abd548a42dc218628191faca481bc05379d
size 2047156

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Sat Jan 28 09:54:36 UTC 2017 - fabian@ritter-vogt.de
- Add upstream patches from master to improve appearance of color picker:
* 0001-Color-Picker-Add-border-around-color-if-contrast-to-.patch
* 0002-Color-Picker-Add-contrast-frame-around-colors-in-pop.patch
-------------------------------------------------------------------
Thu Jan 26 19:58:55 CET 2017 - fabian@ritter-vogt.de
- Update to 5.9.0
* New feature release
* For more details please see:
* https://www.kde.org/announcements/plasma-5.9.0.php
- Changes since 5.8.95:
* Fix pixel alignment and non-standard height in QuickShare delegate
* [User Switcher] Just use Row's implicitWidth instead of calculating it manually
-------------------------------------------------------------------
Thu Jan 12 20:39:58 UTC 2017 - fabian@ritter-vogt.de
- Update to 5.8.95 (Plasma 5.9 Beta)
* New feature release
* For more details please see:
https://www.kde.org/announcements/plasma-5.8.95.php
- Changes:
* See https://www.kde.org/announcements/plasma-5.8.5-5.8.95-changelog.php#plasma-addons
-------------------------------------------------------------------
Tue Dec 27 18:31:45 UTC 2016 - fabian@ritter-vogt.de

View File

@ -1,7 +1,7 @@
#
# spec file for package plasma5-addons
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,17 +18,21 @@
%bcond_without lang
Name: plasma5-addons
Version: 5.8.5
Version: 5.9.0
Release: 0
# Full Plasma 5 version (e.g. 5.8.5)
# Full Plasma 5 version (e.g. 5.9.0)
%{!?_plasma5_bugfix: %global _plasma5_bugfix %{version}}
# Lasted ABI-stable Plasma (e.g. 5.8 in KF5, but 5.8.90 in KUF)
# Lasted ABI-stable Plasma (e.g. 5.8 in KF5, but 5.9.0 in KUF)
%{!?_plasma5_version: %global _plasma5_version %(echo %{_plasma5_bugfix} | awk -F. '{print $1"."$2}')}
Summary: Additional Plasma5 Widgets
License: LGPL-2.1 and GPL-2.0+ and GPL-3.0
Group: System/GUI/KDE
Url: http://www.kde.org/
Source: http://download.kde.org/stable/plasma/%{version}/kdeplasma-addons-%{version}.tar.xz
Source: kdeplasma-addons-%{version}.tar.xz
# PATCH-FIX-UPSTREAM 0001-Color-Picker-Add-border-around-color-if-contrast-to-.patch kde@privat.broulik.de -- [Color Picker] Add border around color if contrast to surrounding view is too little
Patch200: 0001-Color-Picker-Add-border-around-color-if-contrast-to-.patch
# PATCH-FIX-UPSTREAM 0002-Color-Picker-Add-contrast-frame-around-colors-in-pop.patch kde@privat.broulik.de -- [Color Picker] Add contrast frame around colors in popup
Patch201: 0002-Color-Picker-Add-contrast-frame-around-colors-in-pop.patch
BuildRequires: kf5-filesystem
BuildRequires: cmake(KF5Activities) >= 5.25.0
BuildRequires: cmake(KF5Config) >= 5.25.0
@ -78,6 +82,8 @@ Additional plasmoids from upstream for use on the Plasma workspace.
%lang_package
%prep
%setup -q -n kdeplasma-addons-%{version}
%patch200 -p1
%patch201 -p1
%build
%cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
@ -98,6 +104,7 @@ Additional plasmoids from upstream for use on the Plasma workspace.
%doc COPYING*
%config %{_kf5_configdir}/comic.knsrc
%{_kf5_libdir}/libplasmacomicprovidercore.so.*
%{_libdir}/libplasmapotdprovidercore.so*
%{_kf5_libdir}/libplasmaweather.so*
%{_kf5_servicetypesdir}/
%{_kf5_plugindir}/