~faenil/telegram-app/performance_and_ui_improvements

« back to all changes in this revision

Viewing changes to telegram/app/qml/UserNameSuggestionMenu.qml

  • Committer: Michael Zanetti
  • Date: 2016-02-23 13:56:32 UTC
  • mfrom: (145.1.3 telegram-app)
  • Revision ID: michael.zanetti@canonical.com-20160223135632-phr0jd6vdmxipnpe
mergeĀ lp:~mzanetti/telegram-app/username-completion

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
Item {
7
7
    id: uname_sgs_menu
8
 
    width: 200
9
 
    height: 200
 
8
    width: parent.width
 
9
    height: 3*32*Devices.density + back_frame.anchors.topMargin
10
10
    visible: fmodel.count != 0
11
11
    clip: true
12
12
 
14
14
    property alias dialog: fmodel.dialog
15
15
    property alias keyword: fmodel.keyword
16
16
 
 
17
    signal selected();
 
18
 
17
19
    UserNameFilterModel {
18
20
        id: fmodel
19
21
    }
36
38
            id: back_frame
37
39
            anchors.fill: parent
38
40
            anchors.topMargin: 8*Devices.density
39
 
            anchors.leftMargin: 8*Devices.density
40
 
            anchors.rightMargin: 8*Devices.density
41
41
            color: Cutegram.currentTheme.sendFrameColor
42
 
            radius: 4*Devices.density
43
42
 
44
43
            Rectangle {
45
44
                width: parent.width
97
96
                text: user.firstName + " " + user.lastName
98
97
                color: listv.currentIndex==index? Cutegram.currentTheme.sendFrameFontHighlightColor : Cutegram.currentTheme.sendFrameFontColor
99
98
            }
 
99
 
 
100
            MouseArea {
 
101
                anchors.fill: parent
 
102
                onClicked: {
 
103
                    listv.currentIndex = index;
 
104
                    uname_sgs_menu.selected();
 
105
                }
 
106
            }
100
107
        }
101
108
    }
102
109