Replace HStyle singleton by global Theme in Window

This commit is contained in:
miruka
2019-07-06 17:50:55 -04:00
parent 6db870a372
commit d83508742c
30 changed files with 71 additions and 71 deletions

View File

@@ -3,7 +3,7 @@ import "../../Base"
HNoticePage {
text: model.date.toLocaleDateString()
color: HStyle.chat.daybreak.foreground
backgroundColor: HStyle.chat.daybreak.background
radius: HStyle.chat.daybreak.radius
color: theme.chat.daybreak.foreground
backgroundColor: theme.chat.daybreak.background
radius: theme.chat.daybreak.radius
}

View File

@@ -18,13 +18,13 @@ Row {
Rectangle {
color: isOwn?
HStyle.chat.message.ownBackground :
HStyle.chat.message.background
theme.chat.message.ownBackground :
theme.chat.message.background
//width: nameLabel.implicitWidth
width: Math.min(
roomEventListView.width - avatar.width - messageContent.spacing,
HStyle.fontSize.normal * 0.5 * 75, // 600 with 16px font
theme.fontSize.normal * 0.5 * 75, // 600 with 16px font
Math.max(
nameLabel.visible ? nameLabel.implicitWidth : 0,
contentLabel.implicitWidth
@@ -60,16 +60,16 @@ Row {
id: contentLabel
text: Utils.translatedEventContent(model) +
// time
"&nbsp;&nbsp;<font size=" + HStyle.fontSize.small +
"px color=" + HStyle.chat.message.date + ">" +
"&nbsp;&nbsp;<font size=" + theme.fontSize.small +
"px color=" + theme.chat.message.date + ">" +
Qt.formatDateTime(model.date, "hh:mm:ss") +
"</font>" +
// local echo icon
(model.isLocalEcho ?
"&nbsp;<font size=" + HStyle.fontSize.small +
"&nbsp;<font size=" + theme.fontSize.small +
"px>⏳</font>" : "")
color: HStyle.chat.message.body
color: theme.chat.message.body
wrapMode: Text.Wrap
leftPadding: horizontalPadding

View File

@@ -7,7 +7,7 @@ HRectangle {
property int space: 8
color: HStyle.chat.roomEventList.background
color: theme.chat.roomEventList.background
HListView {
id: roomEventListView