Merge pull request 'minor widget and theme fix/additions for the profile manager' (#14) from 01-profiles into master

Reviewed-on: #14
This commit is contained in:
erinn 2020-09-17 15:13:01 -07:00
commit a0d3824712
9 changed files with 45 additions and 13 deletions

View File

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

View File

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

View File

@ -1,27 +1,41 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.13 import QtQuick.Controls 2.13
import "theme"
import "fonts"
RadioButton { RadioButton {
id: control id: control
property real size: 12 property color textColor: Theme.mainTextColor
spacing: 0 property color indicatorColor: Theme.boxCheckedColor
//property real size: 12
spacing: 0 //4 * gcd.themeScale
indicator: Rectangle { indicator: Rectangle {
width: 16 * gcd.themeScale width: 16 * gcd.themeScale
height: 16 * gcd.themeScale height: 16 * gcd.themeScale
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
radius: 9 radius: 9 * gcd.themeScale
border.width: 1 border.width: 1
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
visible: control.checked visible: control.checked
color: "black" color: indicatorColor
radius: 9 radius: 9 * gcd.themeScale
anchors.margins: 4 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 { Grid {
id: container id: container
columns: inline ? 2 : 1 columns: inline ? 2 : 1
spacing: 10 spacing: 10 * gcd.themeScale
padding: 10 padding: 10 * gcd.themeScale
width: parent.width 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 anchors.horizontalCenter: parent.horizontalCenter
@ -47,6 +47,7 @@ Column {
color: Theme.mainTextColor color: Theme.mainTextColor
size: Theme.secondaryTextSize * gcd.themeScale size: Theme.secondaryTextSize * gcd.themeScale
font.weight: Font.Bold font.weight: Font.Bold
visible: text != ""
} }

View File

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

View File

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

View File

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

View File

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

View File

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