Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonidPilyugin committed Feb 3, 2023
1 parent 64b8af9 commit 8fbe6bc
Show file tree
Hide file tree
Showing 41 changed files with 3,017 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Maintainer: Leonid Pilyugin <[email protected]>

pkgname=kawaii-look-and-feel
pkgver=1.0
pkgver=1.1
pkgrel=1
pkgdesc='Kawaii KDE look-and-feel'
groups=('kawaii')
url='https://github.com/LeonidPilyugin/kawaii-look-and-feel'
arch=(x86_64)
license=('GPL3')
source=("$pkgname-$pkgver.tar.gz::https://github.com/LeonidPilyugin/$pkgname/releases/download/v$pkgver/files.tar.gz")
sha256sums=('4a48d1d0728e72a8d16a3f2d3339e460d92f471dad430b4fd5334ff7a0895c9a')
sha256sums=('b0a55116235314c635deba81caf302c7c2d19cb11a34a702114b3d84a023e73f')

package() {
srcdir=$srcdir/files
Expand Down
Binary file modified files.tar.gz
Binary file not shown.
115 changes: 115 additions & 0 deletions files/org.kde.neko.desktop/contents/components/ActionButton.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/*
SPDX-FileCopyrightText: 2016 David Edmundson <[email protected]>
SPDX-License-Identifier: LGPL-2.0-or-later
*/

import QtQuick 2.8
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3

Item {
id: root
property alias text: label.text
property alias iconSource: icon.source
property alias containsMouse: mouseArea.containsMouse
property alias font: label.font
property alias labelRendering: label.renderType
property alias circleOpacity: iconCircle.opacity
property alias circleVisiblity: iconCircle.visible
property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 1
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
signal clicked

activeFocusOnTab: true

property int iconSize: PlasmaCore.Units.gridUnit * 3

implicitWidth: Math.max(iconSize + PlasmaCore.Units.largeSpacing * 2, label.contentWidth)
implicitHeight: iconSize + PlasmaCore.Units.smallSpacing + label.implicitHeight

opacity: activeFocus || containsMouse ? 1 : 0.85
Behavior on opacity {
PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
duration: PlasmaCore.Units.longDuration
easing.type: Easing.InOutQuad
}
}

Rectangle {
id: iconCircle
anchors.centerIn: icon
width: iconSize + PlasmaCore.Units.smallSpacing
height: width
radius: width / 2
color: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : PlasmaCore.ColorScope.textColor
opacity: root.activeFocus || containsMouse ? (softwareRendering ? 0.8 : 0.15) : (softwareRendering ? 0.6 : 0)
Behavior on opacity {
PropertyAnimation { // OpacityAnimator makes it turn black at random intervals
duration: PlasmaCore.Units.longDuration
easing.type: Easing.InOutQuad
}
}
}

Rectangle {
anchors.centerIn: iconCircle
width: iconCircle.width
height: width
radius: width / 2
scale: mouseArea.containsPress ? 1 : 0
color: PlasmaCore.ColorScope.textColor
opacity: 0.15
Behavior on scale {
PropertyAnimation {
duration: PlasmaCore.Units.shortDuration
easing.type: Easing.InOutQuart
}
}
}

PlasmaCore.IconItem {
id: icon
anchors {
top: parent.top
horizontalCenter: parent.horizontalCenter
}
width: iconSize
height: iconSize

colorGroup: PlasmaCore.ColorScope.colorGroup
active: mouseArea.containsMouse || root.activeFocus
}

PlasmaComponents3.Label {
id: label
font.pointSize: root.fontSize
anchors {
top: icon.bottom
topMargin: (softwareRendering ? 1.5 : 1) * PlasmaCore.Units.smallSpacing
left: parent.left
right: parent.right
}
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignTop
wrapMode: Text.WordWrap
font.underline: root.activeFocus
}

MouseArea {
id: mouseArea
hoverEnabled: true
onClicked: root.clicked()
anchors.fill: parent
}

Keys.onEnterPressed: clicked()
Keys.onReturnPressed: clicked()
Keys.onSpacePressed: clicked()

Accessible.onPressAction: clicked()
Accessible.role: Accessible.Button
Accessible.name: label.text
}
43 changes: 43 additions & 0 deletions files/org.kde.neko.desktop/contents/components/Battery.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <[email protected]>
SPDX-License-Identifier: LGPL-2.0-or-later
*/

import QtQuick 2.2

import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.workspace.components 2.0 as PW

Row {
id: row

property int fontSize: PlasmaCore.Theme.defaultFont.pointSize

spacing: PlasmaCore.Units.smallSpacing
visible: pmSource.data["Battery"]["Has Cumulative"]

PlasmaCore.DataSource {
id: pmSource
engine: "powermanagement"
connectedSources: ["Battery", "AC Adapter"]
}

PW.BatteryIcon {
id: battery
hasBattery: pmSource.data["Battery"]["Has Battery"] || false
percent: pmSource.data["Battery"]["Percent"] || 0
pluggedIn: pmSource.data["AC Adapter"] ? pmSource.data["AC Adapter"]["Plugged in"] : false

height: batteryLabel.height
width: height
}

PlasmaComponents3.Label {
id: batteryLabel
font.pointSize: row.fontSize
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","%1%", battery.percent)
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Battery at %1%", battery.percent)
}
}
37 changes: 37 additions & 0 deletions files/org.kde.neko.desktop/contents/components/Clock.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
SPDX-FileCopyrightText: 2016 David Edmundson <[email protected]>
SPDX-License-Identifier: LGPL-2.0-or-later
*/

import QtQuick 2.8
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.5
import org.kde.plasma.core 2.0

ColumnLayout {
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software

Label {
text: Qt.formatTime(timeSource.data["Local"]["DateTime"])
color: ColorScope.textColor
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
font.pointSize: 48
Layout.alignment: Qt.AlignHCenter
}
Label {
text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate)
color: ColorScope.textColor
style: softwareRendering ? Text.Outline : Text.Normal
styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" //no outline, doesn't matter
font.pointSize: 24
Layout.alignment: Qt.AlignHCenter
}
DataSource {
id: timeSource
engine: "time"
connectedSources: ["Local"]
interval: 1000
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/*
SPDX-FileCopyrightText: 2016 David Edmundson <[email protected]>
SPDX-License-Identifier: LGPL-2.0-or-later
*/

import QtQuick 2.2

import QtQuick.Layouts 1.1
import QtQuick.Controls 1.1

import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents3

Item {
id: root

/*
* Any message to be displayed to the user, visible above the text fields
*/
property alias notificationMessage: notificationsLabel.text

/*
* A list of Items (typically ActionButtons) to be shown in a Row beneath the prompts
*/
property alias actionItems: actionItemsLayout.children

/*
* A model with a list of users to show in the view
* The following roles should exist:
* - name
* - iconSource
*
* The following are also handled:
* - vtNumber
* - displayNumber
* - session
* - isTty
*/
property alias userListModel: userListView.model

/*
* Self explanatory
*/
property alias userListCurrentIndex: userListView.currentIndex
property alias userListCurrentItem: userListView.currentItem
property bool showUserList: true

property alias userList: userListView

property int fontSize: PlasmaCore.Theme.defaultFont.pointSize + 2

default property alias _children: innerLayout.children

UserList {
id: userListView
visible: showUserList && y > 0
anchors {
bottom: parent.verticalCenter
left: parent.left
right: parent.right
}
fontSize: root.fontSize
}

//goal is to show the prompts, in ~16 grid units high, then the action buttons
//but collapse the space between the prompts and actions if there's no room
//ui is constrained to 16 grid units wide, or the screen
ColumnLayout {
id: prompts
anchors.top: parent.verticalCenter
anchors.topMargin: PlasmaCore.Units.gridUnit * 0.5
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
PlasmaComponents3.Label {
id: notificationsLabel
font.pointSize: root.fontSize
Layout.maximumWidth: PlasmaCore.Units.gridUnit * 16
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
font.italic: true
}
ColumnLayout {
Layout.minimumHeight: implicitHeight
Layout.maximumHeight: PlasmaCore.Units.gridUnit * 10
Layout.maximumWidth: PlasmaCore.Units.gridUnit * 16
Layout.alignment: Qt.AlignHCenter
ColumnLayout {
id: innerLayout
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
}
Item {
Layout.fillHeight: true
}
}
Row { //deliberately not rowlayout as I'm not trying to resize child items
id: actionItemsLayout
spacing: PlasmaCore.Units.largeSpacing / 2
Layout.alignment: Qt.AlignHCenter
}
Item {
Layout.fillHeight: true
}
}
}
Loading

0 comments on commit 8fbe6bc

Please sign in to comment.