From ae3c9f63571d75d0c047e02ce5a0adc8929bbf92 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Thu, 6 Aug 2015 16:44:21 +0200 Subject: [PATCH 1/2] Fix: Workaround label constructor selecting bool instead nana::string when called with nana::char_t* which silently brake a lot of code Maybe there are more elegant solutions... The second constructor was eliminated in: Commit: f4924ef2f8600fafa82d3fc0d1c4d5f9eea0c738 [f4924ef] Parents: e0ee42d184 Author: Jinhao Date: Sonntag, 2. August 2015 19:37:36 Labels: develop add throw() for some functions --- include/nana/gui/widgets/label.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/nana/gui/widgets/label.hpp b/include/nana/gui/widgets/label.hpp index 6d72cd4e..aa28effc 100644 --- a/include/nana/gui/widgets/label.hpp +++ b/include/nana/gui/widgets/label.hpp @@ -58,6 +58,7 @@ namespace nana label(); label(window, bool visible); label(window, const nana::string& text, bool visible = true); + label(window parent, const nana::char_t* text, bool visible = true) :label(parent, nana::string(text),visible) {}; label(window, const rectangle& = {}, bool visible = true); label& transparent(bool); ///< Switchs the label widget to the transparent background mode. bool transparent() const throw(); From d7aa311fab3c9dd9fa607b684250531d7bae06aa Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Thu, 6 Aug 2015 19:33:33 +0200 Subject: [PATCH 2/2] FIX: ? impossible to construct a picture widget --- source/gui/widgets/picture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/gui/widgets/picture.cpp b/source/gui/widgets/picture.cpp index 707edce5..9733e120 100644 --- a/source/gui/widgets/picture.cpp +++ b/source/gui/widgets/picture.cpp @@ -143,7 +143,8 @@ namespace nana _m_draw_background(valid_area.width, valid_area.height); - backimg.image.paste(valid_area, graph, pos); + if ( ! backimg.image.empty()) + backimg.image.paste(valid_area, graph, pos); } } else @@ -163,7 +164,7 @@ namespace nana if (graph && (bground_mode::basic != API::effects_bground_mode(*impl_->wdg_ptr))) { - if (w < graph->size().width || h < graph->size().width || impl_->backimg.image.alpha()) + if (w < graph->size().width || h < graph->size().height /* .width ??? */ || impl_->backimg.image.alpha()) { auto & bground = impl_->gradual_bground; if (bground.gradual_from.invisible() || bground.gradual_to.invisible())