Skip to content
Snippets Groups Projects
Commit 24a8631c authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Ming Rui Zhang
Browse files

misc: fix svg icon coloration

Change-Id: Idfe409c6e01f8437cba2659e79234a6083bec04e
parent b3fb4e3a
Branches
Tags
No related merge requests found
......@@ -62,8 +62,6 @@ ApplicationWindow {
anchors.fill: parent
smooth: true
antialiasing: true
source: "qrc:/images/logo-jami-standard-coul.svg"
}
......
......@@ -102,10 +102,6 @@ AbstractButton {
return normalImageSource
}
layer {
enabled: imageColor || checkedColor
effect: ColorOverlay {
id: overlay
color: {
if (checked && checkedImageColor)
return checkedImageColor
......@@ -115,11 +111,6 @@ AbstractButton {
return JamiTheme.transparentColor
}
}
// Mipmap does not render correctly on linux
mipmap: false
smooth: true
}
}
Text {
id: textContent
......
......@@ -22,7 +22,7 @@ import QtGraphicalEffects 1.14
import net.jami.Models 1.0
Image {
Item {
id: root
property real containerWidth: 30
......@@ -31,8 +31,8 @@ Image {
property int padding: 0
property point offset: Qt.point(0, 0)
property string normalSource
property string checkedSource
property alias source: image.source
property alias status: image.status
property string color: "transparent"
property bool isSvg: {
......@@ -47,15 +47,24 @@ Image {
width: Math.trunc(containerWidth * Math.sqrt(2) * 0.5) + 3 - padding
height: Math.trunc(containerHeight * Math.sqrt(2) * 0.5) + 3 - padding
fillMode: Image.PreserveAspectFit
smooth: false
antialiasing: false
asynchronous: true
Connections {
target: ScreenInfo
layer {
enabled: true
effect: ColorOverlay { color: root.color }
function onDevicePixelRatioChanged() {
image.setSourceSize()
}
}
Image {
id: image
anchors.fill: root
fillMode: Image.PreserveAspectFit
smooth: true
antialiasing: true
asynchronous: true
visible: false
function setSourceSize() {
sourceSize = undefined
......@@ -63,13 +72,12 @@ Image {
sourceSize = Qt.size(width, height)
}
Connections {
target: ScreenInfo
function onDevicePixelRatioChanged() {
setSourceSize()
}
Component.onCompleted: setSourceSize()
}
Component.onCompleted: setSourceSize()
ColorOverlay {
anchors.fill: image
source: image
color: root.color
}
}
......@@ -74,7 +74,6 @@ MenuItem {
visible: status === Image.Ready
color: iconColor !== "" ? iconColor : JamiTheme.textColor
smooth: true
opacity: 0.7
}
......
......@@ -66,9 +66,6 @@ ModalPopup {
Layout.preferredWidth: 250
Layout.preferredHeight: 88
smooth: true
antialiasing: true
source: JamiTheme.darkTheme?
"qrc:/images/logo-jami-standard-coul-white.svg" :
"qrc:/images/logo-jami-standard-coul.svg"
......
......@@ -188,16 +188,12 @@ Label {
ResponsiveImage {
id: arrowDropDown
anchors.verticalCenter: parent.verticalCenter
width: 24
height: 24
anchors.verticalCenter: parent.verticalCenter
layer {
enabled: true
effect: ColorOverlay {
color: JamiTheme.textColor
}
}
source: !root.popup.opened ?
"qrc:/images/icons/expand_more-24px.svg" :
......
......@@ -116,7 +116,6 @@ ItemDelegate {
containerHeight: size
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
source: ItemAction ? ItemAction.icon.source : ""
color: ItemAction ? ItemAction.icon.color : null
......@@ -189,7 +188,6 @@ ItemDelegate {
contentItem: ResponsiveImage {
source: isVertical ? "qrc:/images/icons/chevron_left_black_24dp.svg" :
"qrc:/images/icons/expand_less-24px.svg"
smooth: true
color: "white"
}
......@@ -217,7 +215,6 @@ ItemDelegate {
IconSource : (menuItem.ListView.isCurrentItem ?
"qrc:/images/icons/check_box-24px.svg" :
"qrc:/images/icons/check_box_outline_blank-24px.svg")
smooth: true
color: "white"
}
Text {
......
......@@ -63,12 +63,8 @@ Rectangle {
height: 20
source: "qrc:/images/icons/ic_baseline-search-24px.svg"
layer.enabled: true
layer.effect: ColorOverlay {
color: JamiTheme.primaryForegroundColor
}
}
TextField {
id: contactSearchBar
......
......@@ -129,57 +129,46 @@ Item {
ResponsiveImage {
id: isHostIndicator
visible: participantIsHost
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: 6
containerHeight: 12
containerWidth: 12
visible: participantIsHost
source: "qrc:/images/icons/star_outline-24px.svg"
layer {
enabled: true
effect: ColorOverlay { color: JamiTheme.whiteColor }
mipmap: false
smooth: true
}
color: JamiTheme.whiteColor
}
ResponsiveImage {
id: isModeratorIndicator
visible: participantIsModerator
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: 6
containerHeight: 12
containerWidth: 12
visible: participantIsModerator
source: "qrc:/images/icons/moderator.svg"
layer {
enabled: true
effect: ColorOverlay { color: JamiTheme.whiteColor }
mipmap: false
smooth: true
}
color: JamiTheme.whiteColor
}
ResponsiveImage {
id: isMutedIndicator
visible: participantIsMuted
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: 6
containerHeight: 12
containerWidth: 12
visible: participantIsMuted
source: "qrc:/images/icons/mic_off-24px.svg"
layer {
enabled: true
effect: ColorOverlay { color: JamiTheme.whiteColor }
mipmap: false
smooth: true
}
color: JamiTheme.whiteColor
}
}
}
......
......@@ -54,10 +54,9 @@ Rectangle {
Layout.preferredHeight: Math.min(welcomePageColumnLayout.width / 3, 110)
Layout.bottomMargin: 10
smooth: true
antialiasing: true
source: JamiTheme.darkTheme? "qrc:/images/logo-jami-standard-coul-white.svg" : "qrc:/images/logo-jami-standard-coul.svg"
source: JamiTheme.darkTheme ?
"qrc:/images/logo-jami-standard-coul-white.svg" :
"qrc:/images/logo-jami-standard-coul.svg"
}
Label {
......
......@@ -69,10 +69,9 @@ Rectangle {
Layout.preferredWidth: 330
Layout.preferredHeight: 110
smooth: true
antialiasing: true
source: JamiTheme.darkTheme ? "qrc:/images/logo-jami-standard-coul-white.svg" : "qrc:/images/logo-jami-standard-coul.svg"
source: JamiTheme.darkTheme ?
"qrc:/images/logo-jami-standard-coul-white.svg" :
"qrc:/images/logo-jami-standard-coul.svg"
}
MaterialButton {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment