diff --git a/package/contents/config/config.qml b/package/contents/config/config.qml index 4cf70cadecdd60033d866a095106fdb244e6fcae..4a2e32ed00f70824878c165c6530b1cb5ed097e2 100644 --- a/package/contents/config/config.qml +++ b/package/contents/config/config.qml @@ -1,6 +1,6 @@ /** Copyright 2016 Bill Binder <dxtwjb@gmail.com> - + 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 3 of the License, or diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml index 87019c8902baffc8efe895fb76fd0744212472f3..b09113ed468e4ebc8f250f053844280940f4ef1c 100644 --- a/package/contents/config/main.xml +++ b/package/contents/config/main.xml @@ -12,6 +12,9 @@ <entry name="showBackground" type="Bool"> <default>false</default> </entry> + <entry name="transparentShadow" type="Bool"> + <default>false</default> + </entry> <entry name="dateFormat" type="int"> <default>3</default> </entry> diff --git a/package/contents/po/es.po b/package/contents/po/es.po index 57c4b632c723af3b471d5b7b5f45a207dd7ec9b7..aa06f3d69de4b614f6a973f033a007a16e78bbc8 100644 Binary files a/package/contents/po/es.po and b/package/contents/po/es.po differ diff --git a/package/contents/po/fr.po b/package/contents/po/fr.po index 30305c08ce239390af1d99cb5a6d311125439d7e..30663295c32f78e0329eac9f9fdd8c614e1ae366 100644 Binary files a/package/contents/po/fr.po and b/package/contents/po/fr.po differ diff --git a/package/contents/po/locale/es/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo b/package/contents/po/locale/es/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo index 7801e84c31bac9f5a9a794a60d37ee9696f69e83..251bc685e4214cedb614002e1d2db1e71b02d6fe 100644 Binary files a/package/contents/po/locale/es/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo and b/package/contents/po/locale/es/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo differ diff --git a/package/contents/po/locale/fr/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo b/package/contents/po/locale/fr/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo index 1077bc5c89892dbd8029dd3b72407c29c24bfc1e..33c2e4c4e554989154a46f78ceabbdb57ee0b0b8 100644 Binary files a/package/contents/po/locale/fr/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo and b/package/contents/po/locale/fr/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo differ diff --git a/package/contents/po/locale/ru/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo b/package/contents/po/locale/ru/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo index 66a5664adae82bc8579375e4213cc13d44758822..b8307bac52ab2dd067b5aa1bc61a677504ab91af 100644 Binary files a/package/contents/po/locale/ru/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo and b/package/contents/po/locale/ru/LC_MESSAGES/plasma_applet_org.kde.userbase.plasma.luna-ii.mo differ diff --git a/package/contents/po/plasma_applet_org.kde.userbase.plasma.luna-ii.pot b/package/contents/po/plasma_applet_org.kde.userbase.plasma.luna-ii.pot index 0b7136b5e3b791e31860799db0a99804fe013ee4..070d3d91b1bcbbb181e5406fe482a84dea192dc3 100644 Binary files a/package/contents/po/plasma_applet_org.kde.userbase.plasma.luna-ii.pot and b/package/contents/po/plasma_applet_org.kde.userbase.plasma.luna-ii.pot differ diff --git a/package/contents/po/ru.po b/package/contents/po/ru.po index 7fae7ab57b4e6fa6d70566afd02c4b3bd7dfc207..949265688013f15e7772f9daa2b255dfdc99cdb2 100644 Binary files a/package/contents/po/ru.po and b/package/contents/po/ru.po differ diff --git a/package/contents/ui/LunaIcon.qml b/package/contents/ui/LunaIcon.qml index d43ed1034e1fba16dc5a1f61e359615471de4aca..d6bc208b2dfe82c751b31eed0259f6e0e6faab9f 100644 --- a/package/contents/ui/LunaIcon.qml +++ b/package/contents/ui/LunaIcon.qml @@ -19,6 +19,7 @@ */ import QtQuick 2.1 +import QtGraphicalEffects 1.12 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasmoid 2.0 @@ -30,6 +31,8 @@ Item { property int phaseNumber: 0 property int hemisphere: 0 property bool showShadow: true + property bool transparentShadow: true + property string lunarImage: '' property color diskColour: '#ffffff' property int lunarImageTweak: 0 @@ -58,12 +61,15 @@ Item { // deal with northern <-> southern hemisphere transformOrigin: Item.Center rotation: (hemisphere == 0 ? 0 : 180) - lunarImageTweak + visible: !transparentShadow } Canvas { id: shadow width: lunaSvgItem.width height: lunaSvgItem.height + visible: !transparentShadow + property int hemisphere: lunaIcon.hemisphere property int theta: lunaIcon.theta property bool showShadow: lunaIcon.showShadow @@ -189,4 +195,12 @@ Item { } } } + + OpacityMask { + anchors.fill: lunaSvgItem + source: lunaSvgItem + maskSource: shadow + invert: true + visible: transparentShadow + } } diff --git a/package/contents/ui/configGeneral.qml b/package/contents/ui/configGeneral.qml index ea03ca01c613ba84660510598844e1e342181589..73823feb8c798e27a81ecb131c4f0635ad47e9c2 100644 --- a/package/contents/ui/configGeneral.qml +++ b/package/contents/ui/configGeneral.qml @@ -26,6 +26,7 @@ Item { id: generalPage property alias cfg_hemisphere: hemisphere.currentIndex // 0=North 1=South + property alias cfg_transparentShadow: transparentShadow.checked // boolean property alias cfg_showBackground: showBackground.checked // boolean property alias cfg_dateFormat: dateFormat.currentIndex // code: 0= 1= 2=... property alias cfg_dateFormatString: dateFormatString.text @@ -83,6 +84,7 @@ Item { height: 200 hemisphere: cfg_hemisphere showShadow: false + transparentShadow: false lunarImage: cfg_lunarImage lunarImageTweak: cfg_lunarImageTweak diskColour: cfg_diskColour @@ -187,7 +189,9 @@ Item { maximumLength: 24 visible: dateFormat.currentIndex == 4 } - + QtControls.Label { + text: i18n("Background") + } QtControls.CheckBox { id: showBackground text: i18n("Show background") @@ -195,6 +199,9 @@ Item { QtControls.Label { text: "" } - + QtControls.CheckBox { + id: transparentShadow + text: i18n("Transparent shadow") + } } } diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index ff0e18f8292d89ed0f5d3fdf6766988fa9f9b64b..643041ad73a597ce769d98b95fdc8cef9e8cb8cc 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -39,6 +39,7 @@ Item { property var currentPhase property bool showBackground: Plasmoid.configuration.showBackground + property bool transparentShadow: Plasmoid.configuration.transparentShadow property int hemisphere: Plasmoid.configuration.hemisphere property int dateFormat: Plasmoid.configuration.dateFormat property string dateFormatString: Plasmoid.configuration.dateFormatString @@ -96,6 +97,7 @@ Item { hemisphere: hemisphere lunarImage: main.lunarImage lunarImageTweak: main.lunarImageTweak + transparentShadow: main.transparentShadow diskColour: main.diskColour anchors.fill: parent