Make tool window closable

This commit is contained in:
Brad Davis 2016-01-24 13:55:31 -08:00
parent 8ed5ea8605
commit 79e6aaf17f

View file

@ -13,7 +13,7 @@ Windows.Window {
objectName: "ToolWindow"
destroyOnCloseButton: false
destroyOnInvisible: false
closable: false
closable: true
visible: false
width: 384; height: 640;
property string newTabSource
@ -54,17 +54,12 @@ Windows.Window {
}
function updateVisiblity() {
var newVisible = false
console.log("Checking " + tabView.count + " children")
for (var i = 0; i < tabView.count; ++i) {
if (tabView.getTab(i).enabled) {
console.log("Tab " + i + " enabled");
newVisible = true;
break;
return;
}
}
console.log("Setting toolWindow visible: " + newVisible);
visible = newVisible
visible = false;
}
function findIndexForUrl(source) {
@ -127,7 +122,6 @@ Windows.Window {
var title = properties.title || "Unknown";
newTabSource = properties.source;
console.log(typeof(properties.source))
var newTab = tabView.addTab(title, webTabCreator);
newTab.active = true;
newTab.enabled = false;