fix context menus, reload-from-disk
This commit is contained in:
@@ -107,7 +107,7 @@
|
|||||||
|
|
||||||
<!-- An app with a single icon. -->
|
<!-- An app with a single icon. -->
|
||||||
<template name="App">
|
<template name="App">
|
||||||
<Button macro="button_style" id="overlay_${idx}" tooltip_str="${name}" _press="::ContextMenuOpen menu_app">
|
<Button macro="button_style" id="overlay_${idx}" tooltip_str="${name}" _context_name="${name}" _press="::ContextMenuOpen menu_app">
|
||||||
<sprite width="38" height="38" color="~text_color" src_ext="${icon}" />
|
<sprite width="38" height="38" color="~text_color" src_ext="${icon}" />
|
||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
</blueprint>
|
</blueprint>
|
||||||
|
|
||||||
<template name="Panel">
|
<template name="Panel">
|
||||||
<Button macro="button_style" id="overlay_${idx}" tooltip_str="${name}" _press="::ContextMenuOpen menu_panel">
|
<Button macro="button_style" id="overlay_${idx}" tooltip_str="${name}" _context_name="${name}" _press="::ContextMenuOpen menu_panel">
|
||||||
<sprite width="38" height="38" color="~text_color" src_builtin="edit/panel.svg" />
|
<sprite width="38" height="38" color="~text_color" src_builtin="edit/panel.svg" />
|
||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
</blueprint>
|
</blueprint>
|
||||||
|
|
||||||
<template name="Mirror">
|
<template name="Mirror">
|
||||||
<Button macro="button_style" id="overlay_${idx}" tooltip_str="${name}" _press="::ContextMenuOpen menu_mirror">
|
<Button macro="button_style" id="overlay_${idx}" tooltip_str="${name}" _context_name="${name}" _press="::ContextMenuOpen menu_mirror">
|
||||||
<sprite width="38" height="38" color="~text_color" src_builtin="edit/mirror.svg" />
|
<sprite width="38" height="38" color="~text_color" src_builtin="edit/mirror.svg" />
|
||||||
<div position="absolute" margin_top="5" margin_left="13">
|
<div position="absolute" margin_top="5" margin_left="13">
|
||||||
<label text="${display}" size="20" color="~color_faded_20" weight="bold" />
|
<label text="${display}" size="20" color="~color_faded_20" weight="bold" />
|
||||||
|
|||||||
@@ -423,7 +423,14 @@ pub(super) fn setup_custom_button<S: 'static>(
|
|||||||
)));
|
)));
|
||||||
app.tasks.enqueue(TaskType::Overlay(OverlayTask::Create(
|
app.tasks.enqueue(TaskType::Overlay(OverlayTask::Create(
|
||||||
OverlaySelector::Name(owc.name.clone()),
|
OverlaySelector::Name(owc.name.clone()),
|
||||||
Box::new(move |app| create_custom(app, name)),
|
Box::new(move |app| {
|
||||||
|
if let Some(mut owc) = create_custom(app, name) {
|
||||||
|
owc.show_on_spawn = true;
|
||||||
|
Some(owc)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}),
|
||||||
)));
|
)));
|
||||||
}),
|
}),
|
||||||
)));
|
)));
|
||||||
|
|||||||
Reference in New Issue
Block a user