commit db54afbbf46fada6a89d662dc56d6d7f426e4393
parent a8aa58f36501f0fa74ef6df8badde454178038f1
Author: falkTX <falktx@gmail.com>
Date: Fri, 23 May 2014 00:19:29 +0100
Misc fixing
Diffstat:
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/dgl/Widget.hpp b/dgl/Widget.hpp
@@ -97,7 +97,7 @@ public:
/**
Mouse motion event.
- @param x The widget-relative coordinates of the pointer.
+ @param pos The widget-relative coordinates of the pointer.
@see onMotion
*/
struct MotionEvent : BaseEvent {
@@ -106,8 +106,8 @@ public:
/**
Mouse scroll event.
- @param pos The scroll distance.
- @param dir The scroll direction.
+ @param pos The widget-relative coordinates of the pointer.
+ @param delta The scroll distance.
@see onScroll
*/
struct ScrollEvent : BaseEvent {
@@ -117,8 +117,8 @@ public:
/**
Resize event.
- @param size The new widget size
- @param oldSize The previous size, may be null
+ @param size The new widget size.
+ @param oldSize The previous size, may be null.
@see onResize
*/
struct ResizeEvent {
diff --git a/dgl/src/ImageKnob.cpp b/dgl/src/ImageKnob.cpp
@@ -135,6 +135,8 @@ void ImageKnob::setDefault(float value) noexcept
void ImageKnob::setRange(float min, float max) noexcept
{
+ DISTRHO_SAFE_ASSERT_RETURN(max > min,);
+
if (fValue < min)
{
fValue = min;
@@ -160,6 +162,11 @@ void ImageKnob::setRange(float min, float max) noexcept
}
}
+ if (fValueDef < min)
+ fValueDef = min;
+ else if (fValueDef > max)
+ fValueDef = max;
+
fMinimum = min;
fMaximum = max;
}
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp
@@ -681,9 +681,9 @@ struct Window::PrivateData {
return;
Widget::ScrollEvent ev;
- ev._ = Point<float>(dx, dy);
- ev.mod = static_cast<Modifier>(puglGetModifiers(fView));
- ev.time = puglGetEventTimestamp(fView);
+ ev.delta = Point<float>(dx, dy);
+ ev.mod = static_cast<Modifier>(puglGetModifiers(fView));
+ ev.time = puglGetEventTimestamp(fView);
FOR_EACH_WIDGET_INV(rit)
{