summaryrefslogtreecommitdiff
path: root/src/controls/Private
diff options
context:
space:
mode:
authorJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-11-11 17:38:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-11-11 17:38:39 +0100
commit0bcb10542727e6f84459ba2779139a71effd965d (patch)
tree37320542f855e3e976cc7722a2ce24212a39a7b0 /src/controls/Private
parent313ae1c3b581a3e3a44f86793e158ba9e8eae9ab (diff)
parentd162d3b03cf5fb5c359c87ac841dd74a9909a548 (diff)
downloadqtquickcontrols-0bcb10542727e6f84459ba2779139a71effd965d.tar.gz
Merge "Merge remote-tracking branch 'origin/5.4' into 5.4.0" into refs/staging/5.4.0
Diffstat (limited to 'src/controls/Private')
-rw-r--r--src/controls/Private/TextHandle.qml2
-rw-r--r--src/controls/Private/TextInputWithHandles.qml2
-rw-r--r--src/controls/Private/qquickstyleitem.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/controls/Private/TextHandle.qml b/src/controls/Private/TextHandle.qml
index 19fc19a6..8656dcfd 100644
--- a/src/controls/Private/TextHandle.qml
+++ b/src/controls/Private/TextHandle.qml
@@ -75,7 +75,7 @@ Loader {
MouseArea {
id: mouse
anchors.fill: item
- enabled: handle.active
+ enabled: item && item.visible
preventStealing: true
property real pressX
property point offset
diff --git a/src/controls/Private/TextInputWithHandles.qml b/src/controls/Private/TextInputWithHandles.qml
index d19dda31..75ca947f 100644
--- a/src/controls/Private/TextInputWithHandles.qml
+++ b/src/controls/Private/TextInputWithHandles.qml
@@ -170,7 +170,7 @@ TextInput {
x: mappedPos.x
y: mappedPos.y
- visible: pressed || (input.hasSelection && handleX + handleWidth >= -1 && handleX <= control.width + 1)
+ visible: pressed || ((input.cursorVisible || input.hasSelection) && handleX + handleWidth >= -1 && handleX <= control.width + 1)
onPositionChanged: {
if (!input.blockRecursion) {
diff --git a/src/controls/Private/qquickstyleitem.cpp b/src/controls/Private/qquickstyleitem.cpp
index edb33212..fb49e6e3 100644
--- a/src/controls/Private/qquickstyleitem.cpp
+++ b/src/controls/Private/qquickstyleitem.cpp
@@ -354,6 +354,8 @@ void QQuickStyleItem::initStyleOption()
opt->features = QStyleOptionViewItem::HasDisplay;
opt->text = text();
opt->textElideMode = Qt::ElideRight;
+ opt->displayAlignment = Qt::AlignLeft | Qt::AlignVCenter;
+ opt->decorationAlignment = Qt::AlignCenter;
resolvePalette();
needsResolvePalette = false;
QPalette pal = m_styleoption->palette;