Merge branch 'hotfix-1.6' into develop
This commit is contained in:
commit
03336210a5
@ -2757,6 +2757,17 @@ namespace nana
|
|||||||
unsigned es_lister::column_content_pixels(size_type pos) const
|
unsigned es_lister::column_content_pixels(size_type pos) const
|
||||||
{
|
{
|
||||||
unsigned max_px = 0;
|
unsigned max_px = 0;
|
||||||
|
|
||||||
|
std::unique_ptr<paint::graphics> graph_helper;
|
||||||
|
auto graph = ess_->graph;
|
||||||
|
if (graph->empty())
|
||||||
|
{
|
||||||
|
//Creates a helper if widget graph is empty(when its size is 0).
|
||||||
|
graph_helper.reset(new paint::graphics{ nana::size{ 5, 5 } });
|
||||||
|
graph_helper->typeface(ess_->graph->typeface());
|
||||||
|
graph = graph_helper.get();
|
||||||
|
}
|
||||||
|
|
||||||
for (auto & cat : categories_)
|
for (auto & cat : categories_)
|
||||||
{
|
{
|
||||||
for (std::size_t i = 0; i < cat.items.size(); ++i)
|
for (std::size_t i = 0; i < cat.items.size(); ++i)
|
||||||
@ -2768,14 +2779,14 @@ namespace nana
|
|||||||
if (pos >= model_cells.size())
|
if (pos >= model_cells.size())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
content_px = ess_->graph->text_extent_size(model_cells[pos].text).width;
|
content_px = graph->text_extent_size(model_cells[pos].text).width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (pos >= cat.items[i].cells->size())
|
if (pos >= cat.items[i].cells->size())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
content_px = ess_->graph->text_extent_size((*cat.items[i].cells)[pos].text).width;
|
content_px = graph->text_extent_size((*cat.items[i].cells)[pos].text).width;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (content_px > max_px)
|
if (content_px > max_px)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user