From f846b4690e256461a4a7762ebf0c6717c6bf5363 Mon Sep 17 00:00:00 2001 From: kateleet Date: Sat, 18 Dec 2021 23:18:52 +0800 Subject: [PATCH] Adjust file items UI --- images/dark/grid.svg | 16 +++++- images/dark/list.svg | 126 ++++++++-------------------------------- images/light/grid.svg | 16 +++++- images/light/list.svg | 128 +++++++++-------------------------------- qml/FolderGridItem.qml | 5 +- qml/FolderListItem.qml | 7 ++- 6 files changed, 83 insertions(+), 215 deletions(-) diff --git a/images/dark/grid.svg b/images/dark/grid.svg index 16cf854..6e1c792 100644 --- a/images/dark/grid.svg +++ b/images/dark/grid.svg @@ -1,11 +1,21 @@ - + + + + + + image/svg+xml + + + + + - - + + diff --git a/images/dark/list.svg b/images/dark/list.svg index 5517525..18c4eea 100644 --- a/images/dark/list.svg +++ b/images/dark/list.svg @@ -1,105 +1,27 @@ - - - - - - image/svg+xml - - - - - - - + + + + + + + + + + diff --git a/images/light/grid.svg b/images/light/grid.svg index e035d6c..f119f5d 100644 --- a/images/light/grid.svg +++ b/images/light/grid.svg @@ -1,11 +1,21 @@ - + + + + + + image/svg+xml + + + + + - - + + diff --git a/images/light/list.svg b/images/light/list.svg index 603a6d1..5633041 100644 --- a/images/light/list.svg +++ b/images/light/list.svg @@ -1,105 +1,29 @@ - - - - - - image/svg+xml - - - - - - - + + + + + + + + + + + + diff --git a/qml/FolderGridItem.qml b/qml/FolderGridItem.qml index 3afd457..56a9883 100644 --- a/qml/FolderGridItem.qml +++ b/qml/FolderGridItem.qml @@ -209,7 +209,7 @@ Item { wrapMode: Text.Wrap text: control.fileName color: control.GridView.view.isDesktopView ? "white" - : selected ? FishUI.Theme.highlightedTextColor + : selected ? FishUI.Theme.highlightColor : FishUI.Theme.textColor opacity: model.isHidden ? 0.8 : 1.0 } @@ -222,7 +222,8 @@ Item { height: _label.paintedHeight radius: 4 color: FishUI.Theme.highlightColor - opacity: control.selected ? 1.0 : 0 + + opacity: control.selected ? control.GridView.view.isDesktopView ? 1: 0.2 : 0 } DropShadow { diff --git a/qml/FolderListItem.qml b/qml/FolderListItem.qml index ee769a3..a9c09bc 100644 --- a/qml/FolderListItem.qml +++ b/qml/FolderListItem.qml @@ -62,6 +62,7 @@ Item { radius: FishUI.Theme.smallRadius color: selected ? FishUI.Theme.highlightColor : hovered ? hoveredColor : "transparent" visible: selected || hovered + opacity: selected ? 0.1 : 2 } RowLayout { @@ -135,7 +136,7 @@ Item { id: _label text: model.fileName Layout.fillWidth: true - color: selected ? FishUI.Theme.highlightedTextColor : FishUI.Theme.textColor + color: selected ? FishUI.Theme.highlightColor : FishUI.Theme.textColor textFormat: Text.PlainText elide: Qt.ElideMiddle opacity: model.isHidden ? 0.8 : 1.0 @@ -144,7 +145,7 @@ Item { Label { id: _label2 text: model.fileSize - color: selected ? FishUI.Theme.highlightedTextColor : FishUI.Theme.disabledTextColor + color: selected ? FishUI.Theme.highlightColor : FishUI.Theme.disabledTextColor textFormat: Text.PlainText Layout.fillWidth: true opacity: model.isHidden ? 0.8 : 1.0 @@ -154,7 +155,7 @@ Item { Label { text: model.modified textFormat: Text.PlainText - color: selected ? FishUI.Theme.highlightedTextColor : FishUI.Theme.disabledTextColor + color: selected ? FishUI.Theme.highlightColor : FishUI.Theme.disabledTextColor opacity: model.isHidden ? 0.8 : 1.0 } }