Sequencer - Display in scrollable area

This commit is contained in:
Emmanuel BENOîT 2017-11-22 16:02:25 +01:00
parent cc8d2b824e
commit fc75f81ff3

View file

@ -289,9 +289,12 @@ bool T_SyncViewImpl_::display( ) noexcept
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Sequencer widget & subwindows // Sequencer widget & subwindows
BeginChild( "##sequencer" , ImVec2{ 0 , 0 } , false ,
ImGuiWindowFlags_NoScrollWithMouse );
PushItemWidth( -1 ); PushItemWidth( -1 );
sequencerWidget( ); sequencerWidget( );
PopItemWidth( ); PopItemWidth( );
EndChild( );
End( ); End( );
switch ( sub ) { switch ( sub ) {
@ -323,7 +326,7 @@ void T_SyncViewImpl_::sequencerWidget( ) noexcept
auto& style( ImGui::GetStyle( ) ); auto& style( ImGui::GetStyle( ) );
const ImRect bbHeader{ cPos , cPos + ImVec2( width , SeqHeaderHeight ) }; const ImRect bbHeader{ cPos , cPos + ImVec2( width , SeqHeaderHeight ) };
const ImRect bbDisplay{ ImVec2{ cPos.x , bbHeader.Max.y } , const ImRect bbDisplay{ ImVec2{ cPos.x , bbHeader.Max.y } ,
ImVec2{ cPos.x + width , GetWindowPos( ).y + ws.y - style.FramePadding.y } }; ImVec2{ cPos.x + width , GetWindowPos( ).y + ws.y - style.FramePadding.y * 2 } };
const ImRect bbAll{ bbHeader.Min , bbDisplay.Max }; const ImRect bbAll{ bbHeader.Min , bbDisplay.Max };
ItemSize( bbAll , style.FramePadding.y ); ItemSize( bbAll , style.FramePadding.y );