mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-01 20:53:14 +02:00
TextField: new design
GitLab: #1417 Change-Id: I89c97d02250b9b283f85a006b13c97e4bb54ee32
This commit is contained in:
parent
23413a8f45
commit
3d0db97a17
4 changed files with 15 additions and 4 deletions
|
@ -48,7 +48,7 @@ TextField {
|
||||||
property alias suffixBisIconColor: suffixBisIcon.color
|
property alias suffixBisIconColor: suffixBisIcon.color
|
||||||
property alias icon: container.data
|
property alias icon: container.data
|
||||||
|
|
||||||
property color accent: isActive || hovered ? prefixIconColor : JamiTheme.buttonTintedBlue
|
property color accent: (isActive || hovered ? prefixIconColor : JamiTheme.passwordBaselineColor)
|
||||||
property color baseColor: JamiTheme.primaryForegroundColor
|
property color baseColor: JamiTheme.primaryForegroundColor
|
||||||
property color textColor: JamiTheme.textColor
|
property color textColor: JamiTheme.textColor
|
||||||
color: textColor
|
color: textColor
|
||||||
|
@ -114,8 +114,11 @@ TextField {
|
||||||
id: overBaseLineLabel
|
id: overBaseLineLabel
|
||||||
font.pixelSize: root.font.pixelSize
|
font.pixelSize: root.font.pixelSize
|
||||||
anchors.baseline: root.baseline
|
anchors.baseline: root.baseline
|
||||||
anchors.horizontalCenter: !isSwarmDetail ? root.horizontalCenter : undefined
|
anchors.left: root.left
|
||||||
|
anchors.leftMargin: 32
|
||||||
|
width: root.width - 64
|
||||||
text: root.placeholderText
|
text: root.placeholderText
|
||||||
|
elide: Text.ElideRight
|
||||||
color: isSwarmDetail ? root.color : root.baseColor
|
color: isSwarmDetail ? root.color : root.baseColor
|
||||||
visible: !root.isActive && !readOnly && root.text.toString() === ""
|
visible: !root.isActive && !readOnly && root.text.toString() === ""
|
||||||
}
|
}
|
||||||
|
@ -206,12 +209,13 @@ TextField {
|
||||||
|
|
||||||
TextFieldIcon {
|
TextFieldIcon {
|
||||||
id: suffixBisIcon
|
id: suffixBisIcon
|
||||||
size: 20
|
size: 16
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: root.verticalCenter
|
anchors.verticalCenter: root.verticalCenter
|
||||||
anchors.verticalCenterOffset: -root.bottomPadding / 2
|
anchors.verticalCenterOffset: -root.bottomPadding / 2
|
||||||
color: suffixBisIconColor
|
color: suffixBisIconColor
|
||||||
source: suffixBisIconSrc
|
source: suffixBisIconSrc
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.ArrowCursor
|
cursorShape: Qt.ArrowCursor
|
||||||
|
|
|
@ -87,6 +87,7 @@ Loader {
|
||||||
|
|
||||||
MaterialTextField {
|
MaterialTextField {
|
||||||
id: displayCompField
|
id: displayCompField
|
||||||
|
|
||||||
font.pixelSize: root.fontPixelSize
|
font.pixelSize: root.fontPixelSize
|
||||||
readOnly: root.readOnly
|
readOnly: root.readOnly
|
||||||
text: elidedText != "" ? elidedText : staticText
|
text: elidedText != "" ? elidedText : staticText
|
||||||
|
@ -94,6 +95,8 @@ Loader {
|
||||||
isSwarmDetail: root.isSwarmDetail
|
isSwarmDetail: root.isSwarmDetail
|
||||||
isSettings: root.isSettings
|
isSettings: root.isSettings
|
||||||
textColor: root.textColor
|
textColor: root.textColor
|
||||||
|
suffixBisIconSrc: root.suffixBisIconSrc
|
||||||
|
suffixBisIconColor: root.suffixBisIconColor
|
||||||
placeholderText: root.placeholderText
|
placeholderText: root.placeholderText
|
||||||
prefixIconSrc: isSwarmDetail ? "" : root.prefixIconSrc
|
prefixIconSrc: isSwarmDetail ? "" : root.prefixIconSrc
|
||||||
prefixIconColor: root.prefixIconColor
|
prefixIconColor: root.prefixIconColor
|
||||||
|
|
|
@ -28,7 +28,7 @@ ModalTextEdit {
|
||||||
prefixIconSrc: firstEntry ? JamiResources.lock_svg : JamiResources.round_edit_24dp_svg
|
prefixIconSrc: firstEntry ? JamiResources.lock_svg : JamiResources.round_edit_24dp_svg
|
||||||
|
|
||||||
suffixBisIconSrc: echoMode == TextInput.Password ? JamiResources.eye_cross_svg : JamiResources.noun_eye_svg
|
suffixBisIconSrc: echoMode == TextInput.Password ? JamiResources.eye_cross_svg : JamiResources.noun_eye_svg
|
||||||
suffixBisIconColor: JamiTheme.buttonTintedBlue
|
suffixBisIconColor: JamiTheme.passwordEyeIconColor
|
||||||
|
|
||||||
placeholderText: JamiStrings.password
|
placeholderText: JamiStrings.password
|
||||||
infoTipText: firstEntry ? JamiStrings.password : ""
|
infoTipText: firstEntry ? JamiStrings.password : ""
|
||||||
|
|
|
@ -596,6 +596,10 @@ Item {
|
||||||
property real textEditError: calcSize(15)
|
property real textEditError: calcSize(15)
|
||||||
property real maximumCharacters: 50
|
property real maximumCharacters: 50
|
||||||
|
|
||||||
|
// PasswordTextEdit
|
||||||
|
property color passwordEyeIconColor: "#5d5d5d"
|
||||||
|
property color passwordBaselineColor: darkTheme ? "#6e6e6e" : "#9fbfd9"
|
||||||
|
|
||||||
// MaterialButton
|
// MaterialButton
|
||||||
property real buttontextPadding: 10
|
property real buttontextPadding: 10
|
||||||
property real buttontextWizzardPadding: 30
|
property real buttontextWizzardPadding: 30
|
||||||
|
|
Loading…
Add table
Reference in a new issue