mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Implement copying user data location to clipboard.
This commit is contained in:
parent
9e76ddb9fd
commit
24727175d7
@ -11092,7 +11092,32 @@ void View::DrawInfo()
|
|||||||
TextFocused( "Program:", m_worker.GetCaptureProgram().c_str() );
|
TextFocused( "Program:", m_worker.GetCaptureProgram().c_str() );
|
||||||
if( m_bigFont ) ImGui::PopFont();
|
if( m_bigFont ) ImGui::PopFont();
|
||||||
TextFocused( "Capture time:", dtmp );
|
TextFocused( "Capture time:", dtmp );
|
||||||
if( !m_filename.empty() ) TextFocused( "File:", m_filename.c_str() );
|
if( !m_filename.empty() )
|
||||||
|
{
|
||||||
|
TextFocused( "File:", m_filename.c_str() );
|
||||||
|
if( m_userData.Valid() )
|
||||||
|
{
|
||||||
|
const auto save = m_userData.GetConfigLocation();
|
||||||
|
if( save )
|
||||||
|
{
|
||||||
|
ImGui::SameLine();
|
||||||
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
|
if( ImGui::SmallButton( ICON_FA_FOLDER ) )
|
||||||
|
#else
|
||||||
|
if( ImGui::SmallButton( "Settings" ) )
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
ImGui::SetClipboardText( save );
|
||||||
|
}
|
||||||
|
if( ImGui::IsItemHovered() )
|
||||||
|
{
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::TextUnformatted( "Copy user settings location to clipboard." );
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
const auto& desc = m_userData.GetDescription();
|
const auto& desc = m_userData.GetDescription();
|
||||||
const auto descsz = std::min<size_t>( 255, desc.size() );
|
const auto descsz = std::min<size_t>( 255, desc.size() );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user