ChannelSlider now sends notifications while being dragged, thus allowing the volume to be manipulated in realtime from the media prefs, rather than on mouseup only. Fixes ticket #3338.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29151 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2009-02-07 16:55:13 +00:00
parent e7a0fd93e2
commit 310177b43e
2 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ virtual void _Reserved_BChannelSlider_7(void* , ...);
uint32 _reserved_[12];
void _InitData();
void _FinishChange();
void _FinishChange(bool update = false);
void _UpdateFontDimens();
void _DrawThumbs();
void _DrawGrooveFrame(BView* where, const BRect& area);
+9 -4
View File
@@ -677,7 +677,7 @@ BChannelSlider::_InitData()
void
BChannelSlider::_FinishChange()
BChannelSlider::_FinishChange(bool update)
{
if (fInitialValues != NULL) {
bool *inMask = NULL;
@@ -690,11 +690,13 @@ BChannelSlider::_FinishChange()
inMask[fCurrentChannel] = true;
}
}
InvokeChannel(NULL, 0, numChannels, inMask);
InvokeChannel(update ? NULL : ModificationMessage(), 0, numChannels, inMask);
}
SetTracking(false);
_Redraw();
if (!update) {
SetTracking(false);
_Redraw();
}
}
@@ -863,6 +865,9 @@ BChannelSlider::_MouseMovedCommon(BPoint point, BPoint point2)
else
SetValueFor(fCurrentChannel, value);
if (ModificationMessage())
_FinishChange(true);
_DrawThumbs();
}