visual-tests: Remove "Just" prefix

This commit is contained in:
Ivan Molodetskikh
2024-02-07 09:24:41 +04:00
parent a1cc39a437
commit 15ec699fbb
3 changed files with 16 additions and 17 deletions
+5 -6
View File
@@ -1,7 +1,6 @@
use std::rc::Rc;
use std::time::Duration;
use niri::layout::tile::Tile;
use niri::layout::Options;
use niri_config::Color;
use smithay::backend::renderer::element::RenderElement;
@@ -11,12 +10,12 @@ use smithay::utils::{Logical, Physical, Point, Scale, Size};
use super::TestCase;
use crate::test_window::TestWindow;
pub struct JustTile {
pub struct Tile {
window: TestWindow,
tile: Tile<TestWindow>,
tile: niri::layout::tile::Tile<TestWindow>,
}
impl JustTile {
impl Tile {
pub fn freeform(size: Size<i32, Logical>) -> Self {
let window = TestWindow::freeform(0);
let mut rv = Self::with_window(window);
@@ -56,12 +55,12 @@ impl JustTile {
},
..Default::default()
};
let tile = Tile::new(window.clone(), Rc::new(options));
let tile = niri::layout::tile::Tile::new(window.clone(), Rc::new(options));
Self { window, tile }
}
}
impl TestCase for JustTile {
impl TestCase for Tile {
fn resize(&mut self, width: i32, height: i32) {
self.tile.request_tile_size(Size::from((width, height)));
self.window.communicate();
+3 -3
View File
@@ -6,11 +6,11 @@ use smithay::utils::{Logical, Physical, Point, Scale, Size};
use super::TestCase;
use crate::test_window::TestWindow;
pub struct JustWindow {
pub struct Window {
window: TestWindow,
}
impl JustWindow {
impl Window {
pub fn freeform(size: Size<i32, Logical>) -> Self {
let window = TestWindow::freeform(0);
window.request_size(size);
@@ -34,7 +34,7 @@ impl JustWindow {
}
}
impl TestCase for JustWindow {
impl TestCase for Window {
fn resize(&mut self, width: i32, height: i32) {
self.window.request_size(Size::from((width, height)));
self.window.communicate();
+8 -8
View File
@@ -5,8 +5,8 @@ use std::env;
use std::sync::atomic::Ordering;
use adw::prelude::{AdwApplicationWindowExt, NavigationPageExt};
use cases::tile::JustTile;
use cases::window::JustWindow;
use cases::tile::Tile;
use cases::window::Window;
use gtk::prelude::{
AdjustmentExt, ApplicationExt, ApplicationExtManual, BoxExt, GtkWindowExt, WidgetExt,
};
@@ -72,17 +72,17 @@ fn build_ui(app: &adw::Application) {
stack: stack.clone(),
};
s.add(JustWindow::freeform, "Freeform Window");
s.add(JustWindow::fixed_size, "Fixed Size Window");
s.add(Window::freeform, "Freeform Window");
s.add(Window::fixed_size, "Fixed Size Window");
s.add(
JustWindow::fixed_size_with_csd_shadow,
Window::fixed_size_with_csd_shadow,
"Fixed Size Window - CSD Shadow",
);
s.add(JustTile::freeform, "Freeform Tile");
s.add(JustTile::fixed_size, "Fixed Size Tile");
s.add(Tile::freeform, "Freeform Tile");
s.add(Tile::fixed_size, "Fixed Size Tile");
s.add(
JustTile::fixed_size_with_csd_shadow,
Tile::fixed_size_with_csd_shadow,
"Fixed Size Tile - CSD Shadow",
);