various: moved more to core lib
This commit is contained in:
@@ -153,7 +153,7 @@ void TimeBasedWidget::UpdateMaximumScroll()
|
||||
rational length = (viewer_node_) ? viewer_node_->GetLength() : 0;
|
||||
|
||||
if (auto_max_scrollbar_) {
|
||||
scrollbar_->setMaximum(qMax(0, qCeil(TimeToScene(length)) - width()));
|
||||
scrollbar_->setMaximum(std::max(0, int(std::ceil(TimeToScene(length)) - width())));
|
||||
}
|
||||
|
||||
foreach (TimeBasedView* base, timeline_views_) {
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <QtMath>
|
||||
|
||||
#include "audio/audiovisualwaveform.h"
|
||||
#include "common/clamp.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
@@ -124,7 +123,7 @@ void TimeScaledObject::SetScale(const double& scale)
|
||||
{
|
||||
Q_ASSERT(scale > 0);
|
||||
|
||||
scale_ = clamp(scale, min_scale_, max_scale_);
|
||||
scale_ = std::clamp(scale, min_scale_, max_scale_);
|
||||
|
||||
ScaleChangedEvent(scale_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user