remove comments and clean up

This commit is contained in:
Cyril Anisimov 2024-12-29 21:19:56 +01:00
parent 2c1f3eaf3a
commit 0f98fc955f
14 changed files with 9 additions and 154 deletions

View file

@ -18,86 +18,15 @@ ListView {
property var selectedText
width: rootWidth
height: contentItem.height // TODO: It should be fixed size, not content item height
height: contentItem.height
clip: true
// interactive: false
// property FlickableType parentFlickable
// property var lastItemTabClicked
// property int currentFocusIndex: 0
// snapMode: ListView.SnapToItem
snapMode: ListView.SnapToItem
ScrollBar.vertical: ScrollBarType {}
property bool isFocusable: true
Keys.onTabPressed: {
FocusController.nextKeyTabItem()
}
Keys.onBacktabPressed: {
FocusController.previousKeyTabItem()
}
Keys.onUpPressed: {
FocusController.nextKeyUpItem()
}
Keys.onDownPressed: {
FocusController.nextKeyDownItem()
}
Keys.onLeftPressed: {
FocusController.nextKeyLeftItem()
}
Keys.onRightPressed: {
FocusController.nextKeyRightItem()
}
// activeFocusOnTab: true
// onActiveFocusChanged: {
// console.log("===========================")
// positionViewAtEnd()
// parentFlickable.ensureVisible(this.itemAtIndex(6))
// if (activeFocus) {
// this.currentFocusIndex = 0
// this.itemAtIndex(currentFocusIndex).forceActiveFocus()
// }
// }
// Keys.onTabPressed: {
// if (currentFocusIndex < this.count - 1) {
// currentFocusIndex += 1
// this.itemAtIndex(currentFocusIndex).forceActiveFocus()
// } else {
// currentFocusIndex = 0
// if (lastItemTabClicked && typeof lastItemTabClicked === "function") {
// lastItemTabClicked()
// }
// }
// }
// onVisibleChanged: {
// if (visible) {
// currentFocusIndex = 0
// focusItem.forceActiveFocus()
// }
// }
// Item {
// id: focusItem
// }
// onCurrentFocusIndexChanged: {
// if (parentFlickable) {
// parentFlickable.ensureVisible(this.itemAtIndex(currentFocusIndex))
// }
// }
ButtonGroup {
id: containersRadioButtonGroup
}
@ -136,7 +65,7 @@ ListView {
}
if (checked) {
containersDropDown.closeTriggered() // TODO: containersDropDown is outside this file
containersDropDown.closeTriggered()
ServersModel.setDefaultContainer(ServersModel.defaultIndex, proxyDefaultServerContainersModel.mapToSource(index))
} else {
ContainersModel.setProcessedContainerIndex(proxyDefaultServerContainersModel.mapToSource(index))

View file

@ -28,11 +28,7 @@ ListView {
model: ServersModel
ScrollBar.vertical: ScrollBarType {
id: scrollBar
objectName: "scrollBar"
policy: root.height >= root.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
}
ScrollBar.vertical: ScrollBarType {}
property bool isFocusable: true

View file

@ -20,16 +20,10 @@ ListView {
height: root.contentItem.height
clip: true
interactive: false
reuseItems: true
property bool isFocusable: false
onVisibleChanged: {
if (visible) {
this.currentIndex = 0
}
}
delegate: Item {
implicitWidth: root.width
implicitHeight: delegateContent.implicitHeight

View file

@ -61,30 +61,6 @@ DrawerType2 {
property bool isFocusable: true
Keys.onTabPressed: {
FocusController.nextKeyTabItem()
}
Keys.onBacktabPressed: {
FocusController.previousKeyTabItem()
}
Keys.onUpPressed: {
FocusController.nextKeyUpItem()
}
Keys.onDownPressed: {
FocusController.nextKeyDownItem()
}
Keys.onLeftPressed: {
FocusController.nextKeyLeftItem()
}
Keys.onRightPressed: {
FocusController.nextKeyRightItem()
}
ScrollBar.vertical: ScrollBarType {}
model: 1