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:
@@ -8,8 +8,8 @@
|
||||
</template>
|
||||
|
||||
<elements>
|
||||
<div box_sizing="content_box" flex_direction="column" justify_content="center" align_content="center">
|
||||
<rectangle padding="10" gap="8" round="100%" color="~bg_color" justify_content="center" align_content="center">
|
||||
<div box_sizing="content_box" flex_direction="column" justify_content="center">
|
||||
<rectangle padding="10" gap="8" round="100%" color="~bg_color" justify_content="center">
|
||||
<TopButton id="lock" src="bar/lock_open.svg" />
|
||||
<TopButton id="anchor" src="bar/anchor.svg" />
|
||||
<TopButton id="mouse" src="bar/mouse.svg" />
|
||||
@@ -19,17 +19,12 @@
|
||||
<TopButton id="inout" src="bar/inout.svg" />
|
||||
<TopButton id="delete" src="bar/delete.svg" />
|
||||
</rectangle>
|
||||
<rectangle padding="8" gap="8" round="100%" color="~bg_color_active" justify_content="center" align_content="center">
|
||||
<rectangle padding="8" gap="8" round="100%" color="~bg_color_active" justify_content="center" align_items="center">
|
||||
<label size="18" text="Opacity" color="~text_color" />
|
||||
<label size="18" text="100%" color="~text_color" weight="bold" />
|
||||
<rectangle width="200" height="20" round="100%" color="~slider_bg_color">
|
||||
<div width="150" />
|
||||
<rectangle width="50" round="100%" color="~slider_fg_color" justify_content="center" align_content="center">
|
||||
</rectangle>
|
||||
</rectangle>
|
||||
<slider width="150" height="24" min_value="0" max_value="100" value="100" />
|
||||
<label size="18" text="Additive:" color="~text_color" />
|
||||
<sprite color="~device_color" width="20" height="20" src="bar/checkbox-checked.svg" />
|
||||
</rectangle>
|
||||
</div>
|
||||
</elements>
|
||||
</layout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user