Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 142bc94b authored by Martin Kacej's avatar Martin Kacej

bug

parent 8f9cf1ea
......@@ -4,15 +4,81 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
Item{
property var details: []
anchors.fill:parent
Rectangle{
//anchors.horizontalCenter: parent
width: units.gridUnit * 20
height: units.gridUnit * 5
color: "red"
Text {
text: qsTr("TEST")
height: 100
function clicked(f){
details = f
}
Column {
anchors.fill: parent
Text{
text:details[0]
anchors.fill:parent
}
Repeater {
id: repeater
property int contentHeight: 0
property int longestString: 0
model: details.length / 2
Item {
anchors {
left: parent.left
right: parent.right
topMargin: Math.round(units.gridUnit / 3)
}
height: Math.max(detailNameLabel.height, detailValueLabel.height)
PlasmaComponents.Label {
id: detailNameLabel
anchors {
left: parent.left
// leftMargin: repeater.longestString - paintedWidth + Math.round(units.gridUnit / 2)
verticalCenter: parent.verticalCenter
}
height: paintedHeight
font.pointSize: theme.smallestFont.pointSize
horizontalAlignment: Text.AlignRight
opacity: 0.6
text: "<b>" + details[index*2] + "</b>: &nbsp"
Component.onCompleted: {
if (paintedWidth > repeater.longestString) {
repeater.longestString = paintedWidth
}
}
}
PlasmaComponents.Label {
id: detailValueLabel
anchors {
left: detailNameLabel.right
right: parent.right
verticalCenter: parent.verticalCenter
}
height: paintedHeight
elide: Text.ElideRight
font.pointSize: theme.smallestFont.pointSize
opacity: 0.6
text: details[(index*2)+1]
textFormat: Text.PlainText
}
}
// Count total height from added items, somehow contentRect.height doesn't work
onItemAdded: {
contentHeight = contentHeight + item.height
}
}
}
}
......@@ -7,10 +7,19 @@ import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
PlasmaComponents.ListItem {
width: parent.width
property var foo : []
RowLayout {
width: parent.width
MouseArea{
anchors.fill: parent
onClicked: {
foo = ConnectionDetails
clicked(foo)
connectionEditorDialog.open()
}
}
PlasmaComponents.Label {
id: connectionNameLabel
......@@ -24,12 +33,7 @@ PlasmaComponents.ListItem {
font.italic: ConnectionState == PlasmaNM.Enums.Activating ? true : false
text: ItemUniqueName
textFormat: Text.PlainText
MouseArea{
anchors.fill: parent
onClicked: {
connectionEditorDialog.open()
}
}
}
PlasmaCore.SvgItem {
......@@ -48,4 +52,23 @@ PlasmaComponents.ListItem {
}
}
}
}
PlasmaComponents.CommonDialog {
id: connectionEditorDialog
titleText: i18n("Connection Editor")
buttonTexts: [i18n("Close")]
onButtonClicked: close()
content: Loader {
id: connectionEditorDialogLoader
width: units.gridUnit * 22
height: units.gridUnit * 25
}
onStatusChanged: {
if (status == PlasmaComponents.DialogStatus.Open) {
connectionEditorDialogLoader.source = "ConnectionEditorDialog.qml"
connectionEditorDialogLoader.item.focusTextInput()
}
}
}
}
\ No newline at end of file
......@@ -65,6 +65,7 @@ Item {
}
RowLayout{
id:layoutrow
width: parent.width
PlasmaComponents.Label {
......@@ -78,7 +79,6 @@ Item {
checked: enabled && enabledConnections.wirelessEnabled
enabled: enabledConnections.wirelessHwEnabled
&& availableDevices.wirelessDeviceAvailable
&& !planeModeSwitchButton.airplaneModeEnabled
//icon: enabled ? "network-wireless-on" : "network-wireless-off"
onClicked: {
......@@ -88,72 +88,57 @@ Item {
}
Rectangle{
//separator
id: separator
anchors.top: layoutrow.bottom
width: parent.width
height: units.gridUnit/8
border.color: "grey"
}
PlasmaComponents.Label {
anchors.left: parent.left
id:label
anchors{
left: parent.left
top:separator.bottom
}
text: i18n("<b>Available wifi networks</b>")
Layout.fillWidth: true
}
Rectangle{
id: wifiSection
anchors.left: parent.left
implicitHeight: 300 //units.gridUnit * 45 -100
//anchors.bottomMargin: 29
width: parent.width
border.color: "black"
//Layout.fillHeight:true
PlasmaExtras.ScrollArea{
anchors {
bottom: parent.bottom
left: parent.left
right: parent.right
fill: parent
}
ListView {
property bool availableConnectionsVisible: false
property int currentVisibleButtonIndex: -1
PlasmaExtras.ScrollArea{
id:wifiarea
anchors {
top:label.bottom
bottomMargin:units.gridUnit*2
bottom: parent.bottom
left: parent.left
right: parent.right
}
anchors.fill: parent
anchors.margins: units.gridUnit
clip: true
width: parent.width
currentIndex: -1
boundsBehavior: Flickable.StopAtBounds
model: mobileappletProxyModel
delegate: RowItemDelegate{
}
ListView {
property bool availableConnectionsVisible: false
property int currentVisibleButtonIndex: -1
anchors.fill: parent
anchors.margins: units.gridUnit
clip: true
width: parent.width
currentIndex: -1
boundsBehavior: Flickable.StopAtBounds
model: mobileappletProxyModel
delegate: RowItemDelegate{
}
}
}
}
PlasmaComponents.CommonDialog {
id: connectionEditorDialog
titleText: i18n("Connection Editor")
buttonTexts: [i18n("Close")]
onButtonClicked: close()
content: Loader {
id: connectionEditorDialogLoader
width: units.gridUnit * 22
height: units.gridUnit * 25
}
onStatusChanged: {
if (status == PlasmaComponents.DialogStatus.Open) {
connectionEditorDialogLoader.source = "ConnectionEditorDialog.qml"
connectionEditorDialogLoader.item.focusTextInput()
}
PlasmaComponents.Button{
id:customConnectionButton
anchors.top:wifiarea.bottom
text:"Add custom connection"
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment