mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
Profiler: Add fixed track headers to the timeline view
The architecture here is a little bit convoluted. I ended up making a new container widget (TimelineContainer) that works similarly to GUI::ScrollableContainerWidget but has two subwidgets (a fixed header that only scrolls vertically, and the timeline view that scrolls on both axes.) It would be nice to generalize this mechanism eventually and move it back into LibGUI, but for now let's go with a special widget for Profiler so we can continue iterating on the GUI. :^)
This commit is contained in:
parent
59da118f2e
commit
fb6d236ba2
7 changed files with 201 additions and 21 deletions
31
Userland/DevTools/Profiler/TimelineHeader.h
Normal file
31
Userland/DevTools/Profiler/TimelineHeader.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGUI/Frame.h>
|
||||
|
||||
namespace Profiler {
|
||||
|
||||
class Process;
|
||||
|
||||
class TimelineHeader final : public GUI::Frame {
|
||||
C_OBJECT(TimelineHeader);
|
||||
|
||||
public:
|
||||
virtual ~TimelineHeader();
|
||||
|
||||
private:
|
||||
TimelineHeader(Process const&);
|
||||
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
|
||||
Process const& m_process;
|
||||
RefPtr<Gfx::Bitmap> m_icon;
|
||||
String m_text;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue