From 809faf1f3dcfa291ba25e493fa4c25bed2b0ee08 Mon Sep 17 00:00:00 2001 From: Rokin Date: Tue, 10 Apr 2018 12:57:55 +0200 Subject: [PATCH] Version 1.5 --- CHANGELOG.md | 5 +- .../desktoptheme/Darkine/widgets/button.svg | 255 +++++------ .../contents/components/ActionButton.qml | 79 ++++ .../contents/components/ActionButton.qmlc | Bin 0 -> 17134 bytes .../contents/components/Battery.qml | 52 +++ .../contents/components/Clock.qml | 44 ++ .../contents/components/Clock.qmlc | Bin 0 -> 6313 bytes .../components/KeyboardLayoutButton.qml | 48 +++ .../components/SessionManagementScreen.qml | 119 ++++++ .../components/SessionManagementScreen.qmlc | Bin 0 -> 15988 bytes .../contents/components/UserDelegate.qml | 158 +++++++ .../contents/components/UserDelegate.qmlc | Bin 0 -> 26078 bytes .../contents/components/UserList.qml | 93 ++++ .../contents/components/UserList.qmlc | Bin 0 -> 15263 bytes .../contents/components/VirtualKeyboard.qml | 28 ++ .../components/artwork/logout_primary.svgz | Bin 0 -> 2514 bytes .../components/artwork/restart_primary.svgz | Bin 0 -> 1860 bytes .../components/artwork/shutdown_primary.svgz | Bin 0 -> 1738 bytes .../org.kde.darkine/contents/defaults | 2 +- .../contents/lockscreen/LockOsd.qml | 71 ++++ .../contents/lockscreen/LockScreen.qml | 65 +++ .../contents/lockscreen/LockScreenUi.qml | 399 ++++++++++++++++++ .../contents/lockscreen/MainBlock.qml | 141 +++++++ .../contents/lockscreen/MediaControls.qml | 159 +++++++ .../contents/lockscreen/config.qml | 23 + .../contents/lockscreen/config.qmlc | Bin 0 -> 4742 bytes .../contents/lockscreen/config.xml | 15 + .../org.kde.darkine/contents/osd/Osd.qml | 58 +++ .../org.kde.darkine/contents/osd/Osd.qmlc | Bin 0 -> 6159 bytes .../org.kde.darkine/contents/osd/OsdItem.qml | 86 ++++ .../org.kde.darkine/contents/osd/OsdItem.qmlc | Bin 0 -> 15379 bytes 31 files changed, 1771 insertions(+), 129 deletions(-) create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/ActionButton.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/ActionButton.qmlc create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/Battery.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/Clock.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/Clock.qmlc create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/KeyboardLayoutButton.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/SessionManagementScreen.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/SessionManagementScreen.qmlc create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/UserDelegate.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/UserDelegate.qmlc create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/UserList.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/UserList.qmlc create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/VirtualKeyboard.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/artwork/logout_primary.svgz create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/artwork/restart_primary.svgz create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/components/artwork/shutdown_primary.svgz create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockOsd.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockScreen.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockScreenUi.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/lockscreen/MainBlock.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/lockscreen/MediaControls.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/lockscreen/config.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/lockscreen/config.qmlc create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/lockscreen/config.xml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/osd/Osd.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/osd/Osd.qmlc create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/osd/OsdItem.qml create mode 100644 plasma/look-and-feel/org.kde.darkine/contents/osd/OsdItem.qmlc diff --git a/CHANGELOG.md b/CHANGELOG.md index 13fa581..30e853f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,4 +24,7 @@ - SDDM : Textbox, PasswordBox and Button colors no longer appear with the default white theme. Colors schemes are now directly integrated into the SDDM theme. This requires a slight visual change. - SDDM : New icons, they are now directly integrated into the SDDM theme. - +#### Version 1.5 - 10 April 2018 +- Plasma theme : Fix button.svg (hover) +- Plasma theme : New : add lockscreen (look-and-feel) +- Plasma theme : Change default icons Papirus-Adapta to Papirus-Adapta-Nokto (better render on dark theme) diff --git a/plasma/desktoptheme/Darkine/widgets/button.svg b/plasma/desktoptheme/Darkine/widgets/button.svg index e2db6ee..b7518a2 100644 --- a/plasma/desktoptheme/Darkine/widgets/button.svg +++ b/plasma/desktoptheme/Darkine/widgets/button.svg @@ -23,6 +23,7 @@ image/svg+xml + @@ -35,16 +36,16 @@ guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:window-width="1344" - inkscape:window-height="897" + inkscape:window-width="1920" + inkscape:window-height="1170" id="namedview158" showgrid="false" - inkscape:zoom="3.2747253" - inkscape:cx="121.278" - inkscape:cy="31.557136" - inkscape:window-x="2152" - inkscape:window-y="64" - inkscape:window-maximized="0" + inkscape:zoom="6.5494506" + inkscape:cx="142.22505" + inkscape:cy="41.023296" + inkscape:window-x="1920" + inkscape:window-y="0" + inkscape:window-maximized="1" inkscape:current-layer="layer1" /> @@ -1176,74 +1177,10 @@ y1="35" x2="47.556" y2="35" /> - - - - - - + + + + + + + style="color:#000000;line-height:normal;font-family:Sans;text-indent:0;text-align:start;text-transform:none;fill:url(#linearGradient898);stroke-width:1.26300001" /> + style="fill:url(#radialGradient894)" /> + style="fill:url(#radialGradient896)" /> + style="color:#000000;line-height:normal;font-family:Sans;text-indent:0;text-align:start;text-transform:none;fill:url(#linearGradient892);stroke-width:1.26300001" /> + style="fill:url(#radialGradient888)" /> + style="fill:url(#radialGradient890)" /> + style="fill:url(#radialGradient884)" /> + style="fill:url(#radialGradient886)" /> + d="m 144.70449,1014.4997 v 29.8972 h 29.89714 v -29.8972 z" + style="color:#000000;fill:#2e2e2e;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.9342863;opacity:0" /> + transform="matrix(0.93428636,0,0,0.93428636,95.187291,995.81393)" + style="stroke:none;opacity:0"> + transform="matrix(0.93428636,0,0,0.93428636,95.187291,996.74823)" + style="stroke:none;opacity:0"> + transform="matrix(0.93428636,0,0,0.93428636,95.187291,991.14253)" + style="stroke:none;opacity:0"> + transform="matrix(0.93428636,0,0,0.93428636,138.16446,995.81393)" + style="stroke:none;opacity:0"> + transform="matrix(-0.93436324,0,0,-0.93436324,224.12157,1063.0866)" + style="stroke:none;opacity:0"> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.2 +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents + +Item { + id: root + property alias text: label.text + property alias iconSource: icon.source + property alias containsMouse: mouseArea.containsMouse + property alias font: label.font + signal clicked + + activeFocusOnTab: true + + property int iconSize: units.gridUnit * 3 + + implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth) + implicitHeight: iconSize + units.smallSpacing + label.implicitHeight + + PlasmaCore.IconItem { + id: icon + anchors { + top: parent.top + horizontalCenter: parent.horizontalCenter + } + width: iconSize + height: iconSize + + colorGroup: PlasmaCore.ColorScope.colorGroup + active: mouseArea.containsMouse || root.activeFocus + } + PlasmaComponents.Label { + id: label + anchors { + top: icon.bottom + topMargin: units.smallSpacing + left: parent.left + right: parent.right + } + 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 +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/ActionButton.qmlc b/plasma/look-and-feel/org.kde.darkine/contents/components/ActionButton.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..2cec1ad58e9855fec0c104c92ea9199fd1cd5f5b GIT binary patch literal 17134 zcmds7eQcHG6@QAQ6o>ZeszU{Rg{#ss+cGO3g6!VX>b-iaRjT3!kwR~wQn2L|_j^9xk9*(y z-g|31#fO~xe4Xb!=Q-y*=bYy)&%e;Pv$JEMqgn`2cJ+Mm+S~W;+EFG%^>QKp^!Tpt zy-_o-eM?Q(;sv+d{`04S^9{hAjr$k^1=(-`RegboZs{m^k32`;*gQ!`E`(3~UV8uL)1I_|0Anyi@0z&0NYzJfjVm{h{ z3_w%}5d*vimJCv_cj)kLorAw5!DmDY5dw2Z#&qQ|D8zf6p4j9j`FhNi=6{Kt?L%MGfs*Bd%v z5h)`f(HbRdxhW67 z2{9cg&-6;QFs;`=kcUpI*d9nH@>R94Tw@t|W!H~@4pGdw-cD8)ezo{T+udqr*5#(@ z8o6!2Hg0}sA1pDE4m|Hu3QeTzRKw8Qh^`;KxX2VmueaVyFOrAeLq+lzX;AcnU~yJ;afEQKk9+obZzu&YKYxFzgs>;w*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T?5K_zvw%OsQHHK`}dd`hm+a-zT}^8ti|!>B);;m(zCDW zS=6t;Jl4&XJgPq*^0?CcPc!vV_?m7K4@uD=KIhI$?ZCI%Gv18~Xq Pc%{j|Wk&a5h7Rw4C4X!C literal 0 HcmV?d00001 diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/Battery.qml b/plasma/look-and-feel/org.kde.darkine/contents/components/Battery.qml new file mode 100644 index 0000000..1adb46f --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/components/Battery.qml @@ -0,0 +1,52 @@ +/* + * Copyright 2016 Kai Uwe Broulik + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.2 + +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.workspace.components 2.0 as PW + +Row { + spacing: 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 + } + + PlasmaComponents.Label { + id: batteryLabel + height: undefined + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","%1%", battery.percent) + Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Battery at %1%", battery.percent) + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/Clock.qml b/plasma/look-and-feel/org.kde.darkine/contents/components/Clock.qml new file mode 100644 index 0000000..395f2bd --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/components/Clock.qml @@ -0,0 +1,44 @@ +/* + * Copyright 2016 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.0 +import QtQuick.Layouts 1.1 + +import org.kde.plasma.core 2.0 +import org.kde.plasma.components 2.0 + +ColumnLayout { + Label { + text: Qt.formatTime(timeSource.data["Local"]["DateTime"]) + font.pointSize: 32 //Mockup says this, I'm not sure what to do? + Layout.alignment: Qt.AlignHCenter + renderType: Text.QtRendering + } + Label { + text: Qt.formatDate(timeSource.data["Local"]["DateTime"], Qt.DefaultLocaleLongDate) + font.pointSize: 18 + Layout.alignment: Qt.AlignHCenter + } + DataSource { + id: timeSource + engine: "time" + connectedSources: ["Local"] + interval: 1000 + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/Clock.qmlc b/plasma/look-and-feel/org.kde.darkine/contents/components/Clock.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..8ac00e052dc551c079307d1e479704f08b27319a GIT binary patch literal 6313 zcmds4U2M};6hC}!;BW;8Oc+qGk&nnm%rpz}p~I21(j`?sLgEYz*1=>SW$O@)F_?wK z+MvV`!-Eft!MF#aeK1%SBsDI=gC^6EfQgBF&;)QX3o*(AI)A_W(f_~Q=vrJbc$d?A z@44rm?{n^dhmX|mZ)uJ-SBS`r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01OgKz0w~C(GS>nC@r;x}#mw9ZeSl-ihhzXb)UIPuVY6 v=UG7;0U{@8_pfFAzx+F~2JL4G->mE>*!5k3LR6J8tScjoy;B+Y*q8qSOhf`Z literal 0 HcmV?d00001 diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/KeyboardLayoutButton.qml b/plasma/look-and-feel/org.kde.darkine/contents/components/KeyboardLayoutButton.qml new file mode 100644 index 0000000..89d5ac2 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/components/KeyboardLayoutButton.qml @@ -0,0 +1,48 @@ +/*************************************************************************** + * Copyright (C) 2014 by Daniel Vrátil * + * * + * 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, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +import QtQuick 2.1 +import QtQuick.Controls 1.1 as QQC + +import org.kde.plasma.components 2.0 as PlasmaComponents + +import org.kde.plasma.workspace.keyboardlayout 1.0 + +PlasmaComponents.ToolButton { + id: kbLayoutButton + + iconName: "input-keyboard" + implicitWidth: minimumWidth + text: layout.currentLayoutDisplayName + + Accessible.name: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to change keyboard layout", "Switch layout") + + visible: layout.layouts.length > 1 + + onClicked: layout.nextLayout() + + KeyboardLayout { + id: layout + function nextLayout() { + var layouts = layout.layouts; + var index = (layouts.indexOf(layout.currentLayout)+1) % layouts.length; + layout.currentLayout = layouts[index]; + } + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/SessionManagementScreen.qml b/plasma/look-and-feel/org.kde.darkine/contents/components/SessionManagementScreen.qml new file mode 100644 index 0000000..45b8315 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/components/SessionManagementScreen.qml @@ -0,0 +1,119 @@ +/* + * Copyright 2016 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +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 2.0 as PlasmaComponents + +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 var userListCurrentModelData: userListView.currentItem === null ? [] : userListView.currentItem.m + property bool showUserList: true + + property alias userList: userListView + + default property alias _children: innerLayout.children + + + UserList { + id: userListView + visible: showUserList && y > 0 + anchors { + bottom: parent.verticalCenter + left: parent.left + right: parent.right + } + } + + //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: units.gridUnit * 0.5 + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + PlasmaComponents.Label { + id: notificationsLabel + Layout.maximumWidth: 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: units.gridUnit * 10 + Layout.maximumWidth: 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: units.smallSpacing + Layout.alignment: Qt.AlignHCenter + } + Item { + Layout.fillHeight: true + } + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/SessionManagementScreen.qmlc b/plasma/look-and-feel/org.kde.darkine/contents/components/SessionManagementScreen.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..7412927af7aa555eee8231822ff9be2a67cb318a GIT binary patch literal 15988 zcmeHOU2Igx6&@R~P3mMfDJ3K!$wHlw&|*vrlmZ1CaM(?Zx_}`-fM#tkhG3fo+l00# zC9ma!jt%%BlAE?AbAN&xt4xz|VP@oc3O>3!0^nnK|naYZ+G-^?Vpx-w$XYakc z>-`CKYO0L&?c6(O=FFLM&YU@ONe&)fT;C9Bi_B0;6+AFao&0b~V_kt#rQcL)*T&zx zI5KqjkJnE8;%EQ55jhn?pBI5A-u?T|!J8ld^3M6+fAZ7l$3LHkwwHiyk1F*v>XX1! zUsa_8nF%7u%fKrd3uKXH)P}uhvFbD(+l{x|p0)Z(?#ee}IfJtINKTrZD z+ki76Pyrc^0c*g|4ay_M552IwVJa0& zQ$tKOL-{QwbJb({`8Wt=rm0f+u22JoRG-XeyXh)`U(#55pE31#$rpIm@C(@qo;0rs zIYgdn6%Y}$ENo{(7zhCKfu{hNL%~f{Y#x44GRX-ue2w_=#)*K9rj` zk!y~5P2p3kVkvyskYbmGUVdZQW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@5_MqIlwi3iyhx*#+P`;FO=~YtF^{1R-aSHrl{cY_WscEqh);%?`??Z zOn3*}x(0lmt38uYzCpu34319sKXY=*_i2^SZ>oo}(wiqe!!xh3+w$nozDBDf?;2l{ z@n6~oqw*Rid!wWFiK?p>){`>*x`4@OQF zd*&S9^0no9EHbSvslYK!(Lf@%hch%e(#-OX_wK@!?Ing8_jsGHK7tda4`!t0((hNB5N(D6&R5~bWEf}g>55fM^P_c zoo??+x9aZNvU62$e$M|++1JIy9jVFuTI3|0q3XlWAJK``JoZNh)Q=3P&vPdI5EMC+ zZt_B=^95;(yuOt8e_rnMjmG=BIIZ@(El=rGWAEP7*x~Gh19OIMqmpX`czwN)WNxc8~E$4pI z=VXp&{IpWz#IufpWnXqog8+$=_x_vo=Wip{=FxBLEB)s2? + * Copyright 2014 Aleix Pol Gonzalez + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.4 + +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents + +Item { + id: wrapper + + property bool isCurrent: true + + readonly property var m: model + property string name + property string userName + property string avatarPath + property string iconSource + property bool constrainText: true + signal clicked() + + property real faceSize: Math.min(width, height - usernameDelegate.height - units.largeSpacing) + + opacity: isCurrent ? 1.0 : 0.5 + + Behavior on opacity { + OpacityAnimator { + duration: units.longDuration + } + } + + Item { + id: imageSource + width: faceSize + height: faceSize + + //Image takes priority, taking a full path to a file, if that doesn't exist we show an icon + Image { + id: face + source: wrapper.avatarPath + sourceSize: Qt.size(faceSize, faceSize) + fillMode: Image.PreserveAspectCrop + anchors.fill: parent + } + + PlasmaCore.IconItem { + id: faceIcon + source: iconSource + visible: (face.status == Image.Error || face.status == Image.Null) + anchors.fill: parent + anchors.margins: units.gridUnit * 0.5 // because mockup says so... + colorGroup: PlasmaCore.ColorScope.colorGroup + } + } + + ShaderEffect { + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + + width: imageSource.width + height: imageSource.height + + supportsAtlasTextures: true + + property var source: ShaderEffectSource { + sourceItem: imageSource + hideSource: true + live: false + } + + property var colorBorder: PlasmaCore.ColorScope.textColor + + //draw a circle with an antialised border + //innerRadius = size of the inner circle with contents + //outerRadius = size of the border + //blend = area to blend between two colours + //all sizes are normalised so 0.5 == half the width of the texture + + //if copying into another project don't forget to connect themeChanged to update() + //but in SDDM that's a bit pointless + fragmentShader: " + varying highp vec2 qt_TexCoord0; + uniform highp float qt_Opacity; + uniform lowp sampler2D source; + + uniform lowp vec4 colorBorder; + highp float blend = 0.01; + highp float innerRadius = 0.47; + highp float outerRadius = 0.49; + lowp vec4 colorEmpty = vec4(0.0, 0.0, 0.0, 0.0); + + void main() { + lowp vec4 colorSource = texture2D(source, qt_TexCoord0.st); + + highp vec2 m = qt_TexCoord0 - vec2(0.5, 0.5); + highp float dist = sqrt(m.x * m.x + m.y * m.y); + + if (dist < innerRadius) + gl_FragColor = colorSource; + else if (dist < innerRadius + blend) + gl_FragColor = mix(colorSource, colorBorder, ((dist - innerRadius) / blend)); + else if (dist < outerRadius) + gl_FragColor = colorBorder; + else if (dist < outerRadius + blend) + gl_FragColor = mix(colorBorder, colorEmpty, ((dist - outerRadius) / blend)); + else + gl_FragColor = colorEmpty ; + + gl_FragColor = gl_FragColor * qt_Opacity; + } + " + } + + + + PlasmaComponents.Label { + id: usernameDelegate + anchors { + bottom: parent.bottom + horizontalCenter: parent.horizontalCenter + } + height: implicitHeight // work around stupid bug in Plasma Components that sets the height + width: constrainText ? parent.width : implicitWidth + text: wrapper.name + elide: Text.ElideRight + horizontalAlignment: Text.AlignHCenter + //make an indication that this has active focus, this only happens when reached with keyboard navigation + font.underline: wrapper.activeFocus + } + + MouseArea { + anchors.fill: parent + hoverEnabled: true + + onClicked: wrapper.clicked(); + } + + Accessible.name: name + Accessible.role: Accessible.Button + function accessiblePressAction() { wrapper.clicked() } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/UserDelegate.qmlc b/plasma/look-and-feel/org.kde.darkine/contents/components/UserDelegate.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..1b858807df29f62b82df23d3fd1e170f1a67a135 GIT binary patch literal 26078 zcmeHPe{5CPeLo~%Oq#@Qnh>`g<&rqV1TanliTTmQKT|sxVq%h!HZ(TaU>YE<4TNrK zVHn}`oZM^^f?4*nf=P~b^UvOdEVRk!@pVa?~kuV-C@9o zUohrj7K5Y#CGw1j~V&54+4G^6MTn1F5;~*fz0ZWbP z2223v0Zq${83$YeG*$o)Um8Fh{jX`Y5-uf`7D6RdtCB692L|*CdH%qIx}bMgAbk0L*+WaDnP>%cpzPu%slII z#iRN6O}A^w&pcE$G)aA&e8`fd@|kpa|6b6WXI!pyY5sQBYFr0o!S$|3c{O0PS=!T* znY}JoJet1~fzNd{9$vf_DaEaq@+@_|X@~Fc1g(`jUzHxsH(CpKopLe{<)K!ojH9a@ zIm|n}|K#TUyvvm?%^wlA+g9bj>uUMdfI=-`rcG)UA9ayQ@o2u;R1=L&arh?NrBB?t zX;Y=jL$E=wpOiPXk2S7A>C=3x>CUrf#o_4-@`f)-;ZNME?ssj9NAqoFyrgx{xdCa1 z=YazFwinTx(M}l{$G;@{Y@QN)YPWR-=-Oc>v+HzSLUzkW`o9^6FOI%)q@Z zI3iRInm0qft|?2OmOZ@G1MUNObl^yjl37R_B+Jw57Wfw;RQ#@+%{)BaaMQb6TK-!y zL;GRUahkUW^hJ93PY}CSREpkLGPf z_F>&9;?`S^zKpsJ=r%`RAwReaelSkHZnzomk@YFQLVj>J{9q~g(r!ajefg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_;_~-?uGx7xu9rn-t$*#vH0=H`3szF fo=U2p6O>1S{qB?B7sdZxHYxw#EXy9swD11|p5zIo literal 0 HcmV?d00001 diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/UserList.qml b/plasma/look-and-feel/org.kde.darkine/contents/components/UserList.qml new file mode 100644 index 0000000..a2d8508 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/components/UserList.qml @@ -0,0 +1,93 @@ +/* + * Copyright 2014 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.2 + +ListView { + id: view + readonly property string selectedUser: currentItem ? currentItem.userName : "" + readonly property int userItemWidth: units.gridUnit * 8 + readonly property int userItemHeight: units.gridUnit * 8 + + implicitHeight: userItemHeight + + activeFocusOnTab : true + + /* + * Signals that a user was explicitly selected + */ + signal userSelected; + + orientation: ListView.Horizontal + highlightRangeMode: ListView.StrictlyEnforceRange + + //centre align selected item (which implicitly centre aligns the rest + preferredHighlightBegin: width/2 - userItemWidth/2 + preferredHighlightEnd: preferredHighlightBegin + + delegate: UserDelegate { + avatarPath: model.icon || "" + iconSource: model.iconName || "user-identity" + + name: { + var displayName = model.realName || model.name + + if (model.vtNumber === undefined || model.vtNumber < 0) { + return displayName + } + + if (!model.session) { + return i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Nobody logged in on that session", "Unused") + } + + + var location = "" + if (model.isTty) { + location = i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "User logged in on console number", "TTY %1", model.vtNumber) + } else if (model.displayNumber) { + location = i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "User logged in on console (X display number)", "on TTY %1 (Display %2)", model.vtNumber, model.displayNumber) + } + + if (location) { + return i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Username (location)", "%1 (%2)", displayName, location) + } + + return displayName + } + + userName: model.name + + width: userItemWidth + height: userItemHeight + + //if we only have one delegate, we don't need to clip the text as it won't be overlapping with anything + constrainText: ListView.view.count > 1 + + isCurrent: ListView.isCurrentItem + + onClicked: { + ListView.view.currentIndex = index; + ListView.view.userSelected(); + } + } + + Keys.onEscapePressed: view.userSelected() + Keys.onEnterPressed: view.userSelected() + Keys.onReturnPressed: view.userSelected() +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/UserList.qmlc b/plasma/look-and-feel/org.kde.darkine/contents/components/UserList.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..a3acc0cc9cc50489008732fa01759f8d06b52660 GIT binary patch literal 15263 zcmeHNYiu0V6}~253~gESXmBWxrEG%ZCXNFE3@v4y*su%huox#zLLheRjpGt0#t-UL z0U3ozUffhxr6O1AkCloltK!F21-iHp83id3RaF-%)jtsIkG8TaR7DXj7OLug-+k=N z?9R-3!@3}~H#$2r_n!ORbI>m&#e z;$sloqPnO~-g6M`5lt82T2m#&#kfXrl?^=opbUAz5CKhq=0L$!LL3C8L5sY{#0)22 z0zS|rC=05s6k-%K3#z?Th!N0P(7TvpS_=DQdsbaUo4!VD*UNE#ji}Z=pY0O7Ud`X5 zbx@<>?CY^>qljw`&0xC(aX)&4>UctPU8l$Maq5fUWN%axmo8IREuP57X%Of13Wb*- zy0W#Z|95&=!xrE?C>nhCm0qs^ey(wX`kF6KEayddEm5(urE$B(ARvtwIZlBpc!nJ zAnqIPP#r0C5m)MKKF&HZ;fph?aT1#AY7dk|vH4D>zB^M#&uj2Z zzcSC);dvf&)lqV3P7bh$4H(;?&$4US0i>(sRsGaq-1wU6ugt{^Io4y`_&6(qYD)`Y zj<3VGiKQzX0+d>WJfN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;dsA8?O!Z8(Z&RVXnc>&z=x^{N zTWfM}=@97rW@xm` zLJIwM5fzgbkB5n;!G53-r>3`oO**8TQzr}?4fb-r!KPddHsyX`O%)id3g9}}r>MS{ z&4DEm*1 z7*lR^&c}^@tkWI+2WiQ;(MqJ_IxOXF?Z0C4jyQIY?ugcK%E24gy(YSw0akY1W|TJP zm8Nvc_0z4aOnD$XX6WkrxsOJ)y5Yn3*vxoy_aCqSLUUPDSPrd37pZcWWS& zW#R@fq1;Q(>4FO{yRpmW@EU7;(m%@Hlb;EIp;{U3?Wwz+Sjw)uHat($jXmE}F5Hbv z-jDb956}JFt`8IA3p=1dNPJro9#~ROyJS-fM4OsQ@9s3 zkP(i`_ZP0)%y1qh=oKp6L9DatY~@!;DgDl{B@T^ceTQ16NHZUc<_|LUH+E*2B?~1>VoyFh5S;;M`XVkCv~< zFDzs$*C)A>&(6e0-t&qKWbjs!yBz zNRJ|^t{wYt!hO?QpI#+Dquxq>{c)3jw`?IvK{n4Hhy)JLE-?ILNXB%J3A= zcK-o4&(31pb|4h{W(?F^E5APZ;r9RfEK_~ro@4mO0Ing+4{0_hb>^7-LINLiN-reJ z=r5i}+IsGSNh2aFB*xORz5Bl`A7U4Odv^iymE<4ZHH*7{P=T)g!Lr=bKYoqD{6r&6 zqItqfG_XwC75$hW`fkdUJbgY;_nygOHgIOSv|fDfe4zRr(0k_td#zQi|F-$O>RoqT z*KuEN$0z^t%v0B#Wpw?SGI+`U{(09^-siEqe)mwnxhl%0P<~~z&dstHwdU=r$YENt S{!88eWB=p(-}{B$|9=1ji}Mcv literal 0 HcmV?d00001 diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/VirtualKeyboard.qml b/plasma/look-and-feel/org.kde.darkine/contents/components/VirtualKeyboard.qml new file mode 100644 index 0000000..7848b75 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/components/VirtualKeyboard.qml @@ -0,0 +1,28 @@ +/******************************************************************** + This file is part of the KDE project. + +Copyright (C) 2017 Martin Gräßlin + +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 . +*********************************************************************/ +import QtQuick 2.5 +import QtQuick.VirtualKeyboard 2.1 + +InputPanel { + id: inputPanel + property bool activated: false + active: activated && Qt.inputMethod.visible + visible: active + width: parent.width +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/artwork/logout_primary.svgz b/plasma/look-and-feel/org.kde.darkine/contents/components/artwork/logout_primary.svgz new file mode 100644 index 0000000000000000000000000000000000000000..6a9423faac82072f74efa510c57f762df3c5b6be GIT binary patch literal 2514 zcmV;@2`%;?iwFP!000000PP!VkK4HM`~C`5`I4ZPOiI+tvG;)Fkh=p~6u2bq$3m89 zTa7Fl61}#!=zs5!dRn4)wVUff2Xu|Z(#(+ao*^ZA`NMgiY7aCo5|*uWY$9EwS;XQb z+phGlUp^VWt`$7Y;xJ_yUFjLqf4IL}{>d=3k2wuFjkQz4ciJ!6w;~D;RC~MQ{IHnM zPp6ZaR6vvE+xa`qFz)Z}mc_&NPSZ5tn-z;VTItn*!!b`KVI0kAO7}G5#T=V>uD9e- zOCAaC$pekpe$TQ(j?9WT9pXIRG}JPzxb6 z2V6@zj%smE!4x-zk=QPGF#iGmH3MpZS+HXs(G85GW=8q^$1guNNCTNMk2}-U*1zI= z<&rGi)8Y_Dw3yd$IsTNyd}GmM4#NNC1I%tng~2!5K?=a#-mfQkumY$h)N)%Qd$C z7mawC523b68H=?@%%eg6Xa(h3Dh!#?qL7e?WjqfH-mp1?p_-dZ_ontp1898GKqMz4 z$w2o5OCdK{W|XFYC@p^d=|g2PVKXY#`)kPavJZMLhBE-GGiktS9_(E&sJB_*xX{;l3ymNDxNGwH>Thp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kt7?EDbeilXjvSAsF*MyaPCeg=Lz+gfhWNLc++B6j z(EK*gEklC<+sK3J581ro)myag=Br_!(cArNMH!m7h4)&>j(=i{hBs4Tsxm+^(U9!a zixr%hq8wq5IEhD-FtiE66m~^QDM@VV#8K+UKuTd0Ml`fR$q#^3q0sSDqDY|wB}pSh zoFGc#(6jqNfGBYkAAXWB^^-vZV$qL$Fq{AgTm6J;62KBV)Q^J{Xke0f2?A_!>W7Jq zsR9`yFLI(lTOKF?k0e1H1Nx9UV9|GA>+Hws3lSUacmNJuQSOu2hFMZCNfHEL6g<@y zJ6=G5qI~NegKvNoIB696001Td-#ui4pmC=mbOIBlj}%NoZ0!3E4ZvcgJfV?|BZzK9 z^zS38!7_DdA6B1$+bXV*3}eo>wYktk*vuZ<+8$M)N0Ld64+gb8LK9>xLOLVZGl(LA z*>OD2_LOX_vmKyeLc6ySKsa!p;?V8~kT;WS+YG?TKFKj8t{(=YmS^j9$7slMWSf!l z*5uo>`+VzK)cIEBr?ZQPghwM~NVu+7on~xuZl2V)_LbC~Iddo~_(Z&I(+b@IVA y?XB@urT_8lROw)8LXCv8dwgDHLYRy3RlhxM)Z6>JrP?U(@BR-X0D4Cy82|ueIi~{v literal 0 HcmV?d00001 diff --git a/plasma/look-and-feel/org.kde.darkine/contents/components/artwork/shutdown_primary.svgz b/plasma/look-and-feel/org.kde.darkine/contents/components/artwork/shutdown_primary.svgz new file mode 100644 index 0000000000000000000000000000000000000000..1c60152f8cf5b181ae3a0722722ff5fe1d140982 GIT binary patch literal 1738 zcmV;*1~vH~iwFoOKm}9)19NC~bYyRLZeMV6X>DP0c`kEyX8@&F-IJR*5`Uk+f+a6W zoduHkFgW&X)g+bNR^7d9a(9ng7-X9bNE8xdd#>((zm@=jKW4L)^_0s)fBw4F>TcFQ zpX$naX00p*-?+rXuETgPijwa)?!Uf%LW%20mGL601ZNwU3-{;8hxJbgIUib@(&av*x5-TUtxgdQIr*7AA(;5ZKW<#JWz8+TA>y0$Wc zMeeh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7EX^fXiILBtS;4{+#&Rj7_DT(5Am_2L%_L>@c%~V!oDx2=? zNP#6e7!wLFFRNcaezJ2k&sYBu?YG&;2Z3xWIygT&ZT0G%ui$l~&eWq>a`l_a-{AEE zx`$<42i!kfQ-Iuo_uS>1ue^F&s{i2=BR-VCVsVX+xgZu&gIFo0=t^F~2 z^R&Mzw_*4HhrXr`xh_WC!<&9xGZ)#Na(Z#GVQ1%3N3W{^{)J_Sy+yHZUQ3!TP)Y)C z8PPO;H>SVI)Zxzd!#S)fuqZ$mdDbg3n{WK4RhvDi8rzI%`|mYn++DNXgOwA`V_e)Qh0*h(jVz7a$H67|6)d(VX$()DBu24kil%O_Y+< z$sI(Yp^`Wz@gnx(APi#%g@azQpsAO}Q8*_-kHv5gD7Xp&j|OR)I5hT_F>s?r1PZAp z#n|gzS&Ej1t)CD;GjhoS8QnR-DnKk0oP{)`5KHReBnaS8BH{(hAh^JZEUF6BAVCwYLy3AR2ff0e-CW9U5FV!(>J? z8j(%`wgMQ?_WBnjtAq_ZiD+UDahWVh8Z1xdvxN!_NtjM8 gt;(bvUVm?vOWTb0j}L3z3?3i;4@cErFclI202m@yf&c&j literal 0 HcmV?d00001 diff --git a/plasma/look-and-feel/org.kde.darkine/contents/defaults b/plasma/look-and-feel/org.kde.darkine/contents/defaults index b46d314..7c3bdd3 100644 --- a/plasma/look-and-feel/org.kde.darkine/contents/defaults +++ b/plasma/look-and-feel/org.kde.darkine/contents/defaults @@ -5,7 +5,7 @@ widgetStyle=kvantum ColorScheme=Darkine [kdeglobals][Icons] -Theme=Papirus-Adapta +Theme=Papirus-Adapta-Nokto [plasmarc][Theme] name=Darkine diff --git a/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockOsd.qml b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockOsd.qml new file mode 100644 index 0000000..90b8f29 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockOsd.qml @@ -0,0 +1,71 @@ +/******************************************************************** + This file is part of the KDE project. + +Copyright (C) 2014 Aleix Pol Gonzalez + +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 . +*********************************************************************/ + +import QtQuick 2.0 +import org.kde.plasma.core 2.0 as PlasmaCore +import "../osd" + +PlasmaCore.FrameSvgItem { + id: osd + + // OSD Timeout in msecs - how long it will stay on the screen + property int timeout: 1800 + // This is either a text or a number, if showingProgress is set to true, + // the number will be used as a value for the progress bar + property var osdValue + // Icon name to display + property string icon + // Set to true if the value is meant for progress bar, + // false for displaying the value as normal text + property bool showingProgress: false + + objectName: "onScreenDisplay" + visible: false + width: osdItem.width + margins.left + margins.right + height: osdItem.height + margins.top + margins.bottom + imagePath: "widgets/background" + + function show() { + osd.visible = true; + hideTimer.restart(); + } + + // avoid leaking ColorScope of lock screen theme into the OSD "popup" + PlasmaCore.ColorScope { + width: osdItem.width + height: osdItem.height + anchors.centerIn: parent + colorGroup: PlasmaCore.Theme.NormalColorGroup + + OsdItem { + id: osdItem + rootItem: osd + } + } + + Timer { + id: hideTimer + interval: osd.timeout + onTriggered: { + osd.visible = false; + osd.icon = ""; + osd.osdValue = 0; + } + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockScreen.qml b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockScreen.qml new file mode 100644 index 0000000..c0bc939 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockScreen.qml @@ -0,0 +1,65 @@ +/******************************************************************** + This file is part of the KDE project. + +Copyright (C) 2014 Aleix Pol Gonzalez + +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 . +*********************************************************************/ + +import QtQuick 2.5 +import QtQuick.Controls 1.1 +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.private.sessions 2.0 +import "../components" + +Item { + id: root + property bool viewVisible: false + property bool debug: false + property string notification + property int interfaceVersion: org_kde_plasma_screenlocker_greeter_interfaceVersion ? org_kde_plasma_screenlocker_greeter_interfaceVersion : 0 + signal clearPassword() + + LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft + LayoutMirroring.childrenInherit: true + + Loader { + id: mainLoader + anchors.fill: parent + opacity: 0 + onItemChanged: opacity = 1 + + focus: true + + Behavior on opacity { + OpacityAnimator { + duration: units.longDuration + easing.type: Easing.InCubic + } + } + } + Connections { + id:loaderConnection + target: org_kde_plasma_screenlocker_greeter_view + onFrameSwapped: { + mainLoader.source = "LockScreenUi.qml"; + loaderConnection.target = null; + } + } + Component.onCompleted: { + if (root.interfaceVersion < 2) { + mainLoader.source = "LockScreenUi.qml"; + } + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockScreenUi.qml b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockScreenUi.qml new file mode 100644 index 0000000..bab06d3 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/LockScreenUi.qml @@ -0,0 +1,399 @@ +/******************************************************************** + This file is part of the KDE project. + +Copyright (C) 2014 Aleix Pol Gonzalez + +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 . +*********************************************************************/ + +import QtQuick 2.5 +import QtQuick.Controls 1.1 +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.private.sessions 2.0 +import "../components" + +PlasmaCore.ColorScope { + + colorGroup: PlasmaCore.Theme.ComplementaryColorGroup + + Connections { + target: authenticator + onFailed: { + root.notification = i18nd("plasma_lookandfeel_org.kde.lookandfeel","Unlocking failed"); + } + onGraceLockedChanged: { + if (!authenticator.graceLocked) { + root.notification = ""; + root.clearPassword(); + } + } + onMessage: { + root.notification = msg; + } + onError: { + root.notification = err; + } + } + + SessionsModel { + id: sessionsModel + showNewSessionEntry: true + } + + Rectangle { + id: sceneColorBackground + color: "#1d1d1d" + anchors.fill: parent + } + + PlasmaCore.DataSource { + id: keystateSource + engine: "keystate" + connectedSources: "Caps Lock" + } + + Loader { + id: changeSessionComponent + active: false + source: "ChangeSession.qml" + visible: false + } + + Item { + id: lockScreenRoot + + x: parent.x + y: parent.y + width: parent.width + height: parent.height + + Component.onCompleted: PropertyAnimation { id: launchAnimation; target: lockScreenRoot; property: "opacity"; from: 0; to: 1; duration: 1000 } + + states: [ + State { + name: "onOtherSession" + // for slide out animation + PropertyChanges { target: lockScreenRoot; y: lockScreenRoot.height } + // we also change the opacity just to be sure it's not visible even on unexpected screen dimension changes with possible race conditions + PropertyChanges { target: lockScreenRoot; opacity: 0 } + } + ] + + transitions: + Transition { + // we only animate switchting to another session, because kscreenlocker doesn't get notified when + // coming from another session back and so we wouldn't know when to trigger the animation exactly + from: "" + to: "onOtherSession" + + PropertyAnimation { id: stateChangeAnimation; properties: "y"; duration: 300; easing.type: Easing.InQuad} + PropertyAnimation { properties: "opacity"; duration: 300} + + onRunningChanged: { + // after the animation has finished switch session: since we only animate the transition TO state "onOtherSession" + // and not the other way around, we don't have to check the state we transitioned into + if (/* lockScreenRoot.state == "onOtherSession" && */ !running) { + mainStack.currentItem.switchSession() + } + } + } + + Clock { + id: clock + anchors.horizontalCenter: parent.horizontalCenter + y: (mainBlock.userList.y + mainStack.y)/2 - height/2 + visible: y > 0 + Layout.alignment: Qt.AlignBaseline + } + + ListModel { + id: users + + Component.onCompleted: { + users.append({name: kscreenlocker_userName, + realName: kscreenlocker_userName, + icon: kscreenlocker_userImage, + + }) + } + } + + + StackView { + id: mainStack + anchors { + left: parent.left + right: parent.right + } + height: lockScreenRoot.height + focus: true //StackView is an implicit focus scope, so we need to give this focus so the item inside will have it + + initialItem: MainBlock { + id: mainBlock + + showUserList: userList.y + mainStack.y > 0 + + Stack.onStatusChanged: { + // prepare for presenting again to the user + if (Stack.status == Stack.Activating) { + mainPasswordBox.remove(0, mainPasswordBox.length) + mainPasswordBox.focus = true + } + } + userListModel: users + notificationMessage: { + var text = "" + if (keystateSource.data["Caps Lock"]["Locked"]) { + text += i18nd("plasma_lookandfeel_org.kde.lookandfeel","Caps Lock is on") + if (root.notification) { + text += " • " + } + } + text += root.notification + return text + } + + onLoginRequest: { + root.notification = "" + authenticator.tryUnlock(password) + } + + actionItems: [ + ActionButton { + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Switch User") + iconSource: "system-switch-user" + onClicked: mainStack.push(switchSessionPage) + // the current session isn't listed in the model, hence a check for greater than zero, not one + visible: (sessionsModel.count > 0 || sessionsModel.canStartNewSession) && sessionsModel.canSwitchUser + } + ] + + Loader { + Layout.fillWidth: true + Layout.preferredHeight: item ? item.implicitHeight : 0 + active: config.showMediaControls + source: "MediaControls.qml" + } + } + } + + Loader { + id: inputPanel + state: "hidden" + readonly property bool keyboardActive: item ? item.active : false + anchors { + left: parent.left + right: parent.right + } + function showHide() { + state = state == "hidden" ? "visible" : "hidden"; + } + Component.onCompleted: inputPanel.source = "../components/VirtualKeyboard.qml" + + onKeyboardActiveChanged: { + if (keyboardActive) { + state = "visible"; + } else { + state = "hidden"; + } + } + + states: [ + State { + name: "visible" + PropertyChanges { + target: mainStack + y: Math.min(0, lockScreenRoot.height - inputPanel.height - mainBlock.visibleBoundary) + } + PropertyChanges { + target: inputPanel + y: lockScreenRoot.height - inputPanel.height + opacity: 1 + } + }, + State { + name: "hidden" + PropertyChanges { + target: mainStack + y: 0 + } + PropertyChanges { + target: inputPanel + y: lockScreenRoot.height - lockScreenRoot.height/4 + opacity: 0 + } + } + ] + transitions: [ + Transition { + from: "hidden" + to: "visible" + SequentialAnimation { + ScriptAction { + script: { + inputPanel.item.activated = true; + Qt.inputMethod.show(); + } + } + ParallelAnimation { + NumberAnimation { + target: mainStack + property: "y" + duration: units.longDuration + easing.type: Easing.InOutQuad + } + NumberAnimation { + target: inputPanel + property: "y" + duration: units.longDuration + easing.type: Easing.OutQuad + } + OpacityAnimator { + target: inputPanel + duration: units.longDuration + easing.type: Easing.OutQuad + } + } + } + }, + Transition { + from: "visible" + to: "hidden" + SequentialAnimation { + ParallelAnimation { + NumberAnimation { + target: mainStack + property: "y" + duration: units.longDuration + easing.type: Easing.InOutQuad + } + NumberAnimation { + target: inputPanel + property: "y" + duration: units.longDuration + easing.type: Easing.InQuad + } + OpacityAnimator { + target: inputPanel + duration: units.longDuration + easing.type: Easing.InQuad + } + } + ScriptAction { + script: { + Qt.inputMethod.hide(); + } + } + } + } + ] + } + + Component { + id: switchSessionPage + SessionManagementScreen { + property var switchSession: finalSwitchSession + + Stack.onStatusChanged: { + if (Stack.status == Stack.Activating) { + focus = true + } + } + + userListModel: sessionsModel + + // initiating animation of lockscreen for session switch + function initSwitchSession() { + lockScreenRoot.state = 'onOtherSession' + } + + // initiating session switch and preparing lockscreen for possible return of user + function finalSwitchSession() { + mainStack.pop({immediate:true}) + sessionsModel.switchUser(userListCurrentModelData.vtNumber) + lockScreenRoot.state = '' + } + + Keys.onLeftPressed: userList.decrementCurrentIndex() + Keys.onRightPressed: userList.incrementCurrentIndex() + Keys.onEnterPressed: initSwitchSession() + Keys.onReturnPressed: initSwitchSession() + Keys.onEscapePressed: mainStack.pop() + + PlasmaComponents.Button { + Layout.fillWidth: true + // the magic "-1" vtNumber indicates the "New Session" entry + text: userListCurrentModelData.vtNumber === -1 ? i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Start New Session") : i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Switch Session") + onClicked: initSwitchSession() + } + + actionItems: [ + ActionButton { + iconSource: "go-previous" + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Back") + onClicked: mainStack.pop() + } + ] + } + } + + Loader { + active: root.viewVisible + source: "LockOsd.qml" + anchors { + horizontalCenter: parent.horizontalCenter + bottom: parent.bottom + } + } + + RowLayout { + id: footer + anchors { + bottom: parent.bottom + left: parent.left + right: parent.right + margins: units.smallSpacing + } + + PlasmaComponents.ToolButton { + text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to show/hide virtual keyboard", "Virtual Keyboard") + iconName: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off" + onClicked: inputPanel.showHide() + + visible: inputPanel.status == Loader.Ready + } + + KeyboardLayoutButton { + } + + Item { + Layout.fillWidth: true + } + + Battery {} + } + } + + Component.onCompleted: { + // version support checks + if (root.interfaceVersion < 1) { + // ksmserver of 5.4, with greeter of 5.5 + root.viewVisible = true; + } + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/MainBlock.qml b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/MainBlock.qml new file mode 100644 index 0000000..65e72b6 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/MainBlock.qml @@ -0,0 +1,141 @@ +/* + * Copyright 2016 David Edmundson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 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 Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.2 + +import QtQuick.Layouts 1.1 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.4 //ROKIN : for style textbox,button,label + +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents + +import "../components" + +SessionManagementScreen { + + property Item mainPasswordBox: passwordBox + + //the y position that should be ensured visible when the on screen keyboard is visible + property int visibleBoundary: mapFromItem(loginButton, 0, 0).y + onHeightChanged: visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + units.smallSpacing + /* + * Login has been requested with the following username and password + * If username field is visible, it will be taken from that, otherwise from the "name" property of the currentIndex + */ + signal loginRequest(string password) + + function startLogin() { + var password = passwordBox.text + + //this is partly because it looks nicer + //but more importantly it works round a Qt bug that can trigger if the app is closed with a TextField focussed + //See https://bugreports.qt.io/browse/QTBUG-55460 + loginButton.forceActiveFocus(); + loginRequest(password); + } + + PlasmaComponents.TextField { + id: passwordBox + Layout.fillWidth: true + //ROKIN + style: TextFieldStyle { + textColor: "#5e5f5e" + selectedTextColor: "#2e2f2f" // The highlighted text color + selectionColor: "#8f86ba" // The text highlight color + placeholderTextColor:"#5e5f5e" // When the text field is empty + background: Rectangle { + color: "#1a1a1a" + radius: 2 + border.color: "#1a1a1a" + border.width: 1 + } + } + placeholderText: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Password") + focus: true + echoMode: TextInput.Password + inputMethodHints: Qt.ImhHiddenText | Qt.ImhSensitiveData | Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText + enabled: !authenticator.graceLocked + revealPasswordButtonShown: true + + onAccepted: startLogin() + + //if empty and left or right is pressed change selection in user switch + //this cannot be in keys.onLeftPressed as then it doesn't reach the password box + Keys.onPressed: { + if (event.key === Qt.Key_Left && !text) { + userList.decrementCurrentIndex(); + event.accepted = true + } + if (event.key === Qt.Key_Right && !text) { + userList.incrementCurrentIndex(); + event.accepted = true + } + } + + Connections { + target: root + onClearPassword: { + passwordBox.forceActiveFocus() + passwordBox.selectAll() + } + } + } + + PlasmaComponents.Button { + id: loginButton + Layout.fillWidth: true + //ROKIN + style: ButtonStyle { + background: Rectangle { + border.width: control.activeFocus ? 2 : 1 + border.color: "#1a1a1a" + radius: 2 + gradient: Gradient { + GradientStop { position: 0 ; color: control.pressed ? "#282828" : "#292929" } + GradientStop { position: 1 ; color: control.pressed ? "#212121" : "#212121" } + } + //implicitWidth: 100 + implicitHeight: 25 + } + label: Component{ + id:labelLogin + Row{ + anchors.left: parent.left + anchors.leftMargin: (parent.width - (textlogin.width + image.width))/2 + anchors.top: parent.top + anchors.topMargin: 2 + spacing: 0 + Image{ id:image ;source: control.iconSource} + Label{ + id:textlogin + height: 25 + width:100 + horizontalAlignment:Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + color: "#5e5f5e" + text: control.text + } + } + } + } + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Unlock") + onClicked: startLogin() + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/MediaControls.qml b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/MediaControls.qml new file mode 100644 index 0000000..6740204 --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/MediaControls.qml @@ -0,0 +1,159 @@ +/******************************************************************** + This file is part of the KDE project. + +Copyright (C) 2016 Kai Uwe Broulik + +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 . +*********************************************************************/ + +import QtQuick 2.5 +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 + +Item { + visible: mpris2Source.hasPlayer + implicitHeight: controlsRow.height + controlsRow.y + + RowLayout { + id: controlsRow + anchors.bottom: parent.bottom + y: units.smallSpacing // some distance to the password field + width: parent.width + height: units.gridUnit * 3 + spacing: 0 + + enabled: mpris2Source.canControl + + PlasmaCore.DataSource { + id: mpris2Source + + readonly property string source: "@multiplex" + readonly property var playerData: data[source] + + readonly property bool hasPlayer: sources.length > 1 && !!playerData + readonly property string identity: hasPlayer ? playerData.Identity : "" + readonly property bool playing: hasPlayer && playerData.PlaybackStatus === "Playing" + readonly property bool canControl: hasPlayer && playerData.CanControl + readonly property bool canGoBack: hasPlayer && playerData.CanGoPrevious + readonly property bool canGoNext: hasPlayer && playerData.CanGoNext + + readonly property var currentMetadata: hasPlayer ? playerData.Metadata : ({}) + + readonly property string track: { + var xesamTitle = currentMetadata["xesam:title"] + if (xesamTitle) { + return xesamTitle + } + // if no track title is given, print out the file name + var xesamUrl = currentMetadata["xesam:url"] ? currentMetadata["xesam:url"].toString() : "" + if (!xesamUrl) { + return "" + } + var lastSlashPos = xesamUrl.lastIndexOf('/') + if (lastSlashPos < 0) { + return "" + } + var lastUrlPart = xesamUrl.substring(lastSlashPos + 1) + return decodeURIComponent(lastUrlPart) + } + readonly property string artist: currentMetadata["xesam:artist"] || "" + readonly property string albumArt: currentMetadata["mpris:artUrl"] || "" + + engine: "mpris2" + connectedSources: [source] + + function startOperation(op) { + var service = serviceForSource(source) + var operation = service.operationDescription(op) + return service.startOperationCall(operation) + } + + function goPrevious() { + startOperation("Previous"); + } + function goNext() { + startOperation("Next"); + } + function playPause(source) { + startOperation("PlayPause"); + } + } + + Image { + id: albumArt + Layout.preferredWidth: height + Layout.fillHeight: true + asynchronous: true + source: mpris2Source.albumArt + sourceSize: Qt.size(width, height) + visible: status === Image.Loading || status === Image.Ready + } + + Item { // spacer + width: units.smallSpacing + height: 1 + } + + ColumnLayout { + Layout.fillWidth: true + spacing: 0 + + PlasmaExtras.Heading { + Layout.fillWidth: true + level: 4 + wrapMode: Text.NoWrap + elide: Text.ElideRight + text: mpris2Source.track || i18n("No media playing") + textFormat: Text.PlainText + } + + PlasmaExtras.Heading { + Layout.fillWidth: true + level: 5 + wrapMode: Text.NoWrap + elide: Text.ElideRight + // if no artist is given, show player name instead + text: mpris2Source.artist || mpris2Source.identity || "" + textFormat: Text.PlainText + } + } + + PlasmaComponents.ToolButton { + enabled: mpris2Source.canGoBack + iconName: LayoutMirroring.enabled ? "media-skip-forward" : "media-skip-backward" + onClicked: mpris2Source.goPrevious() + visible: mpris2Source.canGoBack || mpris2Source.canGoNext + Accessible.name: i18n("Previous track") + } + + PlasmaComponents.ToolButton { + Layout.fillHeight: true + Layout.preferredWidth: height // make this button bigger + iconName: mpris2Source.playing ? "media-playback-pause" : "media-playback-start" + onClicked: mpris2Source.playPause() + Accessible.name: i18n("Play or Pause media") + } + + PlasmaComponents.ToolButton { + enabled: mpris2Source.canGoNext + iconName: LayoutMirroring.enabled ? "media-skip-backward" : "media-skip-forward" + onClicked: mpris2Source.goNext() + visible: mpris2Source.canGoBack || mpris2Source.canGoNext + Accessible.name: i18n("Next track") + } + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/config.qml b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/config.qml new file mode 100644 index 0000000..30f3bfc --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/config.qml @@ -0,0 +1,23 @@ +import QtQuick 2.4 +import QtQuick.Controls 2.0 +import QtQuick.Layouts 1.1 + +import org.kde.plasma.core 2.0 as Plasmacore + +RowLayout { + property alias cfg_showMediaControls: showMediaControls.checked + + spacing: units.largeSpacing / 2 + + Label { + Layout.minimumWidth: formAlignment - units.largeSpacing //to match wallpaper config... + horizontalAlignment: Text.AlignRight + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Show media controls:") + } + CheckBox { + id: showMediaControls + } + Item { + Layout.fillWidth: true + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/config.qmlc b/plasma/look-and-feel/org.kde.darkine/contents/lockscreen/config.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..c458b6fbf44d24c7160c9e8de069e3935a53cf2c GIT binary patch literal 4742 zcmd5;Uuc_E6hCRVHFoQg&UIG&vnat$VQr_|D0^zQRT4}v-MU$1I=ePqW81826Rjd+ zQVWJq>66sAz6g8#9)^UerNiNdFN+FV5VV3qCqqUNEJK{X-@W%szBXx09ilhZf7Td%Am1*b0@Zv|dP;_J)kc1! zId98v1V0MlRw!Krx*%{7XhZ?ChV{6s2Io=3A*Eh>-D~)yP$Q(={|Tru^@{hY4NLWK z(2|OH-B?FCtI;^*SUV(+yx29*I^%gXPUrWpTExg z8nzt+)vw_u$9>bDxa_)QKXn^xzF6D#XwY{4m3-|` zMqDc{12MT8RCmYSqR<n?VTxaYU7X#hAKvWlsJ7DQ~YbZR~$Z<#|#mW*wB*>y*|# z=WzaB4#D#=rH6V$O7oCfvtIfT$sm5t%rWmN#1%I+$~?0=S&1<@R&=w}+v)K439OxU zdJ3n{;x_;t3EWQ~WO<{fz*||}rRCU1kD0plshsP|^{M)IzI6v7DMJ6_vR7J_HPw?% zg$*^VWZbr@yGm0mzai`hDN8i{3&LMWb2khGg4P(&5H;0^IoD+Ev7(?_2kl_QePxjyx z?=lG*1CP3O1`}#;SV`$``m0J33LN8jF#U6I{8luajxC4NL$|}})MDsUE%3+PQ2NhE zrq3PB+9v{+Sy-X;27hS$syi_Li_0_dD?Wdbv{NcHek({$IFnioXP`6_TMmw2jlT3* zLDS7|)mL-f_SsNN+mB>+1g;%wp}_0|c!blx2kyRq5wmvBM<=}P6JL2I=CBH-kNC5f z8#$Xy`mmQVltUEvdb^VmRANB*jbhD4x8C%s4I$b7dYj%vMjf9o&7*?r{vDp^8 z=Z + + + + + + + true + + + + diff --git a/plasma/look-and-feel/org.kde.darkine/contents/osd/Osd.qml b/plasma/look-and-feel/org.kde.darkine/contents/osd/Osd.qml new file mode 100644 index 0000000..d33e20a --- /dev/null +++ b/plasma/look-and-feel/org.kde.darkine/contents/osd/Osd.qml @@ -0,0 +1,58 @@ +/* + * Copyright 2014 Martin Klapetek + * + * 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 . + */ + +import QtQuick 2.0 +import QtQuick.Window 2.2 +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 PlasmaExtra + +PlasmaCore.Dialog { + id: root + location: PlasmaCore.Types.Floating + type: PlasmaCore.Dialog.OnScreenDisplay + outputOnly: true + + // OSD Timeout in msecs - how long it will stay on the screen + property int timeout: 1800 + // This is either a text or a number, if showingProgress is set to true, + // the number will be used as a value for the progress bar + property var osdValue + // Icon name to display + property string icon + // Set to true if the value is meant for progress bar, + // false for displaying the value as normal text + property bool showingProgress: false + + property bool animateOpacity: false + + Behavior on opacity { + SequentialAnimation { + // prevent press and hold from flickering + PauseAnimation { duration: 100 } + NumberAnimation { + duration: root.timeout + easing.type: Easing.InQuad + } + } + enabled: root.animateOpacity + } + + mainItem: OsdItem { + rootItem: root + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/osd/Osd.qmlc b/plasma/look-and-feel/org.kde.darkine/contents/osd/Osd.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..4b0bc6b1171c46710d2058de94c9be926aacd7c5 GIT binary patch literal 6159 zcmdT|Uu=_A6hD(O2BNF{bHH>3s{?_qBvXhXy5UCJ*hv*cNhGAK1(cSKt>aIk1~Ym1 z>`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PxC!jOUrZEoOv1&_}mG75|GDupnge6 z)ALHa(mw_5VzNhB*<<#los1i64@0Y44r6=*^rP@aMET)R);=wd@fF29ccMq)(4Z4< z9iUKC`fEF=he10I8hyb=J9mM83|i~>&|YtG$;x?G$8iKQdZ1NYrgCwg7-ks}?sK6X zFN2}Jhl*|OcSZ^u{o>9fo&#fZ z7b1gsMr%3W4I5c~PH_<$*R{F)`4Ywl!AD;{hg+CG#y}T(#%EMXYcx`H4Qo{Tq)@ju zVV;$46J&7D1XdMRiI|dcL|Gcgyv_kevaVWO!F*|i{_OpT*(4UoO1a?Z}M~n8WU1Fe6PtJ8JF8yu#w&FA!xw_Ya&M(2( zysMV9`i9ywD_X8?5Abiv;U`G^DD4~4D+V#ltze{t9IP1jm10wqWD8~ZfE&xS8bVFG z7xweJZ1_n$%CP^bQf&9a{{JZcg3dm~e;o0jyonqbEtvz;$Dj_T8~9>Y;bQ`>2~G?S z$M2kT-5PfUM&k=G^}!wACkGHg;86bw?05#=c;ofbV;pmo+sgjH(X&kieyAW z#>a!1eNz+iJ0|3;9x;X2RK=i$AN&!g=7Vfx&-(g0@_tIzA{M3&JY m|MM#XKe>Xo^bPWViPt&sPx0EZ6%NT209UN#*N%T!ivI>y + * + * 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 . + */ + +import QtQuick 2.0 +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 PlasmaExtra +import QtQuick.Window 2.2 + +Item { + property QtObject rootItem + height: Math.min(units.gridUnit * 15, Screen.desktopAvailableHeight / 5) + width: height + + // /--------------------\ + // | spacing | + // | /----------------\ | + // | | | | + // | | icon | | + // | | | | + // | | | | + // | \----------------/ | + // | spacing | + // | [progressbar/text] | + // | spacing | + // \--------------------/ + + PlasmaCore.IconItem { + id: icon + + height: parent.height - Math.max(progressBar.height, label.height) + - ((units.smallSpacing/2) * 3) //it's an svg + width: parent.width + + source: rootItem.icon + } + + PlasmaComponents.ProgressBar { + id: progressBar + + anchors { + bottom: parent.bottom + left: parent.left + right: parent.right + margins: Math.floor(units.smallSpacing / 2) + } + + visible: rootItem.showingProgress + minimumValue: 0 + maximumValue: 100 + + value: Number(rootItem.osdValue) + } + PlasmaExtra.Heading { + id: label + anchors { + bottom: parent.bottom + left: parent.left + right: parent.right + margins: Math.floor(units.smallSpacing / 2) + } + + visible: !rootItem.showingProgress + text: rootItem.showingProgress ? "" : (rootItem.osdValue ? rootItem.osdValue : "") + horizontalAlignment: Text.AlignHCenter + wrapMode: Text.WordWrap + maximumLineCount: 2 + elide: Text.ElideLeft + minimumPointSize: theme.defaultFont.pointSize + fontSizeMode: Text.HorizontalFit + } +} diff --git a/plasma/look-and-feel/org.kde.darkine/contents/osd/OsdItem.qmlc b/plasma/look-and-feel/org.kde.darkine/contents/osd/OsdItem.qmlc new file mode 100644 index 0000000000000000000000000000000000000000..296b78bd2bd24b0823669d1247c00288da03abfe GIT binary patch literal 15379 zcmeHOU2I&%6`ll=7~0|m0yRlWx3EBf#&IA&PM~DhIAk}q6DKj$NKkCYc4Cq^#<7#M zrHIIll+_A}_MysCwNf9ts#qraxE+HT}MsIeYKj zy?b}pX%rH5(Al|n&dix}&YZtH4lf;Bzpt-nv}d_eYSGP0)R}iT?C)KqRCuLQdotfz zGP5}S{a+0JbopC9ZeIBm=4=Q2e5z@__vy#$BOC8|`FP7CD;~gD91smDwF>CjfasXfehCc|hm}rMdw*K;4Z>bpdjKIuPjs zWB_w~2C)oa9uQro)M>yJprH=y0XaY&_Ur;=04<1lNtoeW**j_Q6+Gcyo%f_Bl zZ&MJyhL*N;e*l@-zF;~{k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