MCPcopy Create free account
hub / github.com/VCVRack/Rack / step

Method step

src/app/RailWidget.cpp:39–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38
39void RailWidget::step() {
40 // Set rail SVG from theme
41 std::shared_ptr<window::Svg> railSvg;
42 if (settings::uiTheme == "light") {
43 railSvg = window::Svg::load(asset::system("res/ComponentLibrary/Rail-light.svg"));
44 }
45 else if (settings::uiTheme == "hcdark") {
46 railSvg = window::Svg::load(asset::system("res/ComponentLibrary/Rail-hcdark.svg"));
47 }
48 else {
49 // Dark
50 railSvg = window::Svg::load(asset::system("res/ComponentLibrary/Rail.svg"));
51 }
52
53 if (internal->railSw->svg != railSvg) {
54 internal->railSw->setSvg(railSvg);
55 internal->railFb->setDirty();
56 }
57
58 TransparentWidget::step();
59}
60
61
62void RailWidget::draw(const DrawArgs& args) {

Callers

nothing calls this directly

Calls 5

loadFunction · 0.85
systemFunction · 0.85
stepFunction · 0.85
setDirtyMethod · 0.80
setSvgMethod · 0.45

Tested by

no test coverage detected