mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-25 19:21:41 +03:00
more improvements for Tasks applet
This commit is contained in:
parent
631837e199
commit
271089ef33
@ -248,7 +248,8 @@ Item{
|
||||
} else if (appletMinimumLength > appletItem.metrics.iconSize){
|
||||
return appletMinimumLength;
|
||||
} else if ((appletPreferredLength > appletItem.metrics.iconSize)
|
||||
|| (appletItem.originalAppletBehavior && appletPreferredLength > 0 )){
|
||||
|| (appletPreferredLength === 0)/*applet wants to hide itself*/
|
||||
|| (appletItem.originalAppletBehavior && appletPreferredLength > 0)){
|
||||
return appletPreferredLength;
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
import QtQuick 2.0
|
||||
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
import org.kde.latte.abilities.applets 0.1 as AppletAbility
|
||||
|
||||
@ -36,12 +37,13 @@ AppletAbility.Indexer {
|
||||
property int firstVisibleItemIndex: -1
|
||||
property int lastVisibleItemIndex: -1
|
||||
|
||||
readonly property bool isReady: layout.children.length >= allItemsCount
|
||||
readonly property int maxIndex: 99999
|
||||
|
||||
Binding {
|
||||
target: _indexer
|
||||
property: "firstVisibleItemIndex"
|
||||
when: layout.children.length >= allItemsCount
|
||||
when: isReady
|
||||
value: {
|
||||
var ind = maxIndex;
|
||||
for(var i=0; i<layout.children.length; ++i) {
|
||||
@ -61,7 +63,7 @@ AppletAbility.Indexer {
|
||||
Binding {
|
||||
target: _indexer
|
||||
property: "lastVisibleItemIndex"
|
||||
when: layout.children.length >= allItemsCount
|
||||
when: isReady
|
||||
value: {
|
||||
var ind = -1;
|
||||
|
||||
@ -94,6 +96,7 @@ AppletAbility.Indexer {
|
||||
count = count + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,6 @@ import "../code/ColorizerTools.js" as ColorizerTools
|
||||
|
||||
Item {
|
||||
id:root
|
||||
|
||||
Layout.fillWidth: scrollingEnabled && !root.vertical
|
||||
Layout.fillHeight: scrollingEnabled && root.vertical
|
||||
|
||||
@ -238,6 +237,8 @@ Item {
|
||||
readonly property Item indicators: latteView ? latteView.indicatorsManager : indicatorsStandaloneLoader.item
|
||||
//END Latte Dock Panel properties
|
||||
|
||||
readonly property bool inEditMode: latteInEditMode || plasmoid.userConfiguring
|
||||
|
||||
//BEGIN Latte Dock Communicator
|
||||
property QtObject latteBridge: null
|
||||
|
||||
@ -324,8 +325,13 @@ Item {
|
||||
Binding {
|
||||
target: plasmoid
|
||||
property: "status"
|
||||
value: (tasksModel.anyTaskDemandsAttentionInValidTime || root.dragSource ?
|
||||
PlasmaCore.Types.NeedsAttentionStatus : PlasmaCore.Types.PassiveStatus);
|
||||
value: {
|
||||
if (tasksModel.anyTaskDemandsAttentionInValidTime || root.dragSource) {
|
||||
return PlasmaCore.Types.NeedsAttentionStatus;
|
||||
}
|
||||
|
||||
return PlasmaCore.Types.PassiveStatus;
|
||||
}
|
||||
}
|
||||
|
||||
/////
|
||||
|
Loading…
Reference in New Issue
Block a user