@ -57,7 +57,7 @@ Item{
if ( ( root . panelAlignment === Latte . Dock . Justify ) && root . isVertical && ! root . editMode ) {
if ( ( root . panelAlignment === Latte . Dock . Justify ) && root . isVertical && ! root . editMode ) {
return root . maxLength ;
return root . maxLength ;
} else {
} else {
return mainLayout . height + spacing ;
return mainLayout . height + spacing ;
}
}
}
}
}
}
@ -99,8 +99,10 @@ Item{
PlasmaCore . FrameSvgItem {
PlasmaCore . FrameSvgItem {
id: shadowsSvgItem
id: shadowsSvgItem
width: root . isVertical ? panelSize + marginsWidth : Math . min ( parent . width + marginsWidth , root . width - marginsWidth )
width: root . isVertical ? panelSize + marginsWidth - ( solidBackground . leftIncreaser + solidBackground . rightIncreaser ) :
height: root . isVertical ? Math . min ( parent . height + marginsHeight , root . height - marginsHeight ) : panelSize + marginsHeight
Math . min ( parent . width + marginsWidth , root . width - marginsWidth )
height: root . isVertical ? Math . min ( parent . height + marginsHeight , root . height - marginsHeight ) :
panelSize + marginsHeight - ( solidBackground . topIncreaser + solidBackground . bottomIncreaser )
imagePath: root . drawShadowsExternal ? "" : "widgets/panel-background"
imagePath: root . drawShadowsExternal ? "" : "widgets/panel-background"
prefix: root . drawShadowsExternal ? "" : "shadow"
prefix: root . drawShadowsExternal ? "" : "shadow"
@ -114,12 +116,12 @@ Item{
if ( root . drawShadowsExternal ) {
if ( root . drawShadowsExternal ) {
return 0 ;
return 0 ;
} else {
} else {
if ( root . panelAlignment === Latte . Dock . Left )
if ( root . panelAlignment === Latte . Dock . Left )
return margins . right ;
return margins . right ;
else if ( root . panelAlignment === Latte . Dock . Right )
else if ( root . panelAlignment === Latte . Dock . Right )
return margins . left ;
return margins . left ;
else
else
return margins . left + margins . right ;
return margins . left + margins . right ;
}
}
}
}
@ -128,11 +130,11 @@ Item{
return 0 ;
return 0 ;
} else {
} else {
if ( root . panelAlignment === Latte . Dock . Top )
if ( root . panelAlignment === Latte . Dock . Top )
return margins . bottom ;
return margins . bottom ;
else if ( root . panelAlignment === Latte . Dock . Bottom )
else if ( root . panelAlignment === Latte . Dock . Bottom )
return margins . top ;
return margins . top ;
else
else
return margins . top + margins . bottom ;
return margins . top + margins . bottom ;
}
}
}
}
@ -194,13 +196,44 @@ Item{
PlasmaCore . FrameSvgItem {
PlasmaCore . FrameSvgItem {
id: solidBackground
id: solidBackground
anchors.leftMargin: shadowsSvgItem . margins . left
anchors.leftMargin: shadowsSvgItem . margins . left - leftIncreaser
anchors.rightMargin: shadowsSvgItem . margins . right
anchors.rightMargin: shadowsSvgItem . margins . right - rightIncreaser
anchors.topMargin: shadowsSvgItem . margins . top
anchors.topMargin: shadowsSvgItem . margins . top - topIncreaser
anchors.bottomMargin: shadowsSvgItem . margins . bottom
anchors.bottomMargin: shadowsSvgItem . margins . bottom - bottomIncreaser
anchors.fill: parent
anchors.fill: parent
imagePath: "widgets/panel-background"
imagePath: root . solidPanel ? "opaque/dialogs/background" : "widgets/panel-background"
/ / ! t h e i n c r e a s e s u s e d w h e n t h e u s e r f o r c e s a s o l i d b a c k g r o u n d a n d t h e b a c k g r o u n d
/ / ! m u s t b e i n c r e a s e d i n o r d e r t o l o o k o k i n t h e c o r n e r s
property int rightIncreaser: {
if ( ! ( root . solidPanel && root . isVertical && plasmoid . location === PlasmaCore . Types . LeftEdge ) )
return 0 ;
else
return hiddenPanelBackground . margins . right ;
}
property int leftIncreaser: {
if ( ! ( root . solidPanel && root . isVertical && plasmoid . location === PlasmaCore . Types . RightEdge ) )
return 0 ;
else
return hiddenPanelBackground . margins . left ;
}
property int topIncreaser: {
if ( ! ( root . solidPanel && root . isVertical && plasmoid . location === PlasmaCore . Types . BottomEdge ) )
return 0 ;
else
return hiddenPanelBackground . margins . top ;
}
property int bottomIncreaser: {
if ( ! ( root . solidPanel && root . isVertical && plasmoid . location === PlasmaCore . Types . TopEdge ) )
return 0 ;
else
return hiddenPanelBackground . margins . bottom ;
}
Binding {
Binding {
target: root
target: root
@ -258,7 +291,12 @@ Item{
prefix = "" ;
prefix = "" ;
}
}
}
}
}
PlasmaCore . FrameSvgItem {
id: hiddenPanelBackground
imagePath: "widgets/panel-background"
visible: false
}
}
}
}
@ -484,3 +522,4 @@ Item{
/ / E N D s t a t e s
/ / E N D s t a t e s
}
}