First round of BSlider fixes to be more layout friendly:
* Improve the minimum size calculation and cache it. * Invalidate the layout on various property changes that require it. Vertical BSliders are very broken... that's up next. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26441 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -145,6 +145,12 @@ class BSlider : public BControl {
|
||||
|
||||
virtual void SetLimits(int32 minimum, int32 maximum);
|
||||
|
||||
virtual void InvalidateLayout(bool descendants = false);
|
||||
|
||||
virtual BSize MinSize();
|
||||
virtual BSize MaxSize();
|
||||
virtual BSize PreferredSize();
|
||||
|
||||
private:
|
||||
void _DrawBlockThumb();
|
||||
void _DrawTriangleThumb();
|
||||
@@ -156,6 +162,8 @@ class BSlider : public BControl {
|
||||
float _MaxPosition() const;
|
||||
bool _ConstrainPoint(BPoint& point, BPoint compare) const;
|
||||
|
||||
BSize _ValidateMinSize();
|
||||
|
||||
virtual void _ReservedSlider5();
|
||||
virtual void _ReservedSlider6();
|
||||
virtual void _ReservedSlider7();
|
||||
@@ -201,10 +209,12 @@ class BSlider : public BControl {
|
||||
orientation fOrientation;
|
||||
float fBarThickness;
|
||||
|
||||
BSize fMinSize;
|
||||
|
||||
#if USE_OFF_SCREEN_VIEW
|
||||
uint32 _reserved[7];
|
||||
uint32 _reserved[5];
|
||||
#else
|
||||
uint32 _reserved[9];
|
||||
uint32 _reserved[7];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user