Merge branch 'hotfix-1.5.6' into feature-listbox
This commit is contained in:
@@ -208,8 +208,8 @@ namespace nana{
|
||||
outter[field_title] << impl_->caption;
|
||||
outter.collocate();
|
||||
|
||||
impl_->caption.transparent(true);
|
||||
color pbg = API::bgcolor(this->parent());
|
||||
|
||||
impl_->caption.bgcolor(pbg.blend(colors::black, 0.025));
|
||||
|
||||
this->bgcolor(pbg.blend(colors::black, 0.05));
|
||||
@@ -222,10 +222,27 @@ namespace nana{
|
||||
auto gap_px = impl_->gap - 1;
|
||||
|
||||
graph.rectangle(true, API::bgcolor(this->parent()));
|
||||
graph.round_rectangle(rectangle(point(gap_px, impl_->caption_dimension.height / 2),
|
||||
nana::size(graph.width() - 2 * gap_px, graph.height() - impl_->caption_dimension.height / 2 - gap_px)
|
||||
|
||||
auto const top_round_line = static_cast<int>(impl_->caption_dimension.height) / 2;
|
||||
|
||||
graph.round_rectangle(rectangle(point(gap_px, top_round_line),
|
||||
nana::size(graph.width() - 2 * gap_px, graph.height() - top_round_line - gap_px)
|
||||
),
|
||||
3, 3, colors::gray_border, true, this->bgcolor());
|
||||
|
||||
auto opt_r = API::window_rectangle(impl_->caption);
|
||||
if (opt_r)
|
||||
{
|
||||
rectangle grad_r{ opt_r->position(), nana::size{ opt_r->width, static_cast<unsigned>(top_round_line - opt_r->y) } };
|
||||
|
||||
grad_r.y += top_round_line*2 / 3;
|
||||
grad_r.x -= 2;
|
||||
grad_r.width += 4;
|
||||
|
||||
graph.gradual_rectangle(grad_r,
|
||||
API::bgcolor(this->parent()), this->bgcolor(), true
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* A List Box Implementation
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* 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
|
||||
@@ -1595,7 +1595,7 @@ namespace nana
|
||||
return pairs;
|
||||
}
|
||||
|
||||
bool select_for_all(bool sel, const index_pair& except = index_pair{npos, npos})
|
||||
bool select_for_all(bool sel, const index_pair& except_abs = index_pair{npos, npos})
|
||||
{
|
||||
bool changed = false;
|
||||
index_pair pos;
|
||||
@@ -1604,7 +1604,7 @@ namespace nana
|
||||
pos.item = 0;
|
||||
for(auto & m : cat.items)
|
||||
{
|
||||
if (except != pos)
|
||||
if (except_abs != pos)
|
||||
{
|
||||
if (m.flags.selected != sel)
|
||||
{
|
||||
@@ -4223,12 +4223,12 @@ namespace nana
|
||||
//Unselects all selected items if the current item is not selected before selecting.
|
||||
auto selected = lister.pick_items(true);
|
||||
if (selected.cend() == std::find(selected.cbegin(), selected.cend(), item_pos))
|
||||
lister.select_for_all(false, item_pos);
|
||||
lister.select_for_all(false, abs_item_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Unselects all selected items except current item if right button clicked.
|
||||
lister.select_for_all(false, item_pos); //cancel all selections
|
||||
lister.select_for_all(false, abs_item_pos); //cancel all selections
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5231,7 +5231,8 @@ namespace nana
|
||||
cat_->make_sort_order();
|
||||
ess_->lister.sort();
|
||||
|
||||
ess_->update(true);
|
||||
//Don't ignore the auto-draw flag for performance enhancement.
|
||||
ess_->update();
|
||||
}
|
||||
}
|
||||
//end class cat_proxy
|
||||
|
||||
Reference in New Issue
Block a user