forge
Explore
Log in

Don't you dare go Hollow

visual-tests: Remove "Just" prefix

Browse files at this commit

15ec699fbbc9fc7fe1c865aa96584bec15fd2831Ivan MolodetskikhParent: a1cc39a
niri-visual-tests/src/cases/tile.rsmodified+5 -6
@@ -1,7 +1,6 @@
1 use std::rc::Rc;1 use std::rc::Rc;
2 use std::time::Duration;2 use std::time::Duration;
3 3
4-use niri::layout::tile::Tile;
5 use niri::layout::Options;4 use niri::layout::Options;
6 use niri_config::Color;5 use niri_config::Color;
7 use smithay::backend::renderer::element::RenderElement;6 use smithay::backend::renderer::element::RenderElement;
@@ -11,12 +10,12 @@ use smithay::utils::{Logical, Physical, Point, Scale, Size};
11 use super::TestCase;10 use super::TestCase;
12 use crate::test_window::TestWindow;11 use crate::test_window::TestWindow;
13 12
14-pub struct JustTile {13+pub struct Tile {
15 window: TestWindow,14 window: TestWindow,
16- tile: Tile<TestWindow>,15+ tile: niri::layout::tile::Tile<TestWindow>,
17 }16 }
18 17
19-impl JustTile {18+impl Tile {
20 pub fn freeform(size: Size<i32, Logical>) -> Self {19 pub fn freeform(size: Size<i32, Logical>) -> Self {
21 let window = TestWindow::freeform(0);20 let window = TestWindow::freeform(0);
22 let mut rv = Self::with_window(window);21 let mut rv = Self::with_window(window);
@@ -56,12 +55,12 @@ impl JustTile {
56 },55 },
57 ..Default::default()56 ..Default::default()
58 };57 };
59- let tile = Tile::new(window.clone(), Rc::new(options));58+ let tile = niri::layout::tile::Tile::new(window.clone(), Rc::new(options));
60 Self { window, tile }59 Self { window, tile }
61 }60 }
62 }61 }
63 62
64-impl TestCase for JustTile {63+impl TestCase for Tile {
65 fn resize(&mut self, width: i32, height: i32) {64 fn resize(&mut self, width: i32, height: i32) {
66 self.tile.request_tile_size(Size::from((width, height)));65 self.tile.request_tile_size(Size::from((width, height)));
67 self.window.communicate();66 self.window.communicate();
niri-visual-tests/src/cases/window.rsmodified+3 -3
@@ -6,11 +6,11 @@ use smithay::utils::{Logical, Physical, Point, Scale, Size};
6 use super::TestCase;6 use super::TestCase;
7 use crate::test_window::TestWindow;7 use crate::test_window::TestWindow;
8 8
9-pub struct JustWindow {9+pub struct Window {
10 window: TestWindow,10 window: TestWindow,
11 }11 }
12 12
13-impl JustWindow {13+impl Window {
14 pub fn freeform(size: Size<i32, Logical>) -> Self {14 pub fn freeform(size: Size<i32, Logical>) -> Self {
15 let window = TestWindow::freeform(0);15 let window = TestWindow::freeform(0);
16 window.request_size(size);16 window.request_size(size);
@@ -34,7 +34,7 @@ impl JustWindow {
34 }34 }
35 }35 }
36 36
37-impl TestCase for JustWindow {37+impl TestCase for Window {
38 fn resize(&mut self, width: i32, height: i32) {38 fn resize(&mut self, width: i32, height: i32) {
39 self.window.request_size(Size::from((width, height)));39 self.window.request_size(Size::from((width, height)));
40 self.window.communicate();40 self.window.communicate();
niri-visual-tests/src/main.rsmodified+8 -8
@@ -5,8 +5,8 @@ use std::env;
5 use std::sync::atomic::Ordering;5 use std::sync::atomic::Ordering;
6 6
7 use adw::prelude::{AdwApplicationWindowExt, NavigationPageExt};7 use adw::prelude::{AdwApplicationWindowExt, NavigationPageExt};
8-use cases::tile::JustTile;8+use cases::tile::Tile;
9-use cases::window::JustWindow;9+use cases::window::Window;
10 use gtk::prelude::{10 use gtk::prelude::{
11 AdjustmentExt, ApplicationExt, ApplicationExtManual, BoxExt, GtkWindowExt, WidgetExt,11 AdjustmentExt, ApplicationExt, ApplicationExtManual, BoxExt, GtkWindowExt, WidgetExt,
12 };12 };
@@ -72,17 +72,17 @@ fn build_ui(app: &adw::Application) {
72 stack: stack.clone(),72 stack: stack.clone(),
73 };73 };
74 74
75- s.add(JustWindow::freeform, "Freeform Window");75+ s.add(Window::freeform, "Freeform Window");
76- s.add(JustWindow::fixed_size, "Fixed Size Window");76+ s.add(Window::fixed_size, "Fixed Size Window");
77 s.add(77 s.add(
78- JustWindow::fixed_size_with_csd_shadow,78+ Window::fixed_size_with_csd_shadow,
79 "Fixed Size Window - CSD Shadow",79 "Fixed Size Window - CSD Shadow",
80 );80 );
81 81
82- s.add(JustTile::freeform, "Freeform Tile");82+ s.add(Tile::freeform, "Freeform Tile");
83- s.add(JustTile::fixed_size, "Fixed Size Tile");83+ s.add(Tile::fixed_size, "Fixed Size Tile");
84 s.add(84 s.add(
85- JustTile::fixed_size_with_csd_shadow,85+ Tile::fixed_size_with_csd_shadow,
86 "Fixed Size Tile - CSD Shadow",86 "Fixed Size Tile - CSD Shadow",
87 );87 );
88 88