36
36
import org .pushingpixels .radiance .theming .api .colorscheme .ContainerColorTokensSingleColorQuery ;
37
37
import org .pushingpixels .radiance .theming .api .colorscheme .RadianceColorScheme ;
38
38
import org .pushingpixels .radiance .theming .api .painter .border .*;
39
+ import org .pushingpixels .radiance .theming .api .painter .decoration .FlatDecorationPainter ;
39
40
import org .pushingpixels .radiance .theming .api .painter .decoration .MatteDecorationPainter ;
40
41
import org .pushingpixels .radiance .theming .api .painter .fill .ClassicFillPainter ;
41
42
import org .pushingpixels .radiance .theming .api .painter .fill .ClassicTonalFillPainter ;
@@ -238,66 +239,27 @@ public NightShadeTonalSkin() {
238
239
this .registerDecorationAreaSchemeBundle (nightShadeDefaultBundle ,
239
240
RadianceThemingSlices .DecorationAreaType .NONE );
240
241
241
- // RadianceColorScheme2 marinerHeaderColorScheme = ColorSchemeUtils.getColorScheme(
242
- // /* palettesSource */ new ColorSchemeUtils.FidelityPaletteSource(
243
- // Hct.fromInt(0xFFF5D47A), Hct.fromInt(0xFF281D1E), Hct.fromInt(0xFF2C2021)),
244
- // /* activeStatesContainerType */ RadianceThemingSlices.ActiveContainerType.TONAL,
245
- // /* isDark */ true,
246
- // /* schemeColorResolver */ SchemeResolverUtils.getSchemeColorResolver());
247
- //
248
- // RadianceColorSchemeBundle2 marinerHeaderBundle =
249
- // new RadianceColorSchemeBundle2(marinerHeaderColorScheme);
250
- // // More saturated seed for controls in selected state
251
- // marinerHeaderBundle.registerActiveContainerTokens(marinerSelectedContainerTokens,
252
- // ComponentState.SELECTED);
253
- // // More saturated highlights
254
- // marinerHeaderBundle.registerActiveContainerTokens(
255
- // marinerSelectedContainerTokens,
256
- // RadianceThemingSlices.ContainerColorTokensAssociationKind.HIGHLIGHT,
257
- // ComponentState.getActiveStates());
258
- // // More muted separators
259
- // marinerHeaderBundle.registerEnabledContainerTokens(
260
- // ColorSchemeUtils.getContainerTokens(
261
- // /* seed */ Hct.fromInt(0xFF261D1E),
262
- // /* isFidelity */ true,
263
- // /* isDark */ true,
264
- // /* contrastLevel */ -0.7,
265
- // /* colorResolver */ PaletteResolverUtils.getPaletteTonalColorResolver().overlayWith(
266
- // PaletteContainerColorsResolverOverlay.builder()
267
- // //.containerOutline(DynamicPalette::getTonalContainerOutlineVariant)
268
- // .build())),
269
- // RadianceThemingSlices.ContainerColorTokensAssociationKind.SEPARATOR);
270
- // this.registerDecorationAreaSchemeBundle(marinerHeaderBundle,
271
- // ColorSchemeUtils.getExtendedContainerTokens(
272
- // /* seed */ Hct.fromInt(0xFF261D1E),
273
- // /* isFidelity */ true,
274
- // /* isDark */ true,
275
- // /* contrastLevel */ 1.0,
276
- // /* colorResolver */ PaletteResolverUtils.getPaletteTonalColorResolver().overlayWith(
277
- // PaletteContainerColorsResolverOverlay.builder()
278
- // .containerOutline(DynamicPalette::getTonalContainerOutlineVariant)
279
- // .build())),
280
- // RadianceThemingSlices.DecorationAreaType.PRIMARY_TITLE_PANE,
281
- // RadianceThemingSlices.DecorationAreaType.SECONDARY_TITLE_PANE,
282
- // RadianceThemingSlices.DecorationAreaType.HEADER);
283
- //
284
- // RadianceColorScheme2 marinerFooterColorScheme = ColorSchemeUtils.getColorScheme(
285
- // /* palettesSource */ new ColorSchemeUtils.FidelityPaletteSource(
286
- // Hct.fromInt(0xFFF6DD9D), Hct.fromInt(0xFFC5C4C2), Hct.fromInt(0xFFB9B7B9)),
287
- // /* activeStatesContainerType */ RadianceThemingSlices.ActiveContainerType.TONAL,
288
- // /* isDark */ false,
289
- // /* schemeColorResolver */ SchemeResolverUtils.getSchemeColorResolver());
290
- //
291
- // RadianceColorSchemeBundle2 marinerFooterBundle =
292
- // new RadianceColorSchemeBundle2(marinerFooterColorScheme);
293
- // this.registerDecorationAreaSchemeBundle(marinerFooterBundle,
294
- // ColorSchemeUtils.getExtendedContainerTokens(
295
- // /* seed */ Hct.fromInt(0xFFB9B7B9),
296
- // /* isFidelity */ true,
297
- // /* isDark */ false),
298
- // RadianceThemingSlices.DecorationAreaType.FOOTER,
299
- // RadianceThemingSlices.DecorationAreaType.TOOLBAR,
300
- // RadianceThemingSlices.DecorationAreaType.CONTROL_PANE);
242
+ // Toolbars, footers, control panes
243
+ this .registerAsDecorationArea (
244
+ ColorSchemeUtils .getExtendedContainerTokens (
245
+ /* seed */ Hct .fromInt (0xFF22252A ),
246
+ /* isFidelity */ true ,
247
+ /* isDark */ true ),
248
+ RadianceThemingSlices .DecorationAreaType .FOOTER ,
249
+ RadianceThemingSlices .DecorationAreaType .TOOLBAR ,
250
+ RadianceThemingSlices .DecorationAreaType .CONTROL_PANE );
251
+
252
+ // Headers
253
+ this .registerAsDecorationArea (
254
+ ColorSchemeUtils .getExtendedContainerTokens (
255
+ /* seed */ Hct .fromInt (0xFF22252A ),
256
+ /* isFidelity */ true ,
257
+ /* isDark */ true ,
258
+ /* contrastLevel */ 0.6f ,
259
+ /* colorResolver */ PaletteResolverUtils .getPaletteTonalColorResolver ()),
260
+ RadianceThemingSlices .DecorationAreaType .PRIMARY_TITLE_PANE ,
261
+ RadianceThemingSlices .DecorationAreaType .SECONDARY_TITLE_PANE ,
262
+ RadianceThemingSlices .DecorationAreaType .HEADER );
301
263
302
264
this .buttonShaper = new ClassicButtonShaper ();
303
265
this .fillPainter = new FractionBasedTonalFillPainter ("Night Shade" ,
@@ -307,7 +269,7 @@ public NightShadeTonalSkin() {
307
269
ContainerColorTokensSingleColorQuery .CONTAINER_SURFACE ,
308
270
ContainerColorTokensSingleColorQuery .CONTAINER_SURFACE });
309
271
310
- this .decorationPainter = new MatteDecorationPainter ();
272
+ this .decorationPainter = new FlatDecorationPainter ();
311
273
this .highlightFillPainter = new ClassicTonalFillPainter ();
312
274
313
275
this .borderPainter = new CompositeBorderPainter ("Night Shade" ,
@@ -326,10 +288,9 @@ public NightShadeTonalSkin() {
326
288
327
289
@ Override
328
290
void configureOverlayPainters () {
329
- // Add overlay painters to paint drop shadows along the bottom
330
- // edges of toolbars and footers
291
+ // Add overlay painters to paint drop shadows along the bottom edges of toolbars
331
292
this .addOverlayPainter (BottomShadowOverlayPainter .getInstance (100 ),
332
- RadianceThemingSlices .DecorationAreaType .TOOLBAR , RadianceThemingSlices . DecorationAreaType . FOOTER );
293
+ RadianceThemingSlices .DecorationAreaType .TOOLBAR );
333
294
334
295
// add an overlay painter to paint a dark line along the bottom
335
296
// edge of toolbars
@@ -343,7 +304,7 @@ void configureOverlayPainters() {
343
304
ContainerColorTokensSingleColorQuery .CONTAINER_OUTLINE_VARIANT ,
344
305
ContainerColorTokensSingleColorQuery .composite (
345
306
ContainerColorTokensSingleColorQuery .INVERSE_CONTAINER_OUTLINE ,
346
- ColorTransform .alpha (32 )));
307
+ ColorTransform .alpha (72 )));
347
308
this .addOverlayPainter (footerTopBezelOverlayPainter , RadianceThemingSlices .DecorationAreaType .FOOTER );
348
309
}
349
310
0 commit comments