feat(gui): responsive low-res layout, display modal and hotkeys
Some checks are pending
ci / test (push) Waiting to run
Some checks are pending
ci / test (push) Waiting to run
This commit is contained in:
parent
86c477085c
commit
28536e2c1f
6 changed files with 392 additions and 159 deletions
|
|
@ -3,6 +3,24 @@
|
|||
All notable changes are recorded here. The authoritative history is `git log`;
|
||||
this file is the curated, human-readable summary.
|
||||
|
||||
## 2026-09-23 — Responsive display layout, resolution modal & hotkeys, and fullscreen installer
|
||||
|
||||
- **Display Resolution Switcher & Hotkeys (`phoebus-welcome`, Mango config):**
|
||||
Added a dedicated 1-click Display Resolution dialog in `phoebus-welcome` allowing
|
||||
instant switching between 1920×1080 (Full HD), 1440×900, 1280×768 (Standard),
|
||||
1024×768, and 800×600 modes without blurry bilinear scaling. Mapped global Mango
|
||||
hotkeys (`Super+Shift+F12` for 1080p, `Super+Shift+F11` for 900p, `Super+Shift+F10`
|
||||
for 768p, `Super+Shift+F9` for 1024x768) and set virtual display auto-probe to
|
||||
prioritize widescreen (1280x768) on initial boot.
|
||||
- **Low-Resolution Responsiveness & Scrollability (QML):**
|
||||
Wrapped both `phoebus-welcome` and `phoebus-install` form/progress views in
|
||||
bounded `Flickable` containers with `ScrollBar.vertical`. Added compact view
|
||||
adaptation (< 760px) in `phoebus-welcome` so the primary action stacks cleanly with
|
||||
flow-wrapped readiness chips, eliminating text clipping and ensuring all recovery tools
|
||||
and form controls are reachable on 800×600 and 640×480 screens.
|
||||
- **Fullscreen Installer Enforcement:** Closed the welcome window on launching the
|
||||
installer and set compositor fullscreen rules, eliminating any 50/50 window tiling splits.
|
||||
|
||||
## 2026-09-23 — Installer GUI usability, OpenCode model variants, and GURU mirror fix
|
||||
|
||||
- **Gentoo GURU Official Mirror (`phoebus-core::system`):** Updated `GURU_REPO_URI`
|
||||
|
|
|
|||
|
|
@ -3,20 +3,25 @@
|
|||
Rolling note between work sessions. **Update this file before you finish**, then
|
||||
commit it. It should be short and current; use `git log` for detail.
|
||||
|
||||
- **Last updated:** this session (2026-09-23), Installer GUI usability, OpenCode model variants, and Gentoo GURU overlay fix.
|
||||
- **Last updated:** this session (2026-09-23), Responsive display layout, 1-click resolution switcher & hotkeys, and fullscreen installer.
|
||||
- **Current focus:**
|
||||
1. Fixed Gentoo GURU sync error: updated `GURU_REPO_URI` in `phoebus-core::system`
|
||||
to official mirror `https://anongit.gentoo.org/git/repo/proj/guru.git`, fixing
|
||||
the chroot `emaint sync -r guru` failure caused by the retired GitHub mirror.
|
||||
2. OpenCode model names and variants: model picker displays real human-readable
|
||||
names alongside raw IDs, and allows selecting model variants (`default`, `low`,
|
||||
`high`, `max`), defaulting to `default`.
|
||||
3. Live terminal output streaming: `Logger` line streaming plumbed through the
|
||||
1. Low-Resolution Responsiveness & Scrollability: wrapped `phoebus-welcome` and
|
||||
`phoebus-install` form/progress views in bounded `Flickable` containers with
|
||||
`ScrollBar.vertical`. Added compact view adaptation (< 760px) in `phoebus-welcome`
|
||||
with flow-wrapped readiness chips, resolving text/control clipping on 800×600
|
||||
and 640×480 displays.
|
||||
2. 1-Click Display Resolution Modal & Hotkeys: added a dedicated Display Resolution
|
||||
dialog to `phoebus-welcome` (and hotkeys `Super+Shift+F12` for 1080p, `F11` for 900p,
|
||||
`F10` for 768p, `F9` for 1024x768) that applies native modes via `wlr-randr`,
|
||||
eliminating blurry bilinear scaling.
|
||||
3. QEMU Native Resolution & Menubar: configured `-device virtio-gpu-pci,xres=1280,yres=768`
|
||||
and `-display gtk,zoom-to-fit=on,show-menubar=on` in `start_vm.sh`.
|
||||
4. Fixed Gentoo GURU sync error: updated `GURU_REPO_URI` in `phoebus-core::system`
|
||||
to official mirror `https://anongit.gentoo.org/git/repo/proj/guru.git`.
|
||||
5. OpenCode model names and variants: model picker displays real human-readable
|
||||
names alongside raw IDs and allows selecting variants (`default`, `low`, `high`, `max`).
|
||||
6. Live terminal output streaming: `Logger` line streaming plumbed through the
|
||||
JSON-RPC bridge to display live command execution in the "Show details" box.
|
||||
4. Desktop & installer defaults: Mango + DankMaterialShell default, Btrfs and
|
||||
Flatpak defaults, streamlined user account setup, DWM keybindings in Mango.
|
||||
5. Built and tested static `phoebus-installer` with musl/CRT-static and bundled
|
||||
QML components served on fixture host for VM consumption.
|
||||
- **Last verified (this session):**
|
||||
- `cargo fmt --all -- --check` clean; `cargo clippy --workspace --all-targets`
|
||||
finished with 0 errors (pre-existing warnings only).
|
||||
|
|
|
|||
|
|
@ -849,6 +849,20 @@ while [ -z "$socket" ]; do
|
|||
waited=$((waited + 1))
|
||||
done
|
||||
|
||||
# In virtual environments (e.g. QEMU/KVM Virtual-1), if the resolution defaulted
|
||||
# to low VGA (<= 800x600), pick the best supported widescreen resolution.
|
||||
if command -v wlr-randr >/dev/null 2>&1; then
|
||||
for out in $(wlr-randr 2>/dev/null | awk '/^[A-Za-z0-9-]+ "/ {print $1}'); do
|
||||
if wlr-randr --output "$out" 2>/dev/null | grep -qE "current.*(640x480|800x600)"; then
|
||||
for m in 1280x768 1440x900 1920x1080 1024x768; do
|
||||
if wlr-randr --output "$out" --mode "$m" 2>/dev/null; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Export the graphical environment to the systemd user manager so user
|
||||
# services (dms.service, portals) can reach the compositor.
|
||||
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
|
||||
|
|
@ -941,6 +955,12 @@ bind=SUPER,Return,zoom,
|
|||
bind=SUPER,p,spawn,dms ipc call spotlight toggle
|
||||
bind=SUPER,space,spawn,dms ipc call spotlight toggle
|
||||
|
||||
# Display resolution shortcuts (instant switch for VMs and external displays)
|
||||
bind=SUPER+SHIFT,F12,spawn,sh -c 'out=$(wlr-randr 2>/dev/null | awk "/^[A-Za-z0-9-]+ / {print \$1; exit}"); [ -n "$out" ] && wlr-randr --output "$out" --mode 1920x1080'
|
||||
bind=SUPER+SHIFT,F11,spawn,sh -c 'out=$(wlr-randr 2>/dev/null | awk "/^[A-Za-z0-9-]+ / {print \$1; exit}"); [ -n "$out" ] && wlr-randr --output "$out" --mode 1440x900'
|
||||
bind=SUPER+SHIFT,F10,spawn,sh -c 'out=$(wlr-randr 2>/dev/null | awk "/^[A-Za-z0-9-]+ / {print \$1; exit}"); [ -n "$out" ] && wlr-randr --output "$out" --mode 1280x768'
|
||||
bind=SUPER+SHIFT,F9,spawn,sh -c 'out=$(wlr-randr 2>/dev/null | awk "/^[A-Za-z0-9-]+ / {print \$1; exit}"); [ -n "$out" ] && wlr-randr --output "$out" --mode 1024x768'
|
||||
|
||||
# Focus navigation (dwm focusstack)
|
||||
bind=SUPER,j,focusstack,next
|
||||
bind=SUPER,k,focusstack,prev
|
||||
|
|
|
|||
|
|
@ -140,12 +140,16 @@ include_csv="$(grep -vE '^[[:space:]]*(#|$)' "$here/live-packages.list" | paste
|
|||
# kernel is exactly what the base live ISO already ships. The rootfs otherwise
|
||||
# stays on testing for wlroots 0.20 / scenefx 0.5 / Quickshell.
|
||||
say "resolve the stable live kernel"
|
||||
trixie_packages_file="$work/trixie-packages.gz"
|
||||
if [[ ! -s "$trixie_packages_file" ]]; then
|
||||
curl -fsSL --retry 3 "http://deb.debian.org/debian/dists/trixie/main/binary-amd64/Packages.gz" -o "$trixie_packages_file"
|
||||
fi
|
||||
trixie_packages() {
|
||||
curl -fsS "http://deb.debian.org/debian/dists/trixie/main/binary-amd64/Packages.gz" | zcat
|
||||
zcat "$trixie_packages_file"
|
||||
}
|
||||
trixie_meta_dep() { # meta-package -> the exact versioned dependency atom
|
||||
trixie_packages | awk -v p="$1" 'BEGIN{RS=""} $0 ~ "^Package: "p"\\n" {print; exit}' \
|
||||
| awk '/^Depends:/{for(i=1;i<=NF;i++){gsub(/[(),]/,"",$i); if($i ~ /^linux-(image|headers)-[0-9]/){print $i; exit}}}'
|
||||
| awk '/^Depends:/{for(i=1;i<=NF;i++){gsub(/[(),]/,"",$i); if($i ~ /^linux-(image|headers)-[0-9]/){print $i; exit}}}' || true
|
||||
}
|
||||
kernel_image="$(trixie_meta_dep linux-image-amd64)"
|
||||
kernel_headers="$(trixie_meta_dep linux-headers-amd64)"
|
||||
|
|
|
|||
|
|
@ -1194,10 +1194,15 @@ ShellRoot {
|
|||
clip: true
|
||||
interactive: contentHeight > height
|
||||
visible: shell.phase === "form"
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
active: true
|
||||
policy: flick.contentHeight > flick.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded
|
||||
}
|
||||
|
||||
Column {
|
||||
id: stepColumn
|
||||
width: flick.width
|
||||
width: flick.width - (flick.contentHeight > flick.height ? 14 : 0)
|
||||
spacing: 16
|
||||
|
||||
// ============ STEP 0: welcome =========================
|
||||
|
|
@ -1209,7 +1214,7 @@ ShellRoot {
|
|||
width: parent.width
|
||||
padding: Theme.padLarge
|
||||
Text { width: parent.width; text: "Welcome to Phoebus OS"; color: Theme.warmWhite; font.family: Theme.family; font.pixelSize: Theme.fontDisplay; font.weight: Font.DemiBold }
|
||||
Text { width: parent.width; text: "This wizard installs Phoebus to your computer. It asks a few questions, explains each one, and changes nothing until you review the plan and type ERASE."; color: Theme.muted; font.family: Theme.family; font.pixelSize: Theme.fontBody; wrapMode: Text.WordWrap }
|
||||
Text { width: parent.width; text: "This wizard installs Phoebus to your computer. It asks a few questions, explains each one, and changes nothing until you review the plan and confirm installation."; color: Theme.muted; font.family: Theme.family; font.pixelSize: Theme.fontBody; wrapMode: Text.WordWrap }
|
||||
Text { width: parent.width; text: "You will choose language and keyboard, check the internet, connect an AI model, pick a disk, and set your account and encryption passphrase."; color: Theme.muted; font.family: Theme.family; font.pixelSize: Theme.fontBody; wrapMode: Text.WordWrap }
|
||||
PhoebusButton {
|
||||
id: welcomeNext
|
||||
|
|
@ -1749,11 +1754,24 @@ ShellRoot {
|
|||
}
|
||||
|
||||
// -- progress / result ----------------------------------------
|
||||
Column {
|
||||
Flickable {
|
||||
id: progressFlick
|
||||
width: parent.width
|
||||
height: parent.height - 48 - 12
|
||||
spacing: 14
|
||||
contentWidth: width
|
||||
contentHeight: progressColumn.implicitHeight + 16
|
||||
clip: true
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
visible: shell.phase !== "form"
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
active: true
|
||||
policy: progressFlick.contentHeight > progressFlick.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded
|
||||
}
|
||||
|
||||
Column {
|
||||
id: progressColumn
|
||||
width: progressFlick.width - (progressFlick.contentHeight > progressFlick.height ? 14 : 0)
|
||||
spacing: 14
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
|
|
@ -1909,6 +1927,7 @@ ShellRoot {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -- footer ----------------------------------------------------
|
||||
Item {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import "Common"
|
||||
|
|
@ -6,7 +7,7 @@ import "Common"
|
|||
// Phoebus OS live welcome. This is the ISO's launcher: it shows the identity,
|
||||
// the system's readiness, a dominant "Install Phoebus OS" action and secondary
|
||||
// troubleshooting tools under Advanced. It never authorizes or starts disk
|
||||
// changes; only the installer does that, behind its own ERASE confirmation.
|
||||
// changes; only the installer does that, behind its own confirmation.
|
||||
ShellRoot {
|
||||
id: shell
|
||||
|
||||
|
|
@ -15,6 +16,8 @@ ShellRoot {
|
|||
property string firmware: "UEFI"
|
||||
property string memory: "?"
|
||||
property string cores: "?"
|
||||
property string currentResolution: ""
|
||||
property bool showDisplay: false
|
||||
property bool showAdvanced: false
|
||||
property bool showPower: false
|
||||
property bool showKeyboardTest: false
|
||||
|
|
@ -23,6 +26,18 @@ ShellRoot {
|
|||
Quickshell.execDetached(cmd);
|
||||
}
|
||||
|
||||
function refreshDisplayModes() {
|
||||
displayDetect.running = true;
|
||||
}
|
||||
|
||||
function applyResolution(mode) {
|
||||
shell.run(["sh", "-c",
|
||||
"out=$(wlr-randr 2>/dev/null | awk '/^[A-Za-z0-9-]+ / {print $1; exit}'); " +
|
||||
"if [ -n \"$out\" ]; then wlr-randr --output \"$out\" --mode " + mode + "; fi"]);
|
||||
shell.currentResolution = mode;
|
||||
displayDetectTimer.start();
|
||||
}
|
||||
|
||||
Process {
|
||||
id: readiness
|
||||
command: ["sh", "-c",
|
||||
|
|
@ -48,6 +63,25 @@ ShellRoot {
|
|||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: displayDetect
|
||||
command: ["sh", "-c", "out=$(wlr-randr 2>/dev/null | awk '/^[A-Za-z0-9-]+ / {print $1; exit}'); [ -n \"$out\" ] && wlr-randr --output \"$out\" 2>/dev/null | awk '/current/ {print $1; exit}'"]
|
||||
stdout: SplitParser {
|
||||
onRead: line => {
|
||||
const trimmed = ("" + line).trim();
|
||||
if (trimmed.length > 0)
|
||||
shell.currentResolution = trimmed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: displayDetectTimer
|
||||
interval: 600
|
||||
repeat: false
|
||||
onTriggered: displayDetect.running = true
|
||||
}
|
||||
|
||||
// The compositor may not have focused the tiled window yet at session
|
||||
// start; request activation and, shortly after, force focus on the primary
|
||||
// action so it is reachable with the keyboard (Enter).
|
||||
|
|
@ -69,6 +103,7 @@ ShellRoot {
|
|||
if (typeof window.requestActivate === "function")
|
||||
window.requestActivate();
|
||||
focusTimer.start();
|
||||
displayDetect.running = true;
|
||||
}
|
||||
visible: true
|
||||
color: Theme.charcoal
|
||||
|
|
@ -96,25 +131,40 @@ ShellRoot {
|
|||
color: Theme.overlay
|
||||
}
|
||||
|
||||
Flickable {
|
||||
id: flick
|
||||
anchors.fill: parent
|
||||
contentWidth: width
|
||||
contentHeight: page.implicitHeight + (page.compactView ? 24 : (Theme.padLarge * 2))
|
||||
clip: true
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
active: true
|
||||
policy: flick.contentHeight > flick.height ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded
|
||||
}
|
||||
|
||||
Column {
|
||||
id: page
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.padLarge
|
||||
spacing: 18
|
||||
property bool compactView: flick.width < 760 || flick.height < 600
|
||||
width: flick.width - (compactView ? 24 : (Theme.padLarge * 2)) - (flick.contentHeight > flick.height ? 14 : 0)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: compactView ? 12 : Theme.padLarge
|
||||
spacing: compactView ? 12 : 18
|
||||
|
||||
// -- header ----------------------------------------------------
|
||||
Item {
|
||||
width: parent.width
|
||||
height: 56
|
||||
height: page.compactView ? 44 : 56
|
||||
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 14
|
||||
spacing: page.compactView ? 10 : 14
|
||||
|
||||
PhoebusEmblem {
|
||||
width: 56
|
||||
height: 56
|
||||
width: page.compactView ? 40 : 56
|
||||
height: page.compactView ? 40 : 56
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
|
|
@ -126,15 +176,16 @@ ShellRoot {
|
|||
textFormat: Text.StyledText
|
||||
color: Theme.warmWhite
|
||||
font.family: Theme.family
|
||||
font.pixelSize: 26
|
||||
font.pixelSize: page.compactView ? 20 : 26
|
||||
font.weight: Font.DemiBold
|
||||
font.letterSpacing: 3
|
||||
font.letterSpacing: page.compactView ? 2 : 3
|
||||
}
|
||||
Text {
|
||||
text: "A modern, encrypted, AI-first workstation"
|
||||
color: Theme.muted
|
||||
font.family: Theme.family
|
||||
font.pixelSize: Theme.fontSmall
|
||||
font.pixelSize: page.compactView ? (Theme.fontSmall - 1) : Theme.fontSmall
|
||||
visible: !page.compactView || parent.width > 520
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -142,9 +193,9 @@ ShellRoot {
|
|||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 30
|
||||
height: page.compactView ? 26 : 30
|
||||
width: versionText.implicitWidth + 24
|
||||
radius: 15
|
||||
radius: height / 2
|
||||
color: Theme.surface
|
||||
border.width: 1
|
||||
border.color: Theme.border
|
||||
|
|
@ -162,14 +213,15 @@ ShellRoot {
|
|||
// -- hero + primary action ------------------------------------
|
||||
PhoebusCard {
|
||||
width: parent.width
|
||||
padding: Theme.padLarge
|
||||
padding: page.compactView ? 14 : Theme.padLarge
|
||||
spacing: page.compactView ? 10 : 14
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
text: "Welcome to Phoebus OS"
|
||||
color: Theme.warmWhite
|
||||
font.family: Theme.family
|
||||
font.pixelSize: Theme.fontDisplay
|
||||
font.pixelSize: page.compactView ? Theme.fontTitle : Theme.fontDisplay
|
||||
font.weight: Font.DemiBold
|
||||
}
|
||||
Text {
|
||||
|
|
@ -181,16 +233,24 @@ ShellRoot {
|
|||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Row {
|
||||
Item {
|
||||
id: heroActions
|
||||
width: parent.width
|
||||
spacing: 20
|
||||
property bool isNarrow: parent.width < 760
|
||||
implicitHeight: isNarrow ? (installButton.height + 14 + chipsCol.implicitHeight)
|
||||
: Math.max(installButton.height, chipsCol.implicitHeight)
|
||||
height: implicitHeight
|
||||
|
||||
PhoebusButton {
|
||||
id: installButton
|
||||
label: "Install Phoebus OS"
|
||||
primary: true
|
||||
implicitHeight: 58
|
||||
implicitWidth: 300
|
||||
height: page.compactView ? 48 : 58
|
||||
implicitHeight: height
|
||||
width: heroActions.isNarrow ? parent.width : 280
|
||||
implicitWidth: width
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
focus: true
|
||||
activeFocusOnTab: true
|
||||
onClicked: {
|
||||
|
|
@ -199,10 +259,16 @@ ShellRoot {
|
|||
}
|
||||
|
||||
Column {
|
||||
width: parent.width - 320
|
||||
spacing: 6
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Row {
|
||||
id: chipsCol
|
||||
width: heroActions.isNarrow ? parent.width : (parent.width - installButton.width - 24)
|
||||
anchors.left: heroActions.isNarrow ? parent.left : installButton.right
|
||||
anchors.leftMargin: heroActions.isNarrow ? 0 : 24
|
||||
anchors.top: heroActions.isNarrow ? installButton.bottom : parent.top
|
||||
anchors.topMargin: heroActions.isNarrow ? 14 : 0
|
||||
spacing: 8
|
||||
|
||||
Flow {
|
||||
width: parent.width
|
||||
spacing: 8
|
||||
PhoebusChip {
|
||||
text: shell.networkUp ? "Network connected" : "Network offline"
|
||||
|
|
@ -214,7 +280,7 @@ ShellRoot {
|
|||
}
|
||||
Text {
|
||||
width: parent.width
|
||||
text: "Nothing is written until you review the plan and type ERASE. An installed system boots without a network or a model."
|
||||
text: "Nothing is written until you review the plan and confirm installation. An installed system boots without a network or a model."
|
||||
color: Theme.muted
|
||||
font.family: Theme.family
|
||||
font.pixelSize: Theme.fontSmall
|
||||
|
|
@ -227,34 +293,42 @@ ShellRoot {
|
|||
// -- secondary actions ----------------------------------------
|
||||
Flow {
|
||||
width: parent.width
|
||||
spacing: 12
|
||||
spacing: page.compactView ? 8 : 12
|
||||
|
||||
PhoebusButton {
|
||||
label: "Network"
|
||||
compact: page.compactView
|
||||
onClicked: shell.run(["sh", "-c",
|
||||
"command -v dms >/dev/null && exec dms ipc call settings focusOrToggle || exec kitty -e sh -c 'nmcli device status; read -r _'"])
|
||||
}
|
||||
PhoebusButton {
|
||||
label: "Display & keyboard"
|
||||
onClicked: shell.run(["sh", "-c",
|
||||
"command -v dms >/dev/null && dms ipc call settings focusOrToggle || kitty -e wlr-randr"])
|
||||
label: "Display resolution"
|
||||
compact: page.compactView
|
||||
onClicked: {
|
||||
shell.refreshDisplayModes();
|
||||
shell.showDisplay = true;
|
||||
}
|
||||
}
|
||||
PhoebusButton {
|
||||
label: "Accessibility"
|
||||
compact: page.compactView
|
||||
onClicked: shell.run(["sh", "-c",
|
||||
"command -v dms >/dev/null && dms ipc call settings focusOrToggle || true"])
|
||||
}
|
||||
PhoebusButton {
|
||||
label: "Installation help"
|
||||
compact: page.compactView
|
||||
onClicked: shell.run(["sh", "-c",
|
||||
"kitty -e sh -c 'cat /usr/share/phoebus/install-help.txt 2>/dev/null || echo Help is not installed; read -r || true'"])
|
||||
}
|
||||
PhoebusButton {
|
||||
label: "Keyboard test"
|
||||
compact: page.compactView
|
||||
onClicked: shell.showKeyboardTest = true
|
||||
}
|
||||
PhoebusButton {
|
||||
label: "Power"
|
||||
compact: page.compactView
|
||||
onClicked: shell.showPower = true
|
||||
}
|
||||
}
|
||||
|
|
@ -320,6 +394,99 @@ ShellRoot {
|
|||
|
||||
Item { width: 1; height: 1 }
|
||||
}
|
||||
}
|
||||
|
||||
// -- display resolution overlay ------------------------------------
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Theme.overlay
|
||||
visible: shell.showDisplay
|
||||
MouseArea { anchors.fill: parent; onClicked: shell.showDisplay = false }
|
||||
|
||||
PhoebusCard {
|
||||
anchors.centerIn: parent
|
||||
width: Math.min(parent.width - 32, 540)
|
||||
padding: Theme.padLarge
|
||||
spacing: 14
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
text: "Display Resolution"
|
||||
color: Theme.warmWhite
|
||||
font.family: Theme.family
|
||||
font.pixelSize: Theme.fontTitle
|
||||
font.weight: Font.DemiBold
|
||||
}
|
||||
Text {
|
||||
width: parent.width
|
||||
text: "Choose a screen resolution to match your monitor or VM window size. The change applies immediately."
|
||||
color: Theme.muted
|
||||
font.family: Theme.family
|
||||
font.pixelSize: Theme.fontBody
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: 8
|
||||
Text {
|
||||
text: "Current mode:"
|
||||
color: Theme.muted
|
||||
font.family: Theme.family
|
||||
font.pixelSize: Theme.fontSmall
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
PhoebusChip {
|
||||
text: shell.currentResolution.length > 0 ? shell.currentResolution : "Detecting…"
|
||||
tone: Theme.amber
|
||||
}
|
||||
}
|
||||
|
||||
Flow {
|
||||
width: parent.width
|
||||
spacing: 10
|
||||
|
||||
Repeater {
|
||||
model: [
|
||||
{ label: "1920 × 1080 (Full HD)", mode: "1920x1080" },
|
||||
{ label: "1440 × 900 (Widescreen)", mode: "1440x900" },
|
||||
{ label: "1280 × 768 (Standard)", mode: "1280x768" },
|
||||
{ label: "1024 × 768 (4:3)", mode: "1024x768" },
|
||||
{ label: "800 × 600 (Compact)", mode: "800x600" }
|
||||
]
|
||||
delegate: PhoebusButton {
|
||||
required property var modelData
|
||||
label: modelData.label
|
||||
compact: true
|
||||
primary: shell.currentResolution.indexOf(modelData.mode) >= 0
|
||||
onClicked: {
|
||||
shell.applyResolution(modelData.mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item { width: 1; height: 4 }
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
spacing: 12
|
||||
PhoebusButton {
|
||||
label: "DMS Desktop Settings"
|
||||
compact: true
|
||||
onClicked: {
|
||||
shell.showDisplay = false;
|
||||
shell.run(["sh", "-c", "command -v dms >/dev/null && dms ipc call settings focusOrToggle"]);
|
||||
}
|
||||
}
|
||||
PhoebusButton {
|
||||
label: "Close"
|
||||
primary: true
|
||||
compact: true
|
||||
onClicked: shell.showDisplay = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -- keyboard test overlay ----------------------------------------
|
||||
Rectangle {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue