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 @@
11 use std::rc::Rc;
22 use std::time::Duration;
33
4-use niri::layout::tile::Tile;
54 use niri::layout::Options;
65 use niri_config::Color;
76 use smithay::backend::renderer::element::RenderElement;
@@ -11,12 +10,12 @@ use smithay::utils::{Logical, Physical, Point, Scale, Size};
1110 use super::TestCase;
1211 use crate::test_window::TestWindow;
1312
14-pub struct JustTile {
13+pub struct Tile {
1514 window: TestWindow,
16- tile: Tile<TestWindow>,
15+ tile: niri::layout::tile::Tile<TestWindow>,
1716 }
1817
19-impl JustTile {
18+impl Tile {
2019 pub fn freeform(size: Size<i32, Logical>) -> Self {
2120 let window = TestWindow::freeform(0);
2221 let mut rv = Self::with_window(window);
@@ -56,12 +55,12 @@ impl JustTile {
5655 },
5756 ..Default::default()
5857 };
59- let tile = Tile::new(window.clone(), Rc::new(options));
58+ let tile = niri::layout::tile::Tile::new(window.clone(), Rc::new(options));
6059 Self { window, tile }
6160 }
6261 }
6362
64-impl TestCase for JustTile {
63+impl TestCase for Tile {
6564 fn resize(&mut self, width: i32, height: i32) {
6665 self.tile.request_tile_size(Size::from((width, height)));
6766 self.window.communicate();
niri-visual-tests/src/cases/window.rsmodified+3 -3
@@ -6,11 +6,11 @@ use smithay::utils::{Logical, Physical, Point, Scale, Size};
66 use super::TestCase;
77 use crate::test_window::TestWindow;
88
9-pub struct JustWindow {
9+pub struct Window {
1010 window: TestWindow,
1111 }
1212
13-impl JustWindow {
13+impl Window {
1414 pub fn freeform(size: Size<i32, Logical>) -> Self {
1515 let window = TestWindow::freeform(0);
1616 window.request_size(size);
@@ -34,7 +34,7 @@ impl JustWindow {
3434 }
3535 }
3636
37-impl TestCase for JustWindow {
37+impl TestCase for Window {
3838 fn resize(&mut self, width: i32, height: i32) {
3939 self.window.request_size(Size::from((width, height)));
4040 self.window.communicate();
niri-visual-tests/src/main.rsmodified+8 -8
@@ -5,8 +5,8 @@ use std::env;
55 use std::sync::atomic::Ordering;
66
77 use adw::prelude::{AdwApplicationWindowExt, NavigationPageExt};
8-use cases::tile::JustTile;
9-use cases::window::JustWindow;
8+use cases::tile::Tile;
9+use cases::window::Window;
1010 use gtk::prelude::{
1111 AdjustmentExt, ApplicationExt, ApplicationExtManual, BoxExt, GtkWindowExt, WidgetExt,
1212 };
@@ -72,17 +72,17 @@ fn build_ui(app: &adw::Application) {
7272 stack: stack.clone(),
7373 };
7474
75- s.add(JustWindow::freeform, "Freeform Window");
76- s.add(JustWindow::fixed_size, "Fixed Size Window");
75+ s.add(Window::freeform, "Freeform Window");
76+ s.add(Window::fixed_size, "Fixed Size Window");
7777 s.add(
78- JustWindow::fixed_size_with_csd_shadow,
78+ Window::fixed_size_with_csd_shadow,
7979 "Fixed Size Window - CSD Shadow",
8080 );
8181
82- s.add(JustTile::freeform, "Freeform Tile");
83- s.add(JustTile::fixed_size, "Fixed Size Tile");
82+ s.add(Tile::freeform, "Freeform Tile");
83+ s.add(Tile::fixed_size, "Fixed Size Tile");
8484 s.add(
85- JustTile::fixed_size_with_csd_shadow,
85+ Tile::fixed_size_with_csd_shadow,
8686 "Fixed Size Tile - CSD Shadow",
8787 );
8888