mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-29 02:51:45 -04:00
Fix some glitches in qml app menu
This commit is contained in:
parent
6e093c74c0
commit
36e20db887
4 changed files with 13 additions and 22 deletions
|
@ -154,8 +154,8 @@ QtObject
|
||||||
property QtObject chatHelper: QtObject
|
property QtObject chatHelper: QtObject
|
||||||
{
|
{
|
||||||
id: chatHelper
|
id: chatHelper
|
||||||
property var gxs_id
|
property string gxs_id
|
||||||
property var name
|
property string name
|
||||||
property var cb
|
property var cb
|
||||||
|
|
||||||
function startDistantChat (own_gxs_id, gxs_id, name, cb)
|
function startDistantChat (own_gxs_id, gxs_id, name, cb)
|
||||||
|
|
|
@ -104,10 +104,12 @@ Drawer
|
||||||
target: mainWindow
|
target: mainWindow
|
||||||
onCoreReadyChanged:
|
onCoreReadyChanged:
|
||||||
{
|
{
|
||||||
|
console.log("Drawer onCoreReadyChanged",
|
||||||
|
model.title,
|
||||||
|
model.showOnCoreReady,
|
||||||
|
mainWindow.coreReady)
|
||||||
if (model.showOnCoreReady)
|
if (model.showOnCoreReady)
|
||||||
{
|
menuItem.setVisible(mainWindow.coreReady)
|
||||||
setVisible(mainWindow.coreReady)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,30 +149,20 @@ Drawer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
visible: (model.showOnCoreReady)? setVisible(mainWindow.coreReady) : true
|
visible: (model.showOnCoreReady)? setVisible(mainWindow.coreReady) : true
|
||||||
|
|
||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
if (!model.showOnOsAndroid && Q_OS_ANDROID)
|
if (!model.showOnOsAndroid && Q_OS_ANDROID)
|
||||||
{
|
setVisible(false)
|
||||||
menuItem.visible = false
|
|
||||||
menuItem.height = 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setVisible(b)
|
function setVisible(b)
|
||||||
{
|
{
|
||||||
menuItem.visible = b
|
menuItem.visible = b
|
||||||
if (!b)
|
if (!b) menuItem.height = 0
|
||||||
{
|
else menuItem.height = styles.height
|
||||||
menuItem.height = 0
|
return b;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
menuItem.height = styles.height
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -630,11 +630,10 @@ ApplicationWindow
|
||||||
property var netStatus: ({})
|
property var netStatus: ({})
|
||||||
function refreshNetStatus(optCallback)
|
function refreshNetStatus(optCallback)
|
||||||
{
|
{
|
||||||
console.log("refreshNetStatus(optCallback)", optCallback)
|
console.log("refreshNetStatus(optCallback)")
|
||||||
rsApi.request("/peers/get_network_options", "", function(par)
|
rsApi.request("/peers/get_network_options", "", function(par)
|
||||||
{
|
{
|
||||||
var json = JSON.parse(par.response)
|
var json = JSON.parse(par.response)
|
||||||
console.log("got", par.response)
|
|
||||||
mainWindow.netStatus = json.data
|
mainWindow.netStatus = json.data
|
||||||
if(typeof(optCallback) === "function") optCallback();
|
if(typeof(optCallback) === "function") optCallback();
|
||||||
})
|
})
|
||||||
|
|
|
@ -28,7 +28,7 @@ QtObject {
|
||||||
property var color: "white"
|
property var color: "white"
|
||||||
property var textColor: "grey"
|
property var textColor: "grey"
|
||||||
property var margins: 8
|
property var margins: 8
|
||||||
property string text: "Retroshare Dev Version"
|
property string text: "Retroshare Android alpha"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue