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>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#FFFFFF;
}</style>
</defs>
<g class="ColorScheme-Text" 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"/>
<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-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="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"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
viewBox="0 0 22 22"
id="svg17"
sodipodi:docname="view-list-tree.svg"
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 {
<?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>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#FFFFFF;
}</style>
</defs>
<rect
class="ColorScheme-Text"
x="7"
y="5"
width="12"
height="1"
ry="0"
fill="currentColor"
id="rect5" />
<rect
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" />
</defs>
<g transform="matrix(.9375 0 0 .9375 .6875 .21875)" fill="#fff">
<rect class="ColorScheme-Text" x="7" y="5" width="12" height="1" ry="0"/>
<rect class="ColorScheme-Text" x="7" y="11" width="12" height="1" ry="0"/>
<rect class="ColorScheme-Text" x="7" y="17" width="12" height="1" ry="0"/>
</g>
<g transform="matrix(.9375 0 0 .9375 .6875 .21875)" fill="#fff" stroke-width=".7689">
<rect x="3" y="4" width="3" height="3" ry="1.5"/>
<rect x="3" y="10" width="3" height="3" ry="1.5"/>
<rect x="3" y="16" width="3" height="3" ry="1.5"/>
</g>
</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>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#363636;
}</style>
</defs>
<g class="ColorScheme-Text" 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"/>
<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-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="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"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
viewBox="0 0 22 22"
id="svg17"
sodipodi:docname="view-list-tree.svg"
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 {
<?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>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#363636;
}</style>
</defs>
<rect
class="ColorScheme-Text"
x="7"
y="5"
width="12"
height="1"
ry="0"
fill="currentColor"
id="rect5" />
<rect
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:#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" />
</defs>
<g transform="matrix(.9375 0 0 .9375 .6875 .21875)">
<g fill="currentColor">
<rect class="ColorScheme-Text" x="7" y="5" width="12" height="1" ry="0"/>
<rect class="ColorScheme-Text" x="7" y="11" width="12" height="1" ry="0"/>
<rect class="ColorScheme-Text" x="7" y="17" width="12" height="1" ry="0"/>
</g>
<g fill="#363636" stroke-width=".7689">
<rect x="3" y="4" width="3" height="3" ry="1.5"/>
<rect x="3" y="10" width="3" height="3" ry="1.5"/>
<rect x="3" y="16" width="3" height="3" ry="1.5"/>
</g>
</g>
</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
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 {

View file

@ -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
}
}