From f4a775ff69c41252d43bfbbd848a194ebdb027aa Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 2 Aug 2012 13:14:55 +0200 Subject: [PATCH] use the checked property of TabButton --- active/app/package/contents/ui/Browser.qml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/active/app/package/contents/ui/Browser.qml b/active/app/package/contents/ui/Browser.qml index 1845d112e..ef689f89b 100644 --- a/active/app/package/contents/ui/Browser.qml +++ b/active/app/package/contents/ui/Browser.qml @@ -212,31 +212,30 @@ MobileComponents.OverlayDrawer { id: thumbnailsButton text: i18n("Thumbnails") tab: thumbnails - property bool current: mainTabBar.currentTab == thumbnailsButton - onCurrentChanged: { - if (current) { + onCheckedChanged: { + if (checked) { pageStack.replace(Qt.createComponent("Thumbnails.qml")) } } } PlasmaComponents.TabButton { id: tocButton + //enabled: text: i18n("Table of contents") tab: tableOfContents - property bool current: mainTabBar.currentTab == tocButton - onCurrentChanged: { - if (current) { + onCheckedChanged: { + if (checked) { pageStack.replace(Qt.createComponent("TableOfContents.qml")) } } } PlasmaComponents.TabButton { id: bookmarksButton + enabled: documentItem.bookmarks.length > 0 text: i18n("Bookmarks") tab: tableOfContents - property bool current: mainTabBar.currentTab == bookmarksButton - onCurrentChanged: { - if (current) { + onCheckedChanged: { + if (checked) { pageStack.replace(Qt.createComponent("Bookmarks.qml")) } }