Fix font setting in TextMetrics. Fixes #99
This commit is contained in:
parent
33b9caaca9
commit
50d4f267ba
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue