From 2e6d0725d105ddd8d083b1a0fb3dc92247570eb5 Mon Sep 17 00:00:00 2001 From: Richard Harrison Date: Sun, 2 Sep 2018 11:53:32 +0200 Subject: [PATCH] Change the performance monitor to use the font as specified in the style (rather than hardcoding it) --- Nasal/performance_monitor/monitor.nas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Nasal/performance_monitor/monitor.nas b/Nasal/performance_monitor/monitor.nas index e24b38027..5419f5bb2 100644 --- a/Nasal/performance_monitor/monitor.nas +++ b/Nasal/performance_monitor/monitor.nas @@ -11,7 +11,10 @@ var dialog = { me.fg = [[0.9, 0.9, 0.2, 1], [1, 1, 1, 1]]; # alternative active # "private" - var font = { name: "FIXED_8x13" }; + var font = { name: getprop("/sim/gui/selected-style/fonts/mp-list/name") or "FIXED_8x13", + size: getprop("/sim/gui/selected-style/fonts/mp-list/size") or 20, + slant: getprop("/sim/gui/selected-style/fonts/mp-list/slant") or 0, + }; me.header = [" submodule", "cumulative/ms", "total/ms", "max/ms", "min/ms", "mean/ms", "stddev/ms", "iterations" ]; me.columns = [ { type: "text", property: "name", format: " %s", label: "------------------", halign: "fill", font: font },