X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwidget.cpp;h=1c73d7640cc610c49ccb33f6e7f4b0fe315a83d0;hb=b391f4b774d17c53dfd9062fc7c7a6b14f72f926;hp=aa05675b97c1c989c499916247173785593dad5c;hpb=a87517d7595e71ddcbd8df1d2f637e0f9db0467f;p=libs%2Fgltk.git diff --git a/source/widget.cpp b/source/widget.cpp index aa05675..1c73d76 100644 --- a/source/widget.cpp +++ b/source/widget.cpp @@ -72,9 +72,8 @@ void Widget::set_geometry(const Geometry &g) geom = g; if(size_changed) { - // TODO maybe rename this to on_size_change - on_geometry_change(); - rebuild(); + on_size_change(); + mark_rebuild(); } } @@ -142,7 +141,7 @@ void Widget::update_style() on_style_change(); signal_autosize_changed.emit(); - rebuild(); + mark_rebuild(); } void Widget::set_tooltip(const string &t) @@ -185,7 +184,39 @@ void Widget::set_state(State mask, State bits) State old_state = state; state = (state&~mask)|bits; if(style && style->compare_states(old_state, state)) + mark_rebuild(); +} + +void Widget::set_animation_interval(const Time::TimeDelta &iv) +{ + if(ivget_parts(); for(Style::PartSeq::const_iterator i=parts.begin(); i!=parts.end(); ++i) { @@ -202,7 +233,6 @@ void Widget::rebuild() else rebuild_special(*i); } - part_cache.end_rebuild(); } void Widget::rebuild_special(const Part &part)