explicit conversion from point/size to rectangle
This commit is contained in:
@@ -98,10 +98,10 @@ namespace nana{
|
||||
|
||||
void _m_render_edge_nimbus(core_window_t* wd, const nana::rectangle & visual)
|
||||
{
|
||||
nana::rectangle r(visual);
|
||||
auto r = visual;
|
||||
r.pare_off(-static_cast<int>(weight()));
|
||||
nana::rectangle good_r;
|
||||
if(overlap(r, wd->root_graph->size(), good_r))
|
||||
rectangle good_r;
|
||||
if (overlap(r, rectangle{ wd->root_graph->size() }, good_r))
|
||||
{
|
||||
if( (good_r.x < wd->pos_root.x) || (good_r.y < wd->pos_root.y) ||
|
||||
(good_r.x + good_r.width > visual.x + visual.width) || (good_r.y + good_r.height > visual.y + visual.height))
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace nana
|
||||
class event_arg
|
||||
{
|
||||
public:
|
||||
virtual ~event_arg();
|
||||
virtual ~event_arg() = default;
|
||||
|
||||
/// ignorable handlers behind the current one in a chain of event handlers will not get called.
|
||||
void stop_propagation() const;
|
||||
|
||||
@@ -574,7 +574,7 @@ namespace nana{ namespace widgets{ namespace skeletons
|
||||
virtual void nontext_render(graph_reference graph, int x, int y) override
|
||||
{
|
||||
if(size_ != image_.size())
|
||||
image_.stretch(image_.size(), graph, nana::rectangle(x, y, size_.width, size_.height));
|
||||
image_.stretch(::nana::rectangle{ image_.size() }, graph, nana::rectangle(x, y, size_.width, size_.height));
|
||||
else
|
||||
image_.paste(graph, x, y);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace nana
|
||||
|
||||
point pos() const;
|
||||
void move(int x, int y);
|
||||
//void move(const point&);
|
||||
void move(const point&);
|
||||
void move(const rectangle&);
|
||||
|
||||
void fgcolor(const nana::color&);
|
||||
|
||||
Reference in New Issue
Block a user