Opened 6 years ago
Last modified 6 years ago
#14575 new bug
BSlider label value set issues at min.
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
I noticed this through the DriveSetup app.
- Create a new partition.
- Slide the size to the right (max)
- Take note of the size in the text box and label. (correct)
- Slide the size down to 0.
- The TextControl is the correct size (0) while the label at the top is a random size.
- Sliding over and over to the minimum results in a wide range of numbers as the "minimum" size.
During the slide, Size() in Support.cpp SizeSlider is equal to the random number. SetSize however is equal to the correct "0" value at min.
What's odd is the max value seems to work consistently.
You can also reproduce this by:
- Drag slider to minimum position and release
- Note the Partition Size of != 0 bytes
- Click on the slider half way through the bar.. the Partition Size jumps to 0 bytes while the size text box jumps to the correct size.
Change History (3)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|---|
Summary: | BSlider order of operations issue when value 0 → BSlider label value set issues at min. |
comment:2 by , 6 years ago
comment:3 by , 6 years ago
I (git) blame stippi :-)
https://git.haiku-os.org/haiku/commit/src/kits/interface/Slider.cpp?id=1ae794159
Note:
See TracTickets
for help on using tickets.
Ok.. It looks like BSlider::UpdateTextChanged might be at fault.
The logic is all really sketchy, but i think text updates aren't occurring at the proper times. This would explain the Partition Size being "one update behind" in the second example to reproduce.
BSlider::UpdateTextChanged has some really sketchy logic which determines of UpdateText changes based on width of the string :-|