mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 05:55:13 +00:00
My needs are really quite simple, so I'm just going to add what I need as I go along. The first thing I needed was a simple box layout with widgets being able to say whether they prefer fixed or fill for both their vertical and horizontal sizes. I also made a simple GStatusBar so FileManager can show how many bytes worth of files are in the current directory.
20 lines
412 B
C++
20 lines
412 B
C++
#pragma once
|
|
|
|
#include <LibGUI/GWidget.h>
|
|
|
|
class GLabel;
|
|
|
|
class GStatusBar : public GWidget {
|
|
public:
|
|
explicit GStatusBar(GWidget* parent);
|
|
virtual ~GStatusBar() override;
|
|
|
|
String text() const;
|
|
void set_text(String&&);
|
|
|
|
private:
|
|
virtual const char* class_name() const override { return "GStatusBar"; }
|
|
virtual void paint_event(GPaintEvent&) override;
|
|
|
|
GLabel* m_label { nullptr };
|
|
};
|