From 50d4f267ba8361a1fb69e522a8754f1aa1f50636 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 12 Oct 2018 19:19:33 -0700 Subject: [PATCH] Fix font setting in TextMetrics. Fixes #99 --- app/gui/AutoResizingComboBox.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/gui/AutoResizingComboBox.qml b/app/gui/AutoResizingComboBox.qml index 7bf7973e..574e11d0 100644 --- a/app/gui/AutoResizingComboBox.qml +++ b/app/gui/AutoResizingComboBox.qml @@ -9,17 +9,17 @@ ComboBox { TextMetrics { id: popupMetrics - font: popup.font } TextMetrics { id: textMetrics - font: parent.font } // We call this every time the options change (and init) // so we can adjust the combo box width here too onActivated: { + textMetrics.font = font + popupMetrics.font = popup.font textWidth = 0 for (var i = 0; i < count; i++){ textMetrics.text = textAt(i)