Restore icon colors
This commit is contained in:
parent
4bee87ed5d
commit
6cda69ad67
5
TODO.md
5
TODO.md
|
@ -3,8 +3,7 @@
|
||||||
|
|
||||||
- Theming
|
- Theming
|
||||||
- File format
|
- File format
|
||||||
- Make all icon SVG files white/black, since we can now use ColorOverlay
|
- Gray colored buttons when disabled
|
||||||
- Gray colored buttons when disabled
|
|
||||||
- Make the icon blue in EditAccount when hovering and no avatar set
|
- Make the icon blue in EditAccount when hovering and no avatar set
|
||||||
- Remove the filled theme
|
- Remove the filled theme
|
||||||
- Have a default background
|
- Have a default background
|
||||||
|
@ -89,7 +88,7 @@
|
||||||
|
|
||||||
- Theming
|
- Theming
|
||||||
- Distribute fonts
|
- Distribute fonts
|
||||||
- preferredIconPack: accept multiple values
|
- icons.preferredPack: accept multiple values
|
||||||
- Find icon packs in user data dir
|
- Find icon packs in user data dir
|
||||||
- Correctly implement uiScale/fontScale + ctrl+-= keys
|
- Correctly implement uiScale/fontScale + ctrl+-= keys
|
||||||
- See `QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling)`
|
- See `QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling)`
|
||||||
|
|
|
@ -78,6 +78,16 @@ Rectangle {
|
||||||
id: button
|
id: button
|
||||||
text: modelData.text
|
text: modelData.text
|
||||||
icon.name: modelData.iconName || ""
|
icon.name: modelData.iconName || ""
|
||||||
|
icon.color: modelData.iconColor || (
|
||||||
|
name == "ok" || name == "apply" || name == "retry" ?
|
||||||
|
theme.colors.positiveBackground :
|
||||||
|
|
||||||
|
name == "cancel" ?
|
||||||
|
theme.colors.negativeBackground :
|
||||||
|
|
||||||
|
theme.icons.colorize
|
||||||
|
)
|
||||||
|
|
||||||
enabled: (modelData.enabled == undefined ?
|
enabled: (modelData.enabled == undefined ?
|
||||||
true : modelData.enabled) &&
|
true : modelData.enabled) &&
|
||||||
! button.loading
|
! button.loading
|
||||||
|
|
|
@ -73,6 +73,7 @@ Rectangle {
|
||||||
id: button
|
id: button
|
||||||
text: modelData.text
|
text: modelData.text
|
||||||
icon.name: modelData.iconName
|
icon.name: modelData.iconName
|
||||||
|
icon.color: modelData.iconColor || theme.icons.colorize
|
||||||
onClicked: buttonCallbacks[modelData.name](button)
|
onClicked: buttonCallbacks[modelData.name](button)
|
||||||
|
|
||||||
Layout.preferredHeight: theme.baseElementsHeight
|
Layout.preferredHeight: theme.baseElementsHeight
|
||||||
|
|
|
@ -22,11 +22,13 @@ Banner {
|
||||||
name: "accept",
|
name: "accept",
|
||||||
text: qsTr("Join"),
|
text: qsTr("Join"),
|
||||||
iconName: "invite-accept",
|
iconName: "invite-accept",
|
||||||
|
iconColor: theme.colors.positiveBackground
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "decline",
|
name: "decline",
|
||||||
text: qsTr("Decline"),
|
text: qsTr("Decline"),
|
||||||
iconName: "invite-decline",
|
iconName: "invite-decline",
|
||||||
|
iconColor: theme.colors.negativeBackground
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ Banner {
|
||||||
name: "forget",
|
name: "forget",
|
||||||
text: qsTr("Forget"),
|
text: qsTr("Forget"),
|
||||||
iconName: "room-forget",
|
iconName: "room-forget",
|
||||||
|
iconColor: theme.colors.negativeBackground
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -183,6 +183,7 @@ HGridLayout {
|
||||||
|
|
||||||
id: saveButton
|
id: saveButton
|
||||||
icon.name: "apply"
|
icon.name: "apply"
|
||||||
|
icon.color: theme.colors.positiveBackground
|
||||||
text: qsTr("Apply")
|
text: qsTr("Apply")
|
||||||
loading: nameChangeRunning || avatarChangeRunning
|
loading: nameChangeRunning || avatarChangeRunning
|
||||||
enabled:
|
enabled:
|
||||||
|
@ -195,6 +196,7 @@ HGridLayout {
|
||||||
|
|
||||||
HButton {
|
HButton {
|
||||||
icon.name: "cancel"
|
icon.name: "cancel"
|
||||||
|
icon.color: theme.colors.negativeBackground
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Cancel")
|
||||||
enabled: saveButton.enabled && ! saveButton.loading
|
enabled: saveButton.enabled && ! saveButton.loading
|
||||||
onClicked: cancelChanges()
|
onClicked: cancelChanges()
|
||||||
|
|
|
@ -81,6 +81,7 @@ HTileDelegate {
|
||||||
contextMenu: HMenu {
|
contextMenu: HMenu {
|
||||||
HMenuItem {
|
HMenuItem {
|
||||||
icon.name: "logout"
|
icon.name: "logout"
|
||||||
|
icon.color: theme.colors.negativeBackground
|
||||||
text: qsTr("Logout")
|
text: qsTr("Logout")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
disconnecting = true
|
disconnecting = true
|
||||||
|
|
|
@ -41,6 +41,7 @@ HTileDelegate {
|
||||||
|
|
||||||
additionalInfo.children: HIcon {
|
additionalInfo.children: HIcon {
|
||||||
svgName: "invite-received"
|
svgName: "invite-received"
|
||||||
|
colorize: theme.colors.alertBackground
|
||||||
|
|
||||||
visible: Layout.maximumWidth > 0
|
visible: Layout.maximumWidth > 0
|
||||||
Layout.maximumWidth: invited ? implicitWidth : 0
|
Layout.maximumWidth: invited ? implicitWidth : 0
|
||||||
|
@ -82,6 +83,7 @@ HTileDelegate {
|
||||||
HMenuItem {
|
HMenuItem {
|
||||||
visible: invited
|
visible: invited
|
||||||
icon.name: "invite-accept"
|
icon.name: "invite-accept"
|
||||||
|
icon.color: theme.colors.positiveBackground
|
||||||
text: qsTr("Accept %1's invite").arg(Utils.coloredNameHtml(
|
text: qsTr("Accept %1's invite").arg(Utils.coloredNameHtml(
|
||||||
model.data.inviter_name, model.data.inviter_id
|
model.data.inviter_name, model.data.inviter_id
|
||||||
))
|
))
|
||||||
|
@ -95,6 +97,7 @@ HTileDelegate {
|
||||||
HMenuItem {
|
HMenuItem {
|
||||||
visible: ! model.data.left
|
visible: ! model.data.left
|
||||||
icon.name: invited ? "invite-decline" : "room-leave"
|
icon.name: invited ? "invite-decline" : "room-leave"
|
||||||
|
icon.color: theme.colors.negativeBackground
|
||||||
text: invited ? qsTr("Decline invite") : qsTr("Leave")
|
text: invited ? qsTr("Decline invite") : qsTr("Leave")
|
||||||
|
|
||||||
onTriggered: py.callClientCoro(
|
onTriggered: py.callClientCoro(
|
||||||
|
@ -104,6 +107,7 @@ HTileDelegate {
|
||||||
|
|
||||||
HMenuItem {
|
HMenuItem {
|
||||||
icon.name: "room-forget"
|
icon.name: "room-forget"
|
||||||
|
icon.color: theme.colors.negativeBackground
|
||||||
text: qsTr("Forget")
|
text: qsTr("Forget")
|
||||||
|
|
||||||
onTriggered: py.callClientCoro(
|
onTriggered: py.callClientCoro(
|
||||||
|
|
|
@ -61,6 +61,10 @@ colors:
|
||||||
color negativeBackground:
|
color negativeBackground:
|
||||||
hsluv(0, saturation * 2.25, intensity * 52, Math.max(0.6, opacity))
|
hsluv(0, saturation * 2.25, intensity * 52, Math.max(0.6, opacity))
|
||||||
|
|
||||||
|
color alertBackground:
|
||||||
|
hsluv(0, saturation * 2.25, intensity * 52, Math.max(0.6, opacity))
|
||||||
|
|
||||||
|
|
||||||
color brightText: hsluv(0, 0, intensity * 100)
|
color brightText: hsluv(0, 0, intensity * 100)
|
||||||
color text: hsluv(0, 0, intensity * 80)
|
color text: hsluv(0, 0, intensity * 80)
|
||||||
color halfDimText: hsluv(0, 0, intensity * 70)
|
color halfDimText: hsluv(0, 0, intensity * 70)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user