/* * Copyright 2021 Michail Vourlakos * * This file is part of Latte-Dock * * Latte-Dock is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * Latte-Dock is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import QtQuick 2.7 import QtQuick.Layouts 1.3 import org.kde.plasma.core 2.0 as PlasmaCore Item { visible: false property Item stackView: null Item { id: hiddenIndicatorPage anchors.fill: parent readonly property int optionsWidth: dialog.optionsWidth readonly property bool deprecatedOptionsAreHidden: true // @since 0.10.0 readonly property Item nextPage: stackView.currentItem === page1 ? page2 : page1 readonly property Item previousPage: nextPage === page1 ? page2 : page1 //! it is used during first window creation in order to avoid clearing custom indicators from its views //! when the window is created the current view indicator type is stored and restored after //! the tabBar of indicators has completed its creation/initialization property string typeDuringCreation: "" function showNextIndicator() { var nextIndicator; //var pageShown = stackView.currentItem ? 1 : 0; //var total = page1.children.length + page2.children.length + hiddenPages.children.length + pageShown; //console.log(" >>>>>>>>>>>>>>>>> ALL PAGES :: " + total); if (children.length > 0) { nextIndicator = children[0]; } if (nextIndicator && (!stackView.currentItem || !stackView.currentItem.isCurrent)) { //!empty nextPage by moving its pages into hiddenPages var childrenCount = nextPage.children.length; for (var i=0; i0) { //!empty all remaining pages by moving them into hiddenPages var tempcount = children.length; for (var i=0; i