-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds haze effect to app list and grid
This commit introduces a haze effect to the app list and grid items, enhancing the visual appeal of the launcher .
- Loading branch information
Showing
5 changed files
with
48 additions
and
20 deletions.
There are no files selected for viewing
16 changes: 15 additions & 1 deletion
16
app/src/main/java/tgo1014/gridlauncher/domain/usecases/wallpaper/Constants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
package tgo1014.gridlauncher.domain.usecases.wallpaper | ||
|
||
import android.content.Context | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.unit.dp | ||
import dev.chrisbanes.haze.HazeStyle | ||
import dev.chrisbanes.haze.HazeTint | ||
import java.io.File | ||
|
||
val Context.wallpaperFile: File | ||
get() = File(cacheDir, "wallpaper.png") | ||
|
||
val Context.wallpaperDarkFile: File | ||
get() = File(cacheDir, "wallpaperDark.png") | ||
get() = File(cacheDir, "wallpaperDark.png") | ||
|
||
|
||
val AppHazeStyle: HazeStyle | ||
@Composable get() = HazeStyle( | ||
backgroundColor = MaterialTheme.colorScheme.primary, | ||
tint = HazeTint.Color(MaterialTheme.colorScheme.primaryContainer.copy(0.3f)), | ||
blurRadius = 10.dp, | ||
noiseFactor = 0.02f | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters