Compare commits
2 Commits
master
...
work/carl/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fab2a81aee | ||
|
|
4daff26747 |
@@ -163,6 +163,23 @@ Kirigami.Page {
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||
Kirigami.Theme.inherit: false
|
||||
color: NeoChatConfig.compactLayout ? Kirigami.Theme.backgroundColor : "transparent"
|
||||
|
||||
Image {
|
||||
visible: !NeoChatConfig.compactLayout && !NeoChatConfig.blur
|
||||
source: "qrc:/qt/qml/org/kde/neochat/timeline/images/chat-page-background.svg"
|
||||
anchors.fill: parent
|
||||
fillMode: Image.Tile
|
||||
horizontalAlignment: Image.AlignLeft
|
||||
verticalAlignment: Image.AlignTop
|
||||
|
||||
function isDarkColor(background: color): bool {
|
||||
const temp = Qt.darker(background, 1);
|
||||
const darkness = 1 - (0.299 * temp.r + 0.587 * temp.g + 0.114 * temp.b);
|
||||
return temp.a > 0 && darkness >= 0.4;
|
||||
}
|
||||
|
||||
opacity: isDarkColor(Kirigami.Theme.backgroundColor) ? 0.2 : 1
|
||||
}
|
||||
}
|
||||
|
||||
footer: Loader {
|
||||
|
||||
@@ -79,6 +79,7 @@ ecm_add_qml_module(timeline GENERATE_PLUGIN_SOURCE
|
||||
images/transfer.svg
|
||||
images/wait.svg
|
||||
images/walk.svg
|
||||
images/chat-page-background.svg
|
||||
DEPENDENCIES
|
||||
QtQuick
|
||||
)
|
||||
|
||||
1
src/timeline/images/chat-page-background.svg
Normal file
1
src/timeline/images/chat-page-background.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.6 KiB |
3
src/timeline/images/chat-page-background.svg.license
Normal file
3
src/timeline/images/chat-page-background.svg.license
Normal file
@@ -0,0 +1,3 @@
|
||||
SPDX-FileCopyrightText: 2022 Raghavendra Kamath <raghu@raghukamath.com>
|
||||
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
Reference in New Issue
Block a user