@ -40,72 +40,76 @@ ColumnLayout {
property alias activeApplet: container . activeApplet
property alias activeApplet: container . activeApplet
property alias hiddenLayout: hiddenItemsView . layout
property alias hiddenLayout: hiddenItemsView . layout
RowLayout {
PlasmaExtras . PlasmoidHeading {
PlasmaExtras . Heading {
RowLayout {
id: heading
anchors.fill: parent
Layout.fillWidth: true
level: 1
PlasmaExtras . Heading {
Layout.leftMargin: {
id: heading
/ / M e n u m o d e
Layout.fillWidth: true
if ( ! activeApplet && hiddenItemsView . visible && ! LayoutMirroring . enabled ) {
level: 1
return units . smallSpacing ;
Layout.leftMargin: {
/ / M e n u m o d e
/ / a p p l e t o p e n , s i d e b a r
if ( ! activeApplet && hiddenItemsView . visible && ! LayoutMirroring . enabled ) {
} else if ( activeApplet && hiddenItemsView . visible && ! LayoutMirroring . enabled ) {
return units . smallSpacing ;
return hiddenItemsView . width + units . largeSpacing ;
/ / a p p l e t o p e n , s i d e b a r
/ / a p p l e t o p e n , n o s i d e b a r
} else if ( activeApplet && hiddenItemsView . visible && ! LayoutMirroring . enabled ) {
} else {
return hiddenItemsView . width + units . largeSpacing ;
return units . smallSpacing ;
/ / a p p l e t o p e n , n o s i d e b a r
} else {
return units . smallSpacing ;
}
}
}
}
Layout.rightMargin: {
Layout.rightMargin: {
/ / M e n u m o d e
/ / M e n u m o d e
if ( ! activeApplet && hiddenItemsView . visible && LayoutMirroring . enabled ) {
if ( ! activeApplet && hiddenItemsView . visible && LayoutMirroring . enabled ) {
return units . smallSpacing ;
return units . smallSpacing ;
/ / a p p l e t o p e n , s i d e b a r
/ / a p p l e t o p e n , s i d e b a r
} else if ( activeApplet && hiddenItemsView . visible && LayoutMirroring . enabled ) {
} else if ( activeApplet && hiddenItemsView . visible && LayoutMirroring . enabled ) {
return hiddenItemsView . width + units . largeSpacing ;
return hiddenItemsView . width + units . largeSpacing ;
/ / a p p l e t o p e n , n o s i d e b a r
/ / a p p l e t o p e n , n o s i d e b a r
} else {
} else {
return 0 ;
return 0 ;
}
}
}
}
visible: activeApplet
visible: activeApplet
text: activeApplet ? activeApplet.title : ""
text: activeApplet ? activeApplet.title : ""
MouseArea {
MouseArea {
anchors.fill: parent
anchors.fill: parent
onClicked: {
onClicked: {
if ( activeApplet ) {
if ( activeApplet ) {
activeApplet . expanded = false ;
activeApplet . expanded = false ;
dialog . visible = true ;
dialog . visible = true ;
}
}
}
}
}
}
}
}
PlasmaExtras . Heading {
PlasmaExtras . Heading {
id: noAppletHeading
id: noAppletHeading
visible: ! activeApplet
visible: ! activeApplet
Layout.fillWidth: true
Layout.fillWidth: true
level: 1
level: 1
text: i18n ( "Status and Notifications" )
text: i18n ( "Status and Notifications" )
}
}
PlasmaComponents . ToolButton {
PlasmaComponents . ToolButton {
id: pinButton
id: pinButton
implicitHeight: Math . round ( units . gridUnit * 1.25 )
implicitHeight: Math . round ( units . gridUnit * 1.25 )
implicitWidth: implicitHeight
implicitWidth: implicitHeight
checkable: true
checkable: true
checked: plasmoid . configuration . pin
checked: plasmoid . configuration . pin
onToggled: plasmoid . configuration . pin = checked
onToggled: plasmoid . configuration . pin = checked
icon.name: "window-pin"
icon.name: "window-pin"
PlasmaComponents . ToolTip {
PlasmaComponents . ToolTip {
text: i18n ( "Keep Open" )
text: i18n ( "Keep Open" )
}
}
}
}
}
}
}