Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
68912f6d64
commit
444d67ac79
7 files changed
+51
-16
No files matched your search
+20
-7
@@ -95,17 +95,30 @@ pub fn ChandraCompositor::osk_key_center(self : ChandraCompositor, label : Strin
|
||||
None
|
||||
}
|
||||
|
||||
///| Height of the on-screen keyboard when shown.
|
||||
pub fn ChandraCompositor::osk_height(self : ChandraCompositor) -> Int {
|
||||
let half = self.output_h / 2
|
||||
let h = if 236 < half { 236 } else { half }
|
||||
if h < 120 { (120).min(self.output_h) } else { h }
|
||||
///| Room kept below the keyboard for the panel (none in a strict kiosk, which has no panel).
|
||||
fn ChandraCompositor::osk_panel_room(self : ChandraCompositor) -> Int {
|
||||
if self.kiosk_strict() { 0 } else { self.theme.panel_height }
|
||||
}
|
||||
|
||||
///| Bounding rectangle of the visible on-screen keyboard.
|
||||
///| Height of the on-screen keyboard when shown.
|
||||
pub fn ChandraCompositor::osk_height(self : ChandraCompositor) -> Int {
|
||||
let room = self.output_h - self.osk_panel_room()
|
||||
let half = room / 2
|
||||
let h = if 236 < half { 236 } else { half }
|
||||
if h < 120 { (120).min(room) } else { h }
|
||||
}
|
||||
|
||||
///| How much of the bottom of the output the open keyboard takes, the panel under it included
|
||||
/// (0 while it is hidden).
|
||||
fn ChandraCompositor::osk_bottom_inset(self : ChandraCompositor) -> Int {
|
||||
if self.osk_visible { self.output_h - self.osk_rect().y } else { 0 }
|
||||
}
|
||||
|
||||
///| Bounding rectangle of the visible on-screen keyboard: it sits on top of the panel, which
|
||||
/// stays visible and usable.
|
||||
pub fn ChandraCompositor::osk_rect(self : ChandraCompositor) -> @scene.Rect {
|
||||
let h = self.osk_height()
|
||||
@scene.Rect::new(0, self.output_h - h, self.output_w, h)
|
||||
@scene.Rect::new(0, self.output_h - self.osk_panel_room() - h, self.output_w, h)
|
||||
}
|
||||
|
||||
///| Compact "KB" pill above the bottom-right corner of the panel when the OSK is enabled but
|
||||
|
||||
Reference in new issue
Block a user