fix windows build

This commit is contained in:
uncor3
2026-05-14 06:33:31 +03:00
parent 6671cc5f2a
commit 13b71fc80c
10 changed files with 137 additions and 185 deletions
+79 -59
View File
@@ -1,69 +1,89 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import FluentUI
ColumnLayout {
id:root
signal sectionChanged(int sectionIndex)
Button {
Layout.preferredWidth: 220
Layout.fillHeight: true
contentItem : Text {
text: "Info"
color: "Red"
}
background : Rectangle {
color : "transparent"
}
onClicked: {
root.sectionChanged(0)
FluExpander {
id: root
property int currentSection : 1
signal sectionChanged(int sectionIndex)
ListModel {
id: nav_model
ListElement { name: qsTr("Info"); sectionIndex: 0 }
ListElement { name: qsTr("Apps"); sectionIndex: 1 }
ListElement { name: qsTr("Gallery"); sectionIndex: 2 }
ListElement { name: qsTr("Files"); sectionIndex: 3 }
}
implicitWidth: 200
contentHeight : 40 * 4 + 40
headerDelegate: Component {
Item {
FluToggleButton {
anchors.centerIn: parent
text: qsTr("TODO")
}
}
}
Button {
Layout.preferredWidth: 220
Layout.fillHeight: true
contentItem : Text {
text: "Apps"
color: "Red"
}
background : Rectangle {
color : "transparent"
}
onClicked: {
root.sectionChanged(1)
content: Item {
anchors.fill: parent
ListView {
id: nav_list
anchors.fill: parent
anchors.margins : 10
clip: true
spacing : 5
model: nav_model
interactive: false
boundsBehavior: ListView.StopAtBounds
currentIndex : root.currentSection
highlightMoveDuration: FluTheme.animationEnabled ? 167 : 0
highlight: Item{
z:99
clip: true
Rectangle{
height: 18
radius: 1.5
color: FluTheme.primaryColor
width: 3
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 6
}
}
}
delegate: FluButton {
text: name
width: nav_list.width
height: 40
// verticalPadding: 5
// horizontalPadding:20
background : Rectangle {
color : {
if (nav_list.currentIndex == index) {
return FluTheme.itemCheckColor
}
if (hovered) {
return FluTheme.itemHoverColor
}
return "transparent"
}
radius : 4
}
onClicked : {
nav_list.currentIndex = index
root.sectionChanged(sectionIndex)
}
}
}
}
Button {
Layout.preferredWidth: 220
Layout.fillHeight: true
contentItem : Text {
text: "Gallery"
color: "Red"
}
background : Rectangle {
color : "transparent"
}
onClicked: {
root.sectionChanged(2)
}
}
Button {
Layout.preferredWidth: 220
Layout.fillHeight: true
contentItem : Text {
text: "Files"
color: "Red"
}
background : Rectangle {
color : "transparent"
}
onClicked: {
root.sectionChanged(3)
}
}
}
}