Migrate away from Rectangle::from_loc_and_size

Deprecated in `smithay` by https://github.com/Smithay/smithay/pull/1621.
This commit is contained in:
Ian Douglas Scott 2024-12-26 18:18:35 -08:00 committed by Victoria Brekenfeld
parent 9074447c4f
commit b685512127
26 changed files with 184 additions and 201 deletions

View file

@ -491,7 +491,7 @@ impl CosmicStack {
let loc = (geo.loc.x, geo.loc.y + TAB_HEIGHT);
let size = (geo.size.w, geo.size.h - TAB_HEIGHT);
let win_geo = Rectangle::from_loc_and_size(loc, size);
let win_geo = Rectangle::new(loc.into(), size.into());
for window in p.windows.lock().unwrap().iter() {
window.set_geometry(win_geo, TAB_HEIGHT as u32);
}
@ -1045,9 +1045,9 @@ impl Program for CosmicStackInternal {
theme: &Theme,
) {
if self.group_focused.load(Ordering::SeqCst) {
let border = Rectangle::from_loc_and_size(
(0, ((TAB_HEIGHT as f32 * scale) - scale).floor() as i32),
(pixels.width() as i32, scale.ceil() as i32),
let border = Rectangle::new(
(0, ((TAB_HEIGHT as f32 * scale) - scale).floor() as i32).into(),
(pixels.width() as i32, scale.ceil() as i32).into(),
);
let mut paint = tiny_skia::Paint::default();