add noctalia and fuzzel
This commit is contained in:
+211
@@ -0,0 +1,211 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.tooltips-label")
|
||||
description: I18n.tr("panels.user-interface.tooltips-description")
|
||||
checked: Settings.data.ui.tooltipsEnabled
|
||||
defaultValue: Settings.getDefaultValue("ui.tooltipsEnabled")
|
||||
onToggled: checked => Settings.data.ui.tooltipsEnabled = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.box-border-label")
|
||||
description: I18n.tr("panels.user-interface.box-border-description")
|
||||
checked: Settings.data.ui.boxBorderEnabled
|
||||
defaultValue: Settings.getDefaultValue("ui.boxBorderEnabled")
|
||||
onToggled: checked => Settings.data.ui.boxBorderEnabled = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.scrollbar-always-visible-label")
|
||||
description: I18n.tr("panels.user-interface.scrollbar-always-visible-description")
|
||||
checked: Settings.data.ui.scrollbarAlwaysVisible
|
||||
defaultValue: Settings.getDefaultValue("ui.scrollbarAlwaysVisible")
|
||||
onToggled: checked => Settings.data.ui.scrollbarAlwaysVisible = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.shadows-label")
|
||||
description: I18n.tr("panels.user-interface.shadows-description")
|
||||
checked: Settings.data.general.enableShadows
|
||||
defaultValue: Settings.getDefaultValue("general.enableShadows")
|
||||
onToggled: checked => Settings.data.general.enableShadows = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.blur-behind-label")
|
||||
description: I18n.tr("panels.user-interface.blur-behind-description")
|
||||
checked: Settings.data.general.enableBlurBehind
|
||||
defaultValue: Settings.getDefaultValue("general.enableBlurBehind")
|
||||
onToggled: checked => Settings.data.general.enableBlurBehind = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.translucent-widgets-label")
|
||||
description: I18n.tr("panels.user-interface.translucent-widgets-description")
|
||||
checked: Settings.data.ui.translucentWidgets
|
||||
defaultValue: Settings.getDefaultValue("ui.translucentWidgets")
|
||||
onToggled: checked => Settings.data.ui.translucentWidgets = checked
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
visible: Settings.data.general.enableShadows
|
||||
label: I18n.tr("panels.user-interface.shadows-direction-label")
|
||||
description: I18n.tr("panels.user-interface.shadows-direction-description")
|
||||
Layout.fillWidth: true
|
||||
|
||||
readonly property var shadowOptionsMap: ({
|
||||
"top_left": {
|
||||
"name": I18n.tr("positions.top-left"),
|
||||
"p": Qt.point(-2, -2)
|
||||
},
|
||||
"top": {
|
||||
"name": I18n.tr("positions.top"),
|
||||
"p": Qt.point(0, -3)
|
||||
},
|
||||
"top_right": {
|
||||
"name": I18n.tr("positions.top-right"),
|
||||
"p": Qt.point(2, -2)
|
||||
},
|
||||
"left": {
|
||||
"name": I18n.tr("positions.left"),
|
||||
"p": Qt.point(-3, 0)
|
||||
},
|
||||
"center": {
|
||||
"name": I18n.tr("positions.center"),
|
||||
"p": Qt.point(0, 0)
|
||||
},
|
||||
"right": {
|
||||
"name": I18n.tr("positions.right"),
|
||||
"p": Qt.point(3, 0)
|
||||
},
|
||||
"bottom_left": {
|
||||
"name": I18n.tr("positions.bottom-left"),
|
||||
"p": Qt.point(-2, 2)
|
||||
},
|
||||
"bottom": {
|
||||
"name": I18n.tr("positions.bottom"),
|
||||
"p": Qt.point(0, 3)
|
||||
},
|
||||
"bottom_right": {
|
||||
"name": I18n.tr("positions.bottom-right"),
|
||||
"p": Qt.point(2, 3)
|
||||
}
|
||||
})
|
||||
|
||||
model: Object.keys(shadowOptionsMap).map(function (k) {
|
||||
return {
|
||||
"key": k,
|
||||
"name": shadowOptionsMap[k].name
|
||||
};
|
||||
})
|
||||
|
||||
currentKey: Settings.data.general.shadowDirection
|
||||
defaultValue: Settings.getDefaultValue("general.shadowDirection")
|
||||
|
||||
onSelected: function (key) {
|
||||
var opt = shadowOptionsMap[key];
|
||||
if (opt) {
|
||||
Settings.data.general.shadowDirection = key;
|
||||
Settings.data.general.shadowOffsetX = opt.p.x;
|
||||
Settings.data.general.shadowOffsetY = opt.p.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.user-interface.scaling-label")
|
||||
description: I18n.tr("panels.user-interface.scaling-description")
|
||||
from: 0.8
|
||||
to: 1.2
|
||||
stepSize: 0.05
|
||||
showReset: true
|
||||
value: Settings.data.general.scaleRatio
|
||||
defaultValue: Settings.getDefaultValue("general.scaleRatio")
|
||||
onMoved: value => Settings.data.general.scaleRatio = value
|
||||
text: Math.floor(Settings.data.general.scaleRatio * 100) + "%"
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.user-interface.box-border-radius-label")
|
||||
description: I18n.tr("panels.user-interface.box-border-radius-description")
|
||||
from: 0
|
||||
to: 2
|
||||
stepSize: 0.01
|
||||
showReset: true
|
||||
value: Settings.data.general.radiusRatio
|
||||
defaultValue: Settings.getDefaultValue("general.radiusRatio")
|
||||
onMoved: value => Settings.data.general.radiusRatio = value
|
||||
text: Math.floor(Settings.data.general.radiusRatio * 100) + "%"
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.user-interface.control-border-radius-label")
|
||||
description: I18n.tr("panels.user-interface.control-border-radius-description")
|
||||
from: 0
|
||||
to: 2
|
||||
stepSize: 0.01
|
||||
showReset: true
|
||||
value: Settings.data.general.iRadiusRatio
|
||||
defaultValue: Settings.getDefaultValue("general.iRadiusRatio")
|
||||
onMoved: value => Settings.data.general.iRadiusRatio = value
|
||||
text: Math.floor(Settings.data.general.iRadiusRatio * 100) + "%"
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.animation-disable-label")
|
||||
description: I18n.tr("panels.user-interface.animation-disable-description")
|
||||
checked: Settings.data.general.animationDisabled
|
||||
defaultValue: Settings.getDefaultValue("general.animationDisabled")
|
||||
onToggled: checked => Settings.data.general.animationDisabled = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
visible: !Settings.data.general.animationDisabled
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.user-interface.animation-speed-label")
|
||||
description: I18n.tr("panels.user-interface.animation-speed-description")
|
||||
from: 0
|
||||
to: 2.0
|
||||
stepSize: 0.01
|
||||
showReset: true
|
||||
value: Settings.data.general.animationSpeed
|
||||
defaultValue: Settings.getDefaultValue("general.animationSpeed")
|
||||
onMoved: value => Settings.data.general.animationSpeed = Math.max(value, 0.05)
|
||||
text: Math.round(Settings.data.general.animationSpeed * 100) + "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Modules.Panels.Settings // For SettingsPanel
|
||||
import qs.Services.UI
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.panels-attached-to-bar-label")
|
||||
description: I18n.tr("panels.user-interface.panels-attached-to-bar-description")
|
||||
checked: Settings.data.ui.panelsAttachedToBar
|
||||
defaultValue: Settings.getDefaultValue("ui.panelsAttachedToBar")
|
||||
onToggled: checked => Settings.data.ui.panelsAttachedToBar = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
visible: (Quickshell.screens.length > 1)
|
||||
label: I18n.tr("panels.user-interface.allow-panels-without-bar-label")
|
||||
description: I18n.tr("panels.user-interface.allow-panels-without-bar-description")
|
||||
checked: Settings.data.general.allowPanelsOnScreenWithoutBar
|
||||
defaultValue: Settings.getDefaultValue("general.allowPanelsOnScreenWithoutBar")
|
||||
onToggled: checked => Settings.data.general.allowPanelsOnScreenWithoutBar = checked
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.user-interface.panel-background-opacity-label")
|
||||
description: I18n.tr("panels.user-interface.panel-background-opacity-description")
|
||||
from: 0
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
showReset: true
|
||||
value: Settings.data.ui.panelBackgroundOpacity
|
||||
defaultValue: Settings.getDefaultValue("ui.panelBackgroundOpacity")
|
||||
onMoved: value => Settings.data.ui.panelBackgroundOpacity = value
|
||||
text: Math.floor(Settings.data.ui.panelBackgroundOpacity * 100) + "%"
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.user-interface.dimmer-opacity-label")
|
||||
description: I18n.tr("panels.user-interface.dimmer-opacity-description")
|
||||
from: 0
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
showReset: true
|
||||
value: Settings.data.general.dimmerOpacity
|
||||
defaultValue: Settings.getDefaultValue("general.dimmerOpacity")
|
||||
onMoved: value => Settings.data.general.dimmerOpacity = value
|
||||
text: Math.floor(Settings.data.general.dimmerOpacity * 100) + "%"
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NHeader {
|
||||
label: I18n.tr("panels.user-interface.settings-panel-header")
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
label: I18n.tr("panels.user-interface.settings-panel-mode-label")
|
||||
description: I18n.tr("panels.user-interface.settings-panel-mode-description")
|
||||
Layout.fillWidth: true
|
||||
minimumWidth: 220 * Style.uiScaleRatio
|
||||
model: [
|
||||
{
|
||||
"key": "attached",
|
||||
"name": I18n.tr("options.settings-panel-mode.attached")
|
||||
},
|
||||
{
|
||||
"key": "centered",
|
||||
"name": I18n.tr("options.settings-panel-mode.centered")
|
||||
},
|
||||
{
|
||||
"key": "window",
|
||||
"name": I18n.tr("options.settings-panel-mode.window")
|
||||
}
|
||||
]
|
||||
currentKey: Settings.data.ui.settingsPanelMode
|
||||
defaultValue: Settings.getDefaultValue("ui.settingsPanelMode")
|
||||
onSelected: key => {
|
||||
// Defer setup to next update so close can do its work properly
|
||||
Qt.callLater(() => {
|
||||
Settings.data.ui.settingsPanelMode = key;
|
||||
});
|
||||
if (Settings.data.ui.settingsPanelMode === "window" || key === "window") {
|
||||
// Just switched from/to window, need to close panel
|
||||
var screen = PanelService.openedPanel?.screen || SettingsPanelService.settingsWindow?.screen || PanelService.findScreenForPanels();
|
||||
SettingsPanelService.close(screen);
|
||||
|
||||
Qt.callLater(() => {
|
||||
SettingsPanelService.openToTab(SettingsPanel.Tab.UserInterface, 1, screen);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.user-interface.settings-panel-sidebar-card-style-label")
|
||||
description: I18n.tr("panels.user-interface.settings-panel-sidebar-card-style-description")
|
||||
checked: Settings.data.ui.settingsPanelSideBarCardStyle
|
||||
defaultValue: Settings.getDefaultValue("ui.settingsPanelSideBarCardStyle")
|
||||
onToggled: checked => Settings.data.ui.settingsPanelSideBarCardStyle = checked
|
||||
}
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.general.screen-corners-show-corners-label")
|
||||
description: I18n.tr("panels.general.screen-corners-show-corners-description")
|
||||
checked: Settings.data.general.showScreenCorners
|
||||
defaultValue: Settings.getDefaultValue("general.showScreenCorners")
|
||||
onToggled: checked => Settings.data.general.showScreenCorners = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.general.screen-corners-solid-black-label")
|
||||
description: I18n.tr("panels.general.screen-corners-solid-black-description")
|
||||
checked: Settings.data.general.forceBlackScreenCorners
|
||||
defaultValue: Settings.getDefaultValue("general.forceBlackScreenCorners")
|
||||
onToggled: checked => Settings.data.general.forceBlackScreenCorners = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.general.screen-corners-radius-label")
|
||||
description: I18n.tr("panels.general.screen-corners-radius-description")
|
||||
from: 0
|
||||
to: 2
|
||||
stepSize: 0.01
|
||||
showReset: true
|
||||
value: Settings.data.general.screenRadiusRatio
|
||||
defaultValue: Settings.getDefaultValue("general.screenRadiusRatio")
|
||||
onMoved: value => Settings.data.general.screenRadiusRatio = value
|
||||
text: Math.floor(Settings.data.general.screenRadiusRatio * 100) + "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: 0
|
||||
|
||||
NTabBar {
|
||||
id: subTabBar
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: Style.marginM
|
||||
distributeEvenly: true
|
||||
currentIndex: tabView.currentIndex
|
||||
|
||||
NTabButton {
|
||||
text: I18n.tr("common.appearance")
|
||||
tabIndex: 0
|
||||
checked: subTabBar.currentIndex === 0
|
||||
}
|
||||
NTabButton {
|
||||
text: I18n.tr("common.panels")
|
||||
tabIndex: 1
|
||||
checked: subTabBar.currentIndex === 1
|
||||
}
|
||||
NTabButton {
|
||||
text: I18n.tr("common.screen-corners")
|
||||
tabIndex: 2
|
||||
checked: subTabBar.currentIndex === 2
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Style.marginL
|
||||
}
|
||||
|
||||
NTabView {
|
||||
id: tabView
|
||||
currentIndex: subTabBar.currentIndex
|
||||
|
||||
AppearanceSubTab {}
|
||||
PanelsSubTab {}
|
||||
ScreenCornersSubTab {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user