Commit ebc4ac6c authored by Jan Grulich's avatar Jan Grulich
Browse files

Revert: Add ScrollBar with the hope it will work correctly

CCBUG:326456
parent d7c7ef85
......@@ -78,7 +78,16 @@ Item {
anchors.fill: parent
}
PlasmaExtras.ScrollArea {
ListView {
id: connectionView;
property bool expandedItem: false;
property string previouslyExpandedItem: "";
property bool activeExpanded: true;
property bool previousExpanded: true;
property bool unknownExpanded: true;
anchors {
left: parent.left;
right: parent.right;
......@@ -88,63 +97,50 @@ Item {
bottomMargin: padding.margins.bottom
}
ListView {
id: connectionView;
property bool expandedItem: false;
property string previouslyExpandedItem: "";
property bool activeExpanded: true;
property bool previousExpanded: true;
property bool unknownExpanded: true;
anchors.fill: parent;
clip: true
model: connectionSortModel;
currentIndex: -1;
interactive: true;
boundsBehavior: Flickable.StopAtBounds;
section.property: "itemSection";
section.delegate: SectionHeader {
onHideSection: {
if (section == i18n("Active connections")) {
connectionView.activeExpanded = false;
} else if (section == i18n("Previous connections")) {
connectionView.previousExpanded = false;
} else {
connectionView.unknownExpanded = false;
}
clip: true
model: connectionSortModel;
currentIndex: -1;
interactive: true;
boundsBehavior: Flickable.StopAtBounds;
section.property: "itemSection";
section.delegate: SectionHeader {
onHideSection: {
if (section == i18n("Active connections")) {
connectionView.activeExpanded = false;
} else if (section == i18n("Previous connections")) {
connectionView.previousExpanded = false;
} else {
connectionView.unknownExpanded = false;
}
}
onShowSection: {
if (section == i18n("Active connections")) {
connectionView.activeExpanded = true;
} else if (section == i18n("Previous connections")) {
connectionView.previousExpanded = true;
} else {
connectionView.unknownExpanded = true;
}
onShowSection: {
if (section == i18n("Active connections")) {
connectionView.activeExpanded = true;
} else if (section == i18n("Previous connections")) {
connectionView.previousExpanded = true;
} else {
connectionView.unknownExpanded = true;
}
}
}
delegate: ConnectionItem {
expanded: connectionView.expandedItem && connectionView.previouslyExpandedItem == itemUni;
onItemExpanded: {
if (itemExpanded) {
connectionView.expandedItem = true;
connectionView.previouslyExpandedItem = itemUni;;
connectionView.currentIndex = index;
} else {
connectionView.expandedItem = false;
connectionView.previouslyExpandedItem = "";
}
delegate: ConnectionItem {
expanded: connectionView.expandedItem && connectionView.previouslyExpandedItem == itemUni;
onItemExpanded: {
if (itemExpanded) {
connectionView.expandedItem = true;
connectionView.previouslyExpandedItem = itemUni;;
connectionView.currentIndex = index;
} else {
connectionView.expandedItem = false;
connectionView.previouslyExpandedItem = "";
}
}
ListView.onRemove: {
if (ListView.isCurrentItem) {
connectionView.previouslyExpandedItem = "";
}
ListView.onRemove: {
if (ListView.isCurrentItem) {
connectionView.previouslyExpandedItem = "";
}
}
}
......
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