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
524B

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