Replace HStyle singleton by global Theme in Window
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
@@ -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
|
||||
" <font size=" + HStyle.fontSize.small +
|
||||
"px color=" + HStyle.chat.message.date + ">" +
|
||||
" <font size=" + theme.fontSize.small +
|
||||
"px color=" + theme.chat.message.date + ">" +
|
||||
Qt.formatDateTime(model.date, "hh:mm:ss") +
|
||||
"</font>" +
|
||||
// local echo icon
|
||||
(model.isLocalEcho ?
|
||||
" <font size=" + HStyle.fontSize.small +
|
||||
" <font size=" + theme.fontSize.small +
|
||||
"px>⏳</font>" : "")
|
||||
|
||||
color: HStyle.chat.message.body
|
||||
color: theme.chat.message.body
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
leftPadding: horizontalPadding
|
||||
|
@@ -7,7 +7,7 @@ HRectangle {
|
||||
|
||||
property int space: 8
|
||||
|
||||
color: HStyle.chat.roomEventList.background
|
||||
color: theme.chat.roomEventList.background
|
||||
|
||||
HListView {
|
||||
id: roomEventListView
|
||||
|
Reference in New Issue
Block a user