max / audiofiles
1 file changed,
+17 insertions,
-6 deletions
| @@ -150,6 +150,12 @@ | |||
| 150 | 150 | pub surface_overlay: Color32, | |
| 151 | 151 | pub surface_sunken: Color32, | |
| 152 | 152 | pub surface_raised: Color32, | |
| 153 | + | // The content surface cut into a raised one: what a list or a table body | |
| 154 | + | // sits in, so it reads as content in a container rather than as bands on a | |
| 155 | + | // panel. Derived by `makeover::resolve` from `surface-raised`, away from | |
| 156 | + | // resolved `content`, so it goes lighter on a light theme and darker on a | |
| 157 | + | // dark one. Nothing for a theme author to write. | |
| 158 | + | pub surface_well: Color32, | |
| 153 | 159 | // Foreground | |
| 154 | 160 | pub content: Color32, | |
| 155 | 161 | pub content_secondary: Color32, | |
| @@ -187,6 +193,7 @@ | |||
| 187 | 193 | surface_overlay: Color32::from_rgb(0xD4, 0xD4, 0xD4), | |
| 188 | 194 | surface_sunken: Color32::from_rgb(0xA8, 0xA8, 0xA8), | |
| 189 | 195 | surface_raised: Color32::from_rgb(0xDD, 0xDD, 0xDD), | |
| 196 | + | surface_well: Color32::from_rgb(0xF4, 0xF4, 0xF4), | |
| 190 | 197 | content: Color32::from_rgb(0x00, 0x00, 0x00), | |
| 191 | 198 | content_secondary: Color32::from_rgb(0x33, 0x33, 0x33), | |
| 192 | 199 | content_muted: Color32::from_rgb(0x80, 0x80, 0x80), | |
| @@ -347,24 +354,27 @@ | |||
| 347 | 354 | THEME.read().border | |
| 348 | 355 | } | |
| 349 | 356 | ||
| 357 | + | /// The inside of a well: a table body, a tag tree, a text field. | |
| 358 | + | pub fn surface_well() -> Color32 { | |
| 359 | + | THEME.read().surface_well | |
| 360 | + | } | |
| 361 | + | ||
| 350 | 362 | /// This app's resolved theme, as the palette `makeover-immediate` renders against. | |
| 351 | 363 | /// | |
| 352 | 364 | /// The whole makeover-to-renderer adapter, and deliberately a snapshot rather | |
| 353 | 365 | /// than a handle: it is six `Copy` colors read under one lock, so a caller | |
| 354 | 366 | /// painting several regions in a frame is not taking the lock per edge. | |
| 355 | 367 | /// | |
| 356 | - | /// `well` is `None` because `ThemeColors` has no `surface_well`: that intent is | |
| 357 | - | /// derived by makeover 2.3.0, which is bumped in-tree and unpublished, and this | |
| 358 | - | /// app is on 2.2.0. The renderer supplies `surface-page` in its place, which is | |
| 359 | - | /// exactly what [`super::widgets::inset_well`] filled by hand before, so the | |
| 360 | - | /// fallback is a transcription of current behaviour rather than a new choice. | |
| 368 | + | /// `well` carries a real colour now. It was `None` until makeover 2.3.0 was | |
| 369 | + | /// published, and `makeover-immediate` substituted the page in its place; that | |
| 370 | + | /// substitution is now the degraded path rather than the normal one. | |
| 361 | 371 | pub fn palette() -> makeover_immediate::Palette { | |
| 362 | 372 | let t = THEME.read(); | |
| 363 | 373 | makeover_immediate::Palette { | |
| 364 | 374 | page: t.surface_page, | |
| 365 | 375 | raised: t.surface_raised, | |
| 366 | 376 | overlay: t.surface_overlay, | |
| 367 | - | well: None, | |
| 377 | + | well: Some(t.surface_well), | |
| 368 | 378 | bevel_light: t.bevel_light, | |
| 369 | 379 | bevel_dark: t.bevel_dark, | |
| 370 | 380 | } | |
| @@ -652,6 +662,7 @@ | |||
| 652 | 662 | surface_overlay: c("surface-overlay", Color32::BLACK), | |
| 653 | 663 | surface_sunken: c("surface-sunken", Color32::BLACK), | |
| 654 | 664 | surface_raised: c("surface-raised", Color32::BLACK), | |
| 665 | + | surface_well: c("surface-well", Color32::BLACK), | |
| 655 | 666 | content: c("content", Color32::WHITE), | |
| 656 | 667 | content_secondary: c("content-secondary", Color32::WHITE), | |
| 657 | 668 | content_muted: c("content-muted", Color32::GRAY), |