- 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
@@ -38,7 +38,7 @@ pub let critical_percent : Int = 10
|
||||
///|
|
||||
pub fn info() -> (String, String, Int, Int, Int) {
|
||||
// id, name, preferred w, preferred h, min w
|
||||
("org.chandra.battery", "Battery", 104, 34, 34)
|
||||
("org.chandra.battery", "Battery", 76, 34, 34)
|
||||
}
|
||||
|
||||
///|
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
///|
|
||||
pub fn digital_info() -> (String, String, Int, Int, Int) {
|
||||
// id, name, preferred w, preferred h, min w
|
||||
("org.chandra.clock.digital", "Digital Clock", 120, 36, 80)
|
||||
("org.chandra.clock.digital", "Digital Clock", 96, 36, 80)
|
||||
}
|
||||
|
||||
///|
|
||||
|
||||
@@ -190,7 +190,7 @@ pub fn close(st : State) -> Unit {
|
||||
st.armed = -1
|
||||
}
|
||||
|
||||
///| The panel button: a crescent moon plus a label.
|
||||
///| The panel button: a crescent moon plus a label (shortens to "Apps" or icon-only when tight).
|
||||
pub fn render_button(
|
||||
size : @types.Size,
|
||||
t : @theme.Tokens,
|
||||
@@ -201,14 +201,24 @@ pub fn render_button(
|
||||
let bg = if st.open { t.palette.accent } else { t.palette.surface_hover }
|
||||
let fg = if st.open { t.palette.accent_foreground } else { t.palette.foreground }
|
||||
let r = t.radius.reinterpret_as_int()
|
||||
let fs = t.font_size.reinterpret_as_int()
|
||||
let cy = h / 2
|
||||
[
|
||||
@ui.fill_rect(@ui.rect(0, 0, w, h), bg, radius=r),
|
||||
let ops = [@ui.fill_rect(@ui.rect(0, 0, w, h), bg, radius=r)]
|
||||
if 36 + @ui.text_width("Applications", fs) + 12 <= w {
|
||||
// Crescent: light disc with a button-coloured disc biting into it.
|
||||
@ui.circle(18, cy, 9, fg),
|
||||
@ui.circle(22, cy - 3, 8, bg),
|
||||
@ui.text(36, cy, "Applications", t.font_size.reinterpret_as_int(), fg, bold=true),
|
||||
]
|
||||
ops.push(@ui.circle(18, cy, 9, fg))
|
||||
ops.push(@ui.circle(22, cy - 3, 8, bg))
|
||||
ops.push(@ui.text(36, cy, "Applications", fs, fg, bold=true))
|
||||
} else if 34 + @ui.text_width("Apps", fs) + 10 <= w {
|
||||
ops.push(@ui.circle(17, cy, 9, fg))
|
||||
ops.push(@ui.circle(21, cy - 3, 8, bg))
|
||||
ops.push(@ui.text(34, cy, "Apps", fs, fg, bold=true))
|
||||
} else {
|
||||
let cx = w / 2
|
||||
ops.push(@ui.circle(cx, cy, 9, fg))
|
||||
ops.push(@ui.circle(cx + 4, cy - 3, 8, bg))
|
||||
}
|
||||
ops
|
||||
}
|
||||
|
||||
///|
|
||||
|
||||
Reference in new issue
Block a user