Compare commits
4 Commits
5097e30a77
...
b4020438f9
| Author | SHA1 | Date | |
|---|---|---|---|
| b4020438f9 | |||
| 184ab20d11 | |||
| 6533533936 | |||
| ba9926af18 |
@@ -30,9 +30,10 @@ Singleton {
|
|||||||
readonly property alias wallLuminance: analyser.luminance
|
readonly property alias wallLuminance: analyser.luminance
|
||||||
|
|
||||||
function alterColor(c: color, a: real, layer: int): color {
|
function alterColor(c: color, a: real, layer: int): color {
|
||||||
const luminance = getLuminance(c);
|
const initLuminance = getLuminance(c);
|
||||||
|
const luminance = Math.max(initLuminance, 0.001);
|
||||||
|
|
||||||
const offset = (!light || layer == 1 ? 1 : -layer / 2) * (light ? 0.2 : 0.3) * (1 - transparency.base) * (1 + wallLuminance * (light ? (layer == 1 ? 3 : 1) : 2.5));
|
const offset = (!light || layer == 1 ? 1 : -layer / 2) * (light ? 0.2 : 0.3) * (0.2 + 0.3 * (1 - transparency.base)) * (1 + wallLuminance * (light ? (layer == 1 ? 3 : 1) : 2.5));
|
||||||
const scale = (luminance + offset) / luminance;
|
const scale = (luminance + offset) / luminance;
|
||||||
const r = Math.max(0, Math.min(1, c.r * scale));
|
const r = Math.max(0, Math.min(1, c.r * scale));
|
||||||
const g = Math.max(0, Math.min(1, c.g * scale));
|
const g = Math.max(0, Math.min(1, c.g * scale));
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ Item {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: searchBar.bottom
|
anchors.top: searchBar.bottom
|
||||||
anchors.topMargin: Appearance.spacing.smaller
|
anchors.topMargin: Appearance.spacing.smaller
|
||||||
color: DynamicColors.tPalette.m3surfaceContainer
|
color: DynamicColors.tPalette.m3surfaceContainerLowest
|
||||||
radius: Appearance.rounding.normal
|
radius: Appearance.rounding.normal
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
|
|||||||
Reference in New Issue
Block a user