fix: add StyledTextEdit and TextField to use the font

This commit is contained in:
Jonathan Rainville 2020-06-19 14:21:02 -04:00 committed by Iuri Matias
parent 8755c901de
commit 7e96a17f3b
14 changed files with 31 additions and 13 deletions

View File

@ -48,7 +48,7 @@ Rectangle {
} }
} }
TextField { StyledTextField {
id: txtData id: txtData
text: "" text: ""
padding: 0 padding: 0

View File

@ -172,7 +172,7 @@ Item {
} }
} }
TextEdit { StyledTextEdit {
id: chatName id: chatName
text: userName text: userName
anchors.leftMargin: 20 anchors.leftMargin: 20
@ -227,7 +227,7 @@ Item {
z: -1 z: -1
} }
TextEdit { StyledTextEdit {
id: chatText id: chatText
text: message text: message
anchors.left: parent.left anchors.left: parent.left
@ -258,7 +258,7 @@ Item {
visible: contentType == Constants.stickerType visible: contentType == Constants.stickerType
} }
TextEdit { StyledTextEdit {
id: chatTime id: chatTime
color: Theme.darkGrey color: Theme.darkGrey
text: timestamp text: timestamp

View File

@ -23,7 +23,7 @@ Rectangle {
channelIdenticon: chatsModel.activeChannel.identicon channelIdenticon: chatsModel.activeChannel.identicon
} }
TextEdit { StyledTextEdit {
id: channelName id: channelName
width: 80 width: 80
height: 20 height: 20

View File

@ -8,7 +8,7 @@ Rectangle {
property string name: "channelName" property string name: "channelName"
property string lastMessage: "My latest message\n with a return" property string lastMessage: "My latest message\n with a return"
property string timestamp: "20/2/2020" property string timestamp: "20/2/2020"
property string unviewedMessagesCount: "2" property string unviewedMessagesCount: "7"
property string chatType: Constants.chatTypePublic property string chatType: Constants.chatTypePublic
property string searchStr: "" property string searchStr: ""
@ -110,7 +110,8 @@ Rectangle {
visible: unviewedMessagesCount > 0 visible: unviewedMessagesCount > 0
StyledText { StyledText {
id: contactNumberChats id: contactNumberChats
text: wrapper.unviewedMessagesCount text: wrapper.unviewedMessagesCount < 100 ? wrapper.unviewedMessagesCount : "99"
font.pixelSize: 12
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: "white" color: "white"

View File

@ -32,7 +32,7 @@ ModalPopup {
} }
} }
TextEdit { StyledTextEdit {
id: groupName id: groupName
text: chatsModel.activeChannel.name text: chatsModel.activeChannel.name
anchors.top: parent.top anchors.top: parent.top

View File

@ -39,7 +39,7 @@ ModalPopup {
} }
} }
TextEdit { StyledTextEdit {
id: profileName id: profileName
text: userName text: userName
anchors.top: parent.top anchors.top: parent.top

View File

@ -99,7 +99,7 @@ SplitView {
} }
} }
TextField { StyledTextField {
id: txtData id: txtData
text: "" text: ""
leftPadding: 0 leftPadding: 0

View File

@ -52,7 +52,7 @@ Item {
anchors.topMargin: Theme.padding anchors.topMargin: Theme.padding
height: walletAmountValue.height + totalValue.height height: walletAmountValue.height + totalValue.height
TextEdit { StyledTextEdit {
id: walletAmountValue id: walletAmountValue
color: "black" color: "black"
text: walletModel.totalFiatBalance text: walletModel.totalFiatBalance

View File

@ -208,6 +208,8 @@ DISTFILES += \
shared/RoundedIcon.qml \ shared/RoundedIcon.qml \
shared/StyledText.qml \ shared/StyledText.qml \
shared/StyledTextArea.qml \ shared/StyledTextArea.qml \
shared/StyledTextEdit.qml \
shared/StyledTextField.qml \
shared/TextWithLabel.qml \ shared/TextWithLabel.qml \
shared/qmldir shared/qmldir

View File

@ -49,7 +49,7 @@ Item {
anchors.topMargin: inputBox.hasLabel ? inputBox.labelMargin : 0 anchors.topMargin: inputBox.hasLabel ? inputBox.labelMargin : 0
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
TextField { StyledTextField {
id: inputValue id: inputValue
visible: !inputBox.isTextArea && !inputBox.isSelect visible: !inputBox.isTextArea && !inputBox.isSelect
placeholderText: inputBox.placeholderText placeholderText: inputBox.placeholderText

View File

@ -0,0 +1,6 @@
import QtQuick 2.13
import "../imports"
TextEdit {
font.family: Theme.fontRegular.name
}

View File

@ -0,0 +1,7 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import "../imports"
TextField {
font.family: Theme.fontRegular.name
}

View File

@ -25,7 +25,7 @@ Item {
color: Theme.darkGrey color: Theme.darkGrey
} }
TextEdit { StyledTextEdit {
id: textItem id: textItem
text: inputBox.text text: inputBox.text
selectByMouse: true selectByMouse: true

View File

@ -10,4 +10,6 @@ SearchBox 1.0 SearchBox.qml
Select 1.0 Select.qml Select 1.0 Select.qml
StyledTextArea 1.0 StyledTextArea.qml StyledTextArea 1.0 StyledTextArea.qml
StyledText 1.0 StyledText.qml StyledText 1.0 StyledText.qml
StyledTextField 1.0 StyledTextField.qml
StyledTextEdit 1.0 StyledTextEdit.qml
RoundImage 1.0 RoundImage.qml RoundImage 1.0 RoundImage.qml