More compact time range limits window.

This commit is contained in:
Bartosz Taudul
2026-05-02 12:41:12 +02:00
parent 9965aff723
commit 0a64f16c2d
2 changed files with 12 additions and 11 deletions

View File

@@ -4869,11 +4869,12 @@ This window displays information about time range limits (section~\ref{timerange
\begin{itemize}
\item \emph{Limit to view} -- Set the time range limit to current view.
\item \emph{\faMicroscope{}~Focus} -- Set the timeline view to the time range extent.
\item \emph{\faNoteSticky{}~Set from annotation} -- Allows using the annotation region for limiting purposes.
\item \emph{\faArrowUpWideShort{}~Copy from statistics} -- Copies the statistics time range limit.
\item \emph{\faMagnifyingGlass{}~Copy from find zone} -- Copies the find zone time range limit.
\item \emph{\faHourglassHalf{}~Copy from wait stacks} -- Copies the wait stacks time range limit.
\item \emph{\faMemory{}~Copy from memory} -- Copies the memory time range limit.
\item \emph{\faNoteSticky{}~From annotation} -- Allows using the annotation region for limiting purposes.
\item \emph{\faMagnifyingGlass{}~Copy find zone} -- Copies the find zone time range limit.
\item \emph{\faArrowUpWideShort{}~Copy statistics} -- Copies the statistics time range limit.
\item \emph{\faFireFlameCurved{}~Copy flame} -- Copies the flame graph time range limit.
\item \emph{\faHourglassHalf{}~Copy wait stacks} -- Copies the wait stacks time range limit.
\item \emph{\faMemory{}~Copy memory} -- Copies the memory time range limit.
\end{itemize}
Note that ranges displayed in the window have color hints that match the color of the striped regions on the timeline.

View File

@@ -50,7 +50,7 @@ void View::DrawRangeEntry( Range& range, const char* label, uint32_t color, cons
ImGui::TextDisabled( "(%s)", TimeToString( range.max - range.min ) );
if( ImGui::SmallButton( ICON_FA_MICROSCOPE " Focus" ) ) ZoomToRange( range.min, range.max );
ImGui::SameLine();
if( SmallButtonDisablable( ICON_FA_NOTE_STICKY " Set from annotation", m_annotations.empty() ) ) ImGui::OpenPopup( popupLabel );
if( SmallButtonDisablable( ICON_FA_NOTE_STICKY " From annotation", m_annotations.empty() ) ) ImGui::OpenPopup( popupLabel );
if( ImGui::BeginPopup( popupLabel ) )
{
for( auto& v : m_annotations )
@@ -72,27 +72,27 @@ void View::DrawRangeEntry( Range& range, const char* label, uint32_t color, cons
if( id != 0 )
{
ImGui::SameLine();
if( SmallButtonDisablable( ICON_FA_MAGNIFYING_GLASS " Copy from find zone", m_findZone.range.min == 0 && m_findZone.range.max == 0 ) ) range = m_findZone.range;
if( SmallButtonDisablable( ICON_FA_MAGNIFYING_GLASS " Copy find zone", m_findZone.range.min == 0 && m_findZone.range.max == 0 ) ) range = m_findZone.range;
}
if( id != 1 )
{
ImGui::SameLine();
if( SmallButtonDisablable( ICON_FA_ARROW_UP_WIDE_SHORT " Copy from statistics", m_statRange.min == 0 && m_statRange.max == 0 ) ) range = m_statRange;
if( SmallButtonDisablable( ICON_FA_ARROW_UP_WIDE_SHORT " Copy statistics", m_statRange.min == 0 && m_statRange.max == 0 ) ) range = m_statRange;
}
if( id != 2 )
{
ImGui::SameLine();
if( SmallButtonDisablable( ICON_FA_FIRE_FLAME_CURVED " Copy from flame", m_flameRange.min == 0 && m_flameRange.max == 0 ) ) range = m_flameRange;
if( SmallButtonDisablable( ICON_FA_FIRE_FLAME_CURVED " Copy flame", m_flameRange.min == 0 && m_flameRange.max == 0 ) ) range = m_flameRange;
}
if( id != 3 )
{
ImGui::SameLine();
if( SmallButtonDisablable( ICON_FA_HOURGLASS_HALF " Copy from wait stacks", m_waitStackRange.min == 0 && m_waitStackRange.max == 0 ) ) range = m_waitStackRange;
if( SmallButtonDisablable( ICON_FA_HOURGLASS_HALF " Copy wait stacks", m_waitStackRange.min == 0 && m_waitStackRange.max == 0 ) ) range = m_waitStackRange;
}
if( id != 4 )
{
ImGui::SameLine();
if( SmallButtonDisablable( ICON_FA_MEMORY " Copy from memory", m_memInfo.range.min == 0 && m_memInfo.range.max == 0 ) ) range = m_memInfo.range;
if( SmallButtonDisablable( ICON_FA_MEMORY " Copy memory", m_memInfo.range.min == 0 && m_memInfo.range.max == 0 ) ) range = m_memInfo.range;
}
}
ImGui::PopID();