renderer: add support for floating-titlebars (#4)
Reviewed-on: https://git.kosslan.dev/wry/jay/pulls/4
This commit is contained in:
parent
4d803360dd
commit
6dba659978
13 changed files with 316 additions and 158 deletions
|
|
@ -1421,6 +1421,16 @@ impl ConfigProxyHandler {
|
|||
});
|
||||
}
|
||||
|
||||
fn handle_set_floating_titles(&self, floating: bool) {
|
||||
self.state.set_floating_titles(floating);
|
||||
}
|
||||
|
||||
fn handle_get_floating_titles(&self) {
|
||||
self.respond(Response::GetFloatingTitles {
|
||||
floating: self.state.theme.floating_titles.get(),
|
||||
});
|
||||
}
|
||||
|
||||
fn handle_set_bar_position(&self, position: BarPosition) -> Result<(), CphError> {
|
||||
let Ok(position) = position.try_into() else {
|
||||
return Err(CphError::UnknownBarPosition(position));
|
||||
|
|
@ -2441,6 +2451,7 @@ impl ConfigProxyHandler {
|
|||
BAR_HEIGHT => ThemeSized::bar_height,
|
||||
BAR_SEPARATOR_WIDTH => ThemeSized::bar_separator_width,
|
||||
GAP => ThemeSized::gap,
|
||||
TITLE_GAP => ThemeSized::title_gap,
|
||||
_ => return Err(CphError::UnknownSized(sized.0)),
|
||||
};
|
||||
Ok(sized)
|
||||
|
|
@ -3291,6 +3302,10 @@ impl ConfigProxyHandler {
|
|||
ClientMessage::GetShowBar => self.handle_get_show_bar(),
|
||||
ClientMessage::SetShowTitles { show } => self.handle_set_show_titles(show),
|
||||
ClientMessage::GetShowTitles => self.handle_get_show_titles(),
|
||||
ClientMessage::SetFloatingTitles { floating } => {
|
||||
self.handle_set_floating_titles(floating)
|
||||
}
|
||||
ClientMessage::GetFloatingTitles => self.handle_get_floating_titles(),
|
||||
ClientMessage::SetBarPosition { position } => self
|
||||
.handle_set_bar_position(position)
|
||||
.wrn("set_bar_position")?,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue