|
@ -20,17 +20,17 @@ ColumnLayout { |
|
|
|
|
|
|
|
|
function hiddenHeightTopLevel() |
|
|
function hiddenHeightTopLevel() |
|
|
{ |
|
|
{ |
|
|
return section.state === "hidden" ? Style.documentsList.height : Style.documentsList.fileNameHeight * model.count + Style.documentsList.height; |
|
|
return section.state === "hidden" ? ProjectFilesStyle.documentsList.height : ProjectFilesStyle.documentsList.fileNameHeight * model.count + ProjectFilesStyle.documentsList.height; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function hiddenHeightRepeater() |
|
|
function hiddenHeightRepeater() |
|
|
{ |
|
|
{ |
|
|
return section.state === "hidden" ? 0 : Style.documentsList.fileNameHeight * wrapperItem.model.count; |
|
|
return section.state === "hidden" ? 0 : ProjectFilesStyle.documentsList.fileNameHeight * wrapperItem.model.count; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function hiddenHeightElement() |
|
|
function hiddenHeightElement() |
|
|
{ |
|
|
{ |
|
|
return section.state === "hidden" ? 0 : Style.documentsList.fileNameHeight; |
|
|
return section.state === "hidden" ? 0 : ProjectFilesStyle.documentsList.fileNameHeight; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function getDocumentIndex(documentId) |
|
|
function getDocumentIndex(documentId) |
|
@ -65,7 +65,7 @@ ColumnLayout { |
|
|
anchors.top: parent.top |
|
|
anchors.top: parent.top |
|
|
id: rowCol |
|
|
id: rowCol |
|
|
width: parent.width |
|
|
width: parent.width |
|
|
height: Style.documentsList.height |
|
|
height: ProjectFilesStyle.documentsList.height |
|
|
|
|
|
|
|
|
Image { |
|
|
Image { |
|
|
source: "qrc:/qml/img/opentriangleindicator_filesproject.png" |
|
|
source: "qrc:/qml/img/opentriangleindicator_filesproject.png" |
|
@ -83,15 +83,15 @@ ColumnLayout { |
|
|
id: section |
|
|
id: section |
|
|
text: sectionName |
|
|
text: sectionName |
|
|
anchors.left: parent.left |
|
|
anchors.left: parent.left |
|
|
anchors.leftMargin: Style.general.leftMargin |
|
|
anchors.leftMargin: ProjectFilesStyle.general.leftMargin |
|
|
color: Style.documentsList.sectionColor |
|
|
color: ProjectFilesStyle.documentsList.sectionColor |
|
|
font.family: boldFont.name |
|
|
font.family: boldFont.name |
|
|
font.pointSize: Style.documentsList.sectionFontSize |
|
|
font.pointSize: ProjectFilesStyle.documentsList.sectionFontSize |
|
|
states: [ |
|
|
states: [ |
|
|
State { |
|
|
State { |
|
|
name: "hidden" |
|
|
name: "hidden" |
|
|
PropertyChanges { target: filesList; visible: false; } |
|
|
PropertyChanges { target: filesList; visible: false; } |
|
|
PropertyChanges { target: rowCol; Layout.minimumHeight: Style.documentsList.height; Layout.maximumHeight: Style.documentsList.height; height: Style.documentsList.height; } |
|
|
PropertyChanges { target: rowCol; Layout.minimumHeight: ProjectFilesStyle.documentsList.height; Layout.maximumHeight: ProjectFilesStyle.documentsList.height; height: ProjectFilesStyle.documentsList.height; } |
|
|
PropertyChanges { target: imgArrow; source: "qrc:/qml/img/closedtriangleindicator_filesproject.png" } |
|
|
PropertyChanges { target: imgArrow; source: "qrc:/qml/img/closedtriangleindicator_filesproject.png" } |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
@ -132,21 +132,21 @@ ColumnLayout { |
|
|
Layout.preferredHeight: wrapperItem.hiddenHeightElement() |
|
|
Layout.preferredHeight: wrapperItem.hiddenHeightElement() |
|
|
Layout.maximumHeight: wrapperItem.hiddenHeightElement() |
|
|
Layout.maximumHeight: wrapperItem.hiddenHeightElement() |
|
|
height: wrapperItem.hiddenHeightElement() |
|
|
height: wrapperItem.hiddenHeightElement() |
|
|
color: isSelected ? Style.documentsList.highlightColor : Style.documentsList.background |
|
|
color: isSelected ? ProjectFilesStyle.documentsList.highlightColor : ProjectFilesStyle.documentsList.background |
|
|
property bool isSelected |
|
|
property bool isSelected |
|
|
property bool renameMode |
|
|
property bool renameMode |
|
|
Text { |
|
|
Text { |
|
|
id: nameText |
|
|
id: nameText |
|
|
height: parent.height |
|
|
height: parent.height |
|
|
visible: !renameMode |
|
|
visible: !renameMode |
|
|
color: rootItem.isSelected ? Style.documentsList.selectedColor : Style.documentsList.color |
|
|
color: rootItem.isSelected ? ProjectFilesStyle.documentsList.selectedColor : ProjectFilesStyle.documentsList.color |
|
|
text: name; |
|
|
text: name; |
|
|
font.family: fileNameFont.name |
|
|
font.family: fileNameFont.name |
|
|
font.pointSize: Style.documentsList.fontSize |
|
|
font.pointSize: ProjectFilesStyle.documentsList.fontSize |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
verticalAlignment: Text.AlignVCenter |
|
|
verticalAlignment: Text.AlignVCenter |
|
|
anchors.left: parent.left |
|
|
anchors.left: parent.left |
|
|
anchors.leftMargin: Style.general.leftMargin + 2 |
|
|
anchors.leftMargin: ProjectFilesStyle.general.leftMargin + 2 |
|
|
width: parent.width |
|
|
width: parent.width |
|
|
Connections |
|
|
Connections |
|
|
{ |
|
|
{ |
|
@ -171,7 +171,7 @@ ColumnLayout { |
|
|
visible: renameMode |
|
|
visible: renameMode |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.left: parent.left |
|
|
anchors.left: parent.left |
|
|
anchors.leftMargin: Style.general.leftMargin |
|
|
anchors.leftMargin: ProjectFilesStyle.general.leftMargin |
|
|
MouseArea { |
|
|
MouseArea { |
|
|
id: textMouseArea |
|
|
id: textMouseArea |
|
|
anchors.fill: parent |
|
|
anchors.fill: parent |
|
|