From 18d9eee6490bba52b17065bea96b68736c5dc49a Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Fri, 4 Sep 2020 16:59:33 -0700 Subject: [PATCH] move badge anchors to portraitRow; add softgreen to theme --- Badge.qml | 13 ++++++------- Portrait.qml | 4 ++++ PortraitRow.qml | 4 +++- theme/CwtchDark.qml | 3 +++ theme/CwtchLight.qml | 3 +++ theme/Theme.qml | 2 ++ theme/ThemeType.qml | 2 ++ 7 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Badge.qml b/Badge.qml index 66f5e25..3cd5cda 100644 --- a/Badge.qml +++ b/Badge.qml @@ -7,12 +7,12 @@ import CustomQmlTypes 1.0 import "theme" Rectangle { - width: parent.width * 0.25 - height: width - radius: width/2 - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.margins: parent.width * 0.09 + property int size + + width: size + height: size + radius: size/2 + property alias content: container.children Column { @@ -20,5 +20,4 @@ Rectangle { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter } - } diff --git a/Portrait.qml b/Portrait.qml index 8fe05a1..cd83a50 100644 --- a/Portrait.qml +++ b/Portrait.qml @@ -71,5 +71,9 @@ Item { Badge { id: badge + size: parent.width * 0.25 + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.margins: parent.width * 0.09 } } diff --git a/PortraitRow.qml b/PortraitRow.qml index e212a35..65bc5e2 100644 --- a/PortraitRow.qml +++ b/PortraitRow.qml @@ -26,14 +26,16 @@ Item { property color rowColor: Theme.backgroundMainColor property color rowHilightColor: Theme.backgroundHilightElementColor - property alias badgeColor: portrait.badgeColor property alias portraitBorderColor: portrait.portraitBorderColor property alias portraitColor: portrait.portraitColor property alias nameColor: cn.color property alias onionColor: onion.color property alias onionVisible: onion.visible + + property alias badgeColor: portrait.badgeColor property alias badgeVisible: portrait.badgeVisible property alias badgeContent: portrait.badgeContent + property alias hoverEnabled: buttonMA.hoverEnabled // Ideally read only for icons to match against diff --git a/theme/CwtchDark.qml b/theme/CwtchDark.qml index d950ce8..3d2f36f 100644 --- a/theme/CwtchDark.qml +++ b/theme/CwtchDark.qml @@ -9,6 +9,7 @@ ThemeType { readonly property color pink: "#E85DA1" readonly property color hotPink: "#D01972" readonly property color lightGrey: "#9E9E9E" + readonly property color softGreen: "#A0FFB0" backgroundMainColor: darkGreyPurple backgroundPaneColor: darkGreyPurple @@ -48,6 +49,8 @@ ThemeType { portraitBlockedBackgroundColor: lightGrey portraitBlockedTextColor: lightGrey + portraitOnlineBadgeColor: softGreen + portraitContactBadgeColor: hotPink portraitContactBadgeTextColor: whitePurple portraitProfileBadgeColor: mauvePurple diff --git a/theme/CwtchLight.qml b/theme/CwtchLight.qml index 5d21d3b..56ff0f0 100644 --- a/theme/CwtchLight.qml +++ b/theme/CwtchLight.qml @@ -9,6 +9,7 @@ ThemeType { readonly property color pink: "#E85DA1" readonly property color hotPink: "#D01972" readonly property color lightGrey: "#B3B6B3" + readonly property color softGreen: "#A0FFB0" backgroundMainColor: whitePurple backgroundPaneColor: softPurple @@ -49,6 +50,8 @@ ThemeType { portraitBlockedBackgroundColor: lightGrey portraitBlockedTextColor: lightGrey + portraitOnlineBadgeColor: softGreen + portraitContactBadgeColor: hotPink portraitContactBadgeTextColor: whitePurple portraitProfileBadgeColor: brightPurple diff --git a/theme/Theme.qml b/theme/Theme.qml index e672063..7de372b 100644 --- a/theme/Theme.qml +++ b/theme/Theme.qml @@ -46,6 +46,8 @@ Item { readonly property color portraitBlockedBackgroundColor: theme.portraitBlockedBackgroundColor readonly property color portraitBlockedTextColor: theme.portraitBlockedTextColor + readonly property color portraitOnlineBadgeColor: theme.portraitOnlineBadgeColor + readonly property color portraitContactBadgeColor: theme.portraitContactBadgeColor readonly property color portraitContactBadgeTextColor: theme.portraitContactBadgeTextColor readonly property color portraitProfileBadgeColor: theme.portraitProfileBadgeColor diff --git a/theme/ThemeType.qml b/theme/ThemeType.qml index a06f2a5..840cc62 100644 --- a/theme/ThemeType.qml +++ b/theme/ThemeType.qml @@ -40,6 +40,8 @@ QtObject { property color portraitBlockedBackgroundColor: "red" property color portraitBlockedTextColor: "red" + property color portraitOnlineBadgeColor: "red" + property color portraitContactBadgeColor: "red" property color portraitContactBadgeTextColor: "red" property color portraitProfileBadgeColor: "red"