Browse Source

Use percentage unit for cable tension slider in View menu bar.

tags/v2.0.4
Andrew Belt 2 years ago
parent
commit
947d5bc16e
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      src/app/MenuBar.cpp

+ 8
- 2
src/app/MenuBar.cpp View File

@@ -254,11 +254,17 @@ struct CableTensionQuantity : Quantity {
float getDefaultValue() override {
return 0.5;
}
float getDisplayValue() override {
return getValue() * 100;
}
void setDisplayValue(float displayValue) override {
setValue(displayValue / 100);
}
std::string getLabel() override {
return "Cable tension";
}
int getDisplayPrecision() override {
return 2;
std::string getUnit() override {
return "%";
}
};
struct CableTensionSlider : ui::Slider {


Loading…
Cancel
Save