mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
move krunner in a plasmoid
This commit is contained in:
parent
bcb3a7ea3b
commit
ea57d633bb
7 changed files with 87 additions and 52 deletions
|
|
@ -28,43 +28,50 @@ import org.kde.plasma.components 3.0 as PlasmaComponents
|
|||
import org.kde.milou 0.1 as Milou
|
||||
import org.kde.kirigami 2.10 as Kirigami
|
||||
|
||||
PlasmaComponents.TextField {
|
||||
id: bigClock
|
||||
|
||||
Item {
|
||||
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup
|
||||
text: i18n("Search...")
|
||||
Plasmoid.backgroundHints: PlasmaCore.Types.ShadowBackground | PlasmaCore.Types.ConfigurableBackground
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: window.showMaximized()
|
||||
}
|
||||
Kirigami.AbstractApplicationWindow {
|
||||
id: window
|
||||
visible: false
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
queryField.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
header: Controls.ToolBar {
|
||||
contentItem: Kirigami.SearchField {
|
||||
id: queryField
|
||||
focus: true
|
||||
}
|
||||
}
|
||||
Controls.ScrollView {
|
||||
anchors.fill: parent
|
||||
Milou.ResultsListView {
|
||||
id: listView
|
||||
queryString: queryField.text
|
||||
highlight: null
|
||||
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup
|
||||
anchors.rightMargin: 10
|
||||
|
||||
onActivated: queryField.text = ""
|
||||
onUpdateQueryString: {
|
||||
queryField.text = text
|
||||
queryField.cursorPosition = cursorPosition
|
||||
PlasmaComponents.TextField {
|
||||
id: bigClock
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: units.gridUnit
|
||||
}
|
||||
text: i18n("Search...")
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: window.showMaximized()
|
||||
}
|
||||
Kirigami.AbstractApplicationWindow {
|
||||
id: window
|
||||
visible: false
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
queryField.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
header: Controls.ToolBar {
|
||||
contentItem: Kirigami.SearchField {
|
||||
id: queryField
|
||||
focus: true
|
||||
}
|
||||
}
|
||||
Controls.ScrollView {
|
||||
anchors.fill: parent
|
||||
Milou.ResultsListView {
|
||||
id: listView
|
||||
queryString: queryField.text
|
||||
highlight: null
|
||||
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup
|
||||
anchors.rightMargin: 10
|
||||
|
||||
onActivated: queryField.text = ""
|
||||
onUpdateQueryString: {
|
||||
queryField.text = text
|
||||
queryField.cursorPosition = cursorPosition
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ Item {
|
|||
width: parent.width
|
||||
anchors {
|
||||
fill: parent
|
||||
topMargin: plasmoid.availableScreenRect.y + krunner.inputHeight
|
||||
topMargin: plasmoid.availableScreenRect.y
|
||||
bottomMargin: plasmoid.screenGeometry.height - plasmoid.availableScreenRect.height - plasmoid.availableScreenRect.y
|
||||
}
|
||||
|
||||
|
|
@ -321,16 +321,16 @@ Item {
|
|||
//y: Math.max(krunner.inputHeight, root.height - height - mainFlickable.contentY)
|
||||
}
|
||||
|
||||
KRunner {
|
||||
id: krunner
|
||||
z: 998
|
||||
height: plasmoid.availableScreenRect.height
|
||||
topPadding: plasmoid.availableScreenRect.y
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
}
|
||||
// KRunner {
|
||||
// id: krunner
|
||||
// z: 998
|
||||
// height: plasmoid.availableScreenRect.height
|
||||
// topPadding: plasmoid.availableScreenRect.y
|
||||
// anchors {
|
||||
// top: parent.top
|
||||
// left: parent.left
|
||||
// right: parent.right
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ PlasmaCore.IconItem {
|
|||
? iconName(paSinkModel.preferredSink.volume, paSinkModel.preferredSink.muted)
|
||||
: iconName(0, true)
|
||||
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
|
||||
visible: paSinkModel.preferredSink.muted
|
||||
|
||||
function iconName(volume, muted, prefix) {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQml.Models 2.12
|
||||
import QtGraphicalEffects 1.12
|
||||
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
|
@ -32,11 +33,10 @@ import "LayoutManager.js" as LayoutManager
|
|||
import "quicksettings"
|
||||
import "indicators" as Indicators
|
||||
|
||||
PlasmaCore.ColorScope {
|
||||
Item {
|
||||
id: root
|
||||
width: 480
|
||||
height: 30
|
||||
//colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
||||
|
||||
Plasmoid.backgroundHints: showingApp ? PlasmaCore.Types.StandardBackground : PlasmaCore.Types.NoBackground
|
||||
|
||||
|
|
@ -143,8 +143,21 @@ PlasmaCore.ColorScope {
|
|||
interval: 60 * 1000
|
||||
}
|
||||
|
||||
Item {
|
||||
DropShadow {
|
||||
anchors.fill: icons
|
||||
visible: !showinApp
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 1
|
||||
radius: 4.0
|
||||
samples: 17
|
||||
color: Qt.rgba(0,0,0,0.8)
|
||||
source: icons
|
||||
}
|
||||
|
||||
PlasmaCore.ColorScope {
|
||||
id: icons
|
||||
z: 1
|
||||
colorGroup: showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||
//parent: slidingPanel.visible && !slidingPanel.wideScreen ? panelContents : root
|
||||
anchors {
|
||||
left: parent.left
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
import QtQuick 2.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.2
|
||||
import QtGraphicalEffects 1.12
|
||||
|
||||
import org.kde.taskmanager 0.1 as TaskManager
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
|
|
@ -30,7 +31,7 @@ PlasmaCore.ColorScope {
|
|||
id: root
|
||||
width: 600
|
||||
height: 480
|
||||
//colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
||||
colorGroup: showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||
|
||||
Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground
|
||||
|
||||
|
|
@ -100,7 +101,18 @@ PlasmaCore.ColorScope {
|
|||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
anchors.fill: icons
|
||||
visible: !showinApp
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 1
|
||||
radius: 4.0
|
||||
samples: 17
|
||||
color: Qt.rgba(0,0,0,0.8)
|
||||
source: icons
|
||||
}
|
||||
Item {
|
||||
id: icons
|
||||
anchors.fill: parent
|
||||
|
||||
visible: plasmoid.configuration.PanelButtonsVisible
|
||||
|
|
@ -108,7 +120,7 @@ PlasmaCore.ColorScope {
|
|||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: root.backgroundColor
|
||||
opacity: showingApp ? 1 : 0.9
|
||||
opacity: showingApp ? 1 : 0
|
||||
Rectangle {
|
||||
anchors {
|
||||
left: parent.left
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
applet.wallpaperPlugin = 'org.kde.image'
|
||||
applet.writeConfig("AppOrder", ["org.kde.phone.dialer.desktop", "org.kde.mobile.angelfish.desktop", "org.kde.phone.calindori.desktop", "org.kde.mobile.camera.desktop"])
|
||||
applet.writeConfig("Favorites", ["org.kde.phone.dialer.desktop", "org.kde.mobile.angelfish.desktop", "org.kde.phone.calindori.desktop", "org.kde.mobile.camera.desktop"])
|
||||
containment.addWidget("org.kde.phone.krunner", 0, 0, screenGeometry(0).width, 20)
|
||||
applet.reloadConfig()
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ var desktopsArray = desktopsForActivity(currentActivity());
|
|||
for (var j = 0; j < desktopsArray.length; j++) {
|
||||
desktopsArray[j].wallpaperPlugin = "org.kde.image";
|
||||
}
|
||||
|
||||
desktopsArray[0].addWidget("org.kde.phone.krunner", 0, 0, screenGeometry(0).width, 20)
|
||||
var panel = new Panel("org.kde.phone.panel");
|
||||
panel.addWidget("org.kde.plasma.notifications");
|
||||
panel.addWidget("org.kde.plasma.mediacontroller");
|
||||
|
|
|
|||
Loading…
Reference in a new issue