~zsombi/ubuntu-ui-toolkit/listitemSelectModeBugs

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/Themes/Ambiance/1.3/TextCursorStyle.qml

  • Committer: Zsombor Egri
  • Date: 2015-11-16 06:35:05 UTC
  • mfrom: (1664.1.1 listitemSelectModeBugs)
  • Revision ID: zsombor.egri@canonical.com-20151116063505-cwn2qfks7qzk10g9
re-sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
            width: cursorWidth
58
58
            // FIXME: Extend the palette and use palette values here
59
59
            color: UbuntuColors.blue
60
 
            visible: styledItem.positionProperty === "cursorPosition" && (blinkTimer.timerShowCursor || !blinkTimer.running)
 
60
            visible: blinkTimer.timerShowCursor || !blinkTimer.running
61
61
            Timer {
62
62
                id: blinkTimer
63
63
                interval: cursorStyle.cursorVisibleTimeout
66
66
                         styledItem.visible &&
67
67
                         shouldBlink
68
68
                repeat: true
69
 
                property bool shouldBlink: !styledItem.readOnly && !styledItem.contextMenuVisible
 
69
                property bool shouldBlink: styledItem.positionProperty === "cursorPosition" && !styledItem.readOnly && !styledItem.contextMenuVisible
70
70
                property bool timerShowCursor: true
71
71
                onTriggered: {
72
72
                    interval = (interval == cursorStyle.cursorVisibleTimeout) ?
82
82
        id: caretItem
83
83
        source: Qt.resolvedUrl("../artwork/caret_noshadow.png")
84
84
        objectName: "text_cursor_style_caret_" + styledItem.positionProperty
 
85
        property bool flip: styledItem.positionProperty !== "selectionStart"
 
86
        rotation: flip ? 180 : 0
85
87
        anchors {
86
 
            top: parent.bottom
 
88
            top: flip ? parent.bottom : undefined
 
89
            bottom: flip ? undefined : parent.top
87
90
            horizontalCenter: parent.horizontalCenter
88
91
            horizontalCenterOffset: cursorWidth / 2
89
92
        }