aseprite/src/ui/label.cpp
David Capello 06352f79e8 Add ui::IGNORE_MOUSE flag for static widgets
This avoids some MouseEnter/Leave messages between widgets that don't
need them.
2018-12-13 10:48:12 -03:00

30 lines
574 B
C++

// Aseprite UI Library
// Copyright (C) 2018 Igara Studio S.A.
// Copyright (C) 2001-2017 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "os/font.h"
#include "ui/label.h"
#include "ui/message.h"
#include "ui/size_hint_event.h"
#include "ui/theme.h"
namespace ui {
Label::Label(const std::string& text)
: Widget(kLabelWidget)
{
enableFlags(IGNORE_MOUSE);
setAlign(LEFT | MIDDLE);
setText(text);
initTheme();
}
} // namespace ui