mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:27:34 +00:00
Profiler: Allow scaling the timeline with Ctrl+MouseWheel :^)
This commit is contained in:
parent
3dfc3e362b
commit
62819df713
5 changed files with 33 additions and 1 deletions
|
@ -22,7 +22,7 @@ TimelineTrack::TimelineTrack(TimelineView const& view, Profile const& profile, P
|
|||
set_fill_with_background_color(true);
|
||||
set_background_role(Gfx::ColorRole::Base);
|
||||
set_fixed_height(40);
|
||||
set_fixed_width(m_profile.length_in_ms() / 10);
|
||||
set_scale(view.scale());
|
||||
set_frame_thickness(1);
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,11 @@ TimelineTrack::~TimelineTrack()
|
|||
{
|
||||
}
|
||||
|
||||
void TimelineTrack::set_scale(float scale)
|
||||
{
|
||||
set_fixed_width(m_profile.length_in_ms() / scale);
|
||||
}
|
||||
|
||||
void TimelineTrack::event(Core::Event& event)
|
||||
{
|
||||
switch (event.type()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue