1// Aseprite
2// Copyright (C) 2019 Igara Studio S.A.
3// Copyright (C) 2001-2017 David Capello
4//
5// This program is distributed under the terms of
6// the End-User License Agreement for Aseprite.
7
8#ifdef HAVE_CONFIG_H
9#include "config.h"
10#endif
11
12#include "app/ui/skin/skin_property.h"
13
14#include "ui/widget.h"
15
16namespace app {
17namespace skin {
18
19const char* SkinProperty::Name = "SkinProperty";
20
21SkinProperty::SkinProperty()
22 : Property(Name)
23{
24 m_look = NormalLook;
25 m_miniFont = false;
26}
27
28SkinProperty::~SkinProperty()
29{
30}
31
32SkinPropertyPtr get_skin_property(ui::Widget* widget)
33{
34 auto skinProp =
35 std::static_pointer_cast<SkinProperty>(widget->getProperty(SkinProperty::Name));
36 if (!skinProp) {
37 skinProp = std::make_shared<SkinProperty>();
38 widget->setProperty(skinProp);
39 }
40 return skinProp;
41}
42
43} // namespace skin
44} // namespace app
45