mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
GWidget: Make set_font() take either Font* or Font&.
This commit is contained in:
parent
c0742e4c23
commit
b522e3cc05
2 changed files with 4 additions and 3 deletions
|
@ -371,12 +371,12 @@ void GWidget::set_focus(bool focus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GWidget::set_font(RefPtr<Font>&& font)
|
void GWidget::set_font(Font* font)
|
||||||
{
|
{
|
||||||
if (!font)
|
if (!font)
|
||||||
m_font = Font::default_font();
|
m_font = Font::default_font();
|
||||||
else
|
else
|
||||||
m_font = move(font);
|
m_font = font;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,8 @@ public:
|
||||||
bool fill_with_background_color() const { return m_fill_with_background_color; }
|
bool fill_with_background_color() const { return m_fill_with_background_color; }
|
||||||
|
|
||||||
const Font& font() const { return *m_font; }
|
const Font& font() const { return *m_font; }
|
||||||
void set_font(RefPtr<Font>&&);
|
void set_font(Font*);
|
||||||
|
void set_font(Font& font) { set_font(&font); }
|
||||||
|
|
||||||
void set_global_cursor_tracking(bool);
|
void set_global_cursor_tracking(bool);
|
||||||
bool global_cursor_tracking() const;
|
bool global_cursor_tracking() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue