Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
SnoutBug authored Feb 28, 2022
1 parent e205096 commit ec98016
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 57 deletions.
21 changes: 19 additions & 2 deletions contents/ui/AppList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import org.kde.draganddrop 2.0

import QtGraphicalEffects 1.0

ScrollView {
id: scrollView

Expand Down Expand Up @@ -79,16 +81,24 @@ ScrollView {
height: 20
}
Image {
id: starImage
source: "icons/feather/star.svg"
width: 15
height: width
PlasmaComponents.Label {
x: parent.width + 10
anchors.verticalCenter: parent.verticalCenter
text: "Favorite Apps"
font.family: "SF Pro Text"
color: main.textColor
font.family: main.textFont
font.pixelSize: 12
}
ColorOverlay {
visible: plasmoid.configuration.theming != 0
anchors.fill: starImage
source: starImage
color: main.textColor
}
}
Item { //Spacer
width: 1
Expand Down Expand Up @@ -195,7 +205,8 @@ ScrollView {
x: parent.width + 10
anchors.verticalCenter: parent.verticalCenter
text: "All"
font.family: "SF Pro Text"
color: main.textColor
font.family: main.textFont
font.pixelSize: 12
}
MouseArea {
Expand Down Expand Up @@ -224,6 +235,12 @@ ScrollView {
sortingImage.state = sortingImage.states[currentStateIndex].name
}
}
ColorOverlay {
visible: plasmoid.configuration.theming != 0
anchors.fill: sortingImage
source: sortingImage
color: main.textColor
}
}
Item { //Spacer
id: spacer
Expand Down
20 changes: 19 additions & 1 deletion contents/ui/ConfigGeneral.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ Kirigami.FormLayout {
property string cfg_defaultStateIcon: plasmoid.configuration.defaultStateIcon
property bool cfg_isCentered: plasmoid.configuration.isCentered
property alias cfg_defaultPage: defaultPage.currentIndex
property alias cfg_theming: theming.currentIndex
property alias cfg_useExtraRunners: useExtraRunners.checked
property alias cfg_customGreeting: customGreeting.text

Button {
id: iconButton
Expand Down Expand Up @@ -191,6 +193,11 @@ Kirigami.FormLayout {
cfg_enableGreeting = checked
}
}
TextField {
id: customGreeting
Kirigami.FormData.label: i18n("Custom Greeting Text:")
placeholderText: "No custom greeting set"
}
Item {
Kirigami.FormData.isSection: true
}
Expand Down Expand Up @@ -227,12 +234,23 @@ Kirigami.FormLayout {
Item {
Kirigami.FormData.isSection: true
}

CheckBox {
id: useExtraRunners

Kirigami.FormData.label: i18n("Search:")

text: i18n("Expand search to bookmarks, files and emails")
}
Item {
Kirigami.FormData.isSection: true
}
ComboBox {
id: theming
Kirigami.FormData.label: i18n("Theming:")
model: [
i18n("Dark (Default)"),
i18n("Light"),
i18n("Matching"),
]
}
}
11 changes: 6 additions & 5 deletions contents/ui/FavoriteItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Item {
width: appname.width + appicon.width + 3 * 10 + 5
height: 45//40
z: -20
color: "#202124"
border.color: "#141516"
color: plasmoid.configuration.theming == 0 ? "#202124" : plasmoid.configuration.theming == 1 ? "#E0E1E3" : PlasmaCore.Theme.buttonBackgroundColor
border.color: "transparent" //Qt.darker(color, 1.05) //plasmoid.configuration.theming == 0 ? "141516" : plasmoid.configuration.theming == 1 ? "#FAFAFA" : PlasmaCore.Theme.buttonAlternateBackgroundColor
border.width: 1
radius: 6
PlasmaCore.IconItem {
Expand All @@ -80,18 +80,19 @@ Item {
x: appicon.width + 10
anchors.verticalCenter: appicon.verticalCenter
text: ("name" in model ? model.name : model.display)
font.family: "SF Pro Text"
color: plasmoid.configuration.theming != 2 ? main.textColor : PlasmaCore.Theme.buttonTextColor
font.family: main.textFont
font.pixelSize: 12
}
}
states: [
State {
name: "highlight"; when: (highlighted)
PropertyChanges { target: rect; color: "#292A2E"}
PropertyChanges { target: rect; color: plasmoid.configuration.theming == 0 ? "#292A2E" : plasmoid.configuration.theming == 1 ? "#FFFFFF" : PlasmaCore.Theme.buttonHoverColor }
},
State {
name: "default"; when: (!highlighted)
PropertyChanges { target: rect; color: "#202124"}
PropertyChanges { target: rect; color: plasmoid.configuration.theming == 0 ? "#202124" : plasmoid.configuration.theming == 1 ? "#F7F7F7" : PlasmaCore.Theme.buttonBackgroundColor }
}]
transitions: highlight
}
Expand Down
2 changes: 2 additions & 0 deletions contents/ui/FloatingAvatar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ PlasmaCore.Dialog { //cosmic background noise is less random than the placement

property int avatarWidth

flags: Qt.WindowStaysOnTopHint

type: "Notification"

x: root.x + root.width / 2 - width / 2
Expand Down
9 changes: 5 additions & 4 deletions contents/ui/GenericItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Item {
width: main.width - 40 - allItem.x
height: 38
z: -20
color: "#131314"
color: backdrop.color
border.color: "transparent"
border.width: 1
radius: 6
Expand All @@ -100,18 +100,19 @@ Item {
x: appicon.width + 9
anchors.verticalCenter: appicon.verticalCenter
text: ("name" in model ? model.name : model.display)
font.family: "SF Pro Text"
color: main.textColor
font.family: main.textFont
font.pixelSize: 12
}
}
states: [
State {
name: "highlight"; when: !canNavigate ? highlighted : runnerList.currentMainIndex == index && runnerList.currentSubIndex == subIndex
PropertyChanges { target: rect; color: "#0E0E0F"}
PropertyChanges { target: rect; color: plasmoid.configuration.theming == 0 ? "#0E0E0F" : plasmoid.configuration.theming == 1 ? "#FFFFFF" : PlasmaCore.Theme.buttonFocusColor}
},
State {
name: "default"; when: !canNavigate ? !highlighted : runnerList.currentMainIndex != index || runnerList.currentSubIndex != subIndex
PropertyChanges { target: rect; color: "#131314"}
PropertyChanges { target: rect; color: backdrop.color}
}]
transitions: highlight
}
Expand Down
50 changes: 24 additions & 26 deletions contents/ui/Header.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,18 @@ Item {
y: 2 * iconSize
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: "icons/feather/settings.svg"
width: iconSize
height: width
/*
sourceSize: Qt.size( imgS.sourceSize.width, imgS.sourceSize.height)
Image {
id: imgS
source: parent.source
width: 0
height: 0
}*/
id: settingsImage
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: "icons/feather/settings.svg"
width: iconSize
height: width
ColorOverlay {
visible: plasmoid.configuration.theming != 0
anchors.fill: settingsImage
source: settingsImage
color: main.textColor
}
}
onClicked: {
KQuickAddons.KCMShell.openSystemSettings("kcm_quick")
Expand All @@ -76,19 +75,18 @@ Item {
text: "Power Off"
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: "icons/feather/power.svg"
width: iconSize
height: width
/*
sourceSize: Qt.size( imgP.sourceSize.width, imgP.sourceSize.height)
Image {
id: imgP
source: parent.source
width: 0
height: 0
}*/
id: powerImage
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: "icons/feather/power.svg"
width: iconSize
height: width
ColorOverlay {
visible: plasmoid.configuration.theming != 0
anchors.fill: powerImage
source: powerImage
color: main.textColor
}
}
onClicked: {
pmEngine.performOperation("requestShutDown")
Expand Down
36 changes: 23 additions & 13 deletions contents/ui/MainView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ import QtGraphicalEffects 1.12
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.kcoreaddons 1.0 as KCoreAddons
import QtGraphicalEffects 1.0

Item {
id: main
anchors.fill: parent

property bool searching: (searchBar.text != "")
signal newTextQuery(string text)

readonly property color textColor: plasmoid.configuration.theming == 0 ? "#FFFFFF" : plasmoid.configuration.theming == 1 ? "#000000" : PlasmaCore.Theme.textColor
readonly property string textFont: plasmoid.configuration.theming == 2 ? PlasmaCore.Theme.defaultFont : "SF Pro Text"


KCoreAddons.KUser {
id: kuser
}
Expand Down Expand Up @@ -64,7 +68,7 @@ Item {
y: 200 //175
width: main.width
height: main.height - y
color: '#131314'
color: plasmoid.configuration.theming == 0 ? "#131314" : plasmoid.configuration.theming == 1 ? "#ECEDEE" : PlasmaCore.Theme.backgroundColor
}
//Floating Avatar
Item {
Expand Down Expand Up @@ -93,9 +97,9 @@ Item {
id: nameLabel
x: main.width / 2 - width / 2 //This centeres the Text
y: 80//60
text: plasmoid.configuration.enableGreeting ? 'Hi, ' + kuser.fullName : i18n("%1@%2", kuser.loginName, kuser.host)

font.family: 'SF Pro Text' //This is the font that was used in the original design by Max McKinney
text: plasmoid.configuration.enableGreeting && plasmoid.configuration.customGreeting ? plasmoid.configuration.customGreeting : plasmoid.configuration.enableGreeting ? 'Hi, ' + kuser.fullName : i18n("%1@%2", kuser.loginName, kuser.host)
color: textColor
font.family: textFont //This is the font that was used in the original design by Max McKinney
font.pixelSize: 16
}
}
Expand All @@ -107,14 +111,20 @@ Item {
width: main.width - 2 * x
height: 45//40
radius: 6
color: '#202124'
color: plasmoid.configuration.theming == 0 ? "#202124" : plasmoid.configuration.theming == 1 ? "#FFFFFF" : PlasmaCore.Theme.viewBackgroundColor
Image {
id: searchIcon
x: 15
width: 15
height: width
anchors.verticalCenter: parent.verticalCenter
source: 'icons/feather/search.svg'
ColorOverlay {
visible: plasmoid.configuration.theming != 0
anchors.fill: searchIcon
source: searchIcon
color: main.textColor
}
}
Rectangle {
x: 45
Expand All @@ -133,15 +143,15 @@ Item {
width: parent.width
anchors.verticalCenter: parent.verticalCenter
focus: true
color: 'white'
color: textColor
selectByMouse: true
selectionColor: '#141414'
font.family: 'SF Pro Text'
selectionColor: plasmoid.configuration.theming == 0 ? "#141414" : plasmoid.configuration.theming == 1 ? "#EBEBEB" : PlasmaCore.Theme.highlightedTextColor
font.family: textFont
font.pixelSize: 13
Text {
anchors.fill: parent
text: 'Search your computer'
color: '#686B71'
color: plasmoid.configuration.theming == 0 ? "#686B71" : plasmoid.configuration.theming == 1 ? "#798591" : PlasmaCore.Theme.disabledTextColor
visible: !parent.text
}
onTextChanged: {
Expand Down Expand Up @@ -258,8 +268,8 @@ Item {
height: 40//20
anchors.top: backdrop.top
gradient: Gradient {
GradientStop { position: 0.0; color: "#0d0d0d" }
GradientStop { position: 1.0; color: "transparent" }
GradientStop { position: 0.0; color: Qt.darker(backdrop.color, 1.5) }
GradientStop { position: 1.0; color: "transparent" }//"#0d0d0d"
}
states: [
State {
Expand All @@ -284,7 +294,7 @@ Item {
anchors.bottom: backdrop.bottom
gradient: Gradient {
GradientStop { position: 0.0; color: "transparent" }
GradientStop { position: 1.0; color: "#0d0d0d"}
GradientStop { position: 1.0; color: Qt.darker(backdrop.color, 1.5)}
}
states: [
State {
Expand Down
11 changes: 6 additions & 5 deletions contents/ui/MenuRepresentation.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PlasmaCore.Dialog {

objectName: "popupWindow"
flags: Qt.WindowStaysOnTopHint
location: PlasmaCore.Types.Floating
//location: PlasmaCore.Types.Floating
hideOnWindowDeactivate: true

onVisibleChanged: {
Expand Down Expand Up @@ -78,16 +78,18 @@ PlasmaCore.Dialog {
x = (appletTopLeft.x < horizMidPoint) ? screen.x : (screen.x + screen.width) - width;
}

y = screen.height - fs.height + root.margins.bottom;
y = screen.height - fs.height + root.margins.bottom + root.margins.top;

return Qt.point(x, y);
}

FocusScope {
id: fs
focus: true
width: 515//450
height: 600//530
Layout.minimumWidth: 515//450
Layout.minimumHeight: 600//530
Layout.maximumWidth: Layout.minimumWidth
Layout.maximumHeight: Layout.minimumHeight

Item {
x: - root.margins.left
Expand All @@ -110,7 +112,6 @@ PlasmaCore.Dialog {

function refreshModel() {
main.reload()
console.log("[McKinney Launcher] Refreshed Model")
}

Component.onCompleted: {
Expand Down
Loading

0 comments on commit ec98016

Please sign in to comment.