Cleanup sidebar + resize ContentView to correspond

This commit is contained in:
2022-08-28 22:05:38 -04:00
parent 3c6ca152dc
commit 66c6ba9437
3 changed files with 23 additions and 11 deletions
+4 -4
View File
@@ -3,24 +3,24 @@ import QtQuick 2.12
import Ikinuki.Client 1.0
Rectangle {
id: rect
property var providers
default property int selectedElement: 0
property int selectedElement: 0
property var max_elements: providers.length
width: parent.width * 0.3
width: parent.width * 0.2
height: parent.height
color: "#22282A"
Column {
anchors.fill: parent
// header
SidebarHeader {}
Repeater {
id: sidebarElements
model: providers
SidebarElement {
name: modelData.name
selected: (index == selectedElement) ? true : false
}
}
}
function mod(n, m) {
return ((n % m) + m) % m;