minor widget and theme fix/additions for the profile manager

This commit is contained in:
Dan Ballard 2020-09-03 15:40:44 -07:00
parent 5c33d6ed2c
commit 171695750c
9 changed files with 45 additions and 13 deletions

View File

@ -26,6 +26,8 @@ Rectangle {
signal clicked()
signal hover(bool hover)
//property int horizontalPadding: 0
//property int verticalPadding: 0
@ -68,10 +70,12 @@ Rectangle {
onEntered: {
isHover = true
root.hover(true)
}
onExited: {
isHover = false
root.hover(false)
}
}

View File

@ -36,6 +36,9 @@ Item {
property alias badgeContent: portrait.badgeContent
property alias hoverEnabled: buttonMA.hoverEnabled
// Ideally read only for icons to match against
property alias color: crRect.color
property alias content: extraMeta.children
signal clicked(string handle)

View File

@ -1,27 +1,41 @@
import QtQuick 2.7
import QtQuick.Controls 2.13
import "theme"
import "fonts"
RadioButton {
id: control
property real size: 12
spacing: 0
property color textColor: Theme.mainTextColor
property color indicatorColor: Theme.boxCheckedColor
//property real size: 12
spacing: 0 //4 * gcd.themeScale
indicator: Rectangle {
width: 16 * gcd.themeScale
height: 16 * gcd.themeScale
anchors.verticalCenter: parent.verticalCenter
radius: 9
radius: 9 * gcd.themeScale
border.width: 1
Rectangle {
anchors.fill: parent
visible: control.checked
color: "black"
radius: 9
anchors.margins: 4
color: indicatorColor
radius: 9 * gcd.themeScale
anchors.margins: 4 * gcd.themeScale
}
}
contentItem: ScalingLabel {
size: Theme.chatMetaTextSize
color: textColor
text: control.text
font.family: Fonts.applicationFontRegular.name
font.styleName: "Bold"
leftPadding: control.indicator.width + control.spacing
}
}

View File

@ -31,12 +31,12 @@ Column {
Grid {
id: container
columns: inline ? 2 : 1
spacing: 10
padding: 10
spacing: 10 * gcd.themeScale
padding: 10 * gcd.themeScale
width: parent.width
property int gridWidth: inline ? (parent.width / 2) - 20 : parent.width - 20
property int gridWidth: inline ? (parent.width / 2) - (20 * gcd.themeScale) : parent.width - (20 * gcd.themeScale)
anchors.horizontalCenter: parent.horizontalCenter
@ -47,6 +47,7 @@ Column {
color: Theme.mainTextColor
size: Theme.secondaryTextSize * gcd.themeScale
font.weight: Font.Bold
visible: text != ""
}

View File

@ -17,6 +17,9 @@ TextField {
font.pointSize: 10 * gcd.themeScale
width: 100
// selectByMouse shouldn't be enabled on mobile
selectByMouse: gcd.os != "android" && !readOnly
background: Rectangle {
radius: 2
color: Theme.textfieldBackgroundColor

View File

@ -60,6 +60,7 @@ ThemeType {
sliderButtonColor: whitePurple
sliderBarLeftColor: mauvePurple
sliderBarRightColor: mauvePurple
boxCheckedColor: hotPink
toolbarIconColor: whitePurple
toolbarMainColor: darkGreyPurple

View File

@ -33,8 +33,8 @@ ThemeType {
textfieldBackgroundColor: whitePurple
textfieldBorderColor: purple
textfieldTextColor: purple
textfieldButtonColor: purple
textfieldButtonTextColor: pink
textfieldButtonColor: hotPink
textfieldButtonTextColor: whitePurple
portraitOnlineBorderColor: darkPurple
portraitOnlineBackgroundColor: darkPurple
@ -61,6 +61,7 @@ ThemeType {
sliderButtonColor: pink
sliderBarLeftColor: purple
sliderBarRightColor: purple
boxCheckedColor: darkPurple
toolbarIconColor: darkPurple
toolbarMainColor: whitePurple

View File

@ -56,6 +56,8 @@ Item {
readonly property color sliderButtonColor: theme.sliderButtonColor
readonly property color sliderBarLeftColor: theme.sliderBarLeftColor
readonly property color sliderBarRightColor: theme.sliderBarRightColor
readonly property color boxCheckedColor: theme.boxCheckedColor
readonly property color toolbarIconColor: theme.toolbarIconColor
readonly property color toolbarMainColor: theme.toolbarMainColor
@ -83,6 +85,7 @@ Item {
readonly property int headerSize: 50
readonly property int usernameSize: 30
readonly property int primaryTextSize: 25
readonly property int tabSize: 25
readonly property int chatSize: 20
readonly property int secondaryTextSize: 20 // address

View File

@ -40,7 +40,6 @@ QtObject {
property color portraitBlockedBackgroundColor: "red"
property color portraitBlockedTextColor: "red"
property color portraitContactBadgeColor: "red"
property color portraitContactBadgeTextColor: "red"
property color portraitProfileBadgeColor: "red"
@ -52,6 +51,8 @@ QtObject {
property color sliderButtonColor: "red"
property color sliderBarLeftColor: "red"
property color sliderBarRightColor: "red"
property color boxCheckedColor: "red"
property color toolbarIconColor: "red"
property color toolbarMainColor: "red"
@ -77,6 +78,7 @@ QtObject {
property color messageStatusAlertColor: "red"
property color messageStatusAlertTextColor: "red"
// ... more to come