mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
refactor(ui): One QML file per screen; the HDMI boost's setup screens and backend commands removed
This commit is contained in:
1 parent
f774b79007
commit
dfacf3306b
29 files changed
+1050
-1832
No files matched your search
+2
-24
@@ -271,8 +271,8 @@ class Backend(QObject):
|
||||
self.busyChanged.emit()
|
||||
p.start()
|
||||
|
||||
@Slot("QVariant", str, bool, str, str)
|
||||
def apply(self, ids, boot, reapply, password, hdmi):
|
||||
@Slot("QVariant", str, bool, str)
|
||||
def apply(self, ids, boot, reapply, password):
|
||||
try:
|
||||
if hasattr(ids, "toVariant"): # a JS array from QML
|
||||
ids = ids.toVariant()
|
||||
@@ -281,8 +281,6 @@ class Backend(QObject):
|
||||
args.append("--reapply")
|
||||
if boot:
|
||||
args += ["--boot", boot]
|
||||
if hdmi: # rates confirmed on the HDMI screen
|
||||
args += ["--hdmi", hdmi]
|
||||
self._start(args + [str(i) for i in (ids or [])], password)
|
||||
except Exception as e:
|
||||
# Never leave the app on the progress screen.
|
||||
@@ -300,26 +298,6 @@ class Backend(QObject):
|
||||
"""Only after both warnings in the app."""
|
||||
self._start(["bios-flash"], password)
|
||||
|
||||
@Slot(str)
|
||||
def hdmiOptions(self, password):
|
||||
"""Reads the HDMI displays: ends with an hdmi-options event."""
|
||||
self._start(["hdmi-options"], password)
|
||||
|
||||
@Slot(str, str, int, int, float, str)
|
||||
def hdmiTry(self, password, conn, w, h, hz, rates):
|
||||
"""Switches to hz live: an hdmi-tried event says whether it worked."""
|
||||
self._start(["hdmi-try", conn, str(w), str(h), "%g" % hz] + [r for r in rates.split(",") if r], password)
|
||||
|
||||
@Slot(str, str, int, int, float)
|
||||
def hdmiReset(self, password, conn, w, h, hz):
|
||||
"""The display's own EDID and the old rate again (hdmi-reset event)."""
|
||||
self._start(["hdmi-reset", conn, str(w), str(h), "%g" % hz], password)
|
||||
|
||||
@Slot(str, str)
|
||||
def hdmiForget(self, password, display):
|
||||
"""Removes a saved display (hdmi-forgotten event)."""
|
||||
self._start(["hdmi-forget", display], password)
|
||||
|
||||
def _read(self, p):
|
||||
self._buf += bytes(p.readAllStandardOutput())
|
||||
while b"\n" in self._buf:
|
||||
|
||||
Reference in new issue
Block a user