mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibGUI: Convert GLabel to ObjectPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 12:02:31 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c7437f9caa5
@@ -75,7 +75,7 @@ public:
|
||||
TooltipWindow()
|
||||
{
|
||||
set_window_type(GWindowType::Tooltip);
|
||||
m_label = new GLabel;
|
||||
m_label = GLabel::construct();
|
||||
m_label->set_background_color(Color::from_rgb(0xdac7b5));
|
||||
m_label->set_fill_with_background_color(true);
|
||||
m_label->set_frame_thickness(1);
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
m_label->set_text(tooltip);
|
||||
}
|
||||
|
||||
GLabel* m_label { nullptr };
|
||||
ObjectPtr<GLabel> m_label;
|
||||
};
|
||||
|
||||
void GApplication::show_tooltip(const StringView& tooltip, const Point& screen_location)
|
||||
|
||||
Reference in New Issue
Block a user