Merge lp:~aacid/unity-2d/cursor_fixes into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 981
Merged at revision: 982
Proposed branch: lp:~aacid/unity-2d/cursor_fixes
Merge into: lp:unity-2d
Diff against target: 27 lines (+5/-2)
1 file modified
shell/common/SearchEntry.qml (+5/-2)
To merge this branch: bzr merge lp:~aacid/unity-2d/cursor_fixes
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) Approve
Gerry Boland Pending
Review via email: mp+97194@code.launchpad.net

Description of the change

Only blink the cursor when the input line has focus, only show the cursor when the cursor when the input line has focus

To post a comment you must log in.
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

Looks great. thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/common/SearchEntry.qml'
2--- shell/common/SearchEntry.qml 2012-03-07 17:21:56 +0000
3+++ shell/common/SearchEntry.qml 2012-03-13 11:31:17 +0000
4@@ -120,6 +120,8 @@
5 id: cursor
6
7 Rectangle {
8+ property bool timerShowCursor: true
9+
10 id: customCursor
11 color: "white"
12 anchors.top: parent.top
13@@ -127,11 +129,12 @@
14 anchors.topMargin: 2
15 anchors.bottomMargin: 2
16 width: 1
17+ visible: parent.activeFocus && timerShowCursor
18 Timer {
19- interval: 800; running: true; repeat: true
20+ interval: 800; running: customCursor.parent.activeFocus; repeat: true
21 onTriggered: {
22 interval = interval == 800 ? 400 : 800
23- customCursor.visible = !customCursor.visible
24+ customCursor.timerShowCursor = !customCursor.timerShowCursor
25 }
26 }
27 }

Subscribers

People subscribed via source and target branches