mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Fix font setting in TextMetrics. Fixes #99
This commit is contained in:
@@ -9,17 +9,17 @@ ComboBox {
|
|||||||
|
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: popupMetrics
|
id: popupMetrics
|
||||||
font: popup.font
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: textMetrics
|
id: textMetrics
|
||||||
font: parent.font
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We call this every time the options change (and init)
|
// We call this every time the options change (and init)
|
||||||
// so we can adjust the combo box width here too
|
// so we can adjust the combo box width here too
|
||||||
onActivated: {
|
onActivated: {
|
||||||
|
textMetrics.font = font
|
||||||
|
popupMetrics.font = popup.font
|
||||||
textWidth = 0
|
textWidth = 0
|
||||||
for (var i = 0; i < count; i++){
|
for (var i = 0; i < count; i++){
|
||||||
textMetrics.text = textAt(i)
|
textMetrics.text = textAt(i)
|
||||||
|
|||||||
Reference in New Issue
Block a user