- Opens for text-input-v3 fields, terminals, launcher search, Network password, emoji picker and the password dialog; a KB pill summons it manually. - Enabled on CHASSIS=handset; CHANDRA_OSK=1|0 overrides, and it stays off under CHANDRA_TEST_CONFIG. - Work area and panel popups shrink above the keyboard so focused content stays visible. - Keys send evdev codes with Shift, Ctrl and Alt modifiers. - chandra-ctl: `screenshot [PATH]` saves a PNG without opening the editor. - Key names cover the full punctuation set and shifted symbols. - Launcher plasmoid min width drops from 60 to 36.
This commit is contained in:
1 parent
1205329abd
commit
905dab8725
21 files changed
+1335
-68
No files matched your search
@@ -34,6 +34,20 @@ fn fresh_panel(has_battery : Bool) -> Array[String] {
|
||||
out
|
||||
}
|
||||
|
||||
///| Compact default panel for handsets (omits desktop-only inspector, tiling toggle, and moon
|
||||
/// disc so the dock, launcher, settings, Wi-Fi, battery, clock, and screenshot have room).
|
||||
let handset_panel : Array[String] = [
|
||||
"launcher", "dock", "session-settings", "network", "battery", "clock-digital", "screenshot",
|
||||
]
|
||||
|
||||
///| Whether a fresh session runs on a handset chassis (tests keep the desktop layout).
|
||||
fn is_handset_panel() -> Bool {
|
||||
if @sys.getenv("CHANDRA_TEST_CONFIG") != "" {
|
||||
return false
|
||||
}
|
||||
@utf8.decode_lossy(@sys.read_file_bytes("/etc/machine-info")).contains("CHASSIS=handset")
|
||||
}
|
||||
|
||||
///|
|
||||
test "a fresh panel gets the battery module only on a machine with a battery" {
|
||||
assert_false(fresh_panel(false).contains("battery"))
|
||||
@@ -189,12 +203,23 @@ fn DesktopShell::panel_slots(self : DesktopShell) -> Array[@panel.SlotIn] {
|
||||
first_stretch = i
|
||||
}
|
||||
}
|
||||
let compact = self.screen_w > 0 && self.screen_w < 720
|
||||
let out : Array[@panel.SlotIn] = []
|
||||
for i = 0; i < self.widgets.length(); i = i + 1 {
|
||||
let w = self.widgets[i]
|
||||
let base_w = self.dock_width(w).unwrap_or(w.pl.pref_w)
|
||||
let pref_w = if compact &&
|
||||
(w.module_id == "launcher" ||
|
||||
w.module_id == "session-settings" ||
|
||||
w.module_id == "network" ||
|
||||
w.module_id == "screenshot") {
|
||||
36
|
||||
} else {
|
||||
base_w
|
||||
}
|
||||
out.push({
|
||||
id: w.slot,
|
||||
pref_w: self.dock_width(w).unwrap_or(w.pl.pref_w),
|
||||
pref_w,
|
||||
pref_h: w.pl.pref_h,
|
||||
min_w: w.pl.min_w,
|
||||
stretch: w.pl.stretch,
|
||||
@@ -337,7 +362,12 @@ fn DesktopShell::ensure_booted(self : DesktopShell) -> Unit {
|
||||
let saved = self.load_panel_config()
|
||||
let entries = match saved {
|
||||
Some(e) => migrate_panel(e)
|
||||
None => fresh_panel(read_battery().state != 0)
|
||||
None =>
|
||||
if is_handset_panel() {
|
||||
handset_panel
|
||||
} else {
|
||||
fresh_panel(read_battery().state != 0)
|
||||
}
|
||||
}
|
||||
match saved {
|
||||
Some(old) if saved_panel_version() < panel_version => {
|
||||
@@ -972,7 +1002,12 @@ fn DesktopShell::refresh_popup(self : DesktopShell, w : Widget) -> Unit {
|
||||
w.popup_hot = false
|
||||
}
|
||||
Some(ps) => {
|
||||
let (px, py) = @panel.popup_position(self.screen_w, self.screen_h - self.panel_h, w.rect.x, ps.w, ps.h, 6)
|
||||
let bottom = if self.popup_bottom_inset > self.panel_h {
|
||||
self.popup_bottom_inset
|
||||
} else {
|
||||
self.panel_h
|
||||
}
|
||||
let (px, py) = @panel.popup_position(self.screen_w, self.screen_h - bottom, w.rect.x, ps.w, ps.h, 6)
|
||||
w.popup_rect = { x: px, y: py, w: ps.w, h: ps.h }
|
||||
w.popup_ops = ps.ops
|
||||
if !was_open {
|
||||
|
||||
Reference in new issue
Block a user