Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml =================================================================== diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -rbeadb6f68cff8bc50f255f83203ec201a5468dc1 --- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f) +++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision beadb6f68cff8bc50f255f83203ec201a5468dc1) @@ -146,6 +146,13 @@ isUpdatePanels = false } + Connections { target: _logTypeCombo + + function onCurrentIndexChanged() { + vLocalization.notification = "" + } + } + Connections { target: _GuiView function onSdIsReadyChanged ( vValue ) { _root.updatePanels() } function onDidExportStat ( vIndex, vFileName, vPercent ) { _sdcFolderView.positionViewAtIndex(vIndex, ListView.Center) } @@ -188,67 +195,15 @@ height : _root.headetRowHight spacing : _logTypeCombo.width - _logTypeExportButton.width - // FIXME: This combobox needs to be a global Component - ComboBox { id : _logTypeCombo - onCurrentIndexChanged : { - notificationText = "" - _root.updatePanels(currentIndex) - } - enabled : ! _GuiView.exportRunning && ! isUpdatePanels - currentIndex : 0 - displayText : currentText - font.pixelSize : Fonts.fontPixelTextRectExtra - width : parent.width - height : parent.height - padding : 10 - model : [ + BaseComboBox { id: _logTypeCombo + width : parent.width + height : parent.height + currentIndex : 0 + model : [ _root.typeLabelApplication , _root.typeLabelService , _root.typeLabelTreatment ] - - background : Rectangle { - color : Colors.transparent - border.color : enabled ? Colors.borderButton : Colors.borderDisableButton - radius : Variables.dialogRadius - } - - delegate: ItemDelegate { id : _logTypeDelegate - width : _logTypeCombo.width // + anchors.margins - 2 // 2 is the border width - height : 50 - contentItem: Text { - text : modelData - color : Colors.textMain - font : _logTypeCombo.font - padding : 10 - verticalAlignment : Text.AlignVCenter - } - background : Rectangle { - anchors.fill : parent - anchors.margins : 10 / 2 - visible : _logTypeDelegate.down || _logTypeDelegate.highlighted || _logTypeDelegate.visualFocus - color : _logTypeDelegate.down ? Colors.backgroundButtonSelect : - Colors.backgroundButtonSelectDark - } - highlighted : _logTypeCombo.highlightedIndex === index - } - popup: Popup { - y : _logTypeCombo.height - x : - _logTypeCombo.anchors.leftMargin - width : _logTypeCombo.width + _logTypeCombo.anchors.leftMargin - implicitHeight : contentItem.implicitHeight - contentItem : ListView { - clip : true - implicitHeight : contentHeight - currentIndex : _logTypeCombo.highlightedIndex - model : _logTypeCombo.popup.visible ? _logTypeCombo.delegateModel : null - } - background: Rectangle { - color : Colors.backgroundMain - border.color : Colors.borderButton - radius : Variables.dialogRadius - } - } } } Column { 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 } }