mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:05:06 +00:00
Taskbar: Start working on a taskbar app.
I originally thought I would do this inside WindowServer, but let's try to make it as a standalone app that communicates with WindowServer instead. That will allow us to use LibGUI. :^)
This commit is contained in:
parent
318db1e48e
commit
a22774ee3f
31 changed files with 577 additions and 18 deletions
31
Applications/Taskbar/TaskbarWidget.cpp
Normal file
31
Applications/Taskbar/TaskbarWidget.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include "TaskbarWidget.h"
|
||||
#include <LibGUI/GLabel.h>
|
||||
#include <LibGUI/GButton.h>
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <stdio.h>
|
||||
|
||||
TaskbarWidget::TaskbarWidget(GWidget* parent)
|
||||
: GFrame(parent)
|
||||
{
|
||||
set_fill_with_background_color(true);
|
||||
set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||
layout()->set_margins({ 0, 8, 0, 8 });
|
||||
layout()->set_spacing(8);
|
||||
|
||||
set_frame_thickness(1);
|
||||
set_frame_shape(GFrame::Shape::Panel);
|
||||
set_frame_shadow(GFrame::Shadow::Raised);
|
||||
}
|
||||
|
||||
TaskbarWidget::~TaskbarWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskbarWidget::paint_event(GPaintEvent& event)
|
||||
{
|
||||
GFrame::paint_event(event);
|
||||
|
||||
GPainter painter(*this);
|
||||
painter.add_clip_rect(event.rect());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue