Adjust UI details
This commit is contained in:
parent
5c6ba53895
commit
387372164c
4 changed files with 84 additions and 56 deletions
|
@ -39,6 +39,7 @@ add_executable(cutefish-filemanager
|
||||||
helper/pathhistory.cpp
|
helper/pathhistory.cpp
|
||||||
helper/fm.cpp
|
helper/fm.cpp
|
||||||
helper/shortcut.cpp
|
helper/shortcut.cpp
|
||||||
|
helper/thumbnailerjob.cpp
|
||||||
|
|
||||||
desktopiconprovider.cpp
|
desktopiconprovider.cpp
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ Item {
|
||||||
property bool selected: model.selected
|
property bool selected: model.selected
|
||||||
property bool blank: model.blank
|
property bool blank: model.blank
|
||||||
|
|
||||||
property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.1)
|
property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 2.3)
|
||||||
: Qt.darker(FishUI.Theme.backgroundColor, 1.05)
|
: Qt.darker(FishUI.Theme.backgroundColor, 1.05)
|
||||||
property color selectedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.2)
|
property color selectedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.2)
|
||||||
: Qt.darker(FishUI.Theme.backgroundColor, 1.15)
|
: Qt.darker(FishUI.Theme.backgroundColor, 1.15)
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
import Qt.labs.platform 1.0
|
import Qt.labs.platform 1.0
|
||||||
|
|
||||||
import Cutefish.FileManager 1.0 as FM
|
import Cutefish.FileManager 1.0 as FM
|
||||||
|
@ -89,10 +90,26 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: _background
|
id: _background
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: FishUI.Units.smallSpacing * 1.5
|
|
||||||
anchors.bottomMargin: FishUI.Units.smallSpacing * 1.5
|
|
||||||
radius: FishUI.Theme.smallRadius
|
radius: FishUI.Theme.smallRadius
|
||||||
color: FishUI.Theme.secondBackgroundColor
|
color: FishUI.Theme.secondBackgroundColor
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: _topRightRect
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
height: FishUI.Theme.smallRadius
|
||||||
|
width: FishUI.Theme.smallRadius
|
||||||
|
color: FishUI.Theme.secondBackgroundColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: _bottomLeftRect
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
height: FishUI.Theme.smallRadius
|
||||||
|
width: FishUI.Theme.smallRadius
|
||||||
|
color: FishUI.Theme.secondBackgroundColor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
@ -140,7 +157,7 @@ Item {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.bottomMargin: FishUI.Theme.smallRadius
|
anchors.bottomMargin: 2
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
@ -161,32 +178,35 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Item {
|
||||||
Layout.fillWidth: true
|
visible: settings.viewMethod === 0
|
||||||
sourceComponent: _statusBar
|
height: statusBarHeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function rename() {
|
|
||||||
_viewLoader.item.rename()
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
dirModel.requestRename.connect(rename)
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
|
||||||
id: _statusBar
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: _statusBar
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
height: statusBarHeight
|
height: statusBarHeight
|
||||||
z: 999
|
z: 999
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: FishUI.Theme.backgroundColor
|
||||||
|
opacity: 0.7
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: FishUI.Units.smallSpacing
|
anchors.leftMargin: FishUI.Units.smallSpacing
|
||||||
anchors.rightMargin: FishUI.Units.largeSpacing
|
anchors.rightMargin: FishUI.Units.smallSpacing
|
||||||
anchors.bottomMargin: 1
|
// anchors.bottomMargin: 1
|
||||||
spacing: FishUI.Units.largeSpacing
|
spacing: FishUI.Units.largeSpacing
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
@ -213,11 +233,18 @@ Item {
|
||||||
text: qsTr("Empty Trash")
|
text: qsTr("Empty Trash")
|
||||||
font.pointSize: 10
|
font.pointSize: 10
|
||||||
onClicked: dirModel.emptyTrash()
|
onClicked: dirModel.emptyTrash()
|
||||||
visible: dirModel.url === "trash:/"
|
visible: dirModel.url === "trash:///"
|
||||||
focusPolicy: Qt.NoFocus
|
focusPolicy: Qt.NoFocus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function rename() {
|
||||||
|
_viewLoader.item.rename()
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
dirModel.requestRename.connect(rename)
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
@ -253,7 +280,8 @@ Item {
|
||||||
|
|
||||||
topMargin: FishUI.Units.smallSpacing
|
topMargin: FishUI.Units.smallSpacing
|
||||||
leftMargin: FishUI.Units.largeSpacing
|
leftMargin: FishUI.Units.largeSpacing
|
||||||
rightMargin: FishUI.Units.largeSpacing + FishUI.Theme.smallRadius
|
rightMargin: FishUI.Units.largeSpacing
|
||||||
|
bottomMargin: FishUI.Units.largeSpacing
|
||||||
spacing: FishUI.Units.largeSpacing
|
spacing: FishUI.Units.largeSpacing
|
||||||
|
|
||||||
onCountChanged: {
|
onCountChanged: {
|
||||||
|
|
|
@ -111,7 +111,6 @@ ListView {
|
||||||
id: _label
|
id: _label
|
||||||
text: model.name
|
text: model.name
|
||||||
color: checked ? FishUI.Theme.highlightedTextColor : FishUI.Theme.textColor
|
color: checked ? FishUI.Theme.highlightedTextColor : FishUI.Theme.textColor
|
||||||
elide: Text.ElideRight
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue