block approve fixes

This commit is contained in:
Dan Ballard 2020-06-23 16:58:11 -07:00
parent 0ec6a2df57
commit 665a990a33
8 changed files with 50 additions and 38 deletions

View File

@ -48,6 +48,9 @@ Item {
anchors.fill: parent anchors.fill: parent
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
visible: false visible: false
sourceSize.width: imageInner.width*2
sourceSize.height: imageInner.height*2
} }
Image { // CIRCLE MASK Image { // CIRCLE MASK

View File

@ -7,6 +7,7 @@ import CustomQmlTypes 1.0
import "styles" import "styles"
import "." as Widgets import "." as Widgets
import "theme" import "theme"
import "../opaque/fonts"
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
@ -25,6 +26,8 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
property bool isHover property bool isHover
property string tag // profile version/type property string tag // profile version/type
property color rowColor: Theme.backgroundMainColor
property color rowHilightColor: Theme.backgroundHilightElementColor
property alias badgeColor: portrait.badgeColor property alias badgeColor: portrait.badgeColor
property alias portraitBorderColor: portrait.portraitBorderColor property alias portraitBorderColor: portrait.portraitBorderColor
property alias portraitColor: portrait.portraitColor property alias portraitColor: portrait.portraitColor
@ -37,9 +40,6 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
property alias content: extraMeta.children property alias content: extraMeta.children
// TODO: should be in ContactRow
property bool blocked
signal clicked(string handle) signal clicked(string handle)
Rectangle { // CONTACT ENTRY BACKGROUND COLOR Rectangle { // CONTACT ENTRY BACKGROUND COLOR
@ -48,7 +48,7 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
anchors.right: parent.right anchors.right: parent.right
height: crItem.height height: crItem.height
width: parent.width width: parent.width
color: isHover ? Theme.backgroundHilightElementColor : (isActive ? Theme.backgroundHilightElementColor : Theme.backgroundMainColor) color: isHover ? crItem.rowHilightColor : (isActive ? crItem.rowHilightColor : crItem.rowColor)
Portrait { Portrait {
id: portrait id: portrait
@ -73,8 +73,8 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
size: Theme.usernameSize * gcd.themeScale size: Theme.usernameSize * gcd.themeScale
weight: Font.Bold font.family: Fonts.applicationFontExtraBold.name
strikeout: blocked font.styleName: "ExtraBold"
text: displayName text: displayName
} }
@ -84,7 +84,6 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
size: Theme.secondaryTextSize * gcd.themeScale size: Theme.secondaryTextSize * gcd.themeScale
strikeout: blocked
} }
onWidthChanged: { onWidthChanged: {
@ -124,15 +123,9 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
isActive = false isActive = false
} }
onUpdateContactBlocked: function(_handle, _blocked) {
if (handle == _handle) {
blocked = _blocked
}
}
onUpdateContactDisplayName: function(_handle, _displayName) { onUpdateContactDisplayName: function(_handle, _displayName) {
if (handle == _handle) { if (handle == _handle) {
displayName = _displayName + (blocked == true ? " (blocked)" : "") displayName = _displayName
} }
} }

View File

@ -13,22 +13,22 @@ Slider {
property color barLeftColor: Theme.sliderBarLeftColor property color barLeftColor: Theme.sliderBarLeftColor
background: Rectangle { background: Rectangle {
x: control.leftPadding x: control.leftPadding
y: control.topPadding + control.availableHeight / 2 - height / 2 y: control.topPadding + control.availableHeight / 2 - height / 2
implicitWidth: 200 implicitWidth: 200
implicitHeight: 4 implicitHeight: 4
width: control.availableWidth width: control.availableWidth
height: implicitHeight height: implicitHeight
radius: 2 radius: 2
color: control.barRightColor color: control.barRightColor
Rectangle { Rectangle {
width: control.visualPosition * parent.width width: control.visualPosition * parent.width
height: parent.height height: parent.height
color: control.barLeftColor color: control.barLeftColor
radius: 2 radius: 2
}
} }
}
handle: Rectangle { handle: Rectangle {
x: control.leftPadding + control.visualPosition * (control.availableWidth - width) x: control.leftPadding + control.visualPosition * (control.availableWidth - width)
@ -40,4 +40,4 @@ Slider {
border.color: control.buttonColor border.color: control.buttonColor
} }
} }

View File

@ -9,7 +9,7 @@ QtObject {
source: "qrc:/qml/opaque/fonts/opensans/OpenSans-Bold.ttf" source: "qrc:/qml/opaque/fonts/opensans/OpenSans-Bold.ttf"
} }
property FontLoader applicationFontExtrBold: FontLoader { property FontLoader applicationFontExtraBold: FontLoader {
id: opensansExtraBold id: opensansExtraBold
source: "qrc:/qml/opaque/fonts/opensans/OpenSans-ExtraBold.ttf" source: "qrc:/qml/opaque/fonts/opensans/OpenSans-ExtraBold.ttf"
} }

View File

@ -1,6 +1,6 @@
ThemeType { ThemeType {
readonly property color darkGrayPurple: "#281831" readonly property color darkGreyPurple: "#281831"
readonly property color deepPurple: "#422850" readonly property color deepPurple: "#422850"
readonly property color mauvePurple: "#8E64A5" readonly property color mauvePurple: "#8E64A5"
readonly property color purple: "#DFB9DE" readonly property color purple: "#DFB9DE"
@ -8,8 +8,10 @@ ThemeType {
readonly property color softPurple: "#FDF3FC" readonly property color softPurple: "#FDF3FC"
readonly property color pink: "#E85DA1" readonly property color pink: "#E85DA1"
readonly property color hotPink: "#D01972" readonly property color hotPink: "#D01972"
readonly property color lightGrey: "#B3B6B3"
backgroundMainColor: darkGrayPurple
backgroundMainColor: darkGreyPurple
backgroundPaneColor: deepPurple backgroundPaneColor: deepPurple
backgroundHilightElementColor: deepPurple backgroundHilightElementColor: deepPurple
@ -21,22 +23,25 @@ ThemeType {
defaultButtonTextColor: whitePurple defaultButtonTextColor: whitePurple
portraitOnlineBorderColor: whitePurple portraitOnlineBorderColor: whitePurple
portraitOnlineBackgroundColor: darkGrayPurple portraitOnlineBackgroundColor: darkGreyPurple
portraitOnlineTextColor: whitePurple portraitOnlineTextColor: whitePurple
portraitConnectingBorderColor: mauvePurple portraitConnectingBorderColor: mauvePurple
portraitConnectingBackgroundColor: darkGrayPurple portraitConnectingBackgroundColor: darkGreyPurple
portraitConnectingTextColor: whitePurple portraitConnectingTextColor: whitePurple
portraitOfflineBorderColor: deepPurple portraitOfflineBorderColor: deepPurple
portraitOfflineBackgroundColor: darkGrayPurple portraitOfflineBackgroundColor: darkGreyPurple
portraitOfflineTextColor: softPurple portraitOfflineTextColor: softPurple
portraitBlockedBorderColor: lightGrey
portraitBlockedBackgroundColor: lightGrey
portraitBlockedTextColor: lightGrey
portraitContactBadgeColor: hotPink portraitContactBadgeColor: hotPink
portraitContactBadgeTextColor: whitePurple portraitContactBadgeTextColor: whitePurple
portraitProfileBadgeColor: mauvePurple portraitProfileBadgeColor: mauvePurple
dropShadowColor: mauvePurple dropShadowColor: mauvePurple
dropShadowPaneColor: darkGrayPurple dropShadowPaneColor: darkGreyPurple
toggleColor: darkGrayPurple toggleColor: darkGreyPurple
toggleOnColor: whitePurple toggleOnColor: whitePurple
toggleOffColor: mauvePurple toggleOffColor: mauvePurple
sliderButtonColor: whitePurple sliderButtonColor: whitePurple
@ -47,7 +52,7 @@ ThemeType {
statusbarDisconnectedInternetColor: whitePurple statusbarDisconnectedInternetColor: whitePurple
statusbarDisconnectedInternetFontColor: deepPurple statusbarDisconnectedInternetFontColor: deepPurple
statusbarDisconnectedTorColor: darkGrayPurple statusbarDisconnectedTorColor: darkGreyPurple
statusbarDisconnectedTorFontColor: whitePurple statusbarDisconnectedTorFontColor: whitePurple
statusbarConnectingColor: deepPurple statusbarConnectingColor: deepPurple
statusbarConnectingFontColor: whitePurple statusbarConnectingFontColor: whitePurple

View File

@ -8,6 +8,7 @@ ThemeType {
readonly property color greyPurple: "#775F84" readonly property color greyPurple: "#775F84"
readonly property color pink: "#E85DA1" readonly property color pink: "#E85DA1"
readonly property color hotPink: "#D01972" readonly property color hotPink: "#D01972"
readonly property color lightGrey: "#B3B6B3"
backgroundMainColor: whitePurple backgroundMainColor: whitePurple
backgroundPaneColor: softPurple backgroundPaneColor: softPurple
@ -30,6 +31,9 @@ ThemeType {
portraitOfflineBorderColor: purple portraitOfflineBorderColor: purple
portraitOfflineBackgroundColor: purple portraitOfflineBackgroundColor: purple
portraitOfflineTextColor: purple portraitOfflineTextColor: purple
portraitBlockedBorderColor: lightGrey
portraitBlockedBackgroundColor: lightGrey
portraitBlockedTextColor: lightGrey
portraitContactBadgeColor: hotPink portraitContactBadgeColor: hotPink
portraitContactBadgeTextColor: whitePurple portraitContactBadgeTextColor: whitePurple

View File

@ -26,6 +26,9 @@ Item {
readonly property color portraitOfflineBorderColor: theme.portraitOfflineBorderColor readonly property color portraitOfflineBorderColor: theme.portraitOfflineBorderColor
readonly property color portraitOfflineBackgroundColor: theme.portraitOfflineBackgroundColor readonly property color portraitOfflineBackgroundColor: theme.portraitOfflineBackgroundColor
readonly property color portraitOfflineTextColor: theme.portraitOfflineTextColor readonly property color portraitOfflineTextColor: theme.portraitOfflineTextColor
property color portraitBlockedBorderColor: theme.portraitBlockedBorderColor
property color portraitBlockedBackgroundColor: theme.portraitBlockedBackgroundColor
property color portraitBlockedTextColor: theme.portraitBlockedTextColor
readonly property color portraitContactBadgeColor: theme.portraitContactBadgeColor readonly property color portraitContactBadgeColor: theme.portraitContactBadgeColor
readonly property color portraitContactBadgeTextColor: theme.portraitContactBadgeTextColor readonly property color portraitContactBadgeTextColor: theme.portraitContactBadgeTextColor

View File

@ -21,6 +21,10 @@ QtObject {
property color portraitOfflineBorderColor: "red" property color portraitOfflineBorderColor: "red"
property color portraitOfflineBackgroundColor: "red" property color portraitOfflineBackgroundColor: "red"
property color portraitOfflineTextColor: "red" property color portraitOfflineTextColor: "red"
property color portraitBlockedBorderColor: "red"
property color portraitBlockedBackgroundColor: "red"
property color portraitBlockedTextColor: "red"
property color portraitContactBadgeColor: "red" property color portraitContactBadgeColor: "red"
property color portraitContactBadgeTextColor: "red" property color portraitContactBadgeTextColor: "red"