Add more control on radiuses from themes
This commit is contained in:
parent
615c08848d
commit
ebab1e15c2
|
@ -6,7 +6,7 @@ import QtQuick.Layouts 1.12
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: box
|
id: box
|
||||||
color: theme.controls.box.background
|
color: theme.controls.box.background
|
||||||
radius: theme.radius
|
radius: theme.controls.box.radius
|
||||||
implicitWidth: theme.controls.box.defaultWidth
|
implicitWidth: theme.controls.box.defaultWidth
|
||||||
implicitHeight: childrenRect.height
|
implicitHeight: childrenRect.height
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,11 @@ HTileDelegate {
|
||||||
userId: model.id
|
userId: model.id
|
||||||
displayName: model.display_name
|
displayName: model.display_name
|
||||||
mxc: model.avatar_url
|
mxc: model.avatar_url
|
||||||
radius: mainPane.small ? circleRadius : theme.controls.avatar.radius
|
|
||||||
|
radius:
|
||||||
|
mainPane.small ?
|
||||||
|
theme.mainPane.listView.account.collapsedAvatarRadius :
|
||||||
|
theme.mainPane.listView.account.avatarRadius
|
||||||
|
|
||||||
Behavior on radius { HNumberAnimation {} }
|
Behavior on radius { HNumberAnimation {} }
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,13 @@ HTileDelegate {
|
||||||
roomId: model.id
|
roomId: model.id
|
||||||
displayName: model.display_name
|
displayName: model.display_name
|
||||||
mxc: model.avatar_url
|
mxc: model.avatar_url
|
||||||
|
|
||||||
|
radius:
|
||||||
|
mainPane.small ?
|
||||||
|
theme.mainPane.listView.room.collapsedAvatarRadius :
|
||||||
|
theme.mainPane.listView.room.avatarRadius
|
||||||
|
|
||||||
|
Behavior on radius { HNumberAnimation {} }
|
||||||
}
|
}
|
||||||
|
|
||||||
title.color: theme.mainPane.listView.room.name
|
title.color: theme.mainPane.listView.room.name
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "../../.."
|
||||||
|
|
||||||
HRowLayout {
|
HRowLayout {
|
||||||
id: eventContent
|
id: eventContent
|
||||||
spacing: theme.spacing / 1.25
|
spacing: theme.chat.message.horizontalSpacing
|
||||||
layoutDirection: onRight ? Qt.RightToLeft: Qt.LeftToRight
|
layoutDirection: onRight ? Qt.RightToLeft: Qt.LeftToRight
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@ HRowLayout {
|
||||||
mxc: model.sender_avatar
|
mxc: model.sender_avatar
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: collapseAvatar ? 1 : theme.chat.message.avatarSize
|
height: collapseAvatar ? 1 : theme.chat.message.avatarSize
|
||||||
|
radius: theme.chat.message.avatarRadius
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +93,7 @@ HRowLayout {
|
||||||
index: model.index
|
index: model.index
|
||||||
visible: ! pureMedia
|
visible: ! pureMedia
|
||||||
|
|
||||||
topPadding: theme.spacing / 1.75
|
topPadding: theme.chat.message.verticalSpacing
|
||||||
bottomPadding: topPadding
|
bottomPadding: topPadding
|
||||||
leftPadding: eventContent.spacing
|
leftPadding: eventContent.spacing
|
||||||
rightPadding: leftPadding
|
rightPadding: leftPadding
|
||||||
|
@ -154,7 +155,7 @@ HRowLayout {
|
||||||
(pureMedia ? 0 : parent.leftPadding + parent.rightPadding),
|
(pureMedia ? 0 : parent.leftPadding + parent.rightPadding),
|
||||||
)
|
)
|
||||||
height: contentColumn.height
|
height: contentColumn.height
|
||||||
radius: theme.radius
|
radius: theme.chat.message.radius
|
||||||
z: -100
|
z: -100
|
||||||
color: isOwn?
|
color: isOwn?
|
||||||
theme.chat.message.ownBackground :
|
theme.chat.message.ownBackground :
|
||||||
|
|
|
@ -264,24 +264,30 @@ mainPane:
|
||||||
color background: colors.mediumBackground
|
color background: colors.mediumBackground
|
||||||
|
|
||||||
account:
|
account:
|
||||||
real collapsedOpacity: 0.3
|
real collapsedOpacity: 0.3
|
||||||
color background: "transparent"
|
color background: "transparent"
|
||||||
color name: colors.text
|
color name: colors.text
|
||||||
|
|
||||||
|
int avatarRadius: controls.avatar.radius
|
||||||
|
int collapsedAvatarRadius: controls.avatar.size / 2
|
||||||
|
|
||||||
room:
|
room:
|
||||||
real leftRoomOpacity: 0.65
|
real leftRoomOpacity: 0.65
|
||||||
|
|
||||||
color background: "transparent"
|
color background: "transparent"
|
||||||
color name: colors.text
|
color name: colors.text
|
||||||
color lastEventDate: colors.halfDimText
|
color lastEventDate: colors.halfDimText
|
||||||
|
|
||||||
color subtitle: colors.dimText
|
color subtitle: colors.dimText
|
||||||
color subtitleQuote: chat.message.quote
|
color subtitleQuote: chat.message.quote
|
||||||
|
|
||||||
|
int avatarRadius: controls.avatar.radius
|
||||||
|
int collapsedAvatarRadius: controls.avatar.radius
|
||||||
|
|
||||||
bottomBar:
|
bottomBar:
|
||||||
color background: colors.strongBackground
|
color background: colors.strongBackground
|
||||||
color settingsButtonBackground: "transparent"
|
color settingsButtonBackground: "transparent"
|
||||||
color filterFieldBackground: "transparent"
|
color filterFieldBackground: "transparent"
|
||||||
|
|
||||||
|
|
||||||
chat:
|
chat:
|
||||||
|
@ -326,8 +332,12 @@ chat:
|
||||||
message:
|
message:
|
||||||
int avatarSize: 58 * uiScale
|
int avatarSize: 58 * uiScale
|
||||||
int collapsedAvatarSize: 28 * uiScale
|
int collapsedAvatarSize: 28 * uiScale
|
||||||
|
int avatarRadius: controls.avatar.radius
|
||||||
|
|
||||||
|
int radius: theme.radius
|
||||||
|
int horizontalSpacing: theme.spacing / 1.25
|
||||||
|
int verticalSpacing: theme.spacing / 1.75
|
||||||
|
|
||||||
int radius: theme.radius
|
|
||||||
color background: colors.mediumBackground
|
color background: colors.mediumBackground
|
||||||
color ownBackground: colors.strongBackground
|
color ownBackground: colors.strongBackground
|
||||||
|
|
||||||
|
|
|
@ -274,24 +274,30 @@ mainPane:
|
||||||
color background: colors.mediumBackground
|
color background: colors.mediumBackground
|
||||||
|
|
||||||
account:
|
account:
|
||||||
real collapsedOpacity: 0.3
|
real collapsedOpacity: 0.3
|
||||||
color background: "transparent"
|
color background: "transparent"
|
||||||
color name: colors.text
|
color name: colors.text
|
||||||
|
|
||||||
|
int avatarRadius: controls.avatar.radius
|
||||||
|
int collapsedAvatarRadius: controls.avatar.size / 2
|
||||||
|
|
||||||
room:
|
room:
|
||||||
real leftRoomOpacity: 0.65
|
real leftRoomOpacity: 0.65
|
||||||
|
|
||||||
color background: "transparent"
|
color background: "transparent"
|
||||||
color name: colors.text
|
color name: colors.text
|
||||||
color lastEventDate: colors.halfDimText
|
color lastEventDate: colors.halfDimText
|
||||||
|
|
||||||
color subtitle: colors.dimText
|
color subtitle: colors.dimText
|
||||||
color subtitleQuote: chat.message.quote
|
color subtitleQuote: chat.message.quote
|
||||||
|
|
||||||
|
int avatarRadius: controls.avatar.radius
|
||||||
|
int collapsedAvatarRadius: controls.avatar.radius
|
||||||
|
|
||||||
bottomBar:
|
bottomBar:
|
||||||
color background: colors.strongBackground
|
color background: colors.strongBackground
|
||||||
color settingsButtonBackground: "transparent"
|
color settingsButtonBackground: "transparent"
|
||||||
color filterFieldBackground: "transparent"
|
color filterFieldBackground: "transparent"
|
||||||
|
|
||||||
|
|
||||||
chat:
|
chat:
|
||||||
|
@ -336,8 +342,12 @@ chat:
|
||||||
message:
|
message:
|
||||||
int avatarSize: 58 * uiScale
|
int avatarSize: 58 * uiScale
|
||||||
int collapsedAvatarSize: 28 * uiScale
|
int collapsedAvatarSize: 28 * uiScale
|
||||||
|
int avatarRadius: controls.avatar.radius
|
||||||
|
|
||||||
|
int radius: theme.radius
|
||||||
|
int horizontalSpacing: theme.spacing / 1.25
|
||||||
|
int verticalSpacing: theme.spacing / 1.75
|
||||||
|
|
||||||
int radius: theme.radius
|
|
||||||
color background: colors.mediumBackground
|
color background: colors.mediumBackground
|
||||||
color ownBackground: colors.strongBackground
|
color ownBackground: colors.strongBackground
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user