Merge branch 'hotfix-1.5.6' into feature-listbox
This commit is contained in:
@@ -4735,12 +4735,12 @@ namespace nana
|
||||
|
||||
bool item_proxy::operator==(const std::string& s) const
|
||||
{
|
||||
return (text(pos_.item) == s);
|
||||
return (text(0) == s);
|
||||
}
|
||||
|
||||
bool item_proxy::operator==(const std::wstring& s) const
|
||||
{
|
||||
return (text(pos_.item) == to_utf8(s));
|
||||
return (text(0) == to_utf8(s));
|
||||
}
|
||||
|
||||
item_proxy & item_proxy::operator=(const item_proxy& rhs)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* A Progress Indicator Implementation
|
||||
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
||||
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -96,7 +96,11 @@ namespace nana
|
||||
{
|
||||
if (widget_)
|
||||
{
|
||||
auto value_px = (widget_->size().width - border_px * 2) * value_ / max_;
|
||||
auto value_px = (widget_->size().width - border_px * 2);
|
||||
|
||||
//avoid overflow
|
||||
if (value_ < max_)
|
||||
value_px = static_cast<unsigned>(value_px * (double(value_) / double(max_)));
|
||||
|
||||
if (value_px != value_px_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user