Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37038204
en ru br
Репозитории ALT

Группа :: Графические оболочки/Прочее
Пакет: deepin-kwin

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: deepin-kwin-tabbox-chameleon-rename.patch
Скачать


diff --git a/configures/kwinrc b/configures/kwinrc
index 91e05ee76..3edfb2d15 100644
--- a/configures/kwinrc
+++ b/configures/kwinrc
@@ -41,7 +41,7 @@ ActivitiesMode=1
 ApplicationsMode=0
 DesktopMode=1
 HighlightWindows=true
-LayoutName=thumbnail_grid
+LayoutName=chameleon
 MinimizedMode=0
 MultiScreenMode=0
 ShowDesktopMode=1
diff --git a/tabbox/CMakeLists.txt b/tabbox/CMakeLists.txt
index af1c0d929..d377f3056 100644
--- a/tabbox/CMakeLists.txt
+++ b/tabbox/CMakeLists.txt
@@ -1,6 +1,6 @@
 install(
     DIRECTORY
-    thumbnail_grid
+    chameleon
     DESTINATION
     ${CMAKE_INSTALL_PREFIX}/share/kwin/tabbox
 )
diff --git a/tabbox/chameleon/contents/ui/main.qml b/tabbox/chameleon/contents/ui/main.qml
new file mode 100755
index 000000000..a35c5c9f7
--- /dev/null
+++ b/tabbox/chameleon/contents/ui/main.qml
@@ -0,0 +1,357 @@
+import QtQuick 2.0
+import QtQuick.Window 2.0
+import QtGraphicalEffects 1.0
+import QtQuick.Layouts 1.1
+import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.components 2.0 as PlasmaComponents
+import org.kde.kquickcontrolsaddons 2.0
+import org.kde.kwin 2.0 as KWin
+
+// https://techbase.kde.org/Development/Tutorials/KWin/WindowSwitcher
+KWin.Switcher {
+    id: tabBox
+    currentIndex: itemsView.currentIndex
+
+    Window {
+        id: dialog
+        visible: tabBox.visible
+        // FramelessWindowHint is needed under wayland platform
+        flags: Qt.BypassWindowManagerHint | Qt.FramelessWindowHint
+        color: "transparent"
+
+        //NOTE: this is the *current* screen, not the *primary* screen
+        x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
+        y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
+
+        onVisibleChanged: {
+            if (visible) {
+                dialogMainItem.calculateColumnCount();
+                if (typeof(dde) != 'undefined' && "enableDxcb" in dde) {
+                    dialogMainItem.composited = dde.kwinUtils.isCompositing();
+                }
+            } else {
+                itemsView.highCount = 0;
+            }
+        }
+
+        Component.onCompleted: {
+            if (typeof(dde) != 'undefined' && "enableDxcb" in dde) {
+                dde.enableDxcb(dialogMainItem)
+            }
+        }
+
+        width: dialogMainItem.width
+        height: dialogMainItem.height
+
+        //Е╩╤Ф≈╤Е┬╥Ф√╟Е╝ Ф≈╤Е≥╗,Г■╗Д╨▌waylandЕ╧ЁЕ▐╟Д╦▀,Г■╗Ф┬╥alt+tab Е▓▄ alt+ ~ Е┬┤Ф█╒Ф≈╤Е─≥
+        //Е╞╪Х┤╢tabBox Х╒╚Ф┬╙Ф√╜Г └И≈╝И╒≤,Х╞╕Ф┐┘:https://pms.uniontech.com/zentao/bug-view-84001.html
+        Timer {
+            id: updateTimer
+            interval:1
+            triggeredOnStart: false
+            onTriggered: {
+               //И┤█Ф√╟Х╟┐Ф∙╢Г╙≈Е▐ёГ └Е╝╫И╚≤Д╦╨Е├┘Е╝╧Г └Е╝╫И╚≤,Г║╝Д©²Г╙≈Е▐ёХ┐╫Е├█Ф╛║Е┬╥Ф√╟
+               dialog.width  = dialogMainItem.width
+               dialog.height = dialogMainItem.height
+            }
+        }
+
+        function dealyUpdate() {
+            //Х▀╔Е╝ Ф≈╤Е≥╗Е╥╡Г╩▐Г■÷Ф∙┬,Е┬≥Е│°Ф╜╒Х╝║Ф≈╤Е≥╗
+            if (updateTimer.running) {
+                updateTimer.stop();
+            }
+
+            //И┤█Ф√╟Е░╞Е┼╗
+            updateTimer.start()
+        }
+
+        Rectangle {
+            id: dialogMainItem
+
+            QtObject {
+                id: constants
+
+                readonly property int minItemBox: 128
+                readonly property int defaultBoxMargin: 32
+                readonly property int popupPadding: 70
+
+                readonly property int columnSpacing: 20
+                readonly property int rowSpacing: 20
+                readonly property int minItemsEachRow: 7
+                readonly property int maxRows: 2
+            }
+
+            anchors.margins: 0
+            color: "#4cffffff"
+            radius: 6
+            antialiasing: true
+            border.width: 1
+            border.color: "#19000000"
+
+            property bool composited: true
+
+            readonly property int maxWidth: tabBox.screenGeometry.width - constants.popupPadding * 2
+            property int maxHeight: tabBox.screenGeometry.height * 0.7
+
+            property real screenFactor: tabBox.screenGeometry.width / tabBox.screenGeometry.height
+            property int maxGridColumnsByWidth: Math.floor(maxWidth / itemsView.cellWidth)
+
+            property int gridColumns: maxGridColumnsByWidth
+            property int gridRows: 1
+
+            property int optimalWidth: itemsView.cellWidth * gridColumns
+            property int optimalHeight: itemsView.cellHeight * gridRows
+
+            property bool canStretchX: false
+            property bool canStretchY: false
+            width: Math.min(Math.max(itemsView.cellWidth, optimalWidth), maxWidth)
+            height: Math.min(Math.max(itemsView.cellHeight, optimalHeight), maxHeight)
+
+            clip: true
+
+            Accessible.role: Accessible.Window
+            Accessible.name: "tabbox_area"
+            Accessible.description: "alt + tab switcher area"
+
+            function calculateColumnCount() {
+                var count = itemsView.count
+                var item_need_scale = false
+                var spacing = constants.defaultBoxMargin * 2 + 4
+                var item_width = constants.minItemBox + constants.columnSpacing
+                var maxWidth = tabBox.screenGeometry.width - constants.popupPadding * 2
+
+                var max_items_each_row = Math.floor((maxWidth - spacing) / item_width);
+                if (max_items_each_row < constants.minItemsEachRow && count > max_items_each_row) {
+                    item_need_scale = true;
+                    max_items_each_row = Math.min(count, constants.minItemsEachRow);
+                }
+
+                if (max_items_each_row * constants.maxRows < count) {
+                    max_items_each_row = Math.floor(count / constants.maxRows);
+                    item_need_scale = true;
+                }
+
+                if (item_need_scale) {
+                    item_width = maxWidth / max_items_each_row
+                }
+
+                gridColumns = Math.min(max_items_each_row, count);
+                gridRows = Math.ceil(count / max_items_each_row);
+                if (gridRows == 0) gridRows = 1;
+
+                optimalWidth = item_width * gridColumns + spacing
+                optimalHeight = item_width * gridRows + spacing
+
+                itemsView.thumbnailWidth = item_width;
+                itemsView.thumbnailHeight = item_width;
+
+                dialog.dealyUpdate(); //Е╫⌠Е┬≈Ф∙╟Е▐▒Г■÷Е▐≤Е▄√Г └Ф≈╤Е─≥,Е╩╤Ф≈╤Е┬╥Ф√╟
+
+                //console.log('------------------ optimalHeight: ' + optimalHeight +
+                    //', optimalWidth: ' + optimalWidth +
+                    //', max_items_each_row: ' + max_items_each_row +
+                    //', gridColumns: ' + gridColumns +
+                    //', item width: ' + item_width + ', count: ' + count +
+                    //', need scale: ' + item_need_scale +
+                    //', maxWidth: ' + maxWidth);
+            }
+
+
+            property bool mouseEnabled: false
+            MouseArea {
+                id: mouseDetector
+                anchors.fill: parent
+                hoverEnabled: true
+                onPositionChanged: dialogMainItem.mouseEnabled = true
+
+                Accessible.role: Accessible.Button
+                Accessible.name: "Ma_tabbox_mouseDetector"
+                Accessible.description: "tabbox_mouseDetector"
+                Accessible.onPressAction: pressed()
+            }
+
+            Rectangle {
+                anchors.fill: parent
+                anchors.margins: 1
+                color: "transparent"
+                radius: 6
+                antialiasing: true
+                border.width: 1
+                border.color: "#19000000"
+
+
+                Component {
+                    id: highlight
+                    Rectangle {
+                        width: itemsView.cellWidth
+                        height: itemsView.cellHeight
+
+                        color: "#01bdff"
+                        radius: 4
+
+                        x: itemsView.currentItem ? itemsView.currentItem.x : 0
+                        y: itemsView.currentItem ? itemsView.currentItem.y : 0
+
+                        Behavior on x { SmoothedAnimation { easing.type: Easing.InOutCubic; duration: 80 } }
+                        Behavior on y { SmoothedAnimation { easing.type: Easing.InOutCubic; duration: 80 } }
+
+                        Accessible.role: Accessible.Indicator
+                        Accessible.name: "Rect_tabbox_Indicator_"+itemsView.currentIndex
+                        Accessible.description: "tabbox_Indicator_currentIndex_currentWindowId"
+                    }
+                }
+
+                Component {
+                    id: desktopItem
+
+                    Rectangle {
+                        anchors.margins: constants.columnSpacing / 2
+                        anchors.fill: parent
+                        color: "transparent"
+
+                        // PlasmaCore.WindowThumbnail has problem to correctly render desktop thumb
+                        // so we use KWin.ThumbnailItem
+                        /*
+                        PlasmaCore.WindowThumbnail {
+                            winId: modelWId
+                            anchors.fill: parent
+                        }
+                        */
+                        KWin.ThumbnailItem {
+                            anchors.fill: parent
+                            wId: modelWId
+                        }
+
+                        Accessible.role: Accessible.Graphic
+                        Accessible.name: "Rect_tabbox_desktopImage_" + modelWId
+                        Accessible.description: "tabbox_desktopImage_desktopImageId"
+                    }
+
+                }
+
+                Component {
+                    id: windowItem
+
+                    Rectangle {
+                        anchors.margins: constants.columnSpacing / 2
+                        anchors.fill: parent
+                        color: "transparent"
+
+                        QIconItem {
+                            id: iconItem
+                            //FIXME: this is not the icon we want, seems to be a bug of kwin
+                            icon: modelIcon
+                            clip: true
+                            anchors.fill: parent
+                            smooth: true
+                        }
+
+                        // shadow for icon
+                        DropShadow {
+                            anchors.fill: iconItem
+                            horizontalOffset: 0
+                            verticalOffset: 8
+                            radius: 8.0
+                            samples: 17
+                            color: "#32000000"
+                            source: iconItem
+                        }
+
+                        Accessible.role: Accessible.Graphic
+                        Accessible.name: !isCloseable && (modelIndex+1) == itemsView.count ?
+                                             "Rect_tabbox_desktopImage_" + modelWId : "Rect_tabbox_windowImage_" + modelWId
+                        Accessible.description: "tabbox_windowImage_windowImageId"
+                    }
+                }
+
+                GridView {
+                    id: itemsView
+                    model: tabBox.model
+                    // interactive: false // Disable drag to scroll
+
+                    anchors.fill: parent
+                    anchors.margins: constants.defaultBoxMargin
+
+                    property int thumbnailWidth: constants.minItemBox
+                    property int thumbnailHeight: constants.minItemBox
+
+                    cellWidth: thumbnailWidth
+                    cellHeight: thumbnailHeight
+
+                    highlight: highlight
+                    highlightFollowsCurrentItem: false
+
+                    // allow expansion on increasing count
+                    property int highCount: 0
+                    onCountChanged: {
+                        if (highCount != count) {
+                            dialogMainItem.calculateColumnCount();
+                            highCount = count;
+                        }
+                    }
+
+
+                    delegate: Item {
+                        z: 1
+                        width: itemsView.cellWidth
+                        height: itemsView.cellHeight
+
+                        MouseArea {
+                            anchors.fill: parent
+                            onClicked: {
+                                parent.select()
+                            }
+
+                            Accessible.role: Accessible.Button
+                            Accessible.name: !closeable && (index+1) == itemsView.count ?
+                                                 "Ma_tabbox_desktopItem_" + windowId : "Ma_tabbox_windowItem_" + windowId
+                            Accessible.description: "tabbox_window/desktopItem_winId"
+                            Accessible.onPressAction: pressed()
+                        }
+
+                        function select() {
+                            itemsView.currentIndex = index;
+                            itemsView.currentIndexChanged(itemsView.currentIndex);
+                        }
+
+                        Rectangle {
+                            anchors.fill: parent
+                            color: "transparent"
+
+                            Loader {
+                                anchors.fill: parent
+
+                                property int modelIndex: index
+                                property int modelWId: windowId
+                                property variant modelIcon: model.icon
+                                property bool isCloseable: closeable
+                                sourceComponent: {
+                                    if (index < 0) {
+                                        return undefined
+                                    }
+
+                                    if (!dialogMainItem.composited) return windowItem;
+                                    return !isCloseable && (index+1) == itemsView.count ? desktopItem: windowItem
+                                }
+                            }
+
+                        }
+                    } // GridView.delegate
+
+                    Connections {
+                        target: tabBox
+
+                        onCurrentIndexChanged: {
+                            itemsView.currentIndex = tabBox.currentIndex
+                        }
+                    }
+
+                    // keyNavigationEnabled: true // Requires: Qt 5.7 and QtQuick 2.? (2.7 didn't work).
+                    // keyNavigationWraps: true // Requires: Qt 5.7 and QtQuick 2.? (2.7 didn't work).
+
+                } // GridView
+            } // Dialog.mainItem
+        }
+    } // Dialog
+}
diff --git a/tabbox/chameleon/metadata.desktop b/tabbox/chameleon/metadata.desktop
new file mode 100755
index 000000000..97ae44aa3
--- /dev/null
+++ b/tabbox/chameleon/metadata.desktop
@@ -0,0 +1,17 @@
+[Desktop Entry]
+Name=Chameleon
+Comment=
+
+Type=Service
+X-KDE-ServiceTypes=KWin/WindowSwitcher
+
+X-Plasma-API=declarativeappletscript
+X-Plasma-MainScript=ui/main.qml
+
+Icon=preferences-system-windows-switcher-big-icons
+X-KDE-PluginInfo-Author=Chris Holland
+X-KDE-PluginInfo-Email=zrenfire@gmail.com
+X-KDE-PluginInfo-Name=chameleon
+X-KDE-PluginInfo-Version=4
+X-KDE-PluginInfo-Website=https://github.com/linuxdeepin/dde-kwin
+X-KDE-PluginInfo-Depends=
diff --git a/tabbox/thumbnail_grid/contents/ui/main.qml b/tabbox/thumbnail_grid/contents/ui/main.qml
deleted file mode 100755
index a35c5c9f7..000000000
--- a/tabbox/thumbnail_grid/contents/ui/main.qml
+++ /dev/null
@@ -1,357 +0,0 @@
-import QtQuick 2.0
-import QtQuick.Window 2.0
-import QtGraphicalEffects 1.0
-import QtQuick.Layouts 1.1
-import org.kde.plasma.core 2.0 as PlasmaCore
-import org.kde.plasma.components 2.0 as PlasmaComponents
-import org.kde.kquickcontrolsaddons 2.0
-import org.kde.kwin 2.0 as KWin
-
-// https://techbase.kde.org/Development/Tutorials/KWin/WindowSwitcher
-KWin.Switcher {
-    id: tabBox
-    currentIndex: itemsView.currentIndex
-
-    Window {
-        id: dialog
-        visible: tabBox.visible
-        // FramelessWindowHint is needed under wayland platform
-        flags: Qt.BypassWindowManagerHint | Qt.FramelessWindowHint
-        color: "transparent"
-
-        //NOTE: this is the *current* screen, not the *primary* screen
-        x: tabBox.screenGeometry.x + tabBox.screenGeometry.width * 0.5 - dialogMainItem.width * 0.5
-        y: tabBox.screenGeometry.y + tabBox.screenGeometry.height * 0.5 - dialogMainItem.height * 0.5
-
-        onVisibleChanged: {
-            if (visible) {
-                dialogMainItem.calculateColumnCount();
-                if (typeof(dde) != 'undefined' && "enableDxcb" in dde) {
-                    dialogMainItem.composited = dde.kwinUtils.isCompositing();
-                }
-            } else {
-                itemsView.highCount = 0;
-            }
-        }
-
-        Component.onCompleted: {
-            if (typeof(dde) != 'undefined' && "enableDxcb" in dde) {
-                dde.enableDxcb(dialogMainItem)
-            }
-        }
-
-        width: dialogMainItem.width
-        height: dialogMainItem.height
-
-        //Е╩╤Ф≈╤Е┬╥Ф√╟Е╝ Ф≈╤Е≥╗,Г■╗Д╨▌waylandЕ╧ЁЕ▐╟Д╦▀,Г■╗Ф┬╥alt+tab Е▓▄ alt+ ~ Е┬┤Ф█╒Ф≈╤Е─≥
-        //Е╞╪Х┤╢tabBox Х╒╚Ф┬╙Ф√╜Г └И≈╝И╒≤,Х╞╕Ф┐┘:https://pms.uniontech.com/zentao/bug-view-84001.html
-        Timer {
-            id: updateTimer
-            interval:1
-            triggeredOnStart: false
-            onTriggered: {
-               //И┤█Ф√╟Х╟┐Ф∙╢Г╙≈Е▐ёГ └Е╝╫И╚≤Д╦╨Е├┘Е╝╧Г └Е╝╫И╚≤,Г║╝Д©²Г╙≈Е▐ёХ┐╫Е├█Ф╛║Е┬╥Ф√╟
-               dialog.width  = dialogMainItem.width
-               dialog.height = dialogMainItem.height
-            }
-        }
-
-        function dealyUpdate() {
-            //Х▀╔Е╝ Ф≈╤Е≥╗Е╥╡Г╩▐Г■÷Ф∙┬,Е┬≥Е│°Ф╜╒Х╝║Ф≈╤Е≥╗
-            if (updateTimer.running) {
-                updateTimer.stop();
-            }
-
-            //И┤█Ф√╟Е░╞Е┼╗
-            updateTimer.start()
-        }
-
-        Rectangle {
-            id: dialogMainItem
-
-            QtObject {
-                id: constants
-
-                readonly property int minItemBox: 128
-                readonly property int defaultBoxMargin: 32
-                readonly property int popupPadding: 70
-
-                readonly property int columnSpacing: 20
-                readonly property int rowSpacing: 20
-                readonly property int minItemsEachRow: 7
-                readonly property int maxRows: 2
-            }
-
-            anchors.margins: 0
-            color: "#4cffffff"
-            radius: 6
-            antialiasing: true
-            border.width: 1
-            border.color: "#19000000"
-
-            property bool composited: true
-
-            readonly property int maxWidth: tabBox.screenGeometry.width - constants.popupPadding * 2
-            property int maxHeight: tabBox.screenGeometry.height * 0.7
-
-            property real screenFactor: tabBox.screenGeometry.width / tabBox.screenGeometry.height
-            property int maxGridColumnsByWidth: Math.floor(maxWidth / itemsView.cellWidth)
-
-            property int gridColumns: maxGridColumnsByWidth
-            property int gridRows: 1
-
-            property int optimalWidth: itemsView.cellWidth * gridColumns
-            property int optimalHeight: itemsView.cellHeight * gridRows
-
-            property bool canStretchX: false
-            property bool canStretchY: false
-            width: Math.min(Math.max(itemsView.cellWidth, optimalWidth), maxWidth)
-            height: Math.min(Math.max(itemsView.cellHeight, optimalHeight), maxHeight)
-
-            clip: true
-
-            Accessible.role: Accessible.Window
-            Accessible.name: "tabbox_area"
-            Accessible.description: "alt + tab switcher area"
-
-            function calculateColumnCount() {
-                var count = itemsView.count
-                var item_need_scale = false
-                var spacing = constants.defaultBoxMargin * 2 + 4
-                var item_width = constants.minItemBox + constants.columnSpacing
-                var maxWidth = tabBox.screenGeometry.width - constants.popupPadding * 2
-
-                var max_items_each_row = Math.floor((maxWidth - spacing) / item_width);
-                if (max_items_each_row < constants.minItemsEachRow && count > max_items_each_row) {
-                    item_need_scale = true;
-                    max_items_each_row = Math.min(count, constants.minItemsEachRow);
-                }
-
-                if (max_items_each_row * constants.maxRows < count) {
-                    max_items_each_row = Math.floor(count / constants.maxRows);
-                    item_need_scale = true;
-                }
-
-                if (item_need_scale) {
-                    item_width = maxWidth / max_items_each_row
-                }
-
-                gridColumns = Math.min(max_items_each_row, count);
-                gridRows = Math.ceil(count / max_items_each_row);
-                if (gridRows == 0) gridRows = 1;
-
-                optimalWidth = item_width * gridColumns + spacing
-                optimalHeight = item_width * gridRows + spacing
-
-                itemsView.thumbnailWidth = item_width;
-                itemsView.thumbnailHeight = item_width;
-
-                dialog.dealyUpdate(); //Е╫⌠Е┬≈Ф∙╟Е▐▒Г■÷Е▐≤Е▄√Г └Ф≈╤Е─≥,Е╩╤Ф≈╤Е┬╥Ф√╟
-
-                //console.log('------------------ optimalHeight: ' + optimalHeight +
-                    //', optimalWidth: ' + optimalWidth +
-                    //', max_items_each_row: ' + max_items_each_row +
-                    //', gridColumns: ' + gridColumns +
-                    //', item width: ' + item_width + ', count: ' + count +
-                    //', need scale: ' + item_need_scale +
-                    //', maxWidth: ' + maxWidth);
-            }
-
-
-            property bool mouseEnabled: false
-            MouseArea {
-                id: mouseDetector
-                anchors.fill: parent
-                hoverEnabled: true
-                onPositionChanged: dialogMainItem.mouseEnabled = true
-
-                Accessible.role: Accessible.Button
-                Accessible.name: "Ma_tabbox_mouseDetector"
-                Accessible.description: "tabbox_mouseDetector"
-                Accessible.onPressAction: pressed()
-            }
-
-            Rectangle {
-                anchors.fill: parent
-                anchors.margins: 1
-                color: "transparent"
-                radius: 6
-                antialiasing: true
-                border.width: 1
-                border.color: "#19000000"
-
-
-                Component {
-                    id: highlight
-                    Rectangle {
-                        width: itemsView.cellWidth
-                        height: itemsView.cellHeight
-
-                        color: "#01bdff"
-                        radius: 4
-
-                        x: itemsView.currentItem ? itemsView.currentItem.x : 0
-                        y: itemsView.currentItem ? itemsView.currentItem.y : 0
-
-                        Behavior on x { SmoothedAnimation { easing.type: Easing.InOutCubic; duration: 80 } }
-                        Behavior on y { SmoothedAnimation { easing.type: Easing.InOutCubic; duration: 80 } }
-
-                        Accessible.role: Accessible.Indicator
-                        Accessible.name: "Rect_tabbox_Indicator_"+itemsView.currentIndex
-                        Accessible.description: "tabbox_Indicator_currentIndex_currentWindowId"
-                    }
-                }
-
-                Component {
-                    id: desktopItem
-
-                    Rectangle {
-                        anchors.margins: constants.columnSpacing / 2
-                        anchors.fill: parent
-                        color: "transparent"
-
-                        // PlasmaCore.WindowThumbnail has problem to correctly render desktop thumb
-                        // so we use KWin.ThumbnailItem
-                        /*
-                        PlasmaCore.WindowThumbnail {
-                            winId: modelWId
-                            anchors.fill: parent
-                        }
-                        */
-                        KWin.ThumbnailItem {
-                            anchors.fill: parent
-                            wId: modelWId
-                        }
-
-                        Accessible.role: Accessible.Graphic
-                        Accessible.name: "Rect_tabbox_desktopImage_" + modelWId
-                        Accessible.description: "tabbox_desktopImage_desktopImageId"
-                    }
-
-                }
-
-                Component {
-                    id: windowItem
-
-                    Rectangle {
-                        anchors.margins: constants.columnSpacing / 2
-                        anchors.fill: parent
-                        color: "transparent"
-
-                        QIconItem {
-                            id: iconItem
-                            //FIXME: this is not the icon we want, seems to be a bug of kwin
-                            icon: modelIcon
-                            clip: true
-                            anchors.fill: parent
-                            smooth: true
-                        }
-
-                        // shadow for icon
-                        DropShadow {
-                            anchors.fill: iconItem
-                            horizontalOffset: 0
-                            verticalOffset: 8
-                            radius: 8.0
-                            samples: 17
-                            color: "#32000000"
-                            source: iconItem
-                        }
-
-                        Accessible.role: Accessible.Graphic
-                        Accessible.name: !isCloseable && (modelIndex+1) == itemsView.count ?
-                                             "Rect_tabbox_desktopImage_" + modelWId : "Rect_tabbox_windowImage_" + modelWId
-                        Accessible.description: "tabbox_windowImage_windowImageId"
-                    }
-                }
-
-                GridView {
-                    id: itemsView
-                    model: tabBox.model
-                    // interactive: false // Disable drag to scroll
-
-                    anchors.fill: parent
-                    anchors.margins: constants.defaultBoxMargin
-
-                    property int thumbnailWidth: constants.minItemBox
-                    property int thumbnailHeight: constants.minItemBox
-
-                    cellWidth: thumbnailWidth
-                    cellHeight: thumbnailHeight
-
-                    highlight: highlight
-                    highlightFollowsCurrentItem: false
-
-                    // allow expansion on increasing count
-                    property int highCount: 0
-                    onCountChanged: {
-                        if (highCount != count) {
-                            dialogMainItem.calculateColumnCount();
-                            highCount = count;
-                        }
-                    }
-
-
-                    delegate: Item {
-                        z: 1
-                        width: itemsView.cellWidth
-                        height: itemsView.cellHeight
-
-                        MouseArea {
-                            anchors.fill: parent
-                            onClicked: {
-                                parent.select()
-                            }
-
-                            Accessible.role: Accessible.Button
-                            Accessible.name: !closeable && (index+1) == itemsView.count ?
-                                                 "Ma_tabbox_desktopItem_" + windowId : "Ma_tabbox_windowItem_" + windowId
-                            Accessible.description: "tabbox_window/desktopItem_winId"
-                            Accessible.onPressAction: pressed()
-                        }
-
-                        function select() {
-                            itemsView.currentIndex = index;
-                            itemsView.currentIndexChanged(itemsView.currentIndex);
-                        }
-
-                        Rectangle {
-                            anchors.fill: parent
-                            color: "transparent"
-
-                            Loader {
-                                anchors.fill: parent
-
-                                property int modelIndex: index
-                                property int modelWId: windowId
-                                property variant modelIcon: model.icon
-                                property bool isCloseable: closeable
-                                sourceComponent: {
-                                    if (index < 0) {
-                                        return undefined
-                                    }
-
-                                    if (!dialogMainItem.composited) return windowItem;
-                                    return !isCloseable && (index+1) == itemsView.count ? desktopItem: windowItem
-                                }
-                            }
-
-                        }
-                    } // GridView.delegate
-
-                    Connections {
-                        target: tabBox
-
-                        onCurrentIndexChanged: {
-                            itemsView.currentIndex = tabBox.currentIndex
-                        }
-                    }
-
-                    // keyNavigationEnabled: true // Requires: Qt 5.7 and QtQuick 2.? (2.7 didn't work).
-                    // keyNavigationWraps: true // Requires: Qt 5.7 and QtQuick 2.? (2.7 didn't work).
-
-                } // GridView
-            } // Dialog.mainItem
-        }
-    } // Dialog
-}
diff --git a/tabbox/thumbnail_grid/metadata.desktop b/tabbox/thumbnail_grid/metadata.desktop
deleted file mode 100755
index 7114afe0b..000000000
--- a/tabbox/thumbnail_grid/metadata.desktop
+++ /dev/null
@@ -1,17 +0,0 @@
-[Desktop Entry]
-Name=Thumbnail Grid
-Comment=
-
-Type=Service
-X-KDE-ServiceTypes=KWin/WindowSwitcher
-
-X-Plasma-API=declarativeappletscript
-X-Plasma-MainScript=ui/main.qml
-
-Icon=preferences-system-windows-switcher-big-icons
-X-KDE-PluginInfo-Author=Chris Holland
-X-KDE-PluginInfo-Email=zrenfire@gmail.com
-X-KDE-PluginInfo-Name=thumbnail_grid
-X-KDE-PluginInfo-Version=4
-X-KDE-PluginInfo-Website=https://github.com/Zren/kwin-tabbox-thumbnail_grid
-X-KDE-PluginInfo-Depends=
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin