@ -121,13 +121,9 @@ Item{
/ / K Q u i c k C o n t r o l A d d o n s . Q I c o n I t e m {
/ / K Q u i c k C o n t r o l A d d o n s . Q I c o n I t e m {
Item {
Item {
id: iconGraphic
id: iconGraphic
/ / w i d t h : i c o n I m a g e B u f f e r . w i d t h
/ / h e i g h t : i c o n I m a g e B u f f e r . h e i g h t
width: parent . width
width: parent . width
height: parent . height
height: parent . height
opacity: root . enableShadows ? 0 : 1
/ / f i x b u g # 4 7 8 , w h e n c h a n g i n g f o r m f a c t o r s o m e t i m e s t h e t a s k s a r e n o t p o s i t i o n e d
/ / f i x b u g # 4 7 8 , w h e n c h a n g i n g f o r m f a c t o r s o m e t i m e s t h e t a s k s a r e n o t p o s i t i o n e d
/ / c o r r e c t l y , i n s u c h c a s e w e m a k e a f a s t r e i n i t i a l i z a t i o n f o r t h e s i z e s
/ / c o r r e c t l y , i n s u c h c a s e w e m a k e a f a s t r e i n i t i a l i z a t i o n f o r t h e s i z e s
Connections {
Connections {
@ -186,6 +182,7 @@ Item{
height: Math . round ( width )
height: Math . round ( width )
source: decoration
source: decoration
opacity: root . enableShadows ? 0 : 1
visible: ! taskItem . isSeparator && ! badgesLoader . active
visible: ! taskItem . isSeparator && ! badgesLoader . active
/ / v i s i b l e : ! r o o t . e n a b l e S h a d o w s
/ / v i s i b l e : ! r o o t . e n a b l e S h a d o w s
@ -278,9 +275,27 @@ Item{
AnchorAnimation { duration: 1.5 * root . durationTime * units . longDuration }
AnchorAnimation { duration: 1.5 * root . durationTime * units . longDuration }
}
}
]
]
} / / I c o n I m a g e B u f f e r
/ / ! S h a d o w s
Loader {
id: taskWithShadow
anchors.fill: iconImageBuffer
active: root . enableShadows && ! taskItem . isSeparator
sourceComponent: DropShadow {
anchors.fill: parent
color: root . appShadowColor
fast: true
samples: 2 * radius
source: badgesLoader . active ? badgesLoader.item : iconImageBuffer
radius: root . appShadowSize
verticalOffset: 2
}
}
}
/ / ! S h a d o w s
/ / / / ! C o m b i n e d L o a d e r f o r P r o g r e s s a n d A u d i o b a d g e s
/ / ! C o m b i n e d L o a d e r f o r P r o g r e s s a n d A u d i o b a d g e s m a s k s
Loader {
Loader {
id: badgesLoader
id: badgesLoader
anchors.fill: iconImageBuffer
anchors.fill: iconImageBuffer
@ -293,7 +308,7 @@ Item{
&& ( taskIcon . smartLauncherItem . countVisible || taskItem . badgeIndicator > 0 ) )
&& ( taskIcon . smartLauncherItem . countVisible || taskItem . badgeIndicator > 0 ) )
property bool showProgress: root . showProgressBadge && taskIcon . smartLauncherItem && ! taskItem . isSeparator
property bool showProgress: root . showProgressBadge && taskIcon . smartLauncherItem && ! taskItem . isSeparator
&& taskIcon . smartLauncherItem . progressVisible
&& taskIcon . smartLauncherItem . progressVisible
property bool showAudio: root . showAudioBadge && taskItem . hasAudioStream && taskItem . playingAudio && ! taskItem . isSeparator
property bool showAudio: root . showAudioBadge && taskItem . hasAudioStream && taskItem . playingAudio && ! taskItem . isSeparator
@ -323,7 +338,7 @@ Item{
Rectangle {
Rectangle {
id: maskRect
id: maskRect
width: Math . max ( infoBadge. content Width, parent . width / 2 )
width: Math . max ( badgeVisualsLoader. infoBadge Width, parent . width / 2 )
height: parent . height / 2
height: parent . height / 2
radius: parent . height
radius: parent . height
visible: badgesLoader . showInfo || badgesLoader . showProgress
visible: badgesLoader . showInfo || badgesLoader . showProgress
@ -424,23 +439,82 @@ Item{
}
}
"
"
} / / e n d o f s o u r c e C o m p o n e n t
} / / e n d o f s o u r c e C o m p o n e n t
}
}
/ / / / !
/ / ! S T A R T : B a d g e s V i s u a l s
/ / ! t h e b a d g e s v i s u a l g e t o u t f r o m i c o n G r a p h i c i n o r d e r t o b e a b l e t o d r a w s h a d o w s t h a t
/ / ! e x t e n d b e y o n d t h e i c o n G r a p h i c b o u n d a r i e s
Loader {
id: badgeVisualsLoader
anchors.fill: iconImageBuffer
active: badgesLoader . active
readonly property int infoBadgeWidth: active ? publishedInfoBadgeWidth : 0
property int publishedInfoBadgeWidth: 0
sourceComponent: Item {
ProgressOverlay {
ProgressOverlay {
id: infoBadge
id: infoBadge
anchors.fill: parent
anchors.right: parent . right
anchors.top: parent . top
width: Math . max ( parent . width , contentWidth )
height: parent . height
opacity: badgesLoader . opacityN
opacity: badgesLoader . opacityN
visible: badgesLoader . showInfo || badgesLoader . showProgress
visible: badgesLoader . showInfo || badgesLoader . showProgress
layer.enabled: root . enableShadows
layer.effect: DropShadow {
color: root . appShadowColor
fast: true
samples: 2 * radius
source: infoBadge
radius: root . appShadowSize
verticalOffset: 2
}
}
}
AudioStream {
AudioStream {
id: audioStreamBadge
id: audioStreamBadge
anchors.fill: parent
anchors.fill: parent
opacity: badgesLoader . opacityN
opacity: badgesLoader . opacityN
visible: badgesLoader . showAudio
visible: badgesLoader . showAudio
layer.enabled: root . enableShadows
layer.effect: DropShadow {
color: root . appShadowColor
fast: true
samples: 2 * radius
source: audioStreamBadge
radius: root . appShadowSize
verticalOffset: 2
}
}
Binding {
target: badgeVisualsLoader
property: "publishedInfoBadgeWidth"
value: infoBadge . contentWidth
}
/ / ! g r e y - i n g t h e b a d g e s w h e n t h e t a s k i s d r a g g e d
Colorize {
anchors.centerIn: parent
width: source . width
height: source . height
source: parent
opacity: stateColorizer . opacity
hue: stateColorizer . hue
saturation: stateColorizer . saturation
lightness: stateColorizer . lightness
}
}
}
}
}
}
/ / / / !
/ / ! E N D : B a d g e s V i s u a l s
/ / / S T A R T T a s k N u m b e r
/ / / S T A R T T a s k N u m b e r
@ -501,25 +575,18 @@ Item{
}
}
}
}
}
}
/ / E N D o f t a s k n u m b e r
/ / E N D o f t a s k n u m b e r ( s h o w T a s k s N u m b e r s )
/ / s h o w T a s k s N u m b e r s
Colorize {
}
id: stateColorizer
source: badgesLoader . active ? badgesLoader : iconImageBuffer
anchors.fill: iconImageBuffer
/ / / S h a d o w i n t a s k s
opacity: 0
Loader {
id: taskWithShadow
hue: 0
anchors.fill: iconGraphic
saturation: 0
active: root . enableShadows
lightness: 0
sourceComponent: DropShadow {
anchors.fill: parent
color: root . appShadowColor
fast: true
samples: 2 * radius
source: iconGraphic
radius: root . appShadowSize
verticalOffset: 2
}
}
}
}
@ -554,21 +621,6 @@ Item{
visible: clickedAnimation . running
visible: clickedAnimation . running
}
}
Colorize {
id: stateColorizer
source: badgesLoader . active ? badgesLoader : iconImageBuffer
anchors.centerIn: iconGraphic
width: source . width
height: source . height
/ / v i s i b l e : f a l s e
opacity: 0
hue: 0
saturation: 0
lightness: 0
}
Component.onCompleted: {
Component.onCompleted: {
}
}