summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@theqtcompany.com>2015-08-07 17:08:40 +0200
committerAndras Becsi <andras.becsi@theqtcompany.com>2015-08-12 17:22:04 +0200
commitbd5799ee730f1b3789c75e29e8406bf8017bb559 (patch)
tree734e94292c0c388d42eb29c3c4c0a7b5e75839cf
parentef66fb936b280a44000db0c3cdad87e6dc351caf (diff)
Fix active focus propagation to hide the IM if not needed
-rw-r--r--src/qml/BrowserWindow.qml18
-rw-r--r--src/qml/NavigationBar.qml6
-rw-r--r--src/qml/PageView.qml2
3 files changed, 15 insertions, 11 deletions
diff --git a/src/qml/BrowserWindow.qml b/src/qml/BrowserWindow.qml
index 3b5cb25..75dcb69 100644
--- a/src/qml/BrowserWindow.qml
+++ b/src/qml/BrowserWindow.qml
@@ -269,10 +269,6 @@ Item {
State {
name: "enabled"
PropertyChanges {
- target: homeScreen
- state: "disabled"
- }
- PropertyChanges {
target: urlDropDown
height: browserWindow.height - toolBarSize - 3
}
@@ -286,6 +282,11 @@ Item {
}
]
+ Rectangle {
+ anchors.fill: parent
+ color: "#e4e4e4"
+ }
+
ListView {
id: historyList
property int remainingHeight: Math.min((historyList.count + 1) * toolBarSize, inputPanel.y - toolBarSize - 3)
@@ -311,8 +312,8 @@ Item {
onClicked: {
if (!url)
return
- navigation.addressBar.text = url
- navigation.addressBar.accepted()
+ navigation.webView.url = url
+ navigation.webView.forceActiveFocus()
}
}
@@ -360,7 +361,6 @@ Item {
z: 5
width: historyList.width
height: toolBarSize
- border.color: iconStrokeColor
MouseArea {
anchors.fill: parent
onClicked: {
@@ -371,8 +371,8 @@ Item {
} else {
constructedUrl = engine.fromUserInput(googleSearchQuery + string)
}
- navigation.addressBar.text = constructedUrl
- navigation.addressBar.accepted()
+ navigation.webView.url = constructedUrl
+ navigation.webView.forceActiveFocus()
}
}
Row {
diff --git a/src/qml/NavigationBar.qml b/src/qml/NavigationBar.qml
index 6c3fadf..a463801 100644
--- a/src/qml/NavigationBar.qml
+++ b/src/qml/NavigationBar.qml
@@ -171,6 +171,7 @@ ToolBar {
if (activeFocus) {
urlBar.selectAll()
root.state = "enabled"
+ homeScreen.state = "disabled"
urlDropDown.state = "enabled"
} else {
urlDropDown.state = "disabled"
@@ -213,6 +214,7 @@ ToolBar {
onClicked: {
if (state == "load") {
webView.loading ? webView.stop() : webView.reload()
+ webView.forceActiveFocus()
return
}
urlBar.selectAll()
@@ -295,8 +297,10 @@ ToolBar {
if (homeScreen.state == "disabled" || homeScreen.state == "edit") {
homeScreen.messageBox.state = "disabled"
homeScreen.state = "enabled"
- } else if (homeScreen.state != "disabled")
+ homeScreen.forceActiveFocus()
+ } else if (homeScreen.state != "disabled") {
homeScreen.state = "disabled"
+ }
}
}
Rectangle {
diff --git a/src/qml/PageView.qml b/src/qml/PageView.qml
index fa20a82..243d892 100644
--- a/src/qml/PageView.qml
+++ b/src/qml/PageView.qml
@@ -572,7 +572,7 @@ Rectangle {
text: item.title
font.pixelSize: 16
font.family: defaultFontFamily
- color: "#0B508C"
+ color: settingsView.privateBrowsingEnabled ? "white" : "#0B508C"
visible: wrapper.isCurrentItem && wrapper.visibility == 1.0
}
}