feat: make canvas refresh more efficient
This commit is contained in:
parent
b430c80000
commit
8447fdef5d
5 changed files with 507 additions and 408 deletions
|
|
@ -164,7 +164,7 @@ pub fn SettingsPopup(
|
|||
|
||||
// Zoom controls (only when panning enabled)
|
||||
<Show when=move || panning.get()>
|
||||
<div class="pl-4 border-l-2 border-gray-600 space-y-2">
|
||||
<div class="space-y-2">
|
||||
<label class="block text-white font-medium">
|
||||
"Zoom: " {move || format!("{}%", (zoom.get() * 100.0) as i32)}
|
||||
</label>
|
||||
|
|
@ -173,7 +173,7 @@ pub fn SettingsPopup(
|
|||
type="button"
|
||||
class="px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
on:click=on_zoom_decrease
|
||||
disabled=move || zoom.get() <= effective_min_zoom.get()
|
||||
disabled={move || zoom.get() <= effective_min_zoom.get()}
|
||||
aria-label="Zoom out"
|
||||
>
|
||||
"-"
|
||||
|
|
@ -192,7 +192,7 @@ pub fn SettingsPopup(
|
|||
type="button"
|
||||
class="px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
on:click=on_zoom_increase
|
||||
disabled=move || zoom.get() >= ZOOM_MAX
|
||||
disabled={move || zoom.get() >= ZOOM_MAX}
|
||||
aria-label="Zoom in"
|
||||
>
|
||||
"+"
|
||||
|
|
@ -201,15 +201,13 @@ pub fn SettingsPopup(
|
|||
</div>
|
||||
</Show>
|
||||
|
||||
// Enlarge props toggle (only when panning disabled)
|
||||
<Show when=move || !panning.get()>
|
||||
<SettingsToggle
|
||||
label="Enlarge Props"
|
||||
description="Scale props relative to 1920x1080 for consistent size"
|
||||
checked=enlarge
|
||||
on_change=on_enlarge_toggle
|
||||
/>
|
||||
</Show>
|
||||
// Enlarge props toggle (always visible)
|
||||
<SettingsToggle
|
||||
label="Enlarge Props"
|
||||
description="Scale props relative to 1920x1080 for consistent size"
|
||||
checked=enlarge
|
||||
on_change=on_enlarge_toggle
|
||||
/>
|
||||
</div>
|
||||
|
||||
// Keyboard shortcuts help
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue