MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / valueForDrag

Function valueForDrag

pj_widgets/src/Scrollbar.cpp:38–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38long valueForDrag(long start_value, double delta_px, double track_len_px, long total) {
39 if (track_len_px <= 0.0) {
40 return start_value;
41 }
42 return start_value + static_cast<long>(std::llround((delta_px / track_len_px) * static_cast<double>(total)));
43}
44
45QColor defaultAccent(const QColor& window_color) {
46 // The app sets QPalette::Window per theme but not QPalette::Highlight, so we

Callers 2

eventFilterMethod · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68