feat(settings): refine density, group detailed options and add edge maximize gestures
This commit is contained in:
1 parent
d7e122711a
commit
9908dde9f8
11 files changed
+588
-195
No files matched your search
@@ -128,6 +128,7 @@ enum Message {
|
||||
RefreshRate(String, displays::Mode, bool),
|
||||
ThemeChanged(Box<ferese_ipc::theme::Snapshot>),
|
||||
DragWindow,
|
||||
ToggleMaximize,
|
||||
Page(Page),
|
||||
PagePresented(Page),
|
||||
RowVisibility(&'static str, usize, bool),
|
||||
@@ -378,6 +379,7 @@ impl cosmic::Application for App {
|
||||
Message::RefreshTrayApps => return self.load_tray_apps(),
|
||||
Message::Options(input) => return self.options_input(input),
|
||||
Message::DragWindow => return self.core.drag(None),
|
||||
Message::ToggleMaximize => return self.core.toggle_maximize(None),
|
||||
Message::ReadRenderScale(id) => {
|
||||
return cosmic::iced::window::scale_factor(id)
|
||||
.map(|scale| cosmic::Action::App(Message::RenderScale(scale)));
|
||||
@@ -1268,9 +1270,11 @@ mod tests {
|
||||
let mut app = app();
|
||||
app.core.set_main_window_id(None);
|
||||
assert_eq!(app.update(Message::DragWindow).units(), 0);
|
||||
assert_eq!(app.update(Message::ToggleMaximize).units(), 0);
|
||||
app.core
|
||||
.set_main_window_id(Some(cosmic::iced::window::Id::unique()));
|
||||
assert_eq!(app.update(Message::DragWindow).units(), 1);
|
||||
assert_eq!(app.update(Message::ToggleMaximize).units(), 1);
|
||||
}
|
||||
|
||||
fn shortcuts(count: usize) -> App {
|
||||
@@ -1636,10 +1640,9 @@ mod tests {
|
||||
app.visible_rows
|
||||
.extend((0..100).map(|index| ("bindings", index)));
|
||||
let eager = nodes(&app);
|
||||
assert!(
|
||||
eager > visible + 96 * 10,
|
||||
"visible={visible}, eager={eager}"
|
||||
);
|
||||
// Mounting only visible rows should cut the widget tree substantially,
|
||||
// independently of how many wrappers a field label uses.
|
||||
assert!(eager > visible * 2, "visible={visible}, eager={eager}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user