src/main/java/com/spinyowl/legui/theme/colored/def/FlatScrollablePanelTheme.java
@Override
  public void apply(T component) {
    super.apply(component);

    Vector4f bgc = ColorUtil.oppositeBlackOrWhite(settings.backgroundColor().mul(3))
        .add(settings.backgroundColor().mul(3)).div(4);
    component.getStyle().getBackground().setColor(bgc);

    Component viewport = component.getViewport();
    Themes.getDefaultTheme().apply(viewport);
    Themes.getDefaultTheme().applyAll(component.getVerticalScrollBar());
    Themes.getDefaultTheme().applyAll(component.getHorizontalScrollBar());
    viewport.getStyle().getBackground().setColor(ColorConstants.transparent());
    component.getContainer().getStyle().getBackground().setColor(new Vector4f(bgc));
    component.getViewport().getStyle().setBorder(null);
    component.getViewport().getStyle().setShadow(null);
  }
/**
   * Used to apply theme only for component and not apply for child components.
   *
   * @param component component to apply theme.
   */
Used to apply theme only for component and not apply for child components.
@param component component to apply theme.
Used to apply theme only for component and not apply for child components . @param component component to apply theme .
@Override
  public void apply(T component) {
    super.apply(component);
    Vector4f bgc = ColorUtil.oppositeBlackOrWhite(settings.backgroundColor().mul(3))
        .add(settings.backgroundColor().mul(3)).div(4);
    component.getStyle().getBackground().setColor(bgc);
    Component viewport = component.getViewport();
    Themes.getDefaultTheme().apply(viewport);
    Themes.getDefaultTheme().applyAll(component.getVerticalScrollBar());
    Themes.getDefaultTheme().applyAll(component.getHorizontalScrollBar());
    viewport.getStyle().getBackground().setColor(ColorConstants.transparent());
    component.getContainer().getStyle().getBackground().setColor(new Vector4f(bgc));
    component.getViewport().getStyle().setBorder(null);
    component.getViewport().getStyle().setShadow(null);
  }
@ Override public void apply ( T component ) { super . apply ( component ) ; Vector4f bgc = ColorUtil . oppositeBlackOrWhite ( settings . backgroundColor ( ) . mul ( 3 ) ) . add ( settings . backgroundColor ( ) . mul ( 3 ) ) . div ( 4 ) ; component . getStyle ( ) . getBackground ( ) . setColor ( bgc ) ; Component viewport = component . getViewport ( ) ; Themes . getDefaultTheme ( ) . apply ( viewport ) ; Themes . getDefaultTheme ( ) . applyAll ( component . getVerticalScrollBar ( ) ) ; Themes . getDefaultTheme ( ) . applyAll ( component . getHorizontalScrollBar ( ) ) ; viewport . getStyle ( ) . getBackground ( ) . setColor ( ColorConstants . transparent ( ) ) ; component . getContainer ( ) . getStyle ( ) . getBackground ( ) . setColor ( new Vector4f ( bgc ) ) ; component . getViewport ( ) . getStyle ( ) . setBorder ( null ) ; component . getViewport ( ) . getStyle ( ) . setShadow ( null ) ; }
Used to apply theme only for component and not apply for child components.
Used to apply theme only for component and not apply for child components .