Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #409 from ubports/xenial_-_kugiigi-surudark-merged
Browse files Browse the repository at this point in the history
SuruDark fixes (#331), with conflicts fixed
  • Loading branch information
dobey authored Nov 30, 2020
2 parents e550a08 + 983e82d commit a5daaac
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/app/webbrowser/BookmarksView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Common.BrowserPage {
}

activeFocusOnPress: false
strokeColor: theme.palette.selected.base
color: theme.palette.normal.base
text: i18n.tr("Done")

onClicked: bookmarksView.back()
Expand Down
2 changes: 1 addition & 1 deletion src/app/webbrowser/BookmarksViewWide.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Common.BrowserPage {
verticalCenter: parent.verticalCenter
}

strokeColor: theme.palette.selected.base
color: theme.palette.normal.base

text: i18n.tr("Done")

Expand Down
5 changes: 3 additions & 2 deletions src/app/webbrowser/Highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

function highlightTerms(text, terms) {
function highlightTerms(text, terms, color) {
var highlightColor = color ? color : "#752571"
var termsRe
var highlight = '<font color="#752571">$&</font>'
var highlight = '<b><font color="' + highlightColor + '">$&</font></b>'
var searchTerms = []

function escapeTerm(term) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/webbrowser/HistoryView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Common.BrowserPage {
verticalCenter: parent.verticalCenter
}

strokeColor: theme.palette.normal.baseText
color: theme.palette.normal.base

text: i18n.tr("Done")

Expand Down
6 changes: 3 additions & 3 deletions src/app/webbrowser/HistoryViewWide.qml
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ Common.BrowserPage {
property url siteUrl: model.url

icon: model.icon
title: Highlight.highlightTerms(model.title ? model.title : model.url, searchQuery.terms)
url: Highlight.highlightTerms(model.url, searchQuery.terms)
title: Highlight.highlightTerms(model.title ? model.title : model.url, searchQuery.terms, theme.palette.normal.focus)
url: Highlight.highlightTerms(model.url, searchQuery.terms, theme.palette.normal.focus)

headerComponent: Label {
text: Qt.formatTime(model.lastVisit)
Expand Down Expand Up @@ -403,7 +403,7 @@ Common.BrowserPage {
verticalCenter: parent.verticalCenter
}

strokeColor: theme.palette.normal.baseText
color: theme.palette.normal.base

text: i18n.tr("Done")

Expand Down
6 changes: 3 additions & 3 deletions src/app/webbrowser/Suggestion.qml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ListItem.Base {
}
width: units.gu(2)
height: units.gu(2)
color: theme.palette.normal.baseText
color: theme.palette.selected.backgroundText
asynchronous: true
}

Expand All @@ -64,7 +64,7 @@ ListItem.Base {
leftMargin: units.gu(2)
right: parent.right
}
color: selected ? "#DB4923" : theme.palette.normal.baseText
color: selected ? "#DB4923" : theme.palette.selected.backgroundText
elide: Text.ElideRight
}

Expand All @@ -79,7 +79,7 @@ ListItem.Base {
fontSize: "small"
elide: Text.ElideRight
visible: text !== ""
color: selected ? "#DB4923" : theme.palette.normal.baseText
color: selected ? "#DB4923" : theme.palette.selected.backgroundText
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/app/webbrowser/Suggestions.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ FocusScope {
color: theme.palette.normal.base
width: 1
}
color: theme.palette.normal.background
}

clip: true
Expand Down Expand Up @@ -72,9 +73,9 @@ FocusScope {
width: suggestionsList.width
showDivider: index < model.length - 1

title: selected ? modelData.title : Highlight.highlightTerms(modelData.title, searchTerms)
title: selected ? modelData.title : Highlight.highlightTerms(modelData.title, searchTerms, theme.palette.normal.focus)
subtitle: modelData.displayUrl ? (selected ? modelData.url :
Highlight.highlightTerms(modelData.url, searchTerms)) : ""
Highlight.highlightTerms(modelData.url, searchTerms, theme.palette.normal.focus)) : ""
icon: modelData.icon || ""
selected: suggestionsList.activeFocus && ListView.isCurrentItem

Expand Down
9 changes: 2 additions & 7 deletions src/app/webbrowser/Toolbar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@

import QtQuick 2.4
import Ubuntu.Components 1.3
import QtGraphicalEffects 1.0

Rectangle {
id: toolbar

color: theme.palette.normal.foreground

Image {
id: tabShadow
anchors {
Expand All @@ -34,12 +35,6 @@ Rectangle {
fillMode: Image.TileHorizontally
asynchronous: true
}

ColorOverlay {
anchors.fill: bug
source: bug
color: theme.palette.normal.background
}

states: [
State {
Expand Down
2 changes: 1 addition & 1 deletion src/app/webbrowser/ToolbarAction.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ AbstractButton {
id: toolbarAction

property alias iconName: icon.name
property color color: theme.palette.normal.baseText
property color color: theme.palette.normal.foregroundText
property alias text: label.text

opacity: enabled ? 1.0 : 0.3
Expand Down

0 comments on commit a5daaac

Please sign in to comment.