mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
LibGUI: Tweak AbstractButton and subclass constructors
Taking a "const StringView&" for the initial text does not achieve anything useful. Just take a "String" and move it into storage.
This commit is contained in:
parent
476911e1f9
commit
cd9ad6a05e
Notes:
sideshowbarker
2024-07-19 00:29:58 +09:00
Author: https://github.com/awesomekling
Commit: cd9ad6a05e
9 changed files with 25 additions and 21 deletions
|
@ -27,7 +27,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibGUI/AbstractButton.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/StylePainter.h>
|
||||
|
@ -36,7 +35,8 @@
|
|||
namespace GUI {
|
||||
|
||||
class Button : public AbstractButton {
|
||||
C_OBJECT(Button)
|
||||
C_OBJECT(Button);
|
||||
|
||||
public:
|
||||
virtual ~Button() override;
|
||||
|
||||
|
@ -61,7 +61,7 @@ public:
|
|||
virtual bool is_uncheckable() const override;
|
||||
|
||||
protected:
|
||||
explicit Button(const StringView& text = {});
|
||||
explicit Button(String text = {});
|
||||
virtual void paint_event(PaintEvent&) override;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue