|
|
|
@ -63,6 +63,17 @@ ApplicationWindow { |
|
|
|
|
gui.sendCommand(0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function activeView(view, menuItem) { |
|
|
|
|
mainSplit.setView(view, menuItem) |
|
|
|
|
if (view.objectName === "browserView") { |
|
|
|
|
urlPane.visible = false; |
|
|
|
|
mainView.anchors.top = rootView.top |
|
|
|
|
} else { |
|
|
|
|
urlPane.visible = true; |
|
|
|
|
mainView.anchors.top = divider.bottom |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function addViews(view, path, options) { |
|
|
|
|
var views = mainSplit.addComponent(view, options) |
|
|
|
|
views.menuItem.path = path |
|
|
|
@ -284,6 +295,7 @@ ApplicationWindow { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ProgressBar { |
|
|
|
|
visible: false |
|
|
|
|
id: downloadIndicator |
|
|
|
|
value: 0 |
|
|
|
|
objectName: "downloadIndicator" |
|
|
|
@ -293,6 +305,7 @@ ApplicationWindow { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
visible: false |
|
|
|
|
objectName: "downloadLabel" |
|
|
|
|
//y: 7 |
|
|
|
|
anchors.left: downloadIndicator.right |
|
|
|
@ -445,15 +458,7 @@ ApplicationWindow { |
|
|
|
|
MouseArea { |
|
|
|
|
anchors.fill: parent |
|
|
|
|
onClicked: { |
|
|
|
|
mainSplit.setView(view, menuItem) |
|
|
|
|
console.log(view); |
|
|
|
|
if (view.objectName === "browserView") { |
|
|
|
|
urlPane.visible = false; |
|
|
|
|
mainView.anchors.top = rootView.top |
|
|
|
|
} else { |
|
|
|
|
urlPane.visible = true; |
|
|
|
|
mainView.anchors.top = divider.bottom |
|
|
|
|
} |
|
|
|
|
activeView(view, menuItem); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -648,8 +653,7 @@ ApplicationWindow { |
|
|
|
|
|
|
|
|
|
Keys.onReturnPressed: { |
|
|
|
|
if(/^https?/.test(this.text)) { |
|
|
|
|
root.browser.view.open(this.text); |
|
|
|
|
mainSplit.setView(root.browser.view, root.browser.menuItem); |
|
|
|
|
activeView(root.browser.view, root.browser.menuItem); |
|
|
|
|
} else { |
|
|
|
|
addPlugin(this.text, {close: true, section: "apps"}) |
|
|
|
|
} |
|
|
|
|