All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikhail Rudenko <mike.rudenko@gmail.com>
To: linux-trace-devel@vger.kernel.org
Cc: Steven Rostedt <srostedt@redhat.com>,
	"Yordan Karadzhov (VMware)" <y.karadz@gmail.com>,
	Mikhail Rudenko <mike.rudenko@gmail.com>
Subject: [PATCH 3/4] kernel-shark: Set text color to black in KsTraceGraph's axes labels
Date: Fri, 11 Oct 2019 00:24:28 +0300	[thread overview]
Message-ID: <20191010212429.469155-4-mike.rudenko@gmail.com> (raw)
In-Reply-To: <20191010212429.469155-1-mike.rudenko@gmail.com>

At present, background color of axes labels of the plot is forced to
white with a stylesheet, but the text color stays unchanged. As a
result, text is barely visible when using dark color schemes. This
patch forces the text color to black for these labels, making them
readable on all color schemes.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
 kernel-shark/src/KsTraceGraph.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel-shark/src/KsTraceGraph.cpp b/kernel-shark/src/KsTraceGraph.cpp
index 73e7577..90f83f3 100644
--- a/kernel-shark/src/KsTraceGraph.cpp
+++ b/kernel-shark/src/KsTraceGraph.cpp
@@ -96,6 +96,8 @@ KsTraceGraph::KsTraceGraph(QWidget *parent)
 	_legendAxisX.layout()->addWidget(&_labelXMin);
 	_legendAxisX.layout()->addWidget(&_labelXMid);
 	_legendAxisX.layout()->addWidget(&_labelXMax);
+	_legendAxisX.setStyleSheet("QLabel { background-color : white; color: black}");
+
 	_drawWindow.setMinimumSize(100, 100);
 	_drawWindow.setStyleSheet("QWidget {background-color : white;}");

@@ -580,7 +582,7 @@ void KsTraceGraph::_updateGraphLegends()
 			width = STRING_WIDTH(graphName);

 		name->setAlignment(Qt::AlignBottom);
-		name->setStyleSheet("QLabel {background-color : white;}");
+		name->setStyleSheet("QLabel {background-color : white; color : black}");
 		name->setFixedHeight(KS_GRAPH_HEIGHT);
 		layout->addWidget(name);
 	};
--
2.23.0

  parent reply	other threads:[~2019-10-10 21:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 21:24 [PATCH 0/4] Fix KernelShark appearance on dark color schemes Mikhail Rudenko
2019-10-10 21:24 ` [PATCH 1/4] kernel-shark: Set text color to black in KsDualMarker's QLabels Mikhail Rudenko
2019-10-10 21:24 ` [PATCH 2/4] kernel-shark: Set text color to black in pointer position QLabel Mikhail Rudenko
2019-10-10 21:24 ` Mikhail Rudenko [this message]
2019-10-10 21:24 ` [PATCH 4/4] kernel-shark: Change KsDualMarker's inactive button style to default Mikhail Rudenko
2019-10-10 22:02 ` [PATCH 0/4] Fix KernelShark appearance on dark color schemes Steven Rostedt
2019-10-11 14:11   ` Yordan Karadzhov (VMware)
2019-10-11 18:18     ` Mikhail Rudenko

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=20191010212429.469155-4-mike.rudenko@gmail.com \
    --to=mike.rudenko@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=srostedt@redhat.com \
    --cc=y.karadz@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.