Skip to content

Add a theme configuration for the pre-built screens - #16

Merged
skydoves merged 1 commit into
mainfrom
feature/custom-theme-api
Sep 16, 2026
Merged

skydoves merged 1 commit into
mainfrom
feature/custom-theme-api

Conversation

@skydoves

Copy link
Copy Markdown
Owner

The built-in ExceptionTraceActivity wrapped its content in SnitcherTheme with the defaults, so restyling it meant replacing the whole activity.
Snitcher.install now takes a SnitcherThemeConfig that carries the light and dark SnitcherColor, a new SnitcherTypography, and a new SnitcherShapes, and SnitcherTheme defaults to it so your own screens share the same theme.
Colors left unspecified follow the color they belong to, so copy(primary = Color.Red) restyles the title, the labels, the buttons, and the stack trace border together.
Stacked on #15.

@skydoves
skydoves force-pushed the fix/crash-screen-bugs branch from e5ca00a to ae06569 Compare September 16, 2026 12:33
- SnitcherThemeConfig carries the light and dark colors, the typography, and
  the shapes, and both Snitcher.install overloads take it, so the built-in
  trace activity can be restyled without replacing the activity
- SnitcherColor gains onPrimary, textLowEmphasis, and outline, and the colors
  that are left unspecified follow the color they belong to
- SnitcherTypography and SnitcherShapes replace the hard-coded text styles and
  corner shapes of the screens
- SnitcherTheme takes the new pieces, and its defaults come from the installed
  configuration, so custom screens share the same theme
@skydoves
skydoves force-pushed the feature/custom-theme-api branch from f4820fb to 32de5be Compare September 16, 2026 12:33
Base automatically changed from fix/crash-screen-bugs to main September 16, 2026 12:39
@skydoves
skydoves merged commit ffcb222 into main Sep 16, 2026
@skydoves
skydoves deleted the feature/custom-theme-api branch September 16, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant