diff --git a/applets/kicker/package/contents/ui/ActionMenu.qml b/applets/kicker/package/contents/ui/ActionMenu.qml --- a/applets/kicker/package/contents/ui/ActionMenu.qml +++ b/applets/kicker/package/contents/ui/ActionMenu.qml @@ -131,7 +131,7 @@ checked : actionItem.checked ? actionItem.checked : false onClicked: { - actionClicked(actionItem.actionId, actionItem.actionArgument); + root.actionClicked(actionItem.actionId, actionItem.actionArgument); } } } diff --git a/applets/kicker/package/contents/ui/CompactRepresentation.qml b/applets/kicker/package/contents/ui/CompactRepresentation.qml --- a/applets/kicker/package/contents/ui/CompactRepresentation.qml +++ b/applets/kicker/package/contents/ui/CompactRepresentation.qml @@ -69,28 +69,28 @@ Connections { target: units.iconSizeHints - onPanelChanged: updateSizeHints() + onPanelChanged: root.updateSizeHints() } PlasmaCore.IconItem { id: buttonIcon anchors.fill: parent - readonly property double aspectRatio: (vertical ? implicitHeight / implicitWidth + readonly property double aspectRatio: (root.vertical ? implicitHeight / implicitWidth : implicitWidth / implicitHeight) - source: useCustomButtonImage ? plasmoid.configuration.customButtonImage : plasmoid.configuration.icon + source: root.useCustomButtonImage ? plasmoid.configuration.customButtonImage : plasmoid.configuration.icon active: mouseArea.containsMouse && !justOpenedTimer.running smooth: true // A custom icon could also be rectangular. However, if a square, custom, icon is given, assume it // to be an icon and round it to the nearest icon size again to avoid scaling artifacts. - roundToIconSize: !useCustomButtonImage || aspectRatio === 1 + roundToIconSize: !root.useCustomButtonImage || aspectRatio === 1 - onSourceChanged: updateSizeHints() + onSourceChanged: root.updateSizeHints() } MouseArea @@ -100,7 +100,7 @@ anchors.fill: parent - hoverEnabled: !dashWindow || !dashWindow.visible + hoverEnabled: !root.dashWindow || !root.dashWindow.visible onPressed: { if (!isDash) { @@ -110,7 +110,7 @@ onClicked: { if (isDash) { - dashWindow.toggle(); + root.dashWindow.toggle(); justOpenedTimer.start(); } else { plasmoid.expanded = !wasExpanded; diff --git a/applets/kicker/package/contents/ui/ConfigGeneral.qml b/applets/kicker/package/contents/ui/ConfigGeneral.qml --- a/applets/kicker/package/contents/ui/ConfigGeneral.qml +++ b/applets/kicker/package/contents/ui/ConfigGeneral.qml @@ -104,8 +104,8 @@ id: iconDialog function setCustomButtonImage(image) { - cfg_customButtonImage = image || cfg_icon || "start-here-kde" - cfg_useCustomButtonImage = true; + configGeneral.cfg_customButtonImage = image || configGeneral.cfg_icon || "start-here-kde" + configGeneral.cfg_useCustomButtonImage = true; } onIconNameChanged: setCustomButtonImage(iconName); @@ -123,7 +123,7 @@ anchors.centerIn: parent width: units.iconSizes.large height: width - source: cfg_useCustomButtonImage ? cfg_customButtonImage : cfg_icon + source: configGeneral.cfg_useCustomButtonImage ? configGeneral.cfg_customButtonImage : configGeneral.cfg_icon } } @@ -144,8 +144,8 @@ text: i18nc("@item:inmenu Reset icon to default", "Clear Icon") icon.name: "edit-clear" onClicked: { - cfg_icon = "start-here-kde" - cfg_useCustomButtonImage = false + configGeneral.cfg_icon = "start-here-kde" + configGeneral.cfg_useCustomButtonImage = false } } } @@ -187,7 +187,7 @@ CheckBox { id: showIconsRootLevel - visible: !isDash + visible: !configGeneral.isDash text: i18n("Show icons on the root level of the menu") } @@ -244,7 +244,7 @@ CheckBox { id: alignResultsToBottom - visible: !isDash + visible: !configGeneral.isDash text: i18n("Align search results to bottom") } diff --git a/applets/kicker/package/contents/ui/DashboardRepresentation.qml b/applets/kicker/package/contents/ui/DashboardRepresentation.qml --- a/applets/kicker/package/contents/ui/DashboardRepresentation.qml +++ b/applets/kicker/package/contents/ui/DashboardRepresentation.qml @@ -124,7 +124,7 @@ target: kicker onReset: { - if (!searching) { + if (!root.searching) { filterList.applyFilter(); if (tabBar.activeTab == 0) { @@ -211,7 +211,7 @@ repeat: false onTriggered: { - if (done || searching) { + if (done || root.searching) { return; } @@ -247,11 +247,11 @@ visible: (plasmoid.immutability !== PlasmaCore.Types.SystemImmutable) onActiveTabChanged: { - updateWidgetExplorer(); - reset(); + root.updateWidgetExplorer(); + root.reset(); } - onHoveredTabChanged: updateWidgetExplorer() + onHoveredTabChanged: root.updateWidgetExplorer() Keys.onDownPressed: { mainColumn.tryActivate(0, 0); @@ -272,7 +272,7 @@ if (tabBar.activeTab == 0) { runnerModel.query = searchField.text; } else { - widgetExplorer.widgetsModel.searchTerm = searchField.text; + root.widgetExplorer.widgetsModel.searchTerm = searchField.text; } } @@ -291,7 +291,7 @@ horizontalCenter: parent.horizontalCenter } - y: (middleRow.anchors.topMargin / 2) - (smallScreen ? (height/10) : 0) + y: (middleRow.anchors.topMargin / 2) - (root.smallScreen ? (height/10) : 0) font.pointSize: dummyHeading.font.pointSize * 1.5 wrapMode: Text.NoWrap @@ -302,7 +302,7 @@ color: "white" - text: searching ? i18n("Searching for '%1'", searchField.text) : i18n("Type to search...") + text: root.searching ? i18n("Searching for '%1'", searchField.text) : i18n("Type to search...") function updateSelection() { if (!searchField.selectedText) { @@ -367,7 +367,7 @@ horizontalCenter: parent.horizontalCenter } - width: (root.columns * cellSize) + (2 * spacing) + width: (root.columns * root.cellSize) + (2 * spacing) spacing: units.gridUnit * 2 @@ -379,7 +379,7 @@ bottom: parent.bottom } - width: (columns * cellSize) + units.gridUnit + width: (columns * root.cellSize) + units.gridUnit property int columns: 3 @@ -440,14 +440,14 @@ } property int rows: (Math.floor((parent.height - favoritesColumnLabel.height - - favoritesColumnLabelUnderline.height - units.largeSpacing) / cellSize) + - favoritesColumnLabelUnderline.height - units.largeSpacing) / root.cellSize) - systemFavoritesGrid.rows) width: parent.width - height: rows * cellSize + height: rows * root.cellSize - cellWidth: cellSize - cellHeight: cellSize + cellWidth: root.cellSize + cellHeight: root.cellSize iconSize: root.iconSize model: globalFavorites @@ -477,7 +477,7 @@ if (tabBar.visible) { tabBar.focus = true; - } else if (searching) { + } else if (root.searching) { cancelSearchButton.focus = true; } else { mainColumn.tryActivate(0, 0); @@ -502,13 +502,13 @@ top: globalFavoritesGrid.bottom } - property int rows: Math.ceil(count / Math.floor(width / cellSize)) + property int rows: Math.ceil(count / Math.floor(width / root.cellSize)) width: parent.width - height: rows * cellSize + height: rows * root.cellSize - cellWidth: cellSize - cellHeight: cellSize + cellWidth: root.cellSize + cellHeight: root.cellSize iconSize: root.iconSize model: systemFavorites @@ -536,7 +536,7 @@ globalFavoritesGrid.tryActivate(0, 0); } else if (tabBar.visible) { tabBar.focus = true; - } else if (searching && !runnerModel.count) { + } else if (root.searching && !runnerModel.count) { cancelSearchButton.focus = true; } else { mainColumn.tryActivate(0, 0); @@ -546,7 +546,7 @@ if (filterList.enabled) { filterList.forceActiveFocus(); - } else if (searching && !runnerModel.count) { + } else if (root.searching && !runnerModel.count) { cancelSearchButton.focus = true; } else { mainColumn.tryActivate(0, 0); @@ -561,8 +561,8 @@ anchors.top: parent.top - width: (columns * cellSize) + units.gridUnit - height: Math.floor(parent.height / cellSize) * cellSize + mainGridContainer.headerHeight + width: (columns * root.cellSize) + units.gridUnit + height: Math.floor(parent.height / root.cellSize) * root.cellSize + mainGridContainer.headerHeight property int columns: root.columns - favoritesColumn.columns - filterListColumn.columns property Item visibleGrid: mainGrid @@ -584,7 +584,7 @@ property int headerHeight: mainColumnLabel.height + mainColumnLabelUnderline.height + units.largeSpacing opacity: { - if (tabBar.activeTab == 0 && searching) { + if (tabBar.activeTab == 0 && root.searching) { return 0.0; } @@ -649,7 +649,7 @@ width: parent.width height: systemFavoritesGrid.y + systemFavoritesGrid.height - mainGridContainer.headerHeight - cellWidth: (tabBar.activeTab == 0 ? cellSize : cellSize * 2) + cellWidth: (tabBar.activeTab == 0 ? root.cellSize : root.cellSize * 2) cellHeight: cellWidth iconSize: (tabBar.activeTab == 0 ? root.iconSize : cellWidth - (units.largeSpacing * 2)) @@ -747,7 +747,7 @@ grabFocus: true - opacity: (tabBar.activeTab == 0 && searching) ? 1.0 : 0.0 + opacity: (tabBar.activeTab == 0 && root.searching) ? 1.0 : 0.0 onOpacityChanged: { if (opacity == 1.0) { @@ -782,7 +782,7 @@ } else if (event.key === Qt.Key_Backtab) { event.accepted = true; - if (searching) { + if (root.searching) { cancelSearchButton.focus = true; } else if (tabBar.visible) { tabBar.focus = true; @@ -804,7 +804,7 @@ bottom: parent.bottom } - width: columns * cellSize + width: columns * root.cellSize property int columns: 3 @@ -818,11 +818,11 @@ width: parent.width height: mainGrid.height - enabled: !searching + enabled: !root.searching property alias currentIndex: filterList.currentIndex - opacity: root.visible ? (searching ? 0.30 : 1.0) : 0.3 + opacity: root.visible ? (root.searching ? 0.30 : 1.0) : 0.3 Behavior on opacity { SmoothedAnimation { duration: units.longDuration; velocity: 0.01 } } @@ -1012,12 +1012,12 @@ } } - filterListColumn.columns = Math.ceil(width / cellSize); + filterListColumn.columns = Math.ceil(width / root.cellSize); filterListScrollArea.width = width + hItemMargins + (units.gridUnit * 2); } function applyFilter() { - if (!searching && currentIndex >= 0) { + if (!root.searching && currentIndex >= 0) { if (tabBar.activeTab == 1) { root.widgetExplorer.widgetsModel.filterQuery = currentItem.m.filterData; root.widgetExplorer.widgetsModel.filterType = currentItem.m.filterType; diff --git a/applets/kicker/package/contents/ui/DashboardTabButton.qml b/applets/kicker/package/contents/ui/DashboardTabButton.qml --- a/applets/kicker/package/contents/ui/DashboardTabButton.qml +++ b/applets/kicker/package/contents/ui/DashboardTabButton.qml @@ -39,7 +39,7 @@ color: tab.parent.focus ? theme.highlightColor : "black" - opacity: active ? 0.4 : 0.15 + opacity: tab.active ? 0.4 : 0.15 Behavior on opacity { SmoothedAnimation { duration: units.shortDuration; velocity: 0.01 } } } @@ -50,7 +50,7 @@ elide: Text.ElideNone wrapMode: Text.NoWrap - opacity: active ? 1.0 : 0.6 + opacity: tab.active ? 1.0 : 0.6 Behavior on opacity { SmoothedAnimation { duration: units.shortDuration; velocity: 0.01 } } color: tab.parent.focus ? theme.highlightedTextColor : "white" @@ -68,7 +68,7 @@ } onContainsMouseChanged: { - tab.parent.containsMouseChanged(index, containsMouse); + tab.parent.containsMouseChanged(tab.index, containsMouse); } } } diff --git a/applets/kicker/package/contents/ui/ItemGridDelegate.qml b/applets/kicker/package/contents/ui/ItemGridDelegate.qml --- a/applets/kicker/package/contents/ui/ItemGridDelegate.qml +++ b/applets/kicker/package/contents/ui/ItemGridDelegate.qml @@ -61,10 +61,10 @@ PlasmaCore.IconItem { id: icon - y: showLabel ? (2 * highlightItemSvg.margins.top) : undefined + y: item.showLabel ? (2 * highlightItemSvg.margins.top) : undefined anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: showLabel ? undefined : parent.verticalCenter + anchors.verticalCenter: item.showLabel ? undefined : parent.verticalCenter width: iconSize height: width @@ -80,7 +80,7 @@ PlasmaComponents.Label { id: label - visible: showLabel + visible: item.showLabel anchors { top: icon.bottom diff --git a/applets/kicker/package/contents/ui/main.qml b/applets/kicker/package/contents/ui/main.qml --- a/applets/kicker/package/contents/ui/main.qml +++ b/applets/kicker/package/contents/ui/main.qml @@ -81,14 +81,14 @@ autoPopulate: false appNameFormat: plasmoid.configuration.appNameFormat - flat: isDash ? true : plasmoid.configuration.limitDepth + flat: kicker.isDash ? true : plasmoid.configuration.limitDepth sorted: plasmoid.configuration.alphaSort - showSeparators: !isDash + showSeparators: !kicker.isDash appletInterface: plasmoid - showAllApps: isDash + showAllApps: kicker.isDash showAllAppsCategorized: true - showTopLevelItems: !isDash + showTopLevelItems: !kicker.isDash showRecentApps: plasmoid.configuration.showRecentApps showRecentDocs: plasmoid.configuration.showRecentDocs showRecentContacts: plasmoid.configuration.showRecentContacts @@ -160,7 +160,7 @@ runners: { var runners = new Array("services"); - if (isDash) { + if (kicker.isDash) { runners = runners.concat(new Array("desktopsessions", "PowerDevil", "calculator", "unitconverter")); } @@ -172,7 +172,7 @@ return runners; } - deleteWhenEmpty: isDash + deleteWhenEmpty: kicker.isDash } Kicker.DragHelper { @@ -263,7 +263,7 @@ Component.onCompleted: { if (plasmoid.hasOwnProperty("activationTogglesExpanded")) { - plasmoid.activationTogglesExpanded = !isDash + plasmoid.activationTogglesExpanded = !kicker.isDash } windowSystem.focusIn.connect(enableHideOnWindowDeactivate);