mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
browser url bar
This commit is contained in:
parent
1fa98129c0
commit
5f051551aa
2 changed files with 157 additions and 15 deletions
|
|
@ -50,7 +50,7 @@ ApplicationWindow {
|
|||
|
||||
mainSplit.setView(wallet.view, wallet.menuItem);
|
||||
|
||||
newBrowserTab("http://etherian.io");
|
||||
newBrowserTab("http://ethereum-dapp-whisper-client.meteor.com/chat/ethereum");
|
||||
|
||||
// Command setup
|
||||
gui.sendCommand(0)
|
||||
|
|
@ -330,6 +330,7 @@ ApplicationWindow {
|
|||
anchors.fill: parent
|
||||
resizing: false
|
||||
|
||||
|
||||
function setView(view, menu) {
|
||||
for(var i = 0; i < views.length; i++) {
|
||||
views[i].view.visible = false
|
||||
|
|
@ -367,6 +368,8 @@ ApplicationWindow {
|
|||
id: menu
|
||||
Layout.minimumWidth: 192
|
||||
Layout.maximumWidth: 192
|
||||
border.width: 10
|
||||
|
||||
anchors.top: parent.top
|
||||
Rectangle {
|
||||
width: parent.height
|
||||
|
|
@ -680,6 +683,9 @@ ApplicationWindow {
|
|||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
color: "#00000000"
|
||||
border.width: 10
|
||||
border.color: "#00FF0F"
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: urlPane
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ Rectangle {
|
|||
|
||||
//uriNav.text = uri.text.replace(/(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.\w{2,3})(.*)/, "$1$2<span style='color:#CCC'>$3</span>");
|
||||
uriNav.text = uri;
|
||||
appDomain.text = "some.thing"
|
||||
|
||||
} else {
|
||||
// Prevent inf loop.
|
||||
window.cleanPath = false;
|
||||
|
|
@ -79,39 +81,163 @@ Rectangle {
|
|||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
leftMargin: 7
|
||||
}
|
||||
|
||||
|
||||
Button {
|
||||
id: back
|
||||
|
||||
onClicked: {
|
||||
webview.goBack()
|
||||
}
|
||||
|
||||
anchors{
|
||||
left: parent.left
|
||||
leftMargin: 6
|
||||
}
|
||||
|
||||
style: ButtonStyle {
|
||||
background: Image {
|
||||
source: "../../back.png"
|
||||
width: 30
|
||||
source: "../../backButton.png"
|
||||
width: 20
|
||||
height: 30
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TextField {
|
||||
anchors {
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: appInfoPane
|
||||
height: 28
|
||||
color: "#FFFFFF"
|
||||
radius: 6
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
z: 10
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
uriNav.visible = true
|
||||
appTitle.visible = false
|
||||
appDomain.visible = false
|
||||
|
||||
}
|
||||
/*onExited: {
|
||||
uriNav.visible = false
|
||||
appTitle.visible = true
|
||||
appDomain.visible = true
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
anchors {
|
||||
left: back.right
|
||||
right: toggleInspector.left
|
||||
right: parent.right
|
||||
leftMargin: 10
|
||||
rightMargin: 10
|
||||
}
|
||||
text: webview.url;
|
||||
id: uriNav
|
||||
y: parent.height / 2 - this.height / 2
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
webview.url = this.text;
|
||||
}
|
||||
Text {
|
||||
id: appTitle
|
||||
text: webview.title
|
||||
font.bold: true
|
||||
font.capitalization: Font.AllUppercase
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.horizontalCenter
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
rightMargin: 10
|
||||
}
|
||||
color: "#928484"
|
||||
}
|
||||
|
||||
Text {
|
||||
id: appDomain
|
||||
text: webview.url
|
||||
font.bold: false
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
anchors {
|
||||
left: parent.horizontalCenter
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
leftMargin: 10
|
||||
}
|
||||
color: "#928484"
|
||||
}
|
||||
|
||||
|
||||
TextField {
|
||||
id: uriNav
|
||||
visible: false
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
leftMargin: 16
|
||||
}
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
style: TextFieldStyle {
|
||||
textColor: "#928484"
|
||||
background: Rectangle {
|
||||
border.width: 0
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
text: webview.url;
|
||||
y: parent.height / 2 - this.height / 2
|
||||
z: 20
|
||||
Keys.onReturnPressed: {
|
||||
webview.url = this.text;
|
||||
uriNav.visible = false
|
||||
appTitle.visible = true
|
||||
appDomain.visible = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*text {
|
||||
id: appTitle
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.horizontalCenter
|
||||
text: "APP TITLE"
|
||||
font.bold: true
|
||||
color: "#928484"
|
||||
}*/
|
||||
z:2
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: appInfoPaneShadow
|
||||
width: 10
|
||||
height: 30
|
||||
color: "#BDB6B6"
|
||||
radius: 6
|
||||
|
||||
anchors {
|
||||
left: back.right
|
||||
right: parent.right
|
||||
leftMargin:10
|
||||
rightMargin:10
|
||||
top: parent.top
|
||||
topMargin: 23
|
||||
}
|
||||
|
||||
z:1
|
||||
}
|
||||
/*
|
||||
Button {
|
||||
id: toggleInspector
|
||||
anchors {
|
||||
|
|
@ -128,7 +254,17 @@ Rectangle {
|
|||
inspector.url = webview.experimental.remoteInspectorUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "#F6F1F2" }
|
||||
GradientStop { position: 1.0; color: "#DED5D5" }
|
||||
}
|
||||
z:-1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Border
|
||||
|
|
|
|||
Loading…
Reference in a new issue