some modifications

This commit is contained in:
Jinhao
2015-08-01 21:45:22 +08:00
parent 8bf35968ef
commit fff5926be5
7 changed files with 12 additions and 57 deletions

View File

@@ -84,16 +84,6 @@ namespace checkbox
return impl_;
}
/*
void drawer::_m_draw(graph_reference graph)
{
_m_draw_background(graph);
_m_draw_title(graph);
_m_draw_checkbox(graph, graph.text_extent_size(STR("jN"), 2).height + 2);
API::lazy_refresh();
}
*/
void drawer::_m_draw_background(graph_reference graph)
{
if(bground_mode::basic != API::effects_bground_mode(*widget_))

View File

@@ -325,9 +325,8 @@ namespace nana{ namespace widgets
pos.x = editor_._m_pixels_by_char(lnstr, pos.x) + editor_.text_area_.area.x;
int pos_y = static_cast<int>((pos.y - editor_.points_.offset.y) * editor_.line_height() + editor_._m_text_top_base());
int pos_x = static_cast<int>(pos.x - editor_.points_.offset.x);
return{ pos_x, pos_y };
return{ static_cast<int>(pos.x - editor_.points_.offset.x), pos_y };
}
nana::upoint screen_to_caret(point scrpos) override

View File

@@ -66,7 +66,7 @@ namespace nana
r.y = s.pos;
r.height = s.scale;
}
graph.round_rectangle(r, 3, 3, colors::black, true, {0xf0,0xf0,0xf0});
graph.round_rectangle(r, 3, 3, colors::black, true, static_cast<color_rgb>(0xf0f0f0));
}
};

View File

@@ -1253,13 +1253,14 @@ namespace nana
if(compset->comp_attribute(component::icon, attr))
{
const nana::paint::image * img = nullptr;
if(compset->item_attribute().mouse_pointed)
img = &(compset->item_attribute().icon_hover);
else if(compset->item_attribute().expended)
img = &(compset->item_attribute().icon_expanded);
auto & item_attr = compset->item_attribute();
if (item_attr.mouse_pointed)
img = &(item_attr.icon_hover);
else if (item_attr.expended)
img = &(item_attr.icon_expanded);
if((nullptr == img) || img->empty())
img = &(compset->item_attribute().icon_normal);
img = &(item_attr.icon_normal);
if(! img->empty())
{
@@ -1284,12 +1285,8 @@ namespace nana
{
comp_attribute_t attr;
if (compset->comp_attribute(component::text, attr))
{
graph.set_text_color(fgcolor_);
graph.string(point{ attr.area.x, attr.area.y + 3 }, compset->item_attribute().text);
}
graph.string(point{ attr.area.x, attr.area.y + 3 }, compset->item_attribute().text, fgcolor_);
}
private:
mutable facade<element::crook> crook_;
};