Skip to content

Commit

Permalink
Merge pull request #295 from rainemak/VDVsx-cover-fix
Browse files Browse the repository at this point in the history
[sailfish-browser] Limit active cover actions to one for Sailfish 2.0
  • Loading branch information
rojkov committed Feb 15, 2015
2 parents 1882431 + dc71d69 commit 93b77c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rpm/sailfish-browser.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ BuildRequires: qt5-qttools-linguist
BuildRequires: gdb
BuildRequires: oneshot

Requires: sailfishsilica-qt5 >= 0.13.34
Requires: sailfishsilica-qt5 >= 0.13.35
Requires: jolla-ambient >= 0.4.18
Requires: xulrunner-qt5 >= 29.0.1.9
Requires: embedlite-components-qt5 >= 1.6.4
Expand Down
14 changes: 13 additions & 1 deletion src/pages/BrowserPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import QtQuick 2.0
import Sailfish.Silica 1.0
import Sailfish.Silica.private 1.0
import Sailfish.Browser 1.0
import "components" as Browser

Expand Down Expand Up @@ -143,7 +144,18 @@ Page {
}

CoverActionList {
enabled: browserPage.status === PageStatus.Active && webView.contentItem
enabled: browserPage.status === PageStatus.Active && webView.contentItem && (Config.sailfishVersion >= 2.0)
iconBackground: true

CoverAction {
iconSource: "image://theme/icon-cover-new"
onTriggered: activateNewTabView()
}
}

// TODO: remove once we move to sailfish 2.0
CoverActionList {
enabled: browserPage.status === PageStatus.Active && webView.contentItem && (Config.sailfishVersion < 2.0)
iconBackground: true

CoverAction {
Expand Down

0 comments on commit 93b77c0

Please sign in to comment.