Adjust file items UI

This commit is contained in:
kateleet 2021-12-18 23:18:52 +08:00
parent 0a5d31c549
commit f846b4690e
6 changed files with 83 additions and 215 deletions

View file

@ -1,11 +1,21 @@
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"> <?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs> <defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { <style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#FFFFFF; color:#FFFFFF;
}</style> }</style>
</defs> </defs>
<g class="ColorScheme-Text" fill="currentColor"> <g class="ColorScheme-Text" transform="matrix(.9375 0 0 .9375 .6875 .6875)" fill="currentColor">
<path d="m5 3c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2h-3zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/> <path d="m5 3c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/>
<path d="m14 3c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/> <path d="m14 3c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/>
<path d="m5 12c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/> <path d="m5 12c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/>
<path d="m14 12c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/> <path d="m14 12c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,105 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<svg <svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
xmlns:dc="http://purl.org/dc/elements/1.1/" <metadata>
xmlns:cc="http://creativecommons.org/ns#" <rdf:RDF>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <cc:Work rdf:about="">
xmlns:svg="http://www.w3.org/2000/svg" <dc:format>image/svg+xml</dc:format>
xmlns="http://www.w3.org/2000/svg" <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" <dc:title/>
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" </cc:Work>
version="1.1" </rdf:RDF>
viewBox="0 0 22 22" </metadata>
id="svg17" <defs>
sodipodi:docname="view-list-tree.svg" <style id="current-color-scheme" type="text/css">.ColorScheme-Text {
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata21">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2160"
inkscape:window-height="1312"
id="namedview19"
showgrid="false"
inkscape:zoom="33.409091"
inkscape:cx="11"
inkscape:cy="11"
inkscape:window-x="0"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:current-layer="svg17" />
<defs
id="defs3">
<style
id="current-color-scheme"
type="text/css">.ColorScheme-Text {
color:#FFFFFF; color:#FFFFFF;
}</style> }</style>
</defs> </defs>
<rect <g transform="matrix(.9375 0 0 .9375 .6875 .21875)" fill="#fff">
class="ColorScheme-Text" <rect class="ColorScheme-Text" x="7" y="5" width="12" height="1" ry="0"/>
x="7" <rect class="ColorScheme-Text" x="7" y="11" width="12" height="1" ry="0"/>
y="5" <rect class="ColorScheme-Text" x="7" y="17" width="12" height="1" ry="0"/>
width="12" </g>
height="1" <g transform="matrix(.9375 0 0 .9375 .6875 .21875)" fill="#fff" stroke-width=".7689">
ry="0" <rect x="3" y="4" width="3" height="3" ry="1.5"/>
fill="currentColor" <rect x="3" y="10" width="3" height="3" ry="1.5"/>
id="rect5" /> <rect x="3" y="16" width="3" height="3" ry="1.5"/>
<rect </g>
class="ColorScheme-Text"
x="7"
y="11"
width="12"
height="1"
ry="0"
fill="currentColor"
id="rect9" />
<rect
class="ColorScheme-Text"
x="7"
y="17"
width="12"
height="1"
ry="0"
fill="currentColor"
id="rect13" />
<rect
style="fill:#FFFFFF;fill-opacity:1;stroke-width:0.768904"
id="rect855"
width="3"
height="3"
x="3"
y="4"
ry="1.5" />
<rect
style="fill:#FFFFFF;fill-opacity:1;stroke-width:0.768904"
id="rect855-3"
width="3"
height="3"
x="3"
y="10"
ry="1.5" />
<rect
style="fill:#FFFFFF;fill-opacity:1;stroke-width:0.768904"
id="rect855-3-6"
width="3"
height="3"
x="3"
y="16"
ry="1.5" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,11 +1,21 @@
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"> <?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs> <defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text { <style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#363636; color:#363636;
}</style> }</style>
</defs> </defs>
<g class="ColorScheme-Text" fill="currentColor"> <g class="ColorScheme-Text" transform="matrix(.9375 0 0 .9375 .6875 .6875)" fill="currentColor">
<path d="m5 3c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2h-3zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/> <path d="m5 3c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/>
<path d="m14 3c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/> <path d="m14 3c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/>
<path d="m5 12c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/> <path d="m5 12c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/>
<path d="m14 12c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/> <path d="m14 12c-1.108 0-2 0.892-2 2v3c0 1.108 0.892 2 2 2h3c1.108 0 2-0.892 2-2v-3c0-1.108-0.892-2-2-2zm0 1h3c0.554 0 1 0.446 1 1v3c0 0.554-0.446 1-1 1h-3c-0.554 0-1-0.446-1-1v-3c0-0.554 0.446-1 1-1z"/>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,105 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<svg <svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
xmlns:dc="http://purl.org/dc/elements/1.1/" <metadata>
xmlns:cc="http://creativecommons.org/ns#" <rdf:RDF>
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <cc:Work rdf:about="">
xmlns:svg="http://www.w3.org/2000/svg" <dc:format>image/svg+xml</dc:format>
xmlns="http://www.w3.org/2000/svg" <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" <dc:title/>
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" </cc:Work>
version="1.1" </rdf:RDF>
viewBox="0 0 22 22" </metadata>
id="svg17" <defs>
sodipodi:docname="view-list-tree.svg" <style id="current-color-scheme" type="text/css">.ColorScheme-Text {
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata21">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2160"
inkscape:window-height="1312"
id="namedview19"
showgrid="false"
inkscape:zoom="33.409091"
inkscape:cx="11"
inkscape:cy="11"
inkscape:window-x="0"
inkscape:window-y="30"
inkscape:window-maximized="1"
inkscape:current-layer="svg17" />
<defs
id="defs3">
<style
id="current-color-scheme"
type="text/css">.ColorScheme-Text {
color:#363636; color:#363636;
}</style> }</style>
</defs> </defs>
<rect <g transform="matrix(.9375 0 0 .9375 .6875 .21875)">
class="ColorScheme-Text" <g fill="currentColor">
x="7" <rect class="ColorScheme-Text" x="7" y="5" width="12" height="1" ry="0"/>
y="5" <rect class="ColorScheme-Text" x="7" y="11" width="12" height="1" ry="0"/>
width="12" <rect class="ColorScheme-Text" x="7" y="17" width="12" height="1" ry="0"/>
height="1" </g>
ry="0" <g fill="#363636" stroke-width=".7689">
fill="currentColor" <rect x="3" y="4" width="3" height="3" ry="1.5"/>
id="rect5" /> <rect x="3" y="10" width="3" height="3" ry="1.5"/>
<rect <rect x="3" y="16" width="3" height="3" ry="1.5"/>
class="ColorScheme-Text" </g>
x="7" </g>
y="11"
width="12"
height="1"
ry="0"
fill="currentColor"
id="rect9" />
<rect
class="ColorScheme-Text"
x="7"
y="17"
width="12"
height="1"
ry="0"
fill="currentColor"
id="rect13" />
<rect
style="fill:#363636;fill-opacity:1;stroke-width:0.768904"
id="rect855"
width="3"
height="3"
x="3"
y="4"
ry="1.5" />
<rect
style="fill:#363636;fill-opacity:1;stroke-width:0.768904"
id="rect855-3"
width="3"
height="3"
x="3"
y="10"
ry="1.5" />
<rect
style="fill:#363636;fill-opacity:1;stroke-width:0.768904"
id="rect855-3-6"
width="3"
height="3"
x="3"
y="16"
ry="1.5" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -209,7 +209,7 @@ Item {
wrapMode: Text.Wrap wrapMode: Text.Wrap
text: control.fileName text: control.fileName
color: control.GridView.view.isDesktopView ? "white" color: control.GridView.view.isDesktopView ? "white"
: selected ? FishUI.Theme.highlightedTextColor : selected ? FishUI.Theme.highlightColor
: FishUI.Theme.textColor : FishUI.Theme.textColor
opacity: model.isHidden ? 0.8 : 1.0 opacity: model.isHidden ? 0.8 : 1.0
} }
@ -222,7 +222,8 @@ Item {
height: _label.paintedHeight height: _label.paintedHeight
radius: 4 radius: 4
color: FishUI.Theme.highlightColor color: FishUI.Theme.highlightColor
opacity: control.selected ? 1.0 : 0
opacity: control.selected ? control.GridView.view.isDesktopView ? 1: 0.2 : 0
} }
DropShadow { DropShadow {

View file

@ -62,6 +62,7 @@ Item {
radius: FishUI.Theme.smallRadius radius: FishUI.Theme.smallRadius
color: selected ? FishUI.Theme.highlightColor : hovered ? hoveredColor : "transparent" color: selected ? FishUI.Theme.highlightColor : hovered ? hoveredColor : "transparent"
visible: selected || hovered visible: selected || hovered
opacity: selected ? 0.1 : 2
} }
RowLayout { RowLayout {
@ -135,7 +136,7 @@ Item {
id: _label id: _label
text: model.fileName text: model.fileName
Layout.fillWidth: true Layout.fillWidth: true
color: selected ? FishUI.Theme.highlightedTextColor : FishUI.Theme.textColor color: selected ? FishUI.Theme.highlightColor : FishUI.Theme.textColor
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Qt.ElideMiddle elide: Qt.ElideMiddle
opacity: model.isHidden ? 0.8 : 1.0 opacity: model.isHidden ? 0.8 : 1.0
@ -144,7 +145,7 @@ Item {
Label { Label {
id: _label2 id: _label2
text: model.fileSize text: model.fileSize
color: selected ? FishUI.Theme.highlightedTextColor : FishUI.Theme.disabledTextColor color: selected ? FishUI.Theme.highlightColor : FishUI.Theme.disabledTextColor
textFormat: Text.PlainText textFormat: Text.PlainText
Layout.fillWidth: true Layout.fillWidth: true
opacity: model.isHidden ? 0.8 : 1.0 opacity: model.isHidden ? 0.8 : 1.0
@ -154,7 +155,7 @@ Item {
Label { Label {
text: model.modified text: model.modified
textFormat: Text.PlainText 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 opacity: model.isHidden ? 0.8 : 1.0
} }
} }