linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel-shark: Fix function_graph indent monospace
@ 2022-10-03 15:40 Andrej Stender
  2022-10-08 15:40 ` Yordan Karadzhov
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Stender @ 2022-10-03 15:40 UTC (permalink / raw)
  To: Yordan Karadzhov, linux-trace-devel; +Cc: Andrej Stender

Show content of KsTraceViewer table in monospaced font. When using
function_graph tracer, its C-style indentation of traced functions is
now shown correctly.

Use system font, so the font used in the table can still can be
configured via window manager, same as the fonts in title and menus. The
font in the horizontal header of the table stays regular non-monospaced
as before.

Tested on KDE Plasma 5.25.4, Qt 5.15.4.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216404
Signed-off-by: Andrej Stender <andrej.stender@thermalcircle.de>
---
 src/KsTraceViewer.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/KsTraceViewer.cpp b/src/KsTraceViewer.cpp
index afd5a859de72..be0a41941db2 100644
--- a/src/KsTraceViewer.cpp
+++ b/src/KsTraceViewer.cpp
@@ -129,6 +129,9 @@ KsTraceViewer::KsTraceViewer(QWidget *parent)
 	_view.setSelectionBehavior(QAbstractItemView::SelectRows);
 	_view.setSelectionMode(QAbstractItemView::SingleSelection);
 	_view.verticalHeader()->setDefaultSectionSize(FONT_HEIGHT * 1.25);
+	_view.setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
+	_view.horizontalHeader()->setFont(
+		QFontDatabase::systemFont(QFontDatabase::GeneralFont));
 
 	 _proxyModel.setSource(&_model);
 	_view.setModel(&_proxyModel);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-08 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-03 15:40 [PATCH] kernel-shark: Fix function_graph indent monospace Andrej Stender
2022-10-08 15:40 ` Yordan Karadzhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).