mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 14:48:15 +00:00
unstable
This commit is contained in:
parent
33059cc20b
commit
3566f3fdff
4 changed files with 57 additions and 8 deletions
|
|
@ -1,6 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>CallControls</name>
|
||||
<message>
|
||||
<source>homeEntry</source>
|
||||
<translation type="unfinished">Home</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>contactsEntry</source>
|
||||
<translation type="unfinished">Contacts</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Calls</name>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>CallControls</name>
|
||||
<message>
|
||||
<source>homeEntry</source>
|
||||
<translation type="unfinished">Accueil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>contactsEntry</source>
|
||||
<translation type="unfinished">Contacts</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Calls</name>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ ColumnLayout {
|
|||
property int entryWidth
|
||||
property var entries
|
||||
|
||||
property int fontSize: MenuStyle.entry.text.fontSize
|
||||
|
||||
property int _selectedEntry: 0
|
||||
|
||||
signal entrySelected (int entry)
|
||||
|
|
@ -48,15 +50,23 @@ ColumnLayout {
|
|||
spacing: MenuStyle.entry.spacing
|
||||
|
||||
Icon {
|
||||
Layout.preferredHeight: MenuStyle.entry.iconSize
|
||||
Layout.preferredWidth: MenuStyle.entry.iconSize
|
||||
icon: modelData.icon
|
||||
Layout.preferredHeight: modelData.icon
|
||||
? (modelData.iconSize != null
|
||||
? modelData.iconSize
|
||||
: MenuStyle.entry.iconSize
|
||||
) : 0
|
||||
Layout.preferredWidth: modelData.icon
|
||||
? (modelData.iconSize != null
|
||||
? modelData.iconSize
|
||||
: MenuStyle.entry.iconSize
|
||||
) : 0
|
||||
icon: modelData.icon || ''
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
color: MenuStyle.entry.text.color
|
||||
font.pointSize: MenuStyle.entry.text.fontSize
|
||||
font.pointSize: menu.fontSize
|
||||
height: parent.height
|
||||
text: modelData.entryName
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
|
|||
|
|
@ -53,15 +53,32 @@ RowLayout {
|
|||
id: menu
|
||||
|
||||
entryHeight: 22
|
||||
height: 100
|
||||
implicitHeight: toto.height
|
||||
launcher: button
|
||||
relativeTo: button
|
||||
relativeX: button.width + 1
|
||||
width: 120
|
||||
|
||||
Rectangle {
|
||||
color: 'red'
|
||||
anchors.fill: parent
|
||||
Menu {
|
||||
id: toto
|
||||
entryHeight: 22
|
||||
entryWidth: 98
|
||||
fontSize: 11
|
||||
entries: [{
|
||||
entryName: qsTr('homeEntry')
|
||||
}, {
|
||||
entryName: qsTr('contactsEntry')
|
||||
}]
|
||||
|
||||
onEntrySelected: {
|
||||
console.log('entry', entry)
|
||||
|
||||
if (entry === 0) {
|
||||
setView('Home')
|
||||
} else if (entry === 1) {
|
||||
setView('Contacts')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue