1
0
Fork 0
forked from wry/wry

theme: add bar-separator-width setting

This commit is contained in:
Stipe Kotarac 2025-12-01 18:15:11 +01:00
parent f5ed6f8fac
commit a6e629dd2f
16 changed files with 163 additions and 31 deletions

View file

@ -16,6 +16,7 @@ use {
Axis, Direction,
input::{InputDevice, Seat},
keyboard::{Keymap, ModifiedKeySym},
theme::{BarPosition, sized::BAR_SEPARATOR_WIDTH},
video::{Connector, Transform},
},
std::{cell::Cell, ops::Deref, ptr, rc::Rc, time::Duration},
@ -301,6 +302,27 @@ impl TestConfig {
transform,
})
}
pub fn set_bar_separator_width(&self, width: i32) -> TestResult {
self.send(ClientMessage::SetSize {
sized: BAR_SEPARATOR_WIDTH,
size: width,
})
}
pub fn set_bar_position(&self, position: BarPosition) -> TestResult {
self.send(ClientMessage::SetBarPosition { position })
}
pub fn set_show_bar(&self, show: bool) -> TestResult {
self.send(ClientMessage::SetShowBar { show })
}
pub fn get_show_bar(&self) -> Result<bool, TestError> {
let reply = self.send_with_reply(ClientMessage::GetShowBar)?;
get_response!(reply, GetShowBar { show });
Ok(show)
}
}
impl Drop for TestConfig {