dock_pane and toolbar bug fix

fixed bug in dock_pane caption drawing function (used a workaround that hide the caption when the dock_pane width become too small)
fixed small bug in toolbar
This commit is contained in:
besh81 2019-09-05 17:37:40 +02:00
parent e6b0332bad
commit 4dd1c0c7ef
2 changed files with 4 additions and 1 deletions

View File

@ -146,6 +146,7 @@ namespace nana
//draw caption //draw caption
auto text = to_wstring(API::window_caption(window_handle_)); auto text = to_wstring(API::window_caption(window_handle_));
if((graph.size().width > 20) && (graph.size().width - 20 > 10))
text_rd_->render({ 3, 1 }, text.data(), text.size(), graph.size().width - 20, paint::text_renderer::mode::truncate_with_ellipsis); text_rd_->render({ 3, 1 }, text.data(), text.size(), graph.size().width - 20, paint::text_renderer::mode::truncate_with_ellipsis);
//draw x button //draw x button

View File

@ -104,6 +104,7 @@ namespace nana
delete ptr; delete ptr;
cont_.clear(); cont_.clear();
right_ = npos;
} }
@ -683,6 +684,7 @@ namespace nana
if(m && (m->textout != show)) if(m && (m->textout != show))
{ {
m->textout = show; m->textout = show;
m->pixels = 0; //force width calculation
API::refresh_window(this->handle()); API::refresh_window(this->handle());
} }
} }