aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrej Stender <andrej.stender@thermalcircle.de>2022-10-03 17:40:09 +0200
committerYordan Karadzhov <y.karadz@gmail.com>2022-10-08 18:23:18 +0300
commit843903f5cd12990c5786ae6c9bbc6422f8746bb4 (patch)
tree5c9cd09e7281e81b61f2a8b3f69c0357af105b26
parent40646dc9d677262224f2a42aad47931ce88dd553 (diff)
downloadkernel-shark-843903f5cd12990c5786ae6c9bbc6422f8746bb4.tar.gz
kernel-shark: Fix function_graph indent monospace
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> Signed-off-by: Yordan Karadzhov <y.karadz@gmail.com>
-rw-r--r--src/KsTraceViewer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/KsTraceViewer.cpp b/src/KsTraceViewer.cpp
index afd5a859..be0a4194 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);