fix disabled checkbox square
disabled checkbox square now looks like disabled textbox In addition found an unused instruction in text_editor.cpp: could be replaced or removed (or left as it is :) )
This commit is contained in:
parent
232c7ce7e5
commit
36095c9190
@ -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
|
||||
|
@ -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&)
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user