public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kwidgetsaddons/, kde-frameworks/kwidgetsaddons/files/
Date: Wed, 30 Jan 2019 17:28:14 +0000 (UTC)	[thread overview]
Message-ID: <1548867406.c3581c4fe51dcd2ceadc1977a135fa78050b9213.asturm@gentoo> (raw)

commit:     c3581c4fe51dcd2ceadc1977a135fa78050b9213
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 30 16:56:46 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 30 16:56:46 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3581c4f

kde-frameworks/kwidgetsaddons: No light font styles for headings

Fixes a readability regression in 5.53.0.

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=402730
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...addons-5.54.0-no-light-fontstyle-headings.patch | 88 ++++++++++++++++++++++
 .../kwidgetsaddons/kwidgetsaddons-5.54.0-r1.ebuild | 28 +++++++
 2 files changed, 116 insertions(+)

diff --git a/kde-frameworks/kwidgetsaddons/files/kwidgetsaddons-5.54.0-no-light-fontstyle-headings.patch b/kde-frameworks/kwidgetsaddons/files/kwidgetsaddons-5.54.0-no-light-fontstyle-headings.patch
new file mode 100644
index 00000000000..38c89728b52
--- /dev/null
+++ b/kde-frameworks/kwidgetsaddons/files/kwidgetsaddons-5.54.0-no-light-fontstyle-headings.patch
@@ -0,0 +1,88 @@
+From dc901a1f0b5f6621bfa1c23e33dcfdf6246e7cb1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kre=C5=A1imir=20=C4=8Cohar?= <kcohar@gmail.com>
+Date: Thu, 10 Jan 2019 09:19:33 -0700
+Subject: [KWidgetsAddons] Do not use light font styles for headings (3/3)
+
+Summary:
+This patch brings back regular font styles for headings to KTitleWidget for the sake of consistency with QML and Kirigami, where they were also reintroduced in favor of better legibility.
+
+CCBUG: 402730
+
+FIXED-IN: 5.54
+
+Test Plan:
+Before:
+{F6520054}
+After:
+{F6520058}
+
+Reviewers: ngraham, #frameworks, #vdg, #plasma
+
+Reviewed By: ngraham, #vdg
+
+Subscribers: cfeck, filipf, kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D17907
+---
+ src/ktitlewidget.cpp | 29 -----------------------------
+ 1 file changed, 29 deletions(-)
+
+diff --git a/src/ktitlewidget.cpp b/src/ktitlewidget.cpp
+index 7a34bc2..d8b0517 100644
+--- a/src/ktitlewidget.cpp
++++ b/src/ktitlewidget.cpp
+@@ -213,16 +213,6 @@ void KTitleWidget::changeEvent(QEvent *e)
+     if (e->type() == QEvent::PaletteChange || e->type() == QEvent::FontChange
+                                            || e->type() == QEvent::ApplicationFontChange) {
+         d->textLabel->setStyleSheet(d->textStyleSheet());
+-        //Qt stylesheet doesn't support lighter font-weight
+-        QFont font(d->textLabel->font());
+-        if (d->level <= 4) {
+-            font.setWeight(QFont::Light);
+-            font.setStyleName(QStringLiteral("Light"));
+-        } else {
+-            font.setWeight(QFont::Normal);
+-            font.setStyleName(QStringLiteral("Regular"));
+-        }
+-        d->textLabel->setFont(font);
+         d->commentLabel->setStyleSheet(d->commentStyleSheet());
+     }
+ }
+@@ -233,16 +223,6 @@ void KTitleWidget::setText(const QString &text, Qt::Alignment alignment)
+ 
+     if (!Qt::mightBeRichText(text)) {
+         d->textLabel->setStyleSheet(d->textStyleSheet());
+-        //Qt stylesheet doesn't support lighter font-weight
+-        QFont font(d->textLabel->font());
+-        if (d->level <= 4) {
+-            font.setWeight(QFont::Light);
+-            font.setStyleName(QStringLiteral("Light"));
+-        } else {
+-            font.setWeight(QFont::Normal);
+-            font.setStyleName(QStringLiteral("Regular"));
+-        }
+-        d->textLabel->setFont(font);
+     }
+ 
+     d->textLabel->setText(text);
+@@ -259,15 +239,6 @@ void KTitleWidget::setLevel(int level)
+     d->level = level;
+ 
+     d->textLabel->setStyleSheet(d->textStyleSheet());
+-    //Qt stylesheet doesn't support lighter font-weight
+-    QFont font(d->textLabel->font());
+-    if (d->level <= 4) {
+-        font.setWeight(QFont::Light);
+-        font.setStyleName(QStringLiteral("Light"));
+-    } else {
+-        font.setWeight(QFont::Normal);
+-        font.setStyleName(QStringLiteral("Regular"));
+-    }
+ }
+ 
+ int KTitleWidget::level()
+-- 
+cgit v1.1
+

diff --git a/kde-frameworks/kwidgetsaddons/kwidgetsaddons-5.54.0-r1.ebuild b/kde-frameworks/kwidgetsaddons/kwidgetsaddons-5.54.0-r1.ebuild
new file mode 100644
index 00000000000..274e1794131
--- /dev/null
+++ b/kde-frameworks/kwidgetsaddons/kwidgetsaddons-5.54.0-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="An assortment of high-level widgets for common tasks"
+LICENSE="LGPL-2.1+"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="nls"
+
+RDEPEND="
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtwidgets)
+"
+DEPEND="${RDEPEND}
+	nls? ( $(add_qt_dep linguist-tools) )
+"
+
+PATCHES=( "${FILESDIR}/${P}-no-light-fontstyle-headings.patch" )
+
+src_test() {
+	# bug 650216, 653186
+	local myctestargs=( -E "(kdatecomboboxtest|ktooltipwidgettest)" )
+	kde5_src_test
+}


             reply	other threads:[~2019-01-30 17:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 17:28 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-23 14:59 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kwidgetsaddons/, kde-frameworks/kwidgetsaddons/files/ Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1548867406.c3581c4fe51dcd2ceadc1977a135fa78050b9213.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox