Add dock & setting for it, edit StyledTooltip, move settings tabs around
This commit is contained in:
parent
74b233798d
commit
f493fdea44
13 changed files with 493 additions and 53 deletions
|
|
@ -7,7 +7,7 @@ import qs.Settings
|
|||
Rectangle {
|
||||
id: profileSettingsCard
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 650
|
||||
Layout.preferredHeight: 690
|
||||
color: Theme.surface
|
||||
radius: 18
|
||||
|
||||
|
|
@ -353,6 +353,61 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
// Show Dock Setting
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
|
||||
Text {
|
||||
text: "Show Dock"
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: dockSwitch
|
||||
width: 52
|
||||
height: 32
|
||||
radius: 16
|
||||
color: Settings.settings.showDock ? Theme.accentPrimary : Theme.surfaceVariant
|
||||
border.color: Settings.settings.showDock ? Theme.accentPrimary : Theme.outline
|
||||
border.width: 2
|
||||
|
||||
Rectangle {
|
||||
id: dockThumb
|
||||
width: 28
|
||||
height: 28
|
||||
radius: 14
|
||||
color: Theme.surface
|
||||
border.color: Theme.outline
|
||||
border.width: 1
|
||||
y: 2
|
||||
x: Settings.settings.showDock ? taskbarSwitch.width - width - 2 : 2
|
||||
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.showDock = !Settings.settings.showDock
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show Media In Bar Setting
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ PanelWindow {
|
|||
anchors.leftMargin: 32
|
||||
anchors.rightMargin: 32
|
||||
anchors.topMargin: 32
|
||||
|
||||
spacing: 24
|
||||
|
||||
// Header
|
||||
|
|
@ -85,14 +84,14 @@ PanelWindow {
|
|||
}
|
||||
}
|
||||
|
||||
// Tabs bar (moved here)
|
||||
// Tabs bar (reordered)
|
||||
Tabs {
|
||||
id: settingsTabs
|
||||
Layout.fillWidth: true
|
||||
tabsModel: [
|
||||
{ icon: "cloud", label: "Weather" },
|
||||
{ icon: "settings", label: "System" },
|
||||
{ icon: "wallpaper", label: "Wallpaper" }
|
||||
{ icon: "wallpaper", label: "Wallpaper" },
|
||||
{ icon: "cloud", label: "Weather" }
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +114,32 @@ PanelWindow {
|
|||
id: tabContentLoader
|
||||
anchors.top: parent.top
|
||||
width: parent.width
|
||||
sourceComponent: settingsTabs.currentIndex === 0 ? weatherTab : settingsTabs.currentIndex === 1 ? systemTab : wallpaperTab
|
||||
sourceComponent: settingsTabs.currentIndex === 0 ? systemTab : settingsTabs.currentIndex === 1 ? wallpaperTab : weatherTab
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: systemTab
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
ProfileSettings {
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
anchors.margins: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: wallpaperTab
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
WallpaperSettings {
|
||||
id: wallpaperSettings
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
anchors.margins: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -130,29 +154,6 @@ PanelWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: systemTab
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
ProfileSettings {
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
anchors.margins: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: wallpaperTab
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
WallpaperSettings {
|
||||
id: wallpaperSettings
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
anchors.margins: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -160,7 +161,6 @@ PanelWindow {
|
|||
// Function to open the modal and initialize temp values
|
||||
function openSettings() {
|
||||
visible = true;
|
||||
// Force focus on the text input after a short delay
|
||||
focusTimer.start();
|
||||
}
|
||||
|
||||
|
|
@ -174,20 +174,16 @@ PanelWindow {
|
|||
interval: 100
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
if (visible)
|
||||
// Focus will be handled by the individual components
|
||||
{}
|
||||
}
|
||||
}
|
||||
|
||||
// Release focus when modal becomes invisible
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
// Focus will be handled by the individual components
|
||||
if (typeof weather !== 'undefined' && weather !== null && weather.fetchCityWeather) {
|
||||
weather.fetchCityWeather();
|
||||
if (visible) {
|
||||
// Focus logic can go here if needed
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh weather data when hidden
|
||||
onVisibleChanged: {
|
||||
if (!visible && typeof weather !== 'undefined' && weather !== null && weather.fetchCityWeather) {
|
||||
weather.fetchCityWeather();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -422,6 +422,12 @@ Rectangle {
|
|||
running: false
|
||||
}
|
||||
|
||||
Process {
|
||||
id: logoutProcess
|
||||
command: ["loginctl", "terminate-user", Quickshell.env("USER")]
|
||||
running: false
|
||||
}
|
||||
|
||||
function logout() {
|
||||
if (WorkspaceManager.isNiri) {
|
||||
logoutProcessNiri.running = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue