mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-16 05:42:32 +00:00
Add Widget::get/setBorder().
This commit is contained in:
parent
034a943a0c
commit
1738a93fca
@ -679,6 +679,19 @@ void Widget::setBounds(const Rect& rc)
|
|||||||
jwidget_set_rect(this, &jrc);
|
jwidget_set_rect(this, &jrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Border Widget::getBorder() const
|
||||||
|
{
|
||||||
|
return Border(border_width.l, border_width.t, border_width.r, border_width.b);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Widget::setBorder(const Border& br)
|
||||||
|
{
|
||||||
|
border_width.l = br.left();
|
||||||
|
border_width.t = br.top();
|
||||||
|
border_width.r = br.right();
|
||||||
|
border_width.b = br.bottom();
|
||||||
|
}
|
||||||
|
|
||||||
void jwidget_relayout(JWidget widget)
|
void jwidget_relayout(JWidget widget)
|
||||||
{
|
{
|
||||||
jwidget_set_rect(widget, widget->rc);
|
jwidget_set_rect(widget, widget->rc);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "gfx/rect.h"
|
#include "gfx/rect.h"
|
||||||
|
#include "gfx/border.h"
|
||||||
#include "gui/component.h"
|
#include "gui/component.h"
|
||||||
#include "gui/jbase.h"
|
#include "gui/jbase.h"
|
||||||
#include "gui/jrect.h"
|
#include "gui/jrect.h"
|
||||||
@ -243,6 +244,9 @@ public:
|
|||||||
gfx::Rect getBounds() const;
|
gfx::Rect getBounds() const;
|
||||||
void setBounds(const gfx::Rect& rc);
|
void setBounds(const gfx::Rect& rc);
|
||||||
|
|
||||||
|
gfx::Border getBorder() const;
|
||||||
|
void setBorder(const gfx::Border& border);
|
||||||
|
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
// REFRESH ISSUES
|
// REFRESH ISSUES
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user