aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2010-12-20 11:28:48 +0200
committerPekka Vuorela <pekka.ta.vuorela@nokia.com>2011-01-04 14:21:01 +0200
commit8cdff92eb38a6896d4a79d06a5b7e0194cd8e03b (patch)
treeff18889b985ba5f57c080de4b4adda3303812a64
parentc1901b91607c1552780477af7a773f5eb1d3aff1 (diff)
Changes: implemented MTextEditView cursor width style property
RevBy: Mohammad Anwari Details: Requires updated theme.
-rw-r--r--src/views/mtexteditview.cpp4
-rw-r--r--src/views/style/mtexteditstyle.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/views/mtexteditview.cpp b/src/views/mtexteditview.cpp
index c81a9cfe..f473ad00 100644
--- a/src/views/mtexteditview.cpp
+++ b/src/views/mtexteditview.cpp
@@ -1324,9 +1324,13 @@ void MTextEditView::applyStyle()
d->document()->setDocumentMargin(InternalMargin);
d->promptTextDocument->setDocumentMargin(InternalMargin);
+ // Note: using non-documented property
+ d->document()->documentLayout()->setProperty("cursorWidth", style()->cursorWidth());
+
if (d->maskedTextDocument != 0) {
d->maskedTextDocument->setDefaultFont(style()->font());
d->maskedTextDocument->setDocumentMargin(InternalMargin);
+ d->maskedTextDocument->documentLayout()->setProperty("cursorWidth", style()->cursorWidth());
}
// font etc might affect size
diff --git a/src/views/style/mtexteditstyle.h b/src/views/style/mtexteditstyle.h
index a358c2cd..780388dc 100644
--- a/src/views/style/mtexteditstyle.h
+++ b/src/views/style/mtexteditstyle.h
@@ -42,6 +42,7 @@ class M_VIEWS_EXPORT MTextEditStyle : public MWidgetStyle
M_STYLE_ATTRIBUTE(QString, pasteFailedIcon, PasteFailedIcon)
M_STYLE_ATTRIBUTE(int, pasteFailedDuration, PasteFailedDuration)
M_STYLE_ATTRIBUTE(int, maskingDelay, MaskingDelay)
+ M_STYLE_ATTRIBUTE(int, cursorWidth, CursorWidth)
/*!
\property MTextEditStyle::pressBoundaryFeedback