mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
ControlCenter: add position setting to choose where the control center should open
This commit is contained in:
@@ -79,6 +79,16 @@
|
||||
}
|
||||
},
|
||||
"reset-scaling": "Skalierung zurücksetzen"
|
||||
},
|
||||
"control-center": {
|
||||
"section": {
|
||||
"label": "Kontrollzentrum",
|
||||
"description": "Konfigurieren Sie die Positionierung und das Verhalten des Kontrollzentrum-Panels."
|
||||
},
|
||||
"position": {
|
||||
"label": "Position",
|
||||
"description": "Wählen Sie, wo das Kontrollzentrum-Panel beim Öffnen erscheint."
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
@@ -1232,6 +1242,17 @@
|
||||
"center_right": "Rechts mittig"
|
||||
}
|
||||
},
|
||||
"control-center": {
|
||||
"position": {
|
||||
"close_to_bar_button": "Nah zur Leisten-Schaltfläche",
|
||||
"top_left": "Oben links",
|
||||
"top_right": "Oben rechts",
|
||||
"bottom_left": "Unten links",
|
||||
"bottom_right": "Unten rechts",
|
||||
"bottom_center": "Unten mittig",
|
||||
"top_center": "Oben mittig"
|
||||
}
|
||||
},
|
||||
"osd": {
|
||||
"position": {
|
||||
"top_left": "Oben links",
|
||||
@@ -1429,7 +1450,7 @@
|
||||
},
|
||||
"missing-control-center": {
|
||||
"label": "Letztes Control-Center-Widget entfernt",
|
||||
"description": "Das Control-Center-Widget wurde aus der Leiste entfernt. Um es erneut über die Leiste zu öffnen, fügen Sie das Widget wieder hinzu."
|
||||
"description": "Das Control-Center-Widget wurde aus der Leiste entfernt. Um es erneut über die Leiste zu öffnen, fügen Sie das Widget wieder hinzu. Sie können es auch durch Rechtsklick auf die Leiste öffnen."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,16 @@
|
||||
"description": "Increase or decrease the size of the monospaced text."
|
||||
}
|
||||
}
|
||||
},
|
||||
"control-center": {
|
||||
"section": {
|
||||
"label": "Control Center",
|
||||
"description": "Configure the Control Center panel positioning and behavior."
|
||||
},
|
||||
"position": {
|
||||
"label": "Position",
|
||||
"description": "Choose where the Control Center panel appears when opened."
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
@@ -1214,6 +1224,17 @@
|
||||
"center_right": "Right center"
|
||||
}
|
||||
},
|
||||
"control-center": {
|
||||
"position": {
|
||||
"close_to_bar_button": "Close to bar button",
|
||||
"top_left": "Top left",
|
||||
"top_right": "Top right",
|
||||
"bottom_left": "Bottom left",
|
||||
"bottom_right": "Bottom right",
|
||||
"bottom_center": "Bottom center",
|
||||
"top_center": "Top center"
|
||||
}
|
||||
},
|
||||
"osd": {
|
||||
"position": {
|
||||
"top_left": "Top left",
|
||||
@@ -1400,7 +1421,7 @@
|
||||
},
|
||||
"missing-control-center": {
|
||||
"label": "Last Control Center widget removed",
|
||||
"description": "The Control Center widget has been removed from the bar. To access it from the bar again, you will need to re-add the widget."
|
||||
"description": "The Control Center widget has been removed from the bar. To access it from the bar again, you will need to re-add the widget. You can open it with right clicking on the bar too."
|
||||
}
|
||||
},
|
||||
"weather": {
|
||||
|
||||
@@ -79,6 +79,16 @@
|
||||
}
|
||||
},
|
||||
"reset-scaling": "Restablecer la escala"
|
||||
},
|
||||
"control-center": {
|
||||
"section": {
|
||||
"label": "Centro de control",
|
||||
"description": "Configurar el posicionamiento y comportamiento del panel del centro de control."
|
||||
},
|
||||
"position": {
|
||||
"label": "Posición",
|
||||
"description": "Elige dónde aparece el panel del centro de control cuando se abre."
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
@@ -1211,6 +1221,17 @@
|
||||
"center_right": "Derecha centrado"
|
||||
}
|
||||
},
|
||||
"control-center": {
|
||||
"position": {
|
||||
"close_to_bar_button": "Cerca del botón de la barra",
|
||||
"top_left": "Superior izquierda",
|
||||
"top_right": "Superior derecha",
|
||||
"bottom_left": "Inferior izquierda",
|
||||
"bottom_right": "Inferior derecha",
|
||||
"bottom_center": "Inferior central",
|
||||
"top_center": "Superior central"
|
||||
}
|
||||
},
|
||||
"osd": {
|
||||
"position": {
|
||||
"top_left": "Superior izquierda",
|
||||
@@ -1397,7 +1418,7 @@
|
||||
},
|
||||
"missing-control-center": {
|
||||
"label": "Se eliminó el último widget del Centro de control",
|
||||
"description": "El widget del Centro de control se eliminó de la barra. Para acceder a él nuevamente desde la barra, debes volver a añadir el widget."
|
||||
"description": "El widget del Centro de control se eliminó de la barra. Para acceder a él nuevamente desde la barra, debes volver a añadir el widget. También puedes abrirlo haciendo clic derecho en la barra."
|
||||
}
|
||||
},
|
||||
"weather": {
|
||||
|
||||
@@ -79,6 +79,16 @@
|
||||
}
|
||||
},
|
||||
"reset-scaling": "Réinitialiser l'échelle"
|
||||
},
|
||||
"control-center": {
|
||||
"section": {
|
||||
"label": "Centre de contrôle",
|
||||
"description": "Configurer le positionnement et le comportement du panneau du centre de contrôle."
|
||||
},
|
||||
"position": {
|
||||
"label": "Position",
|
||||
"description": "Choisissez où apparaît le panneau du centre de contrôle lors de l'ouverture."
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
@@ -1211,6 +1221,17 @@
|
||||
"center_right": "Droite centre"
|
||||
}
|
||||
},
|
||||
"control-center": {
|
||||
"position": {
|
||||
"close_to_bar_button": "Près du bouton de la barre",
|
||||
"top_left": "En haut à gauche",
|
||||
"top_right": "En haut à droite",
|
||||
"bottom_left": "En bas à gauche",
|
||||
"bottom_right": "En bas à droite",
|
||||
"bottom_center": "En bas au centre",
|
||||
"top_center": "En haut au centre"
|
||||
}
|
||||
},
|
||||
"osd": {
|
||||
"position": {
|
||||
"top_left": "En haut à gauche",
|
||||
@@ -1397,7 +1418,7 @@
|
||||
},
|
||||
"missing-control-center": {
|
||||
"label": "Dernier widget du Centre de contrôle supprimé",
|
||||
"description": "Le widget du Centre de contrôle a été retiré de la barre. Pour y accéder à nouveau depuis la barre, veuillez ré‑ajouter le widget."
|
||||
"description": "Le widget du Centre de contrôle a été retiré de la barre. Pour y accéder à nouveau depuis la barre, veuillez ré‑ajouter le widget. Vous pouvez aussi l'ouvrir en cliquant avec le bouton droit sur la barre."
|
||||
}
|
||||
},
|
||||
"weather": {
|
||||
|
||||
@@ -79,6 +79,16 @@
|
||||
}
|
||||
},
|
||||
"reset-scaling": "Redefinir escala"
|
||||
},
|
||||
"control-center": {
|
||||
"section": {
|
||||
"label": "Centro de controle",
|
||||
"description": "Configurar o posicionamento e comportamento do painel do centro de controle."
|
||||
},
|
||||
"position": {
|
||||
"label": "Posição",
|
||||
"description": "Escolha onde o painel do centro de controle aparece quando aberto."
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
@@ -1210,6 +1220,17 @@
|
||||
"center_right": "Centro à direita"
|
||||
}
|
||||
},
|
||||
"control-center": {
|
||||
"position": {
|
||||
"close_to_bar_button": "Perto do botão da barra",
|
||||
"top_left": "Superior esquerdo",
|
||||
"top_right": "Superior direito",
|
||||
"bottom_left": "Inferior esquerdo",
|
||||
"bottom_right": "Inferior direito",
|
||||
"bottom_center": "Centro inferior",
|
||||
"top_center": "Centro superior"
|
||||
}
|
||||
},
|
||||
"bar": {
|
||||
"position": {
|
||||
"top": "Topo",
|
||||
@@ -1397,7 +1418,7 @@
|
||||
},
|
||||
"missing-control-center": {
|
||||
"label": "Último widget da Central de Controle removido",
|
||||
"description": "O widget da Central de Controle foi removido da barra. Para acessá-lo novamente pela barra, adicione o widget novamente."
|
||||
"description": "O widget da Central de Controle foi removido da barra. Para acessá-lo novamente pela barra, adicione o widget novamente. Você também pode abri-lo clicando com o botão direito na barra."
|
||||
}
|
||||
},
|
||||
"weather": {
|
||||
|
||||
@@ -79,6 +79,16 @@
|
||||
"description": "增大或减小等宽文本的尺寸"
|
||||
}
|
||||
}
|
||||
},
|
||||
"control-center": {
|
||||
"section": {
|
||||
"label": "控制中心",
|
||||
"description": "配置控制中心面板的定位和行为。"
|
||||
},
|
||||
"position": {
|
||||
"label": "位置",
|
||||
"description": "选择控制中心面板打开时出现的位置。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
@@ -1211,6 +1221,17 @@
|
||||
"center_right": "右侧居中"
|
||||
}
|
||||
},
|
||||
"control-center": {
|
||||
"position": {
|
||||
"close_to_bar_button": "靠近栏按钮",
|
||||
"top_left": "左上角",
|
||||
"top_right": "右上角",
|
||||
"bottom_left": "左下角",
|
||||
"bottom_right": "右下角",
|
||||
"bottom_center": "底部居中",
|
||||
"top_center": "顶部居中"
|
||||
}
|
||||
},
|
||||
"osd": {
|
||||
"position": {
|
||||
"top_left": "左上角",
|
||||
@@ -1397,7 +1418,7 @@
|
||||
},
|
||||
"missing-control-center": {
|
||||
"label": "最后一个控制中心小部件已移除",
|
||||
"description": "控制中心小部件已从状态栏中移除。要再次从状态栏访问它,您需要重新添加小部件。"
|
||||
"description": "控制中心小部件已从状态栏中移除。要再次从状态栏访问它,您需要重新添加小部件。您也可以通过右键点击状态栏来打开它。"
|
||||
}
|
||||
},
|
||||
"weather": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"settingsVersion": 13,
|
||||
"settingsVersion": 14,
|
||||
"bar": {
|
||||
"position": "top",
|
||||
"backgroundOpacity": 1,
|
||||
@@ -111,6 +111,9 @@
|
||||
"sortByMostUsed": true,
|
||||
"terminalCommand": "xterm -e"
|
||||
},
|
||||
"controlCenter": {
|
||||
"position": "close_to_bar_button"
|
||||
},
|
||||
"dock": {
|
||||
"autoHide": false,
|
||||
"exclusive": false,
|
||||
|
||||
@@ -128,7 +128,7 @@ Singleton {
|
||||
JsonAdapter {
|
||||
id: adapter
|
||||
|
||||
property int settingsVersion: 13
|
||||
property int settingsVersion: 14
|
||||
|
||||
// bar
|
||||
property JsonObject bar: JsonObject {
|
||||
@@ -242,6 +242,12 @@ Singleton {
|
||||
property string terminalCommand: "xterm -e"
|
||||
}
|
||||
|
||||
// control center
|
||||
property JsonObject controlCenter: JsonObject {
|
||||
// Position: close_to_bar_button, center, top_left, top_right, bottom_left, bottom_right, bottom_center, top_center
|
||||
property string position: "close_to_bar_button"
|
||||
}
|
||||
|
||||
// dock
|
||||
property JsonObject dock: JsonObject {
|
||||
property bool autoHide: false
|
||||
|
||||
@@ -14,6 +14,15 @@ NPanel {
|
||||
preferredHeight: 734
|
||||
panelKeyboardFocus: true
|
||||
|
||||
// Positioning
|
||||
readonly property string controlCenterPosition: Settings.data.controlCenter.position
|
||||
panelAnchorHorizontalCenter: controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.endsWith("_center")
|
||||
panelAnchorVerticalCenter: false
|
||||
panelAnchorLeft: controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.endsWith("_left")
|
||||
panelAnchorRight: controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.endsWith("_right")
|
||||
panelAnchorBottom: controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.startsWith("bottom_")
|
||||
panelAnchorTop: controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.startsWith("top_")
|
||||
|
||||
panelContent: Item {
|
||||
id: content
|
||||
|
||||
|
||||
@@ -194,6 +194,56 @@ ColumnLayout {
|
||||
Layout.bottomMargin: Style.marginXL * scaling
|
||||
}
|
||||
|
||||
// Control Center
|
||||
ColumnLayout {
|
||||
spacing: Style.marginL * scaling
|
||||
Layout.fillWidth: true
|
||||
|
||||
NHeader {
|
||||
label: I18n.tr("settings.general.control-center.section.label")
|
||||
description: I18n.tr("settings.general.control-center.section.description")
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
id: controlCenterPosition
|
||||
label: I18n.tr("settings.general.control-center.position.label")
|
||||
description: I18n.tr("settings.general.control-center.position.description")
|
||||
Layout.fillWidth: true
|
||||
model: [{
|
||||
"key": "close_to_bar_button",
|
||||
"name": I18n.tr("options.control-center.position.close_to_bar_button")
|
||||
}, {
|
||||
"key": "top_left",
|
||||
"name": I18n.tr("options.control-center.position.top_left")
|
||||
}, {
|
||||
"key": "top_right",
|
||||
"name": I18n.tr("options.control-center.position.top_right")
|
||||
}, {
|
||||
"key": "bottom_left",
|
||||
"name": I18n.tr("options.control-center.position.bottom_left")
|
||||
}, {
|
||||
"key": "bottom_right",
|
||||
"name": I18n.tr("options.control-center.position.bottom_right")
|
||||
}, {
|
||||
"key": "bottom_center",
|
||||
"name": I18n.tr("options.control-center.position.bottom_center")
|
||||
}, {
|
||||
"key": "top_center",
|
||||
"name": I18n.tr("options.control-center.position.top_center")
|
||||
}]
|
||||
currentKey: Settings.data.controlCenter.position
|
||||
onSelected: function (key) {
|
||||
Settings.data.controlCenter.position = key
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginXL * scaling
|
||||
Layout.bottomMargin: Style.marginXL * scaling
|
||||
}
|
||||
|
||||
// Fonts
|
||||
ColumnLayout {
|
||||
spacing: Style.marginL * scaling
|
||||
|
||||
Reference in New Issue
Block a user