wgui: Refactoring, various changes (see desc)
- use parking_lot for mutex (less restrictive and easier to use) - simplify event callbacks and widget type casting - defer component initialization at start (required for setting the initial state of sliders) - fix non-working scroll events - update testbed.xml - replace slider with the real one in bar.xml - show slider text on its handle
This commit is contained in:
@@ -41,15 +41,11 @@ where
|
||||
.flatten();
|
||||
let role = cap.get(2).unwrap().as_str();
|
||||
|
||||
let mut widget = panel
|
||||
let mut label = panel
|
||||
.layout
|
||||
.widget_map
|
||||
.get_mut(*widget_id)
|
||||
.unwrap() // want panic
|
||||
.lock()
|
||||
.unwrap(); // want panic
|
||||
|
||||
let label = widget.obj.get_as_mut::<TextLabel>();
|
||||
.get_as::<TextLabel>(*widget_id)
|
||||
.unwrap();
|
||||
|
||||
let format = match role {
|
||||
"tz" => {
|
||||
|
||||
Reference in New Issue
Block a user