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:
@@ -61,7 +61,7 @@ impl WidgetObj for SpriteBox {
|
||||
let mut buffer = Buffer::new_empty(DEFAULT_METRICS);
|
||||
|
||||
{
|
||||
let mut font_system = FONT_SYSTEM.lock().unwrap(); // safe unwrap
|
||||
let mut font_system = FONT_SYSTEM.lock();
|
||||
let mut buffer = buffer.borrow_with(&mut font_system);
|
||||
let attrs = Attrs::new()
|
||||
.color(Color::rgb(255, 0, 255))
|
||||
|
||||
Reference in New Issue
Block a user