summaryrefslogtreecommitdiff
path: root/src/controls
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls')
-rw-r--r--src/controls/ComboBox.qml1
-rw-r--r--src/controls/Private/qquickstyleitem.cpp4
-rw-r--r--src/controls/SpinBox.qml2
-rw-r--r--src/controls/StackView.qml4
-rw-r--r--src/controls/Styles/Desktop/SpinBoxStyle.qml5
-rw-r--r--src/controls/TextArea.qml2
-rw-r--r--src/controls/TextField.qml4
7 files changed, 14 insertions, 8 deletions
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml
index 528b0824..6d8e2268 100644
--- a/src/controls/ComboBox.qml
+++ b/src/controls/ComboBox.qml
@@ -427,6 +427,7 @@ Control {
}
property bool allowComplete: false
+ Keys.forwardTo: comboBox
Keys.onPressed: allowComplete = (event.key !== Qt.Key_Backspace && event.key !== Qt.Key_Delete);
onTextChanged: {
diff --git a/src/controls/Private/qquickstyleitem.cpp b/src/controls/Private/qquickstyleitem.cpp
index 4748788f..105bb9f5 100644
--- a/src/controls/Private/qquickstyleitem.cpp
+++ b/src/controls/Private/qquickstyleitem.cpp
@@ -601,6 +601,7 @@ void QQuickStyleItem::initStyleOption()
QStyleOptionSpinBox *opt = qstyleoption_cast<QStyleOptionSpinBox*>(m_styleoption);
opt->frame = true;
+ opt->subControls = QStyle::SC_SpinBoxFrame | QStyle::SC_SpinBoxEditField;
if (value() & 0x1)
opt->activeSubControls = QStyle::SC_SpinBoxUp;
else if (value() & (1<<1))
@@ -919,6 +920,9 @@ QSize QQuickStyleItem::sizeFromContents(int width, int height)
frame.rect = m_styleoption->rect;
frame.styleObject = this;
size = qApp->style()->sizeFromContents(QStyle::CT_LineEdit, &frame, QSize(width, height));
+ if (m_itemType == SpinBox)
+ size.setWidth(qApp->style()->sizeFromContents(QStyle::CT_SpinBox,
+ m_styleoption, QSize(width + 2, height)).width());
}
break;
case GroupBox: {
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index 4dc03d97..8fc964a0 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -268,6 +268,8 @@ Control {
selectValue()
}
+ Keys.forwardTo: spinbox
+
onEditingFinished: spinbox.editingFinished()
color: __panel ? __panel.foregroundColor : "black"
diff --git a/src/controls/StackView.qml b/src/controls/StackView.qml
index 18f77d2e..d8089174 100644
--- a/src/controls/StackView.qml
+++ b/src/controls/StackView.qml
@@ -290,7 +290,7 @@ import QtQuick.Controls.Private 1.0
properties.exitItem.opacity = 1
}
- property Component pushTransition: StackViewTransition {
+ pushTransition: StackViewTransition {
PropertyAnimation {
target: enterItem
property: "opacity"
@@ -328,7 +328,7 @@ import QtQuick.Controls.Private 1.0
properties.exitItem.rotation = 0
}
- property Component pushTransition: StackViewTransition {
+ pushTransition: StackViewTransition {
SequentialAnimation {
ScriptAction {
script: enterItem.rotation = 90
diff --git a/src/controls/Styles/Desktop/SpinBoxStyle.qml b/src/controls/Styles/Desktop/SpinBoxStyle.qml
index 5cf13ea8..18bfec36 100644
--- a/src/controls/Styles/Desktop/SpinBoxStyle.qml
+++ b/src/controls/Styles/Desktop/SpinBoxStyle.qml
@@ -88,11 +88,6 @@ Style {
Item {
id: edit
anchors.fill: parent
- Rectangle {
- color: "white"
- anchors.fill: parent
- anchors.margins: -1
- }
FocusFrame {
anchors.fill: parent
focusMargin:-6
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index 72697919..66e7faf6 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -720,6 +720,8 @@ ScrollView {
selectByMouse: true
readOnly: false
+ Keys.forwardTo: area
+
KeyNavigation.priority: KeyNavigation.BeforeItem
KeyNavigation.tab: area.tabChangesFocus ? area.KeyNavigation.tab : null
KeyNavigation.backtab: area.tabChangesFocus ? area.KeyNavigation.backtab : null
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index 0bd4db1e..d9ba3625 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -303,7 +303,7 @@ Control {
\qmlproperty string TextField::placeholderText
This property contains the text that is shown in the text field when the
- text field is empty and has no focus.
+ text field is empty.
*/
property alias placeholderText: placeholderTextComponent.text
@@ -598,6 +598,8 @@ Control {
renderType: __style ? __style.renderType : Text.NativeRendering
+ Keys.forwardTo: textfield
+
onAccepted: {
Qt.inputMethod.commit()
Qt.inputMethod.hide()