mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-03-28 14:56:19 +01:00
SwarmDetailsPanel: add new icon design for document preview
Change-Id: I13cd2861bcbc3446a736f7e68b34044c34c2dce5
This commit is contained in:
parent
be32998ff1
commit
3f56754f1c
7 changed files with 24 additions and 2 deletions
1
resources/icons/attached_file.svg
Normal file
1
resources/icons/attached_file.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="15.5" height="20" viewBox="0 0 15.5 20"><defs><style>.a{stroke:#000;stroke-miterlimit:10;stroke-width:0.25px;}</style></defs><g transform="translate(-768.5 -231)"><g transform="translate(773.984 239.07)"><path class="a" d="M1.833,8A1.835,1.835,0,0,1,0,6.167V1.333a1.333,1.333,0,0,1,2.667,0V5.667A.833.833,0,1,1,1,5.667V1.824a.167.167,0,1,1,.333,0V5.667a.5.5,0,0,0,1,0V1.333a1,1,0,0,0-2,0V6.167a1.5,1.5,0,0,0,3,0V1.617a.167.167,0,0,1,.333,0v4.55A1.835,1.835,0,0,1,1.833,8Z"/></g><path d="M14.2,2.3a1.135,1.135,0,0,0-.8-.3H5.5A1.155,1.155,0,0,0,4.3,3.2V20.8A1.155,1.155,0,0,0,5.5,22H18.6a1.155,1.155,0,0,0,1.2-1.2V8.4a1.136,1.136,0,0,0-.3-.8ZM18,7.7H14v-4Zm.6,13.2H5.5V3.2h7.4V7.7a1.155,1.155,0,0,0,1.2,1.2h4.5v12Z" transform="translate(764.2 229)"/></g></svg>
|
After Width: | Height: | Size: 805 B |
1
resources/icons/audio_file.svg
Normal file
1
resources/icons/audio_file.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="15.5" height="20" viewBox="0 0 15.5 20"><g transform="translate(-768.5 -269)"><g transform="translate(769.2 272.54)"><path d="M9.151,4.747a.612.612,0,0,0-.9-.16L5.587,6.5H4.257A1,1,0,0,0,3.3,7.513V9.481a.989.989,0,0,0,.957.957H5.481l2.66,1.915a.449.449,0,0,0,.372.106.694.694,0,0,0,.691-.638V5.12A.467.467,0,0,0,9.151,4.747Zm-.585,7.074h0L5.906,9.96l-.16-.16H4.257a.343.343,0,0,1-.319-.319V7.513a.343.343,0,0,1,.319-.319H5.747l.16-.16,2.66-1.862v6.649Z" transform="translate(0)"/></g><path d="M14.2,2.3a1.135,1.135,0,0,0-.8-.3H5.5A1.155,1.155,0,0,0,4.3,3.2V20.8A1.155,1.155,0,0,0,5.5,22H18.6a1.155,1.155,0,0,0,1.2-1.2V8.4a1.136,1.136,0,0,0-.3-.8ZM18,7.7H14v-4Zm.6,13.2H5.5V3.2h7.4V7.7a1.155,1.155,0,0,0,1.2,1.2h4.5v12Z" transform="translate(764.2 267)"/></g></svg>
|
After Width: | Height: | Size: 811 B |
1
resources/icons/video_file.svg
Normal file
1
resources/icons/video_file.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="15.5" height="20" viewBox="0 0 15.5 20"><g transform="translate(-795.5 -269)"><g transform="translate(797.4 275.1)"><g transform="translate(3.1 1.9)"><g transform="translate(0)"><path d="M-.134,5.9a.7.7,0,0,1-.383-.1A.763.763,0,0,1-.9,5.1V-.3A.8.8,0,0,1-.517-1h0A.755.755,0,0,1,.249-1L4.881,1.721a.763.763,0,0,1,0,1.323L.249,5.8A.7.7,0,0,1-.134,5.9Zm-.1-6.408a.316.316,0,0,0-.1.244V5.1a.211.211,0,0,0,.1.209.294.294,0,0,0,.244,0L4.637,2.626a.286.286,0,0,0,.139-.209.191.191,0,0,0-.139-.209L.005-.508a.3.3,0,0,0-.244,0Z" transform="translate(0.9 1.1)"/></g></g></g><path d="M14.2,2.3a1.135,1.135,0,0,0-.8-.3H5.5A1.155,1.155,0,0,0,4.3,3.2V20.8A1.155,1.155,0,0,0,5.5,22H18.6a1.155,1.155,0,0,0,1.2-1.2V8.4a1.136,1.136,0,0,0-.3-.8ZM18,7.7H14v-4Zm.6,13.2H5.5V3.2h7.4V7.7a1.155,1.155,0,0,0,1.2,1.2h4.5v12Z" transform="translate(791.2 267)"/></g></svg>
|
After Width: | Height: | Size: 891 B |
|
@ -109,7 +109,15 @@ Item {
|
|||
visible : !mediaInfo.isImage && !mediaInfo.isAnimatedImage
|
||||
anchors.fill: parent
|
||||
anchors.margins: 8
|
||||
source: JamiResources.file_black_24dp_svg
|
||||
source: {
|
||||
if(mediaInfo.isVideo)
|
||||
return JamiResources.video_file_svg
|
||||
|
||||
if(mediaInfo.isAudio)
|
||||
return JamiResources.audio_file_svg
|
||||
|
||||
return JamiResources.attached_file_svg
|
||||
}
|
||||
cache: false
|
||||
color: JamiTheme.textColor
|
||||
}
|
||||
|
|
|
@ -77,7 +77,15 @@ Item {
|
|||
visible : !IsImage
|
||||
anchors.fill: parent
|
||||
anchors.margins: 14
|
||||
source: JamiResources.file_black_24dp_svg
|
||||
source: {
|
||||
if(mediaInfo.isVideo)
|
||||
return JamiResources.video_file_svg
|
||||
|
||||
if(mediaInfo.isAudio)
|
||||
return JamiResources.audio_file_svg
|
||||
|
||||
return JamiResources.attached_file_svg
|
||||
}
|
||||
cache: false
|
||||
color: JamiTheme.textColor
|
||||
}
|
||||
|
|
|
@ -310,6 +310,7 @@ Rectangle {
|
|||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: JamiTheme.preferredMarginSize
|
||||
text: JamiStrings.leaveConversation
|
||||
|
|
|
@ -656,6 +656,7 @@ MessagesAdapter::getMediaInfo(const QString& msg)
|
|||
if (!type.isEmpty()) {
|
||||
return {
|
||||
{"isVideo", true},
|
||||
{"isAudio", false},
|
||||
{"html", html.arg("video", "100%", filePath, mime.name())},
|
||||
};
|
||||
} else {
|
||||
|
@ -665,6 +666,7 @@ MessagesAdapter::getMediaInfo(const QString& msg)
|
|||
if (!type.isEmpty()) {
|
||||
return {
|
||||
{"isVideo", false},
|
||||
{"isAudio", true},
|
||||
{"html", html.arg("audio", "54px", filePath, mime.name())},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue