mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fix issue #280 - Close button doesn't appear in some windows
Thanks to @DocHoncho for the help. See https://github.com/aseprite/aseprite/pull/6
This commit is contained in:
parent
a1f3e290c2
commit
7dc8e548be
@ -56,6 +56,7 @@ namespace ui {
|
||||
#define JI_DECORATIVE 0x0200 // To decorate windows.
|
||||
#define JI_INITIALIZED 0x0400 // The widget was already initialized by a theme.
|
||||
#define JI_DIRTY 0x0800 // The widget (or one child) is dirty (update_region != empty).
|
||||
#define JI_HASTEXT 0x1000 // The widget has text (at least setText() was called one time).
|
||||
|
||||
class GuiSystem {
|
||||
public:
|
||||
|
@ -61,7 +61,6 @@ Widget::Widget(WidgetType type)
|
||||
this->m_theme = CurrentTheme::get();
|
||||
|
||||
this->m_align = 0;
|
||||
this->m_text = "";
|
||||
this->m_font = this->m_theme ? this->m_theme->default_font: NULL;
|
||||
this->m_bgColor = ui::ColorNone;
|
||||
|
||||
@ -154,6 +153,7 @@ void Widget::setTextf(const char *format, ...)
|
||||
void Widget::setTextQuiet(const base::string& text)
|
||||
{
|
||||
m_text = text;
|
||||
flags |= JI_HASTEXT;
|
||||
}
|
||||
|
||||
FONT *Widget::getFont() const
|
||||
|
@ -105,7 +105,7 @@ namespace ui {
|
||||
|
||||
// Text property.
|
||||
|
||||
bool hasText() const { return !m_text.empty(); }
|
||||
bool hasText() const { return (flags & JI_HASTEXT) == JI_HASTEXT; }
|
||||
|
||||
const base::string& getText() const { return m_text; }
|
||||
int getTextInt() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user