You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
490B

  1. #pragma once
  2. #include "ui/common.hpp"
  3. namespace rack {
  4. struct MenuSeparator : MenuEntry {
  5. MenuSeparator() {
  6. box.size.y = BND_WIDGET_HEIGHT / 2;
  7. }
  8. void draw(NVGcontext *vg) override {
  9. nvgBeginPath(vg);
  10. const float margin = 8.0;
  11. nvgMoveTo(vg, margin, box.size.y / 2.0);
  12. nvgLineTo(vg, box.size.x - margin, box.size.y / 2.0);
  13. nvgStrokeWidth(vg, 1.0);
  14. nvgStrokeColor(vg, color::alpha(bndGetTheme()->menuTheme.textColor, 0.25));
  15. nvgStroke(vg);
  16. }
  17. };
  18. } // namespace rack