summary refs log tree commit diff
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2020-09-25 12:09:22 -0400
committertrilene <trilene@runbox.com>2020-09-25 12:09:22 -0400
commite57199412aa34ad95e124cad6f8703add92063db (patch)
tree4a2a62354c3ef8bb68bbe57cab67188968d8864a
parentFix build for those without GStreamer (diff)
downloadnheko-e57199412aa34ad95e124cad6f8703add92063db.tar.xz
Allow button colors override
-rw-r--r--resources/qml/ActiveCallBar.qml7
-rw-r--r--resources/qml/ImageButton.qml7
2 files changed, 8 insertions, 6 deletions
diff --git a/resources/qml/ActiveCallBar.qml b/resources/qml/ActiveCallBar.qml
index 8a63725e..8d837c29 100644
--- a/resources/qml/ActiveCallBar.qml
+++ b/resources/qml/ActiveCallBar.qml
@@ -92,9 +92,10 @@ Rectangle {
 		ImageButton {
 			width: 24
 			height: 24
-			src: timelineManager.isMicMuted ?
-				"qrc:/icons/icons/ui/microphone-unmute.png" :
-				"qrc:/icons/icons/ui/microphone-mute.png"
+			buttonTextColor: "#000000"
+			image: timelineManager.isMicMuted ?
+				":/icons/icons/ui/microphone-unmute.png" :
+				":/icons/icons/ui/microphone-mute.png"
 
 			hoverEnabled: true
 			ToolTip.visible: hovered
diff --git a/resources/qml/ImageButton.qml b/resources/qml/ImageButton.qml
index 0a33d376..54399ae7 100644
--- a/resources/qml/ImageButton.qml
+++ b/resources/qml/ImageButton.qml
@@ -2,8 +2,9 @@ import QtQuick 2.3
 import QtQuick.Controls 2.3
 
 AbstractButton {
-	property string image
-	property string src
+	property string image: undefined
+	property color highlightColor: colors.highlight
+	property color buttonTextColor: colors.buttonText
 	width: 16
 	height: 16
 	id: button
@@ -12,7 +13,7 @@ AbstractButton {
 		id: buttonImg
 		// Workaround, can't get icon.source working for now...
 		anchors.fill: parent
-		source: src ? src : ("image://colorimage/" + image + "?" + (button.hovered ? colors.highlight : colors.buttonText))
+		source: "image://colorimage/" + image + "?" + (button.hovered ? highlightColor : buttonTextColor)
 	}
 
 	MouseArea