Merge branch 'patch-2' of https://github.com/qPCR4vir/nana into qPCR4vir-patch-2

This commit is contained in:
Jinhao
2019-08-05 04:02:04 +08:00
7 changed files with 144 additions and 63 deletions

View File

@@ -96,11 +96,11 @@ namespace nana
{
if (widget_)
{
auto value_px = (widget_->size().width - border_px * 2);
unsigned value_px = (widget_->size().width - border_px * 2);
//avoid overflow
if (unknown_ || (value_ < max_))
value_px = static_cast<unsigned>(value_px * (double(value_) / double(max_)));
value_px = unsigned(double(value_px) * (double(value_) / double(max_)));
if (value_px != value_px_)
{