Skip to content

Commit b62b982

Browse files
committed
fixed actor area limits glitches
1 parent 0f220a9 commit b62b982

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

src/ui/dom/Widget.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ Widget::Widget( DOM_ARGS )
4949
it.second->Resize( width, height );
5050
}
5151
};
52-
53-
m_geometry->SetOverflowMode( geometry::Geometry::OM_HIDDEN );
5452
}
5553

5654
void Widget::Show() {

src/ui/geometry/Geometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ void Geometry::Destroy() {
273273

274274
void Geometry::Update( const bool is_update_from_parent ) {
275275
UpdateArea();
276-
UpdateImpl();
277276
for ( const auto& geometry : m_children ) {
278277
geometry->Update( true );
279278
}
280279
UpdateEffectiveArea( is_update_from_parent );
280+
UpdateImpl();
281281
if ( m_parent ) {
282282
if ( !m_is_destroying && ( m_stick_bits & ( STICK_LEFT | STICK_WIDTH | STICK_TOP | STICK_HEIGHT ) ) ) { // TODO: other variants
283283
m_parent->AddBoundaries( this );

src/ui/geometry/Rectangle.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,12 @@ void Rectangle::InitMesh( types::mesh::Render* const mesh, const bool keep_tex,
114114
}
115115

116116
void Rectangle::UpdateActor( scene::actor::Mesh* const actor ) {
117-
if ( m_parent && m_overflow_mode == OM_HIDDEN ) {
118-
const auto& area = m_parent->m_effective_area;
119-
actor->SetAreaLimits(
120-
{
121-
{ m_ui->ClampX( area.left ), m_ui->ClampY( area.top ), -1.0f },
122-
{ m_ui->ClampX( area.right ), m_ui->ClampY( area.bottom ), 1.0f }
123-
}
124-
125-
);
126-
}
117+
actor->SetAreaLimits(
118+
{
119+
{ m_ui->ClampX( m_area.left ), m_ui->ClampY( m_area.top ), -1.0f },
120+
{ m_ui->ClampX( m_area.right ), m_ui->ClampY( m_area.bottom ), 1.0f }
121+
}
122+
);
127123
actor->SetPositionZ( m_area.zindex );
128124
}
129125

0 commit comments

Comments
 (0)