Esc closes the config window; a removed empty workspace closes up during the switch
Hyprland drops an empty workspace the moment it's left, so its number vanished and the row jumped before the disc slid. Its slot now stays for the slide, shrinking and fading, and the pill narrows with it.
This commit is contained in:
+7
-1
@@ -3,7 +3,7 @@ use std::collections::HashMap;
|
||||
use std::process::Command;
|
||||
|
||||
use amane::{
|
||||
Center, Color, Column, Cursor, End, Full, Padding, Rectangle, Row, ScrollArea, Service, SpaceBetween, Stack, Start, Text, TextInput, Weight, Widget, Window, children, close_window, open_window, window_size,
|
||||
Center, Color, Column, Cursor, End, Full, Key, Padding, Rectangle, Row, ScrollArea, Service, SpaceBetween, Stack, Start, Text, TextInput, Weight, Widget, Window, children, close_window, open_window, window_size,
|
||||
};
|
||||
|
||||
use crate::config::{self, Kind, Opt};
|
||||
@@ -283,6 +283,12 @@ pub fn view() -> Window {
|
||||
.title(TITLE)
|
||||
.size(1100.0, 760.0)
|
||||
.resizable(true)
|
||||
// Escape closes it, also from a field (a typed value only applies on Enter)
|
||||
.on_key(|key| {
|
||||
if key == Key::Escape {
|
||||
close_window(NAME);
|
||||
}
|
||||
})
|
||||
.child(
|
||||
Rectangle::new()
|
||||
.width(width)
|
||||
|
||||
Reference in New Issue
Block a user