Merge upstream quattro for the Qt 6.12 palette fix (#14553)

Qt 6.12 shadows the bare Color singleton, so the bar and every Color
role read undefined on fresh installs. Keep our I18n text in the four
conflicting files, qualify #14433's notification button color, give the
new dictation menu rows and notifications Chinese, and drop table
entries for the removed Voxtype and FIDO2 texts.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 01:24:30 -04:00
commit fcd681c099
239 files changed
+3996 -616

No files matched your search

+7 -6
View File
@@ -1,5 +1,6 @@
pragma Singleton
import QtQuick
import qs.Commons as Commons
import "BorderGeometry.js" as Geometry
// Central border-spec factory for shell surfaces and controls. A spec carries
@@ -22,7 +23,7 @@ QtObject {
}
function value(section, key) {
var v = Color.shellValues[section + "." + key]
var v = Commons.Color.shellValues[section + "." + key]
return (v === undefined || v === null) ? "" : v
}
@@ -39,7 +40,7 @@ QtObject {
var seen = {}
while (s.match(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/) && !seen[s]) {
seen[s] = true
var next = Color.shellValues[s]
var next = Commons.Color.shellValues[s]
if (next === undefined || next === null || String(next).length === 0) break
s = String(next).replace(/^\s+|\s+$/g, "")
}
@@ -68,10 +69,10 @@ QtObject {
var s = String(color || "").replace(/^\s+|\s+$/g, "")
var role = s.toLowerCase()
if (role === "foreground" || role === "text") return cssColor(Color.foreground, a)
if (role === "accent") return cssColor(Color.accent, a)
if (role === "urgent") return cssColor(Color.urgent, a)
if (role === "background") return cssColor(Color.background, a)
if (role === "foreground" || role === "text") return cssColor(Commons.Color.foreground, a)
if (role === "accent") return cssColor(Commons.Color.accent, a)
if (role === "urgent") return cssColor(Commons.Color.urgent, a)
if (role === "background") return cssColor(Commons.Color.background, a)
if (role === "transparent") return "transparent"
return Geometry.canonicalColor(s, a)
}
+6 -6
View File
@@ -396,7 +396,6 @@ var table = {
"Pin": "固定",
"Show": "显示",
"Hide": "隐藏",
"Dictate": "语音输入",
"Allow Notifications": "允许通知",
"Silence Notifications": "静默通知",
"Day Light": "日间光线",
@@ -434,11 +433,9 @@ var table = {
"Download failed": "下载失败",
"Editing config file": "正在编辑配置文件",
"Extended mode restored": "已恢复扩展模式",
"FIDO2 authfile needs attention": "FIDO2 认证文件需要处理",
"Failed to start Windows VM": "无法启动 Windows 虚拟机",
"Herdr theme sync disabled": "Herdr 主题同步已关闭",
"Herdr theme sync enabled": "Herdr 主题同步已开启",
"Hold F9 to dictate (or toggle with Super + Ctrl + X).": "按住 F9 语音输入(或用 Super + Ctrl + X 切换)。",
"Laptop display disabled": "笔记本屏幕已关闭",
"Laptop display enabled": "笔记本屏幕已开启",
"Logging out": "正在注销",
@@ -514,8 +511,6 @@ var table = {
"Enable sudo and unlocking with your fingerprint.": "用指纹进行 sudo 和解锁。",
"Set your default agent": "设置默认 AI 代理",
"Let your favorite agent help with Omarchy.": "让你喜欢的 AI 代理帮你使用 Omarchy。",
"Install Dictation with Voxtype": "安装 Voxtype 语音输入",
"Click to install voice dictation for Omarchy.": "点击为 Omarchy 安装语音输入。",
"All %1 accounts are over %2%": "所有 %1 账户都超过 %2%",
"Staying on %1. %2 resets in %3.": "继续使用 %1。%2 将在 %3 后重置。",
"Staying on %1.": "继续使用 %1。",
@@ -616,5 +611,10 @@ var table = {
"Log out now to switch the language?": "立即注销以切换语言?",
"Log back in to switch the language.": "重新登录后切换语言。",
"Log out now to switch the developer mirrors?": "立即注销以切换开发工具镜像?",
"Log back in to switch the developer mirrors.": "重新登录后切换开发工具镜像。"
"Log back in to switch the developer mirrors.": "重新登录后切换开发工具镜像。",
"Superwhisper Dictation Ready": "Superwhisper 语音输入就绪",
"Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X).": "按住右 Alt 或 F9 说话(或用 Super + Ctrl + X 切换)。",
"Background Intros": "背景开场动画",
"Enabled": "已开启",
"Disabled": "已关闭"
}
+22 -21
View File
@@ -1,5 +1,6 @@
pragma Singleton
import QtQuick
import qs.Commons as Commons
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
@@ -114,27 +115,27 @@ QtObject {
}
function resolveStateColor(token, foreground, accent, urgent, fallback) {
var fb = fallback || foreground || Color.foreground
var fb = fallback || foreground || Commons.Color.foreground
var s = String(token || "").replace(/^\s+|\s+$/g, "")
var role = s.toLowerCase()
if (role === "foreground" || role === "text") return foreground || Color.foreground
if (role === "accent") return accent || Color.accent
if (role === "urgent") return urgent || Color.urgent
if (role === "background") return Color.background
if (role === "foreground" || role === "text") return foreground || Commons.Color.foreground
if (role === "accent") return accent || Commons.Color.accent
if (role === "urgent") return urgent || Commons.Color.urgent
if (role === "background") return Commons.Color.background
if (role === "transparent") return Qt.rgba(0, 0, 0, 0)
return colorFromHex(s, fb)
}
function normalStateColor(foreground, accent, urgent) {
return resolveStateColor(normalColorToken, foreground, accent, urgent, foreground || Color.foreground)
return resolveStateColor(normalColorToken, foreground, accent, urgent, foreground || Commons.Color.foreground)
}
function hoverStateColor(foreground, accent, urgent) {
return resolveStateColor(hoverColorToken, foreground, accent, urgent, foreground || Color.foreground)
return resolveStateColor(hoverColorToken, foreground, accent, urgent, foreground || Commons.Color.foreground)
}
function selectedStateColor(foreground, accent, urgent) {
return resolveStateColor(selectedColorToken, foreground, accent, urgent, foreground || Color.foreground)
return resolveStateColor(selectedColorToken, foreground, accent, urgent, foreground || Commons.Color.foreground)
}
function pressedStateColor(foreground, accent, urgent) {
@@ -149,7 +150,7 @@ QtObject {
}
function selectionStateColor(foreground, accent, urgent) {
return resolveStateColor(selectionColorToken, foreground, accent, urgent, foreground || Color.foreground)
return resolveStateColor(selectionColorToken, foreground, accent, urgent, foreground || Commons.Color.foreground)
}
function normalFillFor(foreground, accent, urgent) { return Util.alpha(normalStateColor(foreground, accent, urgent), normalFillAlpha) }
@@ -187,17 +188,17 @@ QtObject {
}
// Convenience colors resolved against the foundational palette.
readonly property color normalFill: normalFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color hoverFill: hoverFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color selectedFill: selectedFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color pressedFill: pressedFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color focusFillColor: focusFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color normalBorderColor: normalBorderFor(Color.foreground, Color.accent, Color.urgent)
readonly property color hoverBorderColor: hoverBorderFor(Color.foreground, Color.accent, Color.urgent)
readonly property color selectedBorderColor: selectedBorderFor(Color.foreground, Color.accent, Color.urgent)
readonly property color focusBorderColor: focusBorderFor(Color.foreground, Color.accent, Color.urgent)
readonly property color selectedAccentFill: Util.alpha(Color.accent, selectedFillAlpha)
readonly property color selectionFill: selectionFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color normalFill: normalFillFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color hoverFill: hoverFillFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color selectedFill: selectedFillFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color pressedFill: pressedFillFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color focusFillColor: focusFillFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color normalBorderColor: normalBorderFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color hoverBorderColor: hoverBorderFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color selectedBorderColor: selectedBorderFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color focusBorderColor: focusBorderFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
readonly property color selectedAccentFill: Util.alpha(Commons.Color.accent, selectedFillAlpha)
readonly property color selectionFill: selectionFillFor(Commons.Color.foreground, Commons.Color.accent, Commons.Color.urgent)
// ---------------------------------------------------------- spacing
//
@@ -390,7 +391,7 @@ QtObject {
}
// Pull typography, bar dimensions, state tokens, and spacing out of the
// shell.toml dict that Color already parsed. Called by Color.loadShell so
// shell.toml dict that Color already parsed. Called by Commons.Color.loadShell so
// a single parse pass feeds both singletons.
function applyShellValues(values) {
var fontOut = {}