listbox:
Added header_fgcolor and item_highlighted to color scheme. menu: Added change_text function.
This commit is contained in:
@@ -3393,7 +3393,7 @@ namespace nana
|
||||
const auto border_color = essence_->scheme_ptr->header_bgcolor.get_color().blend(colors::black, 0.8);
|
||||
|
||||
int text_top = (r.height - essence_->scheme_ptr->text_height) / 2 + r.y;
|
||||
auto text_color = essence_->lister.wd_ptr()->fgcolor();
|
||||
auto text_color = essence_->scheme_ptr->header_fgcolor.get_color();
|
||||
|
||||
auto state = item_state::normal;
|
||||
//check whether grabing an item, if item_spliter_ != npos, that indicates the grab item is a spliter.
|
||||
@@ -3784,7 +3784,7 @@ namespace nana
|
||||
if (item.flags.selected)
|
||||
bgcolor = bgcolor.blend(colors::black, 0.98); // or "selected"
|
||||
else
|
||||
bgcolor = bgcolor.blend(essence_->scheme_ptr->item_selected, 0.7); /// \todo create a parametre for amount of blend
|
||||
bgcolor = bgcolor.blend(essence_->scheme_ptr->item_highlighted, 0.7); /// \todo create a parametre for amount of blend
|
||||
}
|
||||
|
||||
unsigned show_w = (std::min)(content_r.width, width - essence_->scroll.x_offset());
|
||||
|
||||
@@ -1158,6 +1158,11 @@ namespace nana
|
||||
impl_->mbuilder.data().items.at(index).image = img;
|
||||
}
|
||||
|
||||
void menu::change_text(std::size_t index, const std::string& text)
|
||||
{
|
||||
impl_->mbuilder.data().items.at(index).text = text;
|
||||
}
|
||||
|
||||
bool menu::link(std::size_t index, menu& menu_obj)
|
||||
{
|
||||
if(impl_->mbuilder.set_sub_menu(index, menu_obj.impl_->mbuilder.data()))
|
||||
|
||||
Reference in New Issue
Block a user