mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
LibGUI: Add very limited multi-label support to GStatusBar
Created a constructor argument and getter/setter methods to allow you to have a multi-label status bar.
This commit is contained in:
parent
2260190f39
commit
a1c89c2734
2 changed files with 39 additions and 9 deletions
|
@ -11,13 +11,17 @@ public:
|
|||
virtual ~GStatusBar() override;
|
||||
|
||||
String text() const;
|
||||
String text(int index) const;
|
||||
void set_text(const StringView&);
|
||||
void set_text(int index, const StringView&);
|
||||
|
||||
protected:
|
||||
explicit GStatusBar(GWidget* parent);
|
||||
explicit GStatusBar(int label_count, GWidget* parent);
|
||||
virtual void paint_event(GPaintEvent&) override;
|
||||
|
||||
private:
|
||||
RefPtr<GLabel> m_label;
|
||||
NonnullRefPtr<GLabel> create_label();
|
||||
NonnullRefPtrVector<GLabel> m_labels;
|
||||
RefPtr<GResizeCorner> m_corner;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue