Cosmetics

This commit is contained in:
Bertrand Songis
2020-09-29 19:12:47 +02:00
parent e124360484
commit c16eb82122
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -31,7 +31,8 @@
constexpr WindowFlags ROLLER_SEPARATION_LINES = (FORM_FLAGS_LAST << 1u);
constexpr coord_t SCROLL_POSITION_INVALIDATED = INT_MIN;
class Roller: public Choice {
class Roller: public Choice
{
public:
Roller(FormGroup * parent, const rect_t & rect, const char * label, const char * const * values, int16_t vmin, int16_t vmax, std::function<int16_t()> getValue, std::function<void(int16_t)> setValue = nullptr, WindowFlags windowFlags = ROLLER_SEPARATION_LINES):
Choice(parent, rect, values, vmin, vmax, std::move(getValue), std::move(setValue), windowFlags | NO_SCROLLBAR)
@@ -144,15 +145,15 @@ class Roller: public Choice {
invalidateScrollPosition();
}
protected:
coord_t lastScrollPositionY = SCROLL_POSITION_INVALIDATED;
bool lastEditMode = false;
void invalidateScrollPosition()
{
lastScrollPositionY = SCROLL_POSITION_INVALIDATED;
}
protected:
coord_t lastScrollPositionY = SCROLL_POSITION_INVALIDATED;
bool lastEditMode = false;
void updateScrollPositionFromValue()
{
setScrollPositionY(ROLLER_LINE_HEIGHT * (getIndexFromValue(this->getValue()) - 1));
+1 -1
View File
@@ -347,7 +347,7 @@ class Window {
void detach();
bool deleted()
bool deleted() const
{
return _deleted;
}