Make theme file closer to what it was in 0.4.3

This commit is contained in:
miruka 2020-05-13 08:24:53 -04:00
parent c1dd06559c
commit bd3c78a73a
9 changed files with 54 additions and 50 deletions

View File

@ -1,6 +1,8 @@
# TODO # TODO
- add account number binds - add account number binds
- revise pane collapse mode
- bring back account collapsing
- fix left rooms opacity - fix left rooms opacity
- fix escape keybinds (filter rooms, message selection) - fix escape keybinds (filter rooms, message selection)

View File

@ -7,7 +7,7 @@ import "../Base/HTile"
HTileDelegate { HTileDelegate {
id: account id: account
backgroundColor: theme.accountView.account.background backgroundColor: theme.mainPane.listView.account.background
leftPadding: theme.spacing leftPadding: theme.spacing
rightPadding: 0 // the "add chat" button has padding rightPadding: 0 // the "add chat" button has padding
@ -19,7 +19,7 @@ HTileDelegate {
userId: model.id userId: model.id
displayName: model.display_name displayName: model.display_name
mxc: model.avatar_url mxc: model.avatar_url
radius: 0 radius: theme.mainPane.listView.account.avatarRadius
compact: account.compact compact: account.compact
} }
@ -30,7 +30,7 @@ HTileDelegate {
utils.nameColor( utils.nameColor(
model.display_name || model.id.substring(1), model.display_name || model.id.substring(1),
) : ) :
theme.accountView.account.name theme.mainPane.listView.account.name
Behavior on color { HColorAnimation {} } Behavior on color { HColorAnimation {} }
} }

View File

@ -9,7 +9,7 @@ import "../Base/HTile"
Rectangle { Rectangle {
implicitHeight: accountList.count >= 2 ? accountList.contentHeight : 0 implicitHeight: accountList.count >= 2 ? accountList.contentHeight : 0
color: theme.accountsBar.accountList.background color: theme.mainPane.accountBar.background
property RoomList roomList property RoomList roomList
@ -48,7 +48,7 @@ Rectangle {
width: accountList.cellWidth width: accountList.cellWidth
height: accountList.cellHeight height: accountList.cellHeight
padded: false padded: false
backgroundColor: theme.accountsBar.accountList.account.background backgroundColor: theme.mainPane.accountBar.account.background
contentItem: Item { contentItem: Item {
id: tileContent id: tileContent
@ -61,7 +61,7 @@ Rectangle {
mxc: model.avatar_url mxc: model.avatar_url
// compact: tile.compact // compact: tile.compact
radius: theme.accountsBar.accountList.account.avatarRadius radius: theme.mainPane.accountBar.account.avatarRadius
} }
MessageIndicator { MessageIndicator {
@ -69,7 +69,7 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
indicatorTheme: indicatorTheme:
theme.accountView.account.unreadIndicator theme.mainPane.accountBar.account.unreadIndicator
unreads: model.total_unread unreads: model.total_unread
mentions: model.total_mentions mentions: model.total_mentions
} }
@ -107,8 +107,8 @@ Rectangle {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: theme.accountsBar.accountList.account.selectedBackground color: theme.mainPane.accountBar.account.selectedBackground
opacity: theme.accountsBar.accountList.account opacity: theme.mainPane.accountBar.account
.selectedBackgroundOpacity .selectedBackgroundOpacity
} }
@ -117,8 +117,8 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: parent.width width: parent.width
height: height:
theme.accountsBar.accountList.account.selectedBorderSize theme.mainPane.accountBar.account.selectedBorderSize
color: theme.accountsBar.accountList.account.selectedBorder color: theme.mainPane.accountBar.account.selectedBorder
} }
} }

View File

@ -50,7 +50,7 @@ Rectangle {
saveName: "roomFilterField" saveName: "roomFilterField"
placeholderText: qsTr("Filter rooms") placeholderText: qsTr("Filter rooms")
backgroundColor: theme.accountView.bottomBar.filterFieldBackground backgroundColor: theme.mainPane.bottomBar.filterFieldBackground
bordered: false bordered: false
opacity: width >= 16 * theme.uiScale ? 1 : 0 opacity: width >= 16 * theme.uiScale ? 1 : 0

View File

@ -7,7 +7,7 @@ import "../Base"
HDrawer { HDrawer {
id: mainPane id: mainPane
saveName: "mainPane" saveName: "mainPane"
background: theme.mainPane.background background: Rectangle { color: theme.mainPane.background }
minimumSize: theme.controls.avatar.size + theme.spacing * 2 minimumSize: theme.controls.avatar.size + theme.spacing * 2
readonly property alias accountsBar: accountsBar readonly property alias accountsBar: accountsBar

View File

@ -9,11 +9,11 @@ import "../Base/HTile"
HTileDelegate { HTileDelegate {
id: room id: room
backgroundColor: theme.accountView.roomList.room.background backgroundColor: theme.mainPane.listView.room.background
leftPadding: theme.spacing * 2 leftPadding: theme.spacing * 2
rightPadding: theme.spacing rightPadding: theme.spacing
opacity: opacity:
model.left ? theme.accountView.roomList.room.leftRoomOpacity : 1 model.left ? theme.mainPane.listView.room.leftRoomOpacity : 1
contentItem: ContentRow { contentItem: ContentRow {
tile: room tile: room
@ -24,7 +24,7 @@ HTileDelegate {
displayName: model.display_name displayName: model.display_name
mxc: model.avatar_url mxc: model.avatar_url
compact: room.compact compact: room.compact
radius: theme.accountView.roomList.room.avatarRadius radius: theme.mainPane.listView.room.avatarRadius
Behavior on radius { HNumberAnimation {} } Behavior on radius { HNumberAnimation {} }
} }
@ -35,12 +35,12 @@ HTileDelegate {
TitleLabel { TitleLabel {
text: model.display_name || qsTr("Empty room") text: model.display_name || qsTr("Empty room")
color: theme.accountView.roomList.room.name color: theme.mainPane.listView.room.name
} }
MessageIndicator { MessageIndicator {
indicatorTheme: indicatorTheme:
theme.accountView.roomList.room.unreadIndicator theme.mainPane.listView.room.unreadIndicator
unreads: model.unreads unreads: model.unreads
mentions: model.mentions mentions: model.mentions
} }
@ -58,7 +58,7 @@ HTileDelegate {
TitleRightInfoLabel { TitleRightInfoLabel {
tile: room tile: room
color: theme.accountView.roomList.room.lastEventDate color: theme.mainPane.listView.room.lastEventDate
text: { text: {
model.last_event_date < new Date(1) ? model.last_event_date < new Date(1) ?
"" : "" :
@ -80,7 +80,7 @@ HTileDelegate {
SubtitleLabel { SubtitleLabel {
tile: room tile: room
color: theme.accountView.roomList.room.subtitle color: theme.mainPane.listView.room.subtitle
textFormat: Text.StyledText textFormat: Text.StyledText
font.italic: font.italic:
lastEvent && lastEvent.event_type === "RoomMessageEmote" lastEvent && lastEvent.event_type === "RoomMessageEmote"
@ -103,7 +103,7 @@ HTileDelegate {
) + ": " + lastEvent.inline_content ) + ": " + lastEvent.inline_content
const subColor = const subColor =
theme.accountView.roomList.room.subtitleQuote theme.mainPane.listView.room.subtitleQuote
return text.replace( return text.replace(
/< *span +class=['"]?quote['"]? *>(.+?)<\/ *span *>/g, /< *span +class=['"]?quote['"]? *>(.+?)<\/ *span *>/g,

View File

@ -117,6 +117,6 @@ HListView {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
z: -100 z: -100
color: theme.accountView.roomList.background color: theme.mainPane.listView.background
} }
} }

View File

@ -7,7 +7,7 @@ import "../Base"
Rectangle { Rectangle {
clip: true clip: true
implicitHeight: theme.baseElementsHeight implicitHeight: theme.baseElementsHeight
color: theme.mainPaneTopBar.background color: theme.mainPane.topBar.background
HRowLayout { HRowLayout {
anchors.fill: parent anchors.fill: parent
@ -27,7 +27,7 @@ Rectangle {
text: qsTr("%1 %2") text: qsTr("%1 %2")
.arg(Qt.application.displayName).arg(Qt.application.version) .arg(Qt.application.displayName).arg(Qt.application.version)
label.color: theme.mainPaneTopBar.nameVersionLabel label.color: theme.mainPane.topBar.nameVersionLabel
toolTip.text: qsTr("Open project repository") toolTip.text: qsTr("Open project repository")
onClicked: onClicked:

View File

@ -43,12 +43,10 @@ colors:
real opacity: 0.7 real opacity: 0.7
color weakBackground: color weakBackground:
hsluv(hue, bgSaturation, intensity * 10, opacity) hsluv(hue, bgSaturation, intensity * 2.5, opacity)
color mediumBackground: color mediumBackground:
hsluv(hue, bgSaturation, intensity * 8, opacity) hsluv(hue, bgSaturation, intensity * 7, opacity)
color strongBackground: color strongBackground:
hsluv(hue, bgSaturation, intensity * 3, opacity)
color strongerBackground:
hsluv(hue, bgSaturation * 2, intensity, opacity) hsluv(hue, bgSaturation * 2, intensity, opacity)
color accentBackground: hsluv(hue, saturation, intensity * 40, 1) color accentBackground: hsluv(hue, saturation, intensity * 40, 1)
@ -273,16 +271,15 @@ ui:
// color gradientStartColor: hsluv(0, 0, 0, 0.5) // color gradientStartColor: hsluv(0, 0, 0, 0.5)
// color gradientEndColor: hsluv(0, 0, 0, 0.5) // color gradientEndColor: hsluv(0, 0, 0, 0.5)
mainPaneTopBar:
mainPane:
color background: "transparent"
topBar:
color background: colors.strongBackground color background: colors.strongBackground
color nameVersionLabel: colors.text color nameVersionLabel: colors.text
accountsBar: accountBar:
color everyRoomButtonBackground: colors.strongerBackground
color addAccountButtonBackground: colors.strongerBackground
color settingsButtonBackground: colors.strongerBackground
accountList:
color background: colors.mediumBackground color background: colors.mediumBackground
account: account:
@ -294,19 +291,21 @@ accountsBar:
color selectedBorder: colors.strongAccentElement color selectedBorder: colors.strongAccentElement
int selectedBorderSize: 2 int selectedBorderSize: 2
accountView:
account:
color background: "transparent"
color name: colors.text
unreadIndicator: unreadIndicator:
color background: colors.accentBackground color background: colors.accentBackground
color mentionBackground: colors.alertBackground color mentionBackground: colors.alertBackground
roomList: listView:
color background: colors.mediumBackground color background: colors.mediumBackground
account:
real collapsedOpacity: 0.3
color background: "transparent"
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
@ -318,12 +317,15 @@ accountView:
color subtitleQuote: chat.message.quote color subtitleQuote: chat.message.quote
int avatarRadius: controls.avatar.radius int avatarRadius: controls.avatar.radius
int collapsedAvatarRadius: controls.avatar.radius
unreadIndicator: unreadIndicator:
color background: colors.accentBackground color background: colors.accentBackground
color mentionBackground: colors.alertBackground color mentionBackground: colors.alertBackground
bottomBar: bottomBar:
color background: "transparent"
color settingsButtonBackground: colors.strongBackground
color filterFieldBackground: colors.strongBackground color filterFieldBackground: colors.strongBackground
@ -381,8 +383,8 @@ chat:
color focusedHighlight: colors.accentBackground color focusedHighlight: colors.accentBackground
real focusedHighlightOpacity: 0.4 real focusedHighlightOpacity: 0.4
color background: colors.mediumBackground color background: colors.weakBackground
color ownBackground: colors.strongBackground color ownBackground: colors.mediumBackground
color checkedBackground: colors.accentBackground color checkedBackground: colors.accentBackground
color body: colors.text color body: colors.text