make minor fixes and clean up

This commit is contained in:
Cyril Anisimov 2024-12-09 01:39:16 +01:00
parent ea39447708
commit 882c288d92
7 changed files with 5 additions and 65 deletions

View file

@ -90,6 +90,7 @@ DrawerType2 {
model: 1
clip: true
reuseItems: true
header: ColumnLayout {
width: listView.width

View file

@ -176,7 +176,7 @@ Button {
ButtonTextType {
id: buttonText
color: textColor
color: root.textColor
text: root.text
visible: root.text === "" ? false : true

View file

@ -225,11 +225,6 @@ Item {
id: backButton
backButtonImage: root.headerBackButtonImage
backButtonFunction: function() { menu.closeTriggered() }
onActiveFocusChanged: {
if(backButton.enabled && backButton.activeFocus) {
root.listView.positionViewAtBeginning()
}
}
}
}

View file

@ -142,13 +142,6 @@ PageType {
drawer.expandedHeight = implicitHeight
}
Connections {
objectName: "drawerConnections"
target: drawer
enabled: !GC.isMobile()
}
ColumnLayout {
id: collapsed
objectName: "collapsedColumnLayout"
@ -298,16 +291,6 @@ PageType {
}
}
Connections {
target: drawer
enabled: !GC.isMobile()
function onIsCollapsedChanged() {
if (!drawer.isCollapsed) {
focusItem1.forceActiveFocus()
}
}
}
ColumnLayout {
id: serversMenuHeader
objectName: "serversMenuHeader"

View file

@ -240,7 +240,6 @@ PageType {
id: underloadPacketMagicHeaderTextField
Layout.fillWidth: true
Layout.topMargin: 16
parentFlickable: fl
enabled: false

View file

@ -87,6 +87,8 @@ PageType {
property int containerDefaultPort
property int containerDefaultTransportProto
property bool isFocusable: true
delegate: Item {
implicitWidth: containers.width
implicitHeight: delegateContent.implicitHeight

View file

@ -182,15 +182,6 @@ PageType {
shareFullAccessDrawer.openTriggered()
}
actionButton.onFocusChanged: {
console.debug("MOVE THIS LOGIC TO CPP!")
if (actionButton.activeFocus) {
if (fl) {
fl.ensureVisible(moreButton)
}
}
}
DrawerType2 {
id: shareFullAccessDrawer
@ -677,38 +668,7 @@ PageType {
}
clip: true
// interactive: false
// activeFocusOnTab: true
// focus: true
// Keys.onTabPressed: {
// if (!GC.isMobile()) {
// if (currentIndex < this.count - 1) {
// this.incrementCurrentIndex()
// // currentItem.focusItem.forceActiveFocus()
// } else {
// this.currentIndex = 0
// // lastItemTabClicked(focusItem)
// }
// }
// }
// onActiveFocusChanged: {
// if (focus && !GC.isMobile()) {
// currentIndex = 0
// // currentItem.focusItem.forceActiveFocus()
// }
// }
// onCurrentIndexChanged: {
// if (currentItem) {
// if (currentItem.y < a.contentY) {
// a.contentY = currentItem.y
// } else if (currentItem.y + currentItem.height + clientsListView.y > a.contentY + a.height) {
// a.contentY = currentItem.y + clientsListView.y + currentItem.height - a.height
// }
// }
// }
reuseItems: true
delegate: Item {
implicitWidth: clientsListView.width