This commit is contained in:
LubuWest 2018-10-01 21:17:54 +02:00
commit 09e8b8d097
49 changed files with 1720 additions and 825 deletions

View file

@ -40,7 +40,7 @@ Rectangle{
id:smileyDialog
x: mm
width: messageColumn.width-5*mm
height:root.height/3
height:root.height/2
BlueButton{
id:closeButton
@ -64,7 +64,7 @@ Rectangle{
frameOverlap: 1
tab: Rectangle {
color: "white"
implicitWidth: smileyTabView.width/3-2*mm
implicitWidth: smileyTabView.width/4-2*mm
implicitHeight: 4*mm
Text { id: text
anchors.centerIn: parent
@ -78,6 +78,30 @@ Rectangle{
tabsAlignment:Qt.AlignHCenter
}
Tab{
title: qsTr("Unicode")
Rectangle{
id: htmlGridTab
GridView {
id:htmlView
anchors.fill: parent
cellWidth: 5*mm
cellHeight: 5*mm
clip: true
model: htmlModel
delegate: htmlItem
}
ListModel{
id:htmlModel
}
Component.onCompleted:{
for (var icon in Smileyjs.html){
htmlModel.append({"emoji":Smileyjs.html[icon]})
}
}
}
}
Tab{
title: qsTr("Standard")
Rectangle{
@ -152,6 +176,9 @@ Rectangle{
}
}
}
}
Component{
id:smileyItem
@ -166,9 +193,31 @@ Rectangle{
onClicked:{
//bodyField.append(emoji.name+" ")
bodyField.insert(bodyField.cursorPosition,emoji.name+" ");
smileyDialog.destroy()
smileyDialog.visible=false
}
}
}
}
Component{
id:htmlItem
Text{id:smileText
width:4.5*mm
height: 4.5*mm
textFormat:Text.RichText
font.pixelSize: 4*mm
text: emoji
MouseArea{
anchors.fill: parent
onClicked:{
//bodyField.append(emoji.name+" ")
bodyField.insert(bodyField.cursorPosition,emoji+" ");
smileyDialog.visible=false
}
}
}
}
}