[tabbox] Sidebar window switcher got moved to plasma-workspace

It's now part of the org.kde.breeze.desktop look and feel package.
This commit is contained in:
Martin Gräßlin 2014-10-29 08:29:29 +01:00
parent ddc1e6de59
commit 6a8d2236eb
3 changed files with 0 additions and 274 deletions

View file

@ -3,7 +3,6 @@ install( DIRECTORY clients/big_icons DESTINATION ${DATA_INSTALL_DIR}/${KWIN_N
install( DIRECTORY clients/compact DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox )
install( DIRECTORY clients/informative DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox )
install( DIRECTORY clients/present_windows DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox )
install( DIRECTORY clients/sidebar DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox )
install( DIRECTORY clients/small_icons DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox )
install( DIRECTORY clients/text DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox )
install( DIRECTORY clients/thumbnails DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox )
@ -16,7 +15,6 @@ install( FILES clients/big_icons/metadata.desktop DESTINATION ${SERVICES_INST
install( FILES clients/compact/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_compact.desktop )
install( FILES clients/informative/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_informative.desktop )
install( FILES clients/present_windows/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_present_windows.desktop )
install( FILES clients/sidebar/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_sidebar.desktop )
install( FILES clients/small_icons/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_small_icons.desktop )
install( FILES clients/text/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_text.desktop )
install( FILES clients/thumbnails/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_thumbnails.desktop )

View file

@ -1,157 +0,0 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2011 Martin Gräßlin <mgraesslin@kde.org>
Copyright (C) 2013 Marco Martin <mart@kde.org>
This program 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.
This program 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 <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 2.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.plasma.extras 2.0 as PlasmaExtras
import org.kde.kquickcontrolsaddons 2.0
import org.kde.kwin 2.0 as KWin
KWin.Switcher {
id: tabBox
property real screenFactor: screenGeometry.width/screenGeometry.height
currentIndex: thumbnailListView.currentIndex
// just to get the margin sizes
PlasmaCore.FrameSvgItem {
id: hoverItem
imagePath: "widgets/viewitem"
prefix: "hover"
visible: false
}
PlasmaCore.Dialog {
id: dialog
location: PlasmaCore.Types.Floating
visible: tabBox.visible
flags: Qt.X11BypassWindowManagerHint
x: screenGeometry.x
y: screenGeometry.y
mainItem: PlasmaExtras.ScrollArea {
id: dialogMainItem
property bool canStretchX: false
property bool canStretchY: false
width: tabBox.screenGeometry.width * 0.15
height: tabBox.screenGeometry.height
clip: true
focus: true
ListView {
id: thumbnailListView
orientation: ListView.Vertical
model: tabBox.model
anchors.fill: parent
property int delegateWidth: thumbnailListView.width
spacing: 5
highlightMoveDuration: 250
clip: true
delegate: Item {
id: delegateItem
width: thumbnailListView.delegateWidth
height: Math.round(thumbnailItem.height + label.height + 30)
Item {
id: thumbnailItem
width: parent.width - hoverItem.margins.left - hoverItem.margins.right
height: Math.round(thumbnailListView.delegateWidth*(1.0/screenFactor) - hoverItem.margins.top)
anchors {
top: parent.top
left: parent.left
leftMargin: hoverItem.margins.left
rightMargin: hoverItem.margins.right
topMargin: hoverItem.margins.top
}
KWin.ThumbnailItem {
wId: windowId
anchors.fill: parent
}
}
RowLayout {
id: label
spacing: 4
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
leftMargin: hoverItem.margins.left
rightMargin: hoverItem.margins.right
bottomMargin: hoverItem.margins.bottom
}
QIconItem {
id: iconItem
icon: model.icon
property int iconSize: 32
width: iconSize
height: iconSize
Layout.preferredHeight: iconSize
Layout.preferredWidth: iconSize
}
PlasmaComponents.Label {
text: model.caption
elide: Text.ElideMiddle
Layout.fillWidth: true
Layout.maximumWidth: label.maximumWidth - iconItem.iconSize - label.spacing * 2
}
}
MouseArea {
anchors.fill: parent
onClicked: {
thumbnailListView.currentIndex = index;
}
}
}
highlight: PlasmaCore.FrameSvgItem {
id: highlightItem
imagePath: "widgets/viewitem"
prefix: "hover"
width: thumbnailListView.currentItem.width
height: thumbnailListView.currentItem.height
}
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
onCurrentIndexChanged: {
thumbnailListView.currentIndex = tabBox.currentIndex;
thumbnailListView.positionViewAtIndex(thumbnailListView.currentIndex, ListView.Contain);
}
}
}
/*
* Key navigation on outer item for two reasons:
* @li we have to emit the change signal
* @li on multiple invocation it does not work on the list view. Focus seems to be lost.
**/
Keys.onPressed: {
if (event.key == Qt.Key_Up) {
thumbnailListView.decrementCurrentIndex();
} else if (event.key == Qt.Key_Down) {
thumbnailListView.incrementCurrentIndex();
}
}
}
}
}

View file

@ -1,115 +0,0 @@
[Desktop Entry]
Name=Sidebar
Name[ar]=شريط جانبي
Name[ast]=Barra llateral
Name[bg]=Страничен панел
Name[bn]=
Name[ca]=Barra lateral
Name[ca@valencia]=Barra lateral
Name[cs]=Postranní lišta
Name[csb]=Bòcznô listew
Name[da]=Sidepanel
Name[de]=Navigationsbereich
Name[el]=Πλευρική μπάρα
Name[en_GB]=Sidebar
Name[eo]=Flanka breto
Name[es]=Barra lateral
Name[et]=Külgriba
Name[eu]=Alboko-barra
Name[fi]=Sivupalkki
Name[fr]=Barre latérale
Name[fy]=Sydbalke
Name[ga]=Barra Taoibh
Name[gl]=Barra lateral
Name[gu]=
Name[he]=סרגל צד
Name[hi]=
Name[hr]=Bočna traka
Name[hu]=Oldalsáv
Name[ia]=Barra lateral
Name[id]=Batang Sisi
Name[it]=Barra laterale
Name[kk]=Бүйірдегі панелі
Name[kn]=ಿ ಿ
Name[ko]=
Name[mai]=
Name[mk]=Странична лента
Name[ml]=
Name[nb]=Sidestolpe
Name[nds]=Sietpaneel
Name[nl]=Zijbalk
Name[nn]=Sidestolpe
Name[pa]=
Name[pl]=Pasek boczny
Name[pt]=Barra Lateral
Name[pt_BR]=Barra lateral
Name[ro]=Bara laterală
Name[ru]=Боковая панель
Name[si]=
Name[sk]=Bočný panel
Name[sl]=Stranski pas
Name[sr]=Бочна трака
Name[sr@ijekavian]=Бочна трака
Name[sr@ijekavianlatin]=Bočna traka
Name[sr@latin]=Bočna traka
Name[sv]=Sidorad
Name[tg]=Панел
Name[th]=
Name[tr]=Yan Çubuk
Name[uk]=Бічна панель
Name[wa]=Bår di costé
Name[x-test]=xxSidebarxx
Name[zh_CN]=
Name[zh_TW]=
Comment=A window switcher with live thumbnails on the screen side
Comment[ca]=Un commutador de finestres amb miniatures animades en un lateral de la pantalla
Comment[ca@valencia]=Un commutador de finestres amb miniatures animades en un lateral de la pantalla
Comment[cs]=Přepínač oken s živými náhledy po straně obrazovky
Comment[da]=En vinduesskifter som bruger aktive miniaturer på skærmsiden
Comment[de]=Ein Fensterwechsler-Layout, das Live-Vorschauen an der Seite des Bildschirms verwendet
Comment[el]=Εναλλαγή παραθύρων με ζωντανές εικόνες επισκόπησης στη πλευρά της οθόνης
Comment[en_GB]=A window switcher with live thumbnails on the screen side
Comment[es]=Un cambiador de ventanas con miniaturas en tiempo real en el borde de la pantalla
Comment[eu]=pantailaren bazterrean koadro-txiki bizidunak dituen leiho-aldatzaile bat
Comment[fi]=Näytön laidassa oleva ikkunanvalitsimen asettelu, joka käyttää pienoiskuvia
Comment[fr]=Un sélecteur de fenêtres utilisant des aperçus en temps réel sur le bord de l'écran
Comment[gl]=Unha disposición do alternador de xanelas que usa miniaturas ao vivo no lado da pantalla
Comment[hu]=Egy ablakváltó élő bélyegképekkel a képernyőoldalon
Comment[ia]=Un commutator de fenestra usante miniaturas vive sur le latere del schermo
Comment[id]=Pengganti video dengan miniatur langsung di sisi layar
Comment[kk]=Экран жағында "тірі" нобайларын көрсететілін терезе ауыстырғышы
Comment[ko]=
Comment[nb]=En vindusbytter som bruker sanntids minibilder på siden av skjermen
Comment[nds]=En Finsterwessel mit Finster-Vöransichten an de Schirmkant
Comment[nl]=Een vensterwisselaar met levende miniaturen aan kant van het scherm
Comment[pl]=Przełącznik okien z żywymi miniaturami na boku ekranu
Comment[pt]=Um selector de janelas que usa miniaturas geradas na hora de lado do ecrã
Comment[pt_BR]=Um seletor de janelas que usa miniaturas geradas na hora ao lado da tela
Comment[ru]=Переключатель окон в виде «живых» миниатюр окон на краю экрана
Comment[sk]=Prepínač okien so živými miniatúrami na strane obrazovky
Comment[sl]=Razpored preklapljanja med okni, ki uporablja žive sličice na robu zaslona
Comment[sr]=Мењање прозора преко живих сличица уз ивицу екрана
Comment[sr@ijekavian]=Мењање прозора преко живих сличица уз ивицу екрана
Comment[sr@ijekavianlatin]=Menjanje prozora preko živih sličica uz ivicu ekrana
Comment[sr@latin]=Menjanje prozora preko živih sličica uz ivicu ekrana
Comment[sv]=Fönsterbytare med direkta miniatyrbilder vid skärmens kant
Comment[tr]=Ekran kenarında canlı canlı küçük resimleri gösteren bir pencere değiştirici
Comment[uk]=Засіб перемикання вікон з інтерактивними мініатюрами збоку на екрані
Comment[x-test]=xxA window switcher with live thumbnails on the screen sidexx
Comment[zh_CN]=
Comment[zh_TW]=
Icon=preferences-system-windows-switcher-thumbnails
X-Plasma-API=declarativeappletscript
X-Plasma-MainScript=ui/main.qml
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Email=mart@kde.org
X-KDE-PluginInfo-Name=sidebar
X-KDE-PluginInfo-Version=1.0
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-ServiceTypes=KWin/WindowSwitcher
Type=Service