mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
This commit is contained in:
parent
63814ffebf
commit
04b9dc2d30
328 changed files with 36 additions and 36 deletions
44
Libraries/LibGUI/GStatusBar.cpp
Normal file
44
Libraries/LibGUI/GStatusBar.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GLabel.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GResizeCorner.h>
|
||||
#include <LibGUI/GStatusBar.h>
|
||||
#include <SharedGraphics/StylePainter.h>
|
||||
|
||||
GStatusBar::GStatusBar(GWidget* parent)
|
||||
: GWidget(parent)
|
||||
{
|
||||
set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
set_preferred_size({ 0, 20 });
|
||||
set_layout(make<GBoxLayout>(Orientation::Horizontal));
|
||||
layout()->set_margins({ 2, 2, 2, 2 });
|
||||
layout()->set_spacing(2);
|
||||
m_label = new GLabel(this);
|
||||
m_label->set_frame_shadow(FrameShadow::Sunken);
|
||||
m_label->set_frame_shape(FrameShape::Panel);
|
||||
m_label->set_frame_thickness(1);
|
||||
m_label->set_text_alignment(TextAlignment::CenterLeft);
|
||||
|
||||
m_corner = new GResizeCorner(this);
|
||||
}
|
||||
|
||||
GStatusBar::~GStatusBar()
|
||||
{
|
||||
}
|
||||
|
||||
void GStatusBar::set_text(const StringView& text)
|
||||
{
|
||||
m_label->set_text(text);
|
||||
}
|
||||
|
||||
String GStatusBar::text() const
|
||||
{
|
||||
return m_label->text();
|
||||
}
|
||||
|
||||
void GStatusBar::paint_event(GPaintEvent& event)
|
||||
{
|
||||
GPainter painter(*this);
|
||||
painter.add_clip_rect(event.rect());
|
||||
StylePainter::paint_surface(painter, rect(), !spans_entire_window_horizontally());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue