Merge branch 'develop' into prepare-utf8

This commit is contained in:
Jinhao
2016-01-03 14:18:03 +08:00
13 changed files with 522 additions and 108 deletions

View File

@@ -58,12 +58,12 @@ namespace nana
cell::cell(std::string text, const format& fmt)
: text(std::move(text)),
custom_format(new format{ fmt }) //make_unique
custom_format(std::make_unique<format>( fmt )) // or custom_format(new format{ fmt })
{}
cell::cell(std::string text, const ::nana::color& bgcolor, const ::nana::color& fgcolor)
: text(std::move(text)),
custom_format{ new format{ bgcolor, fgcolor } } //make_unique
custom_format{std::make_unique<format>( bgcolor, fgcolor ) } //custom_format{ new format{ bgcolor, fgcolor } }
{}
cell& cell::operator=(const cell& rhs)

View File

@@ -528,17 +528,16 @@ namespace nana
auto index = state_.active;
for (auto & m : menu_->items)
{
if (0 == index--)
break;
if (m.flags.splitter)
{
pos.y += 2;
continue;
}
if (0 == index)
break;
pos.y += _m_item_height() + 1;
--index;
}
tmstamp = state_.active_timestamp;