Skip to content

Commit

Permalink
uiux: allow for changing app's fontsize
Browse files Browse the repository at this point in the history
Closes #737
  • Loading branch information
0x-r4bbit committed Oct 5, 2020
1 parent 64b0a11 commit bb12641
Show file tree
Hide file tree
Showing 122 changed files with 418 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.bottomMargin: Style.current.smallPadding
font.weight: Font.Medium
font.pixelSize: 13
font.pixelSize: Style.current.secondaryTextFontSize
}

MouseArea {
Expand Down
4 changes: 2 additions & 2 deletions ui/app/AppLayouts/Chat/ChatColumn/ChatInput.qml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.left: emojiImage.right
anchors.leftMargin: Style.current.smallPadding
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
}

MouseArea {
Expand Down Expand Up @@ -368,7 +368,7 @@ Rectangle {
text: ""
selectByMouse: true
wrapMode: TextArea.Wrap
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
//% "Type a message..."
placeholderText: qsTrId("type-a-message")
Keys.onPressed: onEnter(event)
Expand Down
2 changes: 1 addition & 1 deletion ui/app/AppLayouts/Chat/ChatColumn/ChatMessages.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ScrollView {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
color: Style.current.pillButtonTextColor
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
anchors.leftMargin: Style.current.halfPadding
}

Expand Down
2 changes: 1 addition & 1 deletion ui/app/AppLayouts/Chat/ChatColumn/EmptyChat.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Item {
anchors.right: walkieTalkieImage.right
anchors.left: walkieTalkieImage.left
anchors.top: walkieTalkieImage.bottom
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
color: Style.current.darkGrey
onLinkActivated: function (linkClicked) {
switch (linkClicked) {
Expand Down
4 changes: 2 additions & 2 deletions ui/app/AppLayouts/Chat/ChatColumn/Message.qml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Item {
StyledText {
id: fetchMoreButton
font.weight: Font.Medium
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
color: Style.current.blue
//% "↓ Fetch more messages"
text: qsTrId("load-more-messages")
Expand Down Expand Up @@ -185,7 +185,7 @@ Item {
`</html>`;
}
visible: isStatusMessage
font.pixelSize: 14
font.pixelSize: Style.current.altPrimaryTextFontSize
color: Style.current.secondaryText
width: parent.width - 120
horizontalAlignment: Text.AlignHCenter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Item {
default: return "";
}
}
font.pixelSize: 14
font.pixelSize: Style.current.secondaryTextFontSize
color: Style.current.darkGrey
anchors.left: parent.left
anchors.right: parent.right
Expand All @@ -112,7 +112,7 @@ Item {
id: joinChat
//% "Join chat"
text: qsTrId("join-chat")
font.pixelSize: 20
font.pixelSize: Style.current.actionTextFontSize
color: Style.current.blue
anchors.horizontalCenter: parent.horizontalCenter

Expand All @@ -129,7 +129,7 @@ Item {
StyledText {
//% "Decline invitation"
text: qsTrId("group-chat-decline-invitation")
font.pixelSize: 20
font.pixelSize: Style.current.actionTextFontSize
color: Style.current.blue
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: joinChat.bottom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Item {
textFormat: Text.RichText
horizontalAlignment: Text.AlignLeft
wrapMode: Text.Wrap
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
readOnly: true
selectByMouse: true
color: Style.current.textColor
Expand Down Expand Up @@ -94,7 +94,7 @@ Item {
qsTr("Read less") :
qsTr("Read more")
color: chatText.color
font.pixelSize: 12
font.pixelSize: Style.current.tertiaryTextFontSize
font.underline: true
z: 100

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ StyledTextEdit {
visible: isMessage
color: Style.current.darkGrey
text: Utils.formatTime(timestamp)
font.pixelSize: 10
font.pixelSize: Style.current.infoTextFontSize
readOnly: true
selectByMouse: true
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "../../../../../imports"

StyledText {
id: dateGroupLbl
font.pixelSize: 13
font.pixelSize: Style.current.secondaryTextFontSize
color: Style.current.darkGrey
horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
anchors.left: emojiImage.right
anchors.leftMargin: root.imageMargin
font.pixelSize: 12
font.pixelSize: Style.current.tertiaryTextFontSize
color: modelData.currentUserReacted ? Style.current.currentUserTextColor : Style.current.textColor
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Item {
//% "Loading image..."
text: loadingImage.hasError ? qsTrId("error-loading-the-image") : qsTrId("loading-image---")
color: loadingImage.hasError ? Style.current.red : Style.current.textColor
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
Expand Down
4 changes: 2 additions & 2 deletions ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/Retry.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ StyledText {
color: Style.current.red
//% "Resend"
text: qsTrId("resend-message")
font.pixelSize: 12
font.pixelSize: Style.current.tertiaryTextFontSize
visible: isCurrentUser && (timeout || isExpired)
MouseArea {
cursorShape: Qt.PointingHandCursor
Expand All @@ -17,4 +17,4 @@ StyledText {
chatsModel.resendMessage(chatId, messageId)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Item {
anchors.topMargin: Style.current.halfPadding
anchors.left: parent.left
anchors.leftMargin: root.innerMargin
font.pixelSize: 13
font.pixelSize: Style.current.secondaryTextFontSize
}

Item {
Expand Down Expand Up @@ -157,7 +157,7 @@ Item {
text: root.fiatValue
anchors.top: tokenText.bottom
anchors.left: tokenText.left
font.pixelSize: 13
font.pixelSize: Style.current.secondaryTextFontSize
}
}

Expand Down Expand Up @@ -215,7 +215,7 @@ Item {
anchors.rightMargin: bubbleLoader.active ? 0 : root.innerMargin
anchors.bottom: bubbleLoader.active ? bubbleLoader.bottom : buttonsLoader.top
anchors.bottomMargin: bubbleLoader.active ? -root.innerMargin : 7
font.pixelSize: 10
font.pixelSize: Style.current.infoTextFontSize
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Item {
anchors.right: parent.right
anchors.left: parent.left
anchors.top: separator1.bottom
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize

MouseArea {
anchors.fill: parent
Expand Down Expand Up @@ -61,7 +61,7 @@ Item {
anchors.left: parent.left
padding: Style.current.halfPadding
anchors.top: separator2.bottom
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize

MouseArea {
anchors.fill: parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Item {
anchors.left: parent.left
topPadding: Style.current.halfPadding
anchors.top: separator.bottom
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize

MouseArea {
anchors.fill: parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Rectangle {
anchors.left: stateImage.right
anchors.leftMargin: 4
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 13
font.pixelSize: Style.current.secondaryTextFontSize
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ StyledTextEdit {
text: !isCurrentUser ? Utils.removeStatusEns(userName) : qsTrId("You")
color: (userName.startsWith("@") || isCurrentUser) ? Style.current.blue : Style.current.textColor
font.bold: true
font.pixelSize: 14
font.pixelSize: Style.current.altPrimaryTextFontSize
readOnly: true
wrapMode: Text.WordWrap
selectByMouse: true
Expand Down
6 changes: 3 additions & 3 deletions ui/app/AppLayouts/Chat/ChatColumn/ReplyArea.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Rectangle {
id: replyToUsername
text: userName
font.bold: true
font.pixelSize: 14
font.pixelSize: Style.current.secondaryTextFontSize
anchors.leftMargin: 20
anchors.top: parent.top
anchors.topMargin: 0
Expand All @@ -107,8 +107,8 @@ Rectangle {
anchors.rightMargin: Style.current.padding
elide: Text.ElideRight
wrapMode: Text.Wrap
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
textFormat: Text.RichText
}

}
}
2 changes: 1 addition & 1 deletion ui/app/AppLayouts/Chat/ChatColumn/SuggestionBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Rectangle {
anchors.left: accountImage.right
anchors.leftMargin: Style.current.padding
verticalAlignment: Text.AlignVCenter
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
}
MouseArea {
cursorShape: Qt.PointingHandCursor
Expand Down
2 changes: 1 addition & 1 deletion ui/app/AppLayouts/Chat/ContactsColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Item {
anchors.topMargin: Style.current.padding
anchors.horizontalCenter: parent.horizontalCenter
font.weight: Font.Bold
font.pixelSize: 17
font.pixelSize: Style.current.altTitleTextFontSize
}

PublicChatPopup {
Expand Down
8 changes: 4 additions & 4 deletions ui/app/AppLayouts/Chat/ContactsColumn/Channel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Rectangle {
anchors.rightMargin: Style.current.smallPadding
elide: Text.ElideRight
font.weight: Font.Medium
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
anchors.left: channelIcon.visible ? channelIcon.right : contactImage.right
anchors.leftMargin: channelIcon.visible ? 2 : Style.current.padding
anchors.top: !isCompact ? parent.top : undefined
Expand Down Expand Up @@ -105,7 +105,7 @@ Rectangle {
elide: Text.ElideRight
anchors.bottom: parent.bottom
anchors.bottomMargin: Style.current.smallPadding
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
anchors.left: contactImage.right
anchors.leftMargin: Style.current.padding
color: Style.current.darkGrey
Expand Down Expand Up @@ -154,7 +154,7 @@ Rectangle {
anchors.top: !isCompact ? parent.top : undefined
anchors.topMargin: !isCompact ? Style.current.smallPadding : 0
anchors.verticalCenter: !isCompact ? undefined : parent.verticalCenter
font.pixelSize: 11
font.pixelSize: Style.current.altInfoTextFontSize
color: Style.current.darkGrey
}
Rectangle {
Expand All @@ -172,7 +172,7 @@ Rectangle {
StyledText {
id: contactNumberChats
text: wrapper.hasMentions ? '@' : (wrapper.unviewedMessagesCount < 100 ? wrapper.unviewedMessagesCount : "99")
font.pixelSize: 12
font.pixelSize: Style.current.tertiaryTextFontSize
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
color: Style.current.white
Expand Down
2 changes: 1 addition & 1 deletion ui/app/AppLayouts/Chat/ContactsColumn/ClosedEmptyView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Item {
anchors.left: parent.left
anchors.leftMargin: 56
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
color: Style.current.darkGrey
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/app/AppLayouts/Chat/ContactsColumn/EmptyView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Rectangle {
anchors.top: parent.top
anchors.topMargin: 56
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
wrapMode: Text.WordWrap
anchors.right: parent.right
anchors.rightMargin: Style.current.xlPadding
Expand Down
4 changes: 2 additions & 2 deletions ui/app/AppLayouts/Chat/components/Contact.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Rectangle {
elide: Text.ElideRight
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
font.pixelSize: 17
font.pixelSize: Style.current.altTitleTextFontSize
anchors.top: accountImage.top
anchors.topMargin: 10
anchors.left: accountImage.right
Expand Down Expand Up @@ -83,7 +83,7 @@ Rectangle {
text: qsTrId("group-chat-admin")
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
color: Style.current.darkGrey
anchors.top: accountImage.top
anchors.topMargin: 10
Expand Down
4 changes: 2 additions & 2 deletions ui/app/AppLayouts/Chat/components/EmojiSection.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Item {
id: categoryText
text: modelData && modelData.length ? modelData[0].category.toUpperCase() : ""
color: Style.current.darkGrey
font.pixelSize: 13
font.pixelSize: Style.current.secondaryTextFontSize
}

StyledText {
Expand All @@ -36,7 +36,7 @@ Item {
//% "No recent emojis"
text: qsTrId("no-recent-emojis")
color: Style.current.darkGrey
font.pixelSize: 10
font.pixelSize: Style.current.infoTextFontSize
anchors.top: categoryText.bottom
anchors.topMargin: Style.current.smallPadding
}
Expand Down
4 changes: 2 additions & 2 deletions ui/app/AppLayouts/Chat/components/GroupChatPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ModalPopup {
text: qsTrId("new-group-chat")
anchors.left: parent.left
font.bold: true
font.pixelSize: 17
font.pixelSize: Style.current.altTitleTextFontSize
anchors.top: parent.top
anchors.topMargin: Style.current.padding
}
Expand All @@ -81,7 +81,7 @@ ModalPopup {
//% "%1 / 10 members"
text: qsTrId("%1-/-10-members").arg(memberCount)
color: Style.current.darkGrey
font.pixelSize: 15
font.pixelSize: Style.current.primaryTextFontSize
}
}

Expand Down

0 comments on commit bb12641

Please sign in to comment.