diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2013-03-25 18:42:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-26 16:06:08 +0100 |
commit | c1479a9d971b1add0aad43a5e06ad266b2dff9d1 (patch) | |
tree | d8b10836bb913722368407be798d65fb89cb9996 /src/controls/ComboBox.qml | |
parent | 2fa076d30ad5136a49f293f0aa3e5429ad7b831b (diff) | |
download | qtquickcontrols-c1479a9d971b1add0aad43a5e06ad266b2dff9d1.tar.gz |
ComboBox: Fix style content size calculation
Expression taken from QComboBox. Also, cleaner way of setting the
popup item font size where needed.
Change-Id: Ic6997e8d887dafc519a3827c2a40cb8f91503ebc
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/ComboBox.qml')
-rw-r--r-- | src/controls/ComboBox.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index fadd2a16..5127954e 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -104,7 +104,11 @@ Control { onPressedChanged: if (pressed) popup.show() } - StyleItem { id: styleItem } + StyleItem { + id: styleItem + elementType: "comboboxitem" + visible: false + } Component.onCompleted: { if (currentIndex === -1) @@ -112,7 +116,6 @@ Control { if (styleItem.style == "mac") { popup.x -= 10 popup.y += 4 - popup.__font.pointSize = 13 } popup.ready = true @@ -136,6 +139,7 @@ Control { property int y: isPopup ? (comboBox.__panel.height - comboBox.__panel.implicitHeight) / 2.0 : comboBox.__panel.height __minimumWidth: comboBox.width __visualItem: comboBox + __font: styleItem.font property ExclusiveGroup eg: ExclusiveGroup { id: eg } |