More improvements.

This commit is contained in:
Martín Lucas Golini
2025-01-04 21:11:21 -03:00
parent df65ec78c3
commit 0330f38cae
7 changed files with 107 additions and 59 deletions

View File

@@ -34,12 +34,13 @@ void StatusDebuggerController::createContainer() {
if ( mContainer )
return;
const auto XML = R"xml(
<TabWidget id="app_debugger" layout_width="match_parent" layout_height="0dp" layout_weight="1">
<TableView id="debugger_stack" layout_width="mp" layout_height="mp" />
<TableView id="debugger_threads" layout_width="mp" layout_height="mp" />
<TabWidget id="app_debugger" layout_width="mp" layout_height="mp">
<Splitter id="debugger_threads_and_stack" layout_width="mp" lh="mp" splitter-partition="15%">
<TableView id="debugger_threads" layout_width="mp" layout_height="mp" />
<TableView id="debugger_stack" layout_width="mp" layout_height="mp" />
</Splitter>
<TableView id="debugger_breakpoints" layout_width="mp" layout_height="mp" />
<Tab text="@string(stack, Stack)" owns="debugger_stack" />
<Tab text="@string(threads, Threads)" owns="debugger_threads" />
<Tab text="@string(threads_and_stack, Threads & Stack)" owns="debugger_threads_and_stack" />
<Tab text="@string(breakpoints, Breakpoints)" owns="debugger_breakpoints" />
</TabWidget>
)xml";
@@ -53,32 +54,18 @@ void StatusDebuggerController::createContainer() {
->loadLayoutFromString( XML, mMainSplitter )
->asType<UILinearLayout>();
mContainer->bind( "debugger_threads_and_stack", mUIThreadsSplitter );
mContainer->bind( "debugger_threads", mUIThreads );
mContainer->bind( "debugger_stack", mUIStack );
mContainer->bind( "debugger_breakpoints", mUIBreakpoints );
mContainer->on( Event::OnSizeChange, [this]( const Event* event ) {
if ( !mContainer->isVisible() || mContainer->getSize().getWidth() == 0.f )
return;
mUIThreads->setAutoExpandOnSingleColumn( true );
const Float width = mContainer->getPixelsSize().getWidth();
mUIStack->setAutoColumnsWidth( true );
mUIStack->setMainColumn( 1 );
mUIThreads->setColumnWidth( 0, width * 0.1 );
mUIThreads->setColumnWidth( 1, eefloor( width * 0.88 ) );
mUIStack->setColumnWidth( 0, width * 0.05 );
mUIStack->setColumnWidth( 1, width * 0.3 );
mUIStack->setColumnWidth( 2, width * 0.15 );
mUIStack->setColumnWidth( 3, eefloor( width * 0.3 ) );
mUIStack->setColumnWidth( 4, width * 0.08 );
mUIStack->setColumnWidth( 5, width * 0.08 );
mUIBreakpoints->setColumnWidth( 0, width * 0.1 );
mUIBreakpoints->setColumnWidth( 1, eefloor( width * 0.7 ) );
mUIBreakpoints->setColumnWidth( 2, eefloor( width * 0.1 ) );
mContainer->removeEventListener( event->getCallbackId() );
} );
mUIBreakpoints->setAutoColumnsWidth( true );
mUIBreakpoints->setMainColumn( 1 );
}
} // namespace ecode