updates and minor error fixes while ravamping Messages in ui

This commit is contained in:
Dan Ballard 2020-07-25 09:44:47 -07:00
parent 0505934172
commit 7bdf6d7955
9 changed files with 33 additions and 10 deletions

View File

@ -17,6 +17,7 @@ Item {
property alias strikeout: label.font.strikeout
property alias font: label.font
property alias topPadding: label.topPadding
property alias leftPadding: label.leftPadding
property int extraPadding: 0
property Item container: parent
@ -48,7 +49,7 @@ Item {
var i = 2
var containerWidth = container != null ? container.width : 50
// - 30 for padding
while (textMetric.width > containerWidth - ((30 + extraPadding) * gcd.themeScale) && containerWidth > 50) {
while (textMetric.width > containerWidth - ((30 + extraPadding) * gcd.themeScale) && textMetric.width > 50) {
textMetric.text = text.slice(0, text.length - (i * 3)) + "..."
i++
}

View File

@ -14,9 +14,10 @@ Item {
property string source
property alias badgeColor: badge.color
property int size: Theme.contactPortraitSize
property real logscale: 4 * Math.log10(gcd.themeScale + 1)
property int baseWidth: 78 * logscale
height: 78 * logscale
property int baseWidth: size * logscale
height: size * logscale
property alias portraitBorderColor: mainImage.color
property alias portraitColor: imageInner.color

View File

@ -13,7 +13,7 @@ import QtQuick.Controls.Styles 1.4
Item {
id: crItem
implicitHeight: 78 * logscale + 3
implicitHeight: Theme.contactPortraitSize * logscale + 3
height: implicitHeight
property real logscale: 4 * Math.log10(gcd.themeScale + 1)

View File

@ -41,7 +41,7 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter
Column {
Opaque.EllipsisLabel {
Opaque.ScalingLabel {
id: settingLabel
width: container.gridWidth
color: Theme.mainTextColor

View File

@ -99,7 +99,7 @@ Rectangle { // Global Toolbar
function setTitle(text, width) {
paneTitle.text = text
paneArea.width = width
paneArea.width = theStack.width
paneTitle.textResize()
paneTitle.visible = true
}
@ -113,7 +113,7 @@ Rectangle { // Global Toolbar
target: gcd
onSetToolbarTitle: function(handle) {
setTitle(handle, theStack.width)
setTitle(handle)
btnRightMenu.visible = true
}
}

View File

@ -58,4 +58,9 @@ ThemeType {
statusbarConnectingFontColor: whitePurple
statusbarOnlineColor: mauvePurple
statusbarOnlineFontColor: whitePurple
messageFromMeBackgroundColor: mauvePurple
messageFromMeTextColor: darkGreyPurple
messageFromOtherBackgroundColor: deepPurple
messageFromOtherTextColor: whitePurple
}

View File

@ -58,4 +58,9 @@ ThemeType {
statusbarConnectingFontColor: whitePurple
statusbarOnlineColor: darkPurple
statusbarOnlineFontColor: whitePurple
messageFromMeBackgroundColor: darkPurple
messageFromMeTextColor: whitePurple
messageFromOtherBackgroundColor: purple
messageFromOtherTextColor: darkPurple
}

View File

@ -26,9 +26,9 @@ Item {
readonly property color portraitOfflineBorderColor: theme.portraitOfflineBorderColor
readonly property color portraitOfflineBackgroundColor: theme.portraitOfflineBackgroundColor
readonly property color portraitOfflineTextColor: theme.portraitOfflineTextColor
property color portraitBlockedBorderColor: theme.portraitBlockedBorderColor
property color portraitBlockedBackgroundColor: theme.portraitBlockedBackgroundColor
property color portraitBlockedTextColor: theme.portraitBlockedTextColor
readonly property color portraitBlockedBorderColor: theme.portraitBlockedBorderColor
readonly property color portraitBlockedBackgroundColor: theme.portraitBlockedBackgroundColor
readonly property color portraitBlockedTextColor: theme.portraitBlockedTextColor
readonly property color portraitContactBadgeColor: theme.portraitContactBadgeColor
readonly property color portraitContactBadgeTextColor: theme.portraitContactBadgeTextColor
@ -52,6 +52,11 @@ Item {
readonly property color statusbarOnlineColor: theme.statusbarOnlineColor
readonly property color statusbarOnlineFontColor: theme.statusbarOnlineFontColor
readonly property color messageFromMeBackgroundColor: theme.messageFromMeBackgroundColor
readonly property color messageFromMeTextColor: theme.messageFromMeTextColor
readonly property color messageFromOtherBackgroundColor: theme.messageFromOtherBackgroundColor
readonly property color messageFromOtherTextColor: theme.messageFromOtherTextColor
readonly property int headerSize: 50
readonly property int usernameSize: 30
readonly property int tabSize: 25
@ -60,6 +65,7 @@ Item {
readonly property int chatMetaTextSize: 15
readonly property int badgeTextSize: 12
readonly property int statusTextSize: 12
readonly property int contactPortraitSize: 75
readonly property int sidePaneMinSize: 700
readonly property int doublePaneMinSize: 1000

View File

@ -49,6 +49,11 @@ QtObject {
property color statusbarOnlineColor: "red"
property color statusbarOnlineFontColor: "red"
property color messageFromMeBackgroundColor: "red"
property color messageFromMeTextColor: "red"
property color messageFromOtherBackgroundColor: "red"
property color messageFromOtherTextColor: "red"
// ... more to come