Fix some glitches in qml app menu

This commit is contained in:
Gioacchino Mazzurco 2018-02-01 21:26:36 +01:00
parent 6e093c74c0
commit 36e20db887
4 changed files with 13 additions and 22 deletions

View File

@ -154,8 +154,8 @@ QtObject
property QtObject chatHelper: QtObject
{
id: chatHelper
property var gxs_id
property var name
property string gxs_id
property string name
property var cb
function startDistantChat (own_gxs_id, gxs_id, name, cb)

View File

@ -104,10 +104,12 @@ Drawer
target: mainWindow
onCoreReadyChanged:
{
console.log("Drawer onCoreReadyChanged",
model.title,
model.showOnCoreReady,
mainWindow.coreReady)
if (model.showOnCoreReady)
{
setVisible(mainWindow.coreReady)
}
menuItem.setVisible(mainWindow.coreReady)
}
}
@ -147,30 +149,20 @@ Drawer
}
}
visible: (model.showOnCoreReady)? setVisible(mainWindow.coreReady) : true
Component.onCompleted:
{
if (!model.showOnOsAndroid && Q_OS_ANDROID)
{
menuItem.visible = false
menuItem.height = 0
}
setVisible(false)
}
function setVisible(b)
{
menuItem.visible = b
if (!b)
{
menuItem.height = 0
}
else
{
menuItem.height = styles.height
}
if (!b) menuItem.height = 0
else menuItem.height = styles.height
return b;
}
}

View File

@ -630,11 +630,10 @@ ApplicationWindow
property var netStatus: ({})
function refreshNetStatus(optCallback)
{
console.log("refreshNetStatus(optCallback)", optCallback)
console.log("refreshNetStatus(optCallback)")
rsApi.request("/peers/get_network_options", "", function(par)
{
var json = JSON.parse(par.response)
console.log("got", par.response)
mainWindow.netStatus = json.data
if(typeof(optCallback) === "function") optCallback();
})

View File

@ -28,7 +28,7 @@ QtObject {
property var color: "white"
property var textColor: "grey"
property var margins: 8
property string text: "Retroshare Dev Version"
property string text: "Retroshare Android alpha"
}
}