docs: private void resize() {
          width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
          height = getHeight() - getInsets().getTop() - getInsets().getBottom();
          size   = width < height ? width : height;
  
          if (aspectRatio * width > height) {
              width = 1 / (aspectRatio / height);
          } else if (1 / (aspectRatio / height) > width) {
              height = aspectRatio * width;
          }
  
          if (width > 0 && height > 0) {
              pane.setMaxSize(width, height);
              pane.setPrefSize(width, height);
              pane.relocate((getWidth() - width) * 0.5, (getHeight() - height) * 0.5);
  
              shadow.setRadius(width * 0.012);
  
              switchBorder.setWidth(width);
              switchBorder.setHeight(height);
              switchBorder.setArcWidth(height);
              switchBorder.setArcHeight(height);
              switchBorder.relocate((width - switchBorder.getWidth()) * 0.5, (height - switchBorder.getHeight()) * 0.5);
  
              switchBackground.setWidth(width * 0.95505618);
              switchBackground.setHeight(height * 0.90909091);
              switchBackground.setArcWidth(height * 0.90909091);
              switchBackground.setArcHeight(height * 0.90909091);
              switchBackground.relocate((width - switchBackground.getWidth()) * 0.5, (height - switchBackground.getHeight()) * 0.5);
  
              thumb.setRadius(height * 0.40909091);
              thumb.setCenterX(isActive() ? width - thumb.getRadius() - height * 0.1 : thumb.getRadius() + height * 0.1);
              thumb.setCenterY(height * 0.5);
  
              redraw();
          }
      }