expose plasmoid configuration through dock config

pull/1/head
Michail Vourlakos 8 years ago
parent db3f0c4f1c
commit bf4047d6f8

@ -52,5 +52,19 @@
</choices>
<default>1</default>
</entry>
<!-- Tasks properties -->
<entry name="showGlow" type="Bool">
<default>true</default>
</entry>
<entry name="threeColorsWindows" type="Bool">
<default>false</default>
</entry>
<entry name="dotsOnActive" type="Bool">
<default>false</default>
</entry>
<entry name="reverseLinesPosition" type="Bool">
<default>false</default>
</entry>
</group>
</kcfg>

@ -98,8 +98,12 @@ DragDrop.DropArea {
// TO BE DELETED, if not needed: property int counter:0;
///BEGIN properties from nowDock
property bool reverseLinesPosition: nowDock ? nowDock.reverseLinesPosition : false
///BEGIN properties provided to Latte Plasmoid
property bool enableShadows: plasmoid.configuration.shadows
property bool dotsOnActive: plasmoid.configuration.dotsOnActive
property bool reverseLinesPosition: plasmoid.configuration.reverseLinesPosition// nowDock ? nowDock.reverseLinesPosition : false
property bool showGlow: plasmoid.configuration.showGlow
property bool threeColorsWindows: plasmoid.configuration.threeColorsWindows
property int durationTime: nowDock ? nowDock.durationTime : 2
property int nowDockHoveredIndex: nowDock ? nowDock.hoveredIndex : -1
@ -537,9 +541,9 @@ DragDrop.DropArea {
}
if (plasmoid.userConfiguring) {
// console.log("applets------");
// console.log("applets------");
for (var i = 0; i < plasmoid.applets.length; ++i) {
// console.log("applet:"+i);
// console.log("applet:"+i);
plasmoid.applets[i].expanded = false;
}
if (!dragOverlay) {

@ -84,7 +84,7 @@ Item{
//color: "#cc222222"
// cornerRadius: smallCircle.radius + glowRadius
opacity: panel.showBarLine ? 0.25 : 0.45
visible: panel.glow
visible: panel.showGlow
}
/* BrightnessContrast {

@ -275,9 +275,9 @@ MouseArea{
Loader{
id: firstIndicator
active:( (((panel.position === PlasmaCore.Types.TopPositioned) || (panel.position === PlasmaCore.Types.LeftPositioned))
&& !plasmoid.configuration.reverseLinesPosition)
&& !panel.reverseLinesPosition)
|| (((panel.position === PlasmaCore.Types.BottomPositioned) || (panel.position === PlasmaCore.Types.RightPositioned))
&& plasmoid.configuration.reverseLinesPosition) )
&& panel.reverseLinesPosition) )
sourceComponent: Component{
TaskGroupItem{}
}

@ -35,7 +35,7 @@ Item{
property color isActiveColor: theme.buttonFocusColor
//property color isShownColor: plasmoid.configuration.threeColorsWindows ? panel.shownDotColor : isActiveColor
property color isShownColor: isActiveColor
property color minimizedColor: plasmoid.configuration.threeColorsWindows ? panel.minimizedDotColor : isActiveColor
property color minimizedColor: panel.threeColorsWindows ? panel.minimizedDotColor : isActiveColor
property color notActiveColor: mainItemContainer.hasMinimized ? minimizedColor : isShownColor
/* Rectangle{
@ -157,7 +157,7 @@ Item{
basicColor: ((mainItemContainer.hasActive)&&(!(mainItemContainer.hasMinimized))) ? state2Color : state1Color
roundCorners: true
visible: ( mainItemContainer.isGroupParent && plasmoid.configuration.dotsOnActive )
visible: ( mainItemContainer.isGroupParent && panel.dotsOnActive )
|| (mainItemContainer.isGroupParent && !mainItemContainer.hasActive)? true: false
//when there is no active window

@ -202,7 +202,7 @@ Item{
///Shadow in tasks
Loader{
anchors.fill: iconImageBuffer
active: plasmoid.configuration.showShadows
active: panel.enableShadows
sourceComponent: DropShadow{
anchors.fill: parent

@ -53,8 +53,6 @@ Item {
property bool editMode: plasmoid.userConfiguring
property bool disableRestoreZoom: false //blocks restore animation in rightClick
property bool dropNewLauncher: false
property bool enableShadows: plasmoid.configuration.showShadows
property bool glow: plasmoid.configuration.showGlow
property bool initializationStep: true
property bool initializatedBuffers: noInitCreatedBuffers >= tasksStarting ? true : false
property bool isHovered: false
@ -93,10 +91,14 @@ Item {
property color minimizedDotColor: textColorLuma > 0.5 ? Qt.darker(theme.textColor, 1+ (1-textColorLuma)) : Qt.lighter(theme.textColor, 1+(1-textColorLuma))
//BEGIN Now Dock Panel properties
property bool enableShadows: nowDockPanel ? nowDockPanel.enableShadows > 0 : plasmoid.configuration.showShadows
property bool forceHidePanel: false
property bool disableLeftSpacer: false
property bool disableRightSpacer: false
property bool reverseLinesPosition: plasmoid.configuration.reverseLinesPosition
property bool reverseLinesPosition: nowDockPanel ? nowDockPanel.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition
property bool dotsOnActive: nowDockPanel ? nowDockPanel.dotsOnActive : plasmoid.configuration.dotsOnActive
property bool showGlow: nowDockPanel ? nowDockPanel.showGlow : plasmoid.configuration.showGlow
property bool threeColorsWindows: nowDockPanel ? nowDockPanel.threeColorsWindows : plasmod.configuration.threeColorsWindows
property int durationTime: plasmoid.configuration.durationTime
property int iconSize: nowDockPanel ? nowDockPanel.iconSize : Math.max(plasmoid.configuration.iconSize, 16)

@ -16,5 +16,57 @@ PlasmaComponents.Page{
Column{
spacing: 1.5*theme.defaultFont.pointSize
width: parent.width
Column{
width:parent.width
spacing: 0.8*theme.defaultFont.pointSize
Header{
text: i18n("Appearance")
}
PlasmaComponents.CheckBox {
id: showGlow
text: i18n("Show glow around windows points")
onCheckedChanged: {
plasmoid.configuration.showGlow = checked;
}
Component.onCompleted: checked = plasmoid.configuration.showGlow;
}
PlasmaComponents.CheckBox {
id: threeColorsWindows
text: i18n("Different color for minimized windows")
onCheckedChanged: {
plasmoid.configuration.threeColorsWindows = checked;
}
Component.onCompleted: checked = plasmoid.configuration.threeColorsWindows;
}
PlasmaComponents.CheckBox {
id: dotsOnActive
text: i18n("Dots on active window")
onCheckedChanged: {
plasmoid.configuration.dotsOnActive = checked;
}
Component.onCompleted: checked = plasmoid.configuration.dotsOnActive;
}
PlasmaComponents.CheckBox {
id: reverseLinesPosition
text: i18n("Reverse position for lines and dots")
onCheckedChanged: {
plasmoid.configuration.reverseLinesPosition = checked;
}
Component.onCompleted: checked = plasmoid.configuration.reverseLinesPosition;
}
}
}
}

Loading…
Cancel
Save