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.

25 lines
484B

  1. #include "ui.hpp"
  2. #include "window.hpp"
  3. #include "color.hpp"
  4. namespace rack {
  5. MenuSeparator::MenuSeparator() {
  6. box.size.y = BND_WIDGET_HEIGHT / 2;
  7. }
  8. void MenuSeparator::draw(NVGcontext *vg) {
  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. } // namespace rack