Index: sources/gui/qml/pages/settings/SettingsLocalization.qml =================================================================== diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -rbeadb6f68cff8bc50f255f83203ec201a5468dc1 --- sources/gui/qml/pages/settings/SettingsLocalization.qml (.../SettingsLocalization.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f) +++ sources/gui/qml/pages/settings/SettingsLocalization.qml (.../SettingsLocalization.qml) (revision beadb6f68cff8bc50f255f83203ec201a5468dc1) @@ -20,6 +20,7 @@ // Qml imports import "qrc:/globals" +import "qrc:/components" /*! * \brief SettingsROInput is the screen @@ -32,61 +33,13 @@ contentArea.anchors.topMargin: Variables.defaultMargin * 10 - contentItem: Item { id: _settingsRoInputItem - - // FIXME: This combobox needs to be a global Component - ComboBox { id : _settingsLanguageCombo - anchors.horizontalCenter : parent.horizontalCenter - currentIndex : vLocalization.languageIndex - displayText : currentText - font.pixelSize : Fonts.fontPixelTextRectTitle - width : 300 - height : 55 - padding : 10 - model : vLocalization.languageList - - background : Rectangle { - color : Colors.transparent - border.color : enabled ? Colors.borderButton : Colors.borderDisableButton - radius : Variables.dialogRadius - } - - delegate: ItemDelegate { id : _settingsLanguageDelegate - width : _settingsLanguageCombo.width // + anchors.margins - 2 // 2 is the border width - height : 50 - contentItem: Text { - text : modelData - color : Colors.textMain - font : _settingsLanguageCombo.font - padding : 10 - verticalAlignment : Text.AlignVCenter - } - background : Rectangle { - anchors.fill : parent - anchors.margins : 10 / 2 - visible : _settingsLanguageDelegate.down || _settingsLanguageDelegate.highlighted || _settingsLanguageDelegate.visualFocus - color : _settingsLanguageDelegate.down ? Colors.backgroundButtonSelect : - Colors.backgroundButtonSelectDark - } - highlighted : _settingsLanguageCombo.highlightedIndex === index - } - popup: Popup { - y : _settingsLanguageCombo.height - x : - _settingsLanguageCombo.anchors.leftMargin - width : _settingsLanguageCombo.width + _settingsLanguageCombo.anchors.leftMargin - implicitHeight : contentItem.implicitHeight - contentItem : ListView { - clip : true - implicitHeight : contentHeight - currentIndex : _settingsLanguageCombo.highlightedIndex - model : _settingsLanguageCombo.popup.visible ? _settingsLanguageCombo.delegateModel : null - } - background: Rectangle { - color : Colors.backgroundMain - border.color : Colors.borderButton - radius : Variables.dialogRadius - } - } + contentItem: Item { id: _settingsLanguageItem + BaseComboBox { id: _settingsLanguageCombo + anchors.horizontalCenter : parent.horizontalCenter + width : 300 + height : 55 + currentIndex : vLocalization.languageIndex + model : vLocalization.languageList } }