mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
style(wallpaper): hide dark/light behind toggle just like display selection
This commit is contained in:
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Personen",
|
||||
"color-extraction-disabled": "Hintergrundbild-Farbenextraktion verwenden",
|
||||
"color-extraction-enabled": "Vordefinierte Farbschemata nutzen",
|
||||
"link-light-dark-description": "Einen Hintergrund für helles und dunkles Erscheinungsbild verwenden. Deaktivieren, um verschiedene Bilder auszuwählen.",
|
||||
"link-light-dark-label": "Gleiches Hintergrundbild für hell und dunkel",
|
||||
"order-asc": "Aufsteigend",
|
||||
"order-desc": "Absteigend",
|
||||
"order-label": "Reihenfolge",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "People",
|
||||
"color-extraction-disabled": "Use wallpaper colour extraction",
|
||||
"color-extraction-enabled": "Use predefined colour schemes",
|
||||
"link-light-dark-description": "Use one wallpaper for both light and dark appearance. Turn off to pick different images.",
|
||||
"link-light-dark-label": "Same wallpaper for light and dark",
|
||||
"order-asc": "Ascending",
|
||||
"order-desc": "Descending",
|
||||
"order-label": "Order",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "People",
|
||||
"color-extraction-disabled": "Use wallpaper color extraction",
|
||||
"color-extraction-enabled": "Use predefined color schemes",
|
||||
"link-light-dark-description": "Use one wallpaper for both light and dark appearance. Turn off to pick different images.",
|
||||
"link-light-dark-label": "Same wallpaper for light and dark",
|
||||
"order-asc": "Ascending",
|
||||
"order-desc": "Descending",
|
||||
"order-label": "Order",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Personas",
|
||||
"color-extraction-disabled": "Usar extracción de colores del fondo de pantalla",
|
||||
"color-extraction-enabled": "Usar esquemas de color predefinidos",
|
||||
"link-light-dark-description": "Usar un mismo fondo de pantalla para la apariencia clara y oscura. Desactiva para elegir imágenes diferentes.",
|
||||
"link-light-dark-label": "Mismo fondo de pantalla para claro y oscuro",
|
||||
"order-asc": "Ascendente",
|
||||
"order-desc": "Descendente",
|
||||
"order-label": "Orden",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Personnes",
|
||||
"color-extraction-disabled": "Utiliser l'extraction des couleurs du fond d'écran",
|
||||
"color-extraction-enabled": "Utiliser les schémas de couleurs prédéfinis",
|
||||
"link-light-dark-description": "Utiliser un seul fond d'écran pour l'apparence claire et sombre. Désactivez pour choisir différentes images.",
|
||||
"link-light-dark-label": "Même fond d'écran pour clair et sombre",
|
||||
"order-asc": "Croissant",
|
||||
"order-desc": "Décroissant",
|
||||
"order-label": "Ordre",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Emberek",
|
||||
"color-extraction-disabled": "Háttérkép színkivonás használata",
|
||||
"color-extraction-enabled": "Előre meghatározott színsémák használata",
|
||||
"link-light-dark-description": "Egy háttérkép használata világos és sötét megjelenéshez is. Kapcsolja ki, hogy különböző képeket választhasson.",
|
||||
"link-light-dark-label": "Ugyanaz a háttérkép világos és sötét módhoz",
|
||||
"order-asc": "Növekvő",
|
||||
"order-desc": "Csökkenő",
|
||||
"order-label": "Sorrend",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Persone",
|
||||
"color-extraction-disabled": "Usa estrazione colori dallo sfondo",
|
||||
"color-extraction-enabled": "Usa schemi colore predefiniti",
|
||||
"link-light-dark-description": "Usa un solo sfondo per l'aspetto chiaro e scuro. Disattiva per scegliere immagini diverse.",
|
||||
"link-light-dark-label": "Stesso sfondo per chiaro e scuro",
|
||||
"order-asc": "Crescente",
|
||||
"order-desc": "Decrescente",
|
||||
"order-label": "Ordine",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "人物",
|
||||
"color-extraction-disabled": "壁紙の色抽出を使用する",
|
||||
"color-extraction-enabled": "事前定義された配色スキームを使用する",
|
||||
"link-light-dark-description": "ライトとダークの両方の外観に同じ壁紙を使用します。オフにすると、異なる画像を選択できます。",
|
||||
"link-light-dark-label": "ライトとダークで同じ壁紙",
|
||||
"order-asc": "昇順",
|
||||
"order-desc": "降順",
|
||||
"order-label": "順序",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "인물",
|
||||
"color-extraction-disabled": "배경화면 색상 추출 사용",
|
||||
"color-extraction-enabled": "사전 정의된 색상 구성표 사용",
|
||||
"link-light-dark-description": "밝고 어두운 테마 모두에 하나의 배경화면을 사용합니다. 끄면 다른 이미지를 선택할 수 있습니다.",
|
||||
"link-light-dark-label": "밝고 어두운 모드에 동일한 배경화면",
|
||||
"order-asc": "오름차순",
|
||||
"order-desc": "내림차순",
|
||||
"order-label": "순서",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Mensen",
|
||||
"color-extraction-disabled": "Achtergrondkleurextractie gebruiken",
|
||||
"color-extraction-enabled": "Voorgedefinieerde kleurenschema's gebruiken",
|
||||
"link-light-dark-description": "Gebruik één achtergrond voor zowel lichte als donkere weergave. Schakel uit om verschillende afbeeldingen te kiezen.",
|
||||
"link-light-dark-label": "Zelfde achtergrond voor licht en donker",
|
||||
"order-asc": "Oplopend",
|
||||
"order-desc": "Aflopend",
|
||||
"order-label": "Volgorde",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Ludzie",
|
||||
"color-extraction-disabled": "Użyj ekstrakcji kolorów tapety",
|
||||
"color-extraction-enabled": "Użyj predefiniowanych schematów kolorów",
|
||||
"link-light-dark-description": "Użyj jednej tapety dla jasnego i ciemnego wyglądu. Wyłącz, aby wybrać inne obrazy.",
|
||||
"link-light-dark-label": "Ta sama tapeta dla trybu jasnego i ciemnego",
|
||||
"order-asc": "Rosnąco",
|
||||
"order-desc": "Malejąco",
|
||||
"order-label": "Kolejność",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Pessoas",
|
||||
"color-extraction-disabled": "Usar extração de cores do papel de parede",
|
||||
"color-extraction-enabled": "Usar esquemas de cores predefinidos",
|
||||
"link-light-dark-description": "Usar um único papel de parede para a aparência clara e escura. Desative para escolher imagens diferentes.",
|
||||
"link-light-dark-label": "Mesmo papel de parede para claro e escuro",
|
||||
"order-asc": "Crescente",
|
||||
"order-desc": "Decrescente",
|
||||
"order-label": "Ordem",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Люди",
|
||||
"color-extraction-disabled": "Использовать извлечение цветов обоев",
|
||||
"color-extraction-enabled": "Использовать предопределенные цветовые схемы",
|
||||
"link-light-dark-description": "Использовать одни обои для светлого и темного оформления. Отключите, чтобы выбрать другие изображения.",
|
||||
"link-light-dark-label": "Одни и те же обои для светлой и темной темы",
|
||||
"order-asc": "По возрастанию",
|
||||
"order-desc": "По убыванию",
|
||||
"order-label": "Порядок",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Personer",
|
||||
"color-extraction-disabled": "Använd bakgrundsfärgsutvinning",
|
||||
"color-extraction-enabled": "Använd fördefinierade färgscheman",
|
||||
"link-light-dark-description": "Använd en bakgrundsbild för både ljust och mörkt utseende. Stäng av för att välja olika bilder.",
|
||||
"link-light-dark-label": "Samma bakgrundsbild för ljust och mörkt",
|
||||
"order-asc": "Stigande",
|
||||
"order-desc": "Fallande",
|
||||
"order-label": "Ordning",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "İnsanlar",
|
||||
"color-extraction-disabled": "Duvar kağıdı renk çıkarma kullan",
|
||||
"color-extraction-enabled": "Önceden tanımlanmış renk şemalarını kullan",
|
||||
"link-light-dark-description": "Hem açık hem de koyu görünüm için tek bir duvar kağıdı kullanın. Farklı görseller seçmek için kapatın.",
|
||||
"link-light-dark-label": "Açık ve koyu için aynı duvar kağıdı",
|
||||
"order-asc": "Artan",
|
||||
"order-desc": "Azalan",
|
||||
"order-label": "Sıra",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Люди",
|
||||
"color-extraction-disabled": "Використовувати вилучення кольорів шпалер",
|
||||
"color-extraction-enabled": "Використовувати попередньо визначені кольорові схеми",
|
||||
"link-light-dark-description": "Використовувати одні шпалери для світлого та темного оформлення. Вимкніть, щоб вибрати інші зображення.",
|
||||
"link-light-dark-label": "Однакові шпалери для світлого та темного режимів",
|
||||
"order-asc": "За зростанням",
|
||||
"order-desc": "За спаданням",
|
||||
"order-label": "Порядок",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "Mọi người",
|
||||
"color-extraction-disabled": "Sử dụng trích xuất màu hình nền.",
|
||||
"color-extraction-enabled": "Sử dụng các bảng màu tích hợp sẵn",
|
||||
"link-light-dark-description": "Sử dụng một hình nền cho cả giao diện sáng và tối. Tắt để chọn các hình ảnh khác.",
|
||||
"link-light-dark-label": "Cùng hình nền cho chế độ sáng và tối",
|
||||
"order-asc": "Tăng dần",
|
||||
"order-desc": "Giảm dần",
|
||||
"order-label": "Thứ tự",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "人物",
|
||||
"color-extraction-disabled": "使用壁纸颜色提取",
|
||||
"color-extraction-enabled": "使用预设配色方案",
|
||||
"link-light-dark-description": "为浅色和深色外观使用同一张壁纸。关闭此选项以选择不同的图片。",
|
||||
"link-light-dark-label": "明暗模式使用相同壁纸",
|
||||
"order-asc": "升序",
|
||||
"order-desc": "降序",
|
||||
"order-label": "顺序",
|
||||
|
||||
@@ -2066,6 +2066,8 @@
|
||||
"categories-people": "人物",
|
||||
"color-extraction-disabled": "使用桌布顏色擷取",
|
||||
"color-extraction-enabled": "使用預設配色方案",
|
||||
"link-light-dark-description": "為淺色和深色外觀使用同一張桌布。關閉此選項以選擇不同的圖片。",
|
||||
"link-light-dark-label": "明暗模式使用相同桌布",
|
||||
"order-asc": "升序",
|
||||
"order-desc": "降序",
|
||||
"order-label": "排序",
|
||||
|
||||
@@ -197,6 +197,7 @@
|
||||
"showHiddenFiles": false,
|
||||
"viewMode": "single",
|
||||
"setWallpaperOnAllMonitors": true,
|
||||
"linkLightAndDarkWallpapers": true,
|
||||
"fillMode": "crop",
|
||||
"fillColor": "#000000",
|
||||
"useSolidColor": false,
|
||||
|
||||
@@ -382,6 +382,7 @@ Singleton {
|
||||
property bool showHiddenFiles: false
|
||||
property string viewMode: "single" // "single" | "recursive" | "browse"
|
||||
property bool setWallpaperOnAllMonitors: true
|
||||
property bool linkLightAndDarkWallpapers: true
|
||||
property string fillMode: "crop"
|
||||
property color fillColor: "#000000"
|
||||
property bool useSolidColor: false
|
||||
|
||||
@@ -334,9 +334,18 @@ SmartPanel {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("wallpaper.panel.link-light-dark-label")
|
||||
description: I18n.tr("wallpaper.panel.link-light-dark-description")
|
||||
checked: Settings.data.wallpaper.linkLightAndDarkWallpapers
|
||||
onToggled: checked => Settings.data.wallpaper.linkLightAndDarkWallpapers = checked
|
||||
defaultValue: Settings.getDefaultValue("wallpaper.linkLightAndDarkWallpapers")
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NTabBar {
|
||||
id: appearanceTabBar
|
||||
visible: Settings.data.wallpaper.enabled
|
||||
visible: Settings.data.wallpaper.enabled && !Settings.data.wallpaper.linkLightAndDarkWallpapers
|
||||
Layout.fillWidth: true
|
||||
currentIndex: panelContent.appearanceTabIndex
|
||||
spacing: Style.marginM
|
||||
|
||||
@@ -139,11 +139,21 @@ Singleton {
|
||||
function onSortOrderChanged() {
|
||||
root.refreshWallpapersList();
|
||||
}
|
||||
function onLinkLightAndDarkWallpapersChanged() {
|
||||
if (Settings.data.wallpaper.linkLightAndDarkWallpapers) {
|
||||
root.wallpaperSelectionAppearance = Settings.data.colorSchemes.darkMode ? "dark" : "light";
|
||||
root._syncWallpaperSlotsWhenLinking();
|
||||
}
|
||||
root._notifyAllWallpapersChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Settings.data.colorSchemes
|
||||
function onDarkModeChanged() {
|
||||
if (Settings.data.wallpaper.linkLightAndDarkWallpapers) {
|
||||
root.wallpaperSelectionAppearance = Settings.data.colorSchemes.darkMode ? "dark" : "light";
|
||||
}
|
||||
// Restore scheme from favorite for this light/dark slot before wallpaper refresh
|
||||
root.reapplyFavoriteThemeForActiveWallpaper();
|
||||
root._notifyAllWallpapersChanged();
|
||||
@@ -569,9 +579,18 @@ Singleton {
|
||||
return;
|
||||
}
|
||||
var p = _pathsFromEntry(e);
|
||||
var old = slot === "dark" ? p.dark : p.light;
|
||||
if (old && old !== newPath) {
|
||||
paths.push(old);
|
||||
if (Settings.data.wallpaper.linkLightAndDarkWallpapers) {
|
||||
if (p.light && p.light !== newPath) {
|
||||
paths.push(p.light);
|
||||
}
|
||||
if (p.dark && p.dark !== newPath && p.dark !== p.light) {
|
||||
paths.push(p.dark);
|
||||
}
|
||||
} else {
|
||||
var old = slot === "dark" ? p.dark : p.light;
|
||||
if (old && old !== newPath) {
|
||||
paths.push(old);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -595,7 +614,16 @@ Singleton {
|
||||
}
|
||||
|
||||
unique.forEach(function (path) {
|
||||
if (path && path !== newPath && isFavorite(path, slot)) {
|
||||
if (!path || path === newPath) {
|
||||
return;
|
||||
}
|
||||
if (Settings.data.wallpaper.linkLightAndDarkWallpapers) {
|
||||
["light", "dark"].forEach(function (app) {
|
||||
if (isFavorite(path, app)) {
|
||||
updateFavoriteColorScheme(path, app);
|
||||
}
|
||||
});
|
||||
} else if (isFavorite(path, slot)) {
|
||||
updateFavoriteColorScheme(path, slot);
|
||||
}
|
||||
});
|
||||
@@ -627,6 +655,36 @@ Singleton {
|
||||
return "";
|
||||
}
|
||||
|
||||
function _syncWallpaperSlotsWhenLinking() {
|
||||
var names = new Set(Object.keys(currentWallpapers));
|
||||
for (var i = 0; i < Quickshell.screens.length; i++) {
|
||||
names.add(Quickshell.screens[i].name);
|
||||
}
|
||||
names.forEach(function (name) {
|
||||
var e = currentWallpapers[name];
|
||||
if (!e) {
|
||||
return;
|
||||
}
|
||||
var eff = _entryToEffectivePath(e);
|
||||
if (!eff) {
|
||||
return;
|
||||
}
|
||||
var merged = {
|
||||
light: eff,
|
||||
dark: eff
|
||||
};
|
||||
if (_entriesEqual(e, merged)) {
|
||||
return;
|
||||
}
|
||||
currentWallpapers[name] = merged;
|
||||
saveTimer.restart();
|
||||
root.wallpaperChanged(name, eff);
|
||||
});
|
||||
if (randomWallpaperTimer.running) {
|
||||
randomWallpaperTimer.restart();
|
||||
}
|
||||
}
|
||||
|
||||
function _setWallpaper(screenName, path, appearanceSlot) {
|
||||
if (path === "" || path === undefined) {
|
||||
return;
|
||||
@@ -641,7 +699,12 @@ Singleton {
|
||||
var oldEntry = currentWallpapers[screenName];
|
||||
var p = _pathsFromEntry(oldEntry);
|
||||
var newEntry;
|
||||
if (slot === "dark") {
|
||||
if (Settings.data.wallpaper.linkLightAndDarkWallpapers) {
|
||||
newEntry = {
|
||||
light: path,
|
||||
dark: path
|
||||
};
|
||||
} else if (slot === "dark") {
|
||||
newEntry = {
|
||||
light: p.light || p.dark || path,
|
||||
dark: path
|
||||
@@ -1432,6 +1495,11 @@ Singleton {
|
||||
|
||||
root._ensureObjectWallpaperEntries();
|
||||
|
||||
if (Settings.data.wallpaper.linkLightAndDarkWallpapers) {
|
||||
root.wallpaperSelectionAppearance = Settings.data.colorSchemes.darkMode ? "dark" : "light";
|
||||
root._syncWallpaperSlotsWhenLinking();
|
||||
}
|
||||
|
||||
// Load default wallpaper from cache if it exists, otherwise use Noctalia default
|
||||
if (wallpaperCacheAdapter.defaultWallpaper && wallpaperCacheAdapter.defaultWallpaper !== "") {
|
||||
root.defaultWallpaper = wallpaperCacheAdapter.defaultWallpaper;
|
||||
|
||||
Reference in New Issue
Block a user