1
Fork 0
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:
Brandon Scott 2019-10-23 17:43:40 -05:00 committed by Andreas Kling
parent 2260190f39
commit a1c89c2734
2 changed files with 39 additions and 9 deletions

View file

@ -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;
};