all: remove traditional i3 titlebars, add corner rounding
This commit is contained in:
parent
e1928863d9
commit
a41dbae899
52 changed files with 1866 additions and 1047 deletions
|
|
@ -2025,6 +2025,16 @@ impl ConfigClient {
|
|||
self.send(&ClientMessage::SetPointerRevertKey { seat, key });
|
||||
}
|
||||
|
||||
pub fn set_corner_radius(&self, radius: f32) {
|
||||
self.send(&ClientMessage::SetCornerRadius { radius });
|
||||
}
|
||||
|
||||
pub fn get_corner_radius(&self) -> f32 {
|
||||
let res = self.send_with_response(&ClientMessage::GetCornerRadius);
|
||||
get_response!(res, 0.0, GetCornerRadius { radius });
|
||||
radius
|
||||
}
|
||||
|
||||
fn handle_msg(&self, msg: &[u8]) {
|
||||
self.handle_msg2(msg);
|
||||
self.dispatch_futures();
|
||||
|
|
|
|||
|
|
@ -880,6 +880,10 @@ pub enum ClientMessage<'a> {
|
|||
seat: Seat,
|
||||
enabled: bool,
|
||||
},
|
||||
SetCornerRadius {
|
||||
radius: f32,
|
||||
},
|
||||
GetCornerRadius,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
@ -1136,6 +1140,9 @@ pub enum Response {
|
|||
ConnectorSupportsArbitraryModes {
|
||||
supports_arbitrary_modes: bool,
|
||||
},
|
||||
GetCornerRadius {
|
||||
radius: f32,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -382,6 +382,18 @@ pub fn toggle_floating_titles() {
|
|||
get.set_floating_titles(!get.get_floating_titles());
|
||||
}
|
||||
|
||||
/// Sets the corner radius for window borders.
|
||||
///
|
||||
/// A radius of 0 means square corners. The radius is in logical pixels.
|
||||
pub fn set_corner_radius(radius: f32) {
|
||||
get!().set_corner_radius(radius)
|
||||
}
|
||||
|
||||
/// Returns the current corner radius for window borders.
|
||||
pub fn get_corner_radius() -> f32 {
|
||||
get!(0.0).get_corner_radius()
|
||||
}
|
||||
|
||||
/// Sets a callback to run when this config is unloaded.
|
||||
///
|
||||
/// Only one callback can be set at a time. If another callback is already set, it will be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue