Merge branch 'besh81-hotfix-1.6.2' into hotfix-1.6.2

This commit is contained in:
Jinhao 2018-12-20 07:10:04 +08:00
commit 1f8f991103
3 changed files with 8 additions and 3 deletions

View File

@ -163,7 +163,8 @@ namespace nana
bld_fgcolor = fgcolor.blend(highlighted, 0.6);
break;
case element_state::disabled:
bld_bgcolor = bld_fgcolor = static_cast<color_rgb>(0xb2b7bc);
bld_bgcolor = static_cast<color_rgb>(0xE0E0E0);
bld_fgcolor = static_cast<color_rgb>(0x999A9E);
break;
default:
//Leave things as they are

View File

@ -85,9 +85,13 @@ namespace nana{ namespace drawerbase
graph.text_metrics(txt_px, descent, ileading);
txt_px += (descent + 2);
auto e_state = API::element_state(*wdg);
if(!wdg->enabled())
e_state = element_state::disabled;
impl_->crook.draw(graph,
impl_->scheme_ptr->square_bgcolor.get(wdg->bgcolor()), impl_->scheme_ptr->square_border_color.get(wdg->fgcolor()),
rectangle(0, txt_px > 16 ? (txt_px - 16) / 2 : 0, 16, 16), API::element_state(*wdg));
rectangle(0, txt_px > 16 ? (txt_px - 16) / 2 : 0, 16, 16), e_state);
}
void drawer::mouse_down(graph_reference graph, const arg_mouse&)

View File

@ -2002,7 +2002,7 @@ namespace nana {
auto fgcolor = scheme_->foreground.get_color();
if (!API::window_enabled(window_))
fgcolor.blend(bgcolor, 0.5);
fgcolor.blend(bgcolor, 0.5); // do nothing !!! should be replace with <code> fgcolor = fgcolor.blend(bgcolor, 0.5); <\code> or removed
if (API::widget_borderless(window_))
graph_.rectangle(false, bgcolor);