mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 00:23:35 +00:00
Minor changes in box.cpp and image_view.cpp
This commit is contained in:
parent
46bc974d3b
commit
f6f6225b1a
@ -18,10 +18,6 @@
|
|||||||
|
|
||||||
using namespace gfx;
|
using namespace gfx;
|
||||||
|
|
||||||
static bool box_msg_proc(JWidget widget, Message* msg);
|
|
||||||
static void box_request_size(JWidget widget, int *w, int *h);
|
|
||||||
static void box_set_position(JWidget widget, JRect rect);
|
|
||||||
|
|
||||||
Box::Box(int align)
|
Box::Box(int align)
|
||||||
: Widget(JI_BOX)
|
: Widget(JI_BOX)
|
||||||
{
|
{
|
||||||
@ -34,7 +30,7 @@ bool Box::onProcessMessage(Message* msg)
|
|||||||
switch (msg->type) {
|
switch (msg->type) {
|
||||||
|
|
||||||
case JM_SETPOS:
|
case JM_SETPOS:
|
||||||
box_set_position(&msg->setpos.rect);
|
layoutBox(&msg->setpos.rect);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -111,7 +107,7 @@ void Box::onPaint(PaintEvent& ev)
|
|||||||
getTheme()->paintBox(ev);
|
getTheme()->paintBox(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Box::box_set_position(JRect rect)
|
void Box::layoutBox(JRect rect)
|
||||||
{
|
{
|
||||||
#define FIXUP(x, y, w, h, l, t, r, b) \
|
#define FIXUP(x, y, w, h, l, t, r, b) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -22,7 +22,7 @@ protected:
|
|||||||
void onPaint(PaintEvent& ev) OVERRIDE;
|
void onPaint(PaintEvent& ev) OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void box_set_position(JRect rect);
|
void layoutBox(JRect rect);
|
||||||
};
|
};
|
||||||
|
|
||||||
class VBox : public Box
|
class VBox : public Box
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
#include "gui/system.h"
|
#include "gui/system.h"
|
||||||
#include "gui/theme.h"
|
#include "gui/theme.h"
|
||||||
|
|
||||||
static bool image_msg_proc(JWidget widget, Message* msg);
|
|
||||||
|
|
||||||
ImageView::ImageView(BITMAP* bmp, int align)
|
ImageView::ImageView(BITMAP* bmp, int align)
|
||||||
: Widget(JI_IMAGE_VIEW)
|
: Widget(JI_IMAGE_VIEW)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user