1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

welcome: make the first page stuff clickable

fixes #1295
This commit is contained in:
bbedward
2026-01-07 21:22:15 -05:00
parent a5e107c89d
commit ccc7047be0
5 changed files with 45 additions and 6 deletions

View File

@@ -1587,6 +1587,9 @@ Singleton {
updateCompositorCursor(); updateCompositorCursor();
} }
// This solution for xwayland cursor themes is from the xwls discussion:
// https://github.com/Supreeeme/xwayland-satellite/issues/104
// no idea if this matters on other compositors but we also set XCURSOR stuff in the launcher
function updateCompositorCursor() { function updateCompositorCursor() {
updateXResources(); updateXResources();
if (typeof CompositorService === "undefined") if (typeof CompositorService === "undefined")

View File

@@ -168,7 +168,7 @@ Column {
iconName: "search" iconName: "search"
title: "Settings Search" title: "Settings Search"
description: "Find settings fast" description: "Find settings fast"
onClicked: PopoutService.openSettingsWithTab("general") onClicked: PopoutService.openSettings()
} }
} }
} }

View File

@@ -9,12 +9,21 @@ Rectangle {
property string title: "" property string title: ""
property string description: "" property string description: ""
signal clicked
readonly property real iconContainerSize: Math.round(Theme.iconSize * 1.5) readonly property real iconContainerSize: Math.round(Theme.iconSize * 1.5)
height: Math.round(Theme.fontSizeMedium * 6.4) height: Math.round(Theme.fontSizeMedium * 6.4)
radius: Theme.cornerRadius radius: Theme.cornerRadius
color: Theme.surfaceContainerHigh color: Theme.surfaceContainerHigh
Rectangle {
anchors.fill: parent
radius: parent.radius
color: Theme.primary
opacity: mouseArea.containsMouse ? 0.12 : 0
}
Column { Column {
anchors.centerIn: parent anchors.centerIn: parent
spacing: Theme.spacingS spacing: Theme.spacingS
@@ -54,4 +63,12 @@ Rectangle {
} }
} }
} }
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.clicked()
}
} }

View File

@@ -1,6 +1,8 @@
import QtQuick import QtQuick
import QtQuick.Effects import QtQuick.Effects
import Quickshell
import qs.Common import qs.Common
import qs.Services
import qs.Widgets import qs.Widgets
Item { Item {
@@ -87,6 +89,7 @@ Item {
iconName: "auto_awesome" iconName: "auto_awesome"
title: I18n.tr("Dynamic Theming", "greeter feature card title") title: I18n.tr("Dynamic Theming", "greeter feature card title")
description: I18n.tr("Colors from wallpaper", "greeter feature card description") description: I18n.tr("Colors from wallpaper", "greeter feature card description")
onClicked: PopoutService.openSettingsWithTab("theme")
} }
GreeterFeatureCard { GreeterFeatureCard {
@@ -94,6 +97,7 @@ Item {
iconName: "format_paint" iconName: "format_paint"
title: I18n.tr("App Theming", "greeter feature card title") title: I18n.tr("App Theming", "greeter feature card title")
description: I18n.tr("GTK, Qt, IDEs, more", "greeter feature card description") description: I18n.tr("GTK, Qt, IDEs, more", "greeter feature card description")
onClicked: PopoutService.openSettingsWithTab("theme")
} }
GreeterFeatureCard { GreeterFeatureCard {
@@ -101,6 +105,7 @@ Item {
iconName: "download" iconName: "download"
title: I18n.tr("Theme Registry", "greeter feature card title") title: I18n.tr("Theme Registry", "greeter feature card title")
description: I18n.tr("Community themes", "greeter feature card description") description: I18n.tr("Community themes", "greeter feature card description")
onClicked: PopoutService.openSettingsWithTab("theme")
} }
GreeterFeatureCard { GreeterFeatureCard {
@@ -108,6 +113,7 @@ Item {
iconName: "view_carousel" iconName: "view_carousel"
title: I18n.tr("DankBar", "greeter feature card title") title: I18n.tr("DankBar", "greeter feature card title")
description: I18n.tr("Modular widget bar", "greeter feature card description") description: I18n.tr("Modular widget bar", "greeter feature card description")
onClicked: PopoutService.openSettingsWithTab("dankbar_settings")
} }
GreeterFeatureCard { GreeterFeatureCard {
@@ -115,6 +121,7 @@ Item {
iconName: "extension" iconName: "extension"
title: I18n.tr("Plugins", "greeter feature card title") title: I18n.tr("Plugins", "greeter feature card title")
description: I18n.tr("Extensible architecture", "greeter feature card description") description: I18n.tr("Extensible architecture", "greeter feature card description")
onClicked: PopoutService.openSettingsWithTab("plugins")
} }
GreeterFeatureCard { GreeterFeatureCard {
@@ -122,6 +129,10 @@ Item {
iconName: "layers" iconName: "layers"
title: I18n.tr("Multi-Monitor", "greeter feature card title") title: I18n.tr("Multi-Monitor", "greeter feature card title")
description: I18n.tr("Per-screen config", "greeter feature card description") description: I18n.tr("Per-screen config", "greeter feature card description")
onClicked: {
const hasDisplayConfig = CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl;
PopoutService.openSettingsWithTab(hasDisplayConfig ? "display_config" : "display_widgets");
}
} }
GreeterFeatureCard { GreeterFeatureCard {
@@ -129,6 +140,7 @@ Item {
iconName: "nightlight" iconName: "nightlight"
title: I18n.tr("Display Control", "greeter feature card title") title: I18n.tr("Display Control", "greeter feature card title")
description: I18n.tr("Night mode & gamma", "greeter feature card description") description: I18n.tr("Night mode & gamma", "greeter feature card description")
onClicked: PopoutService.openSettingsWithTab("display_gamma")
} }
GreeterFeatureCard { GreeterFeatureCard {
@@ -136,13 +148,16 @@ Item {
iconName: "tune" iconName: "tune"
title: I18n.tr("Control Center", "greeter feature card title") title: I18n.tr("Control Center", "greeter feature card title")
description: I18n.tr("Quick system toggles", "greeter feature card description") description: I18n.tr("Quick system toggles", "greeter feature card description")
// This is doing an IPC since its just easier and lazier to access the bar ref
onClicked: Quickshell.execDetached(["dms", "ipc", "call", "control-center", "open"])
} }
GreeterFeatureCard { GreeterFeatureCard {
width: (parent.width - Theme.spacingS * 2) / 3 width: (parent.width - Theme.spacingS * 2) / 3
iconName: "density_small" iconName: "lock"
title: I18n.tr("System Tray", "greeter feature card title") title: I18n.tr("Lock Screen", "greeter feature card title")
description: I18n.tr("Background app icons", "greeter feature card description") description: I18n.tr("Security & privacy", "greeter feature card description")
onClicked: PopoutService.openSettingsWithTab("lock_screen")
} }
} }
} }

View File

@@ -34,15 +34,19 @@ FloatingWindow {
} }
function showWithTab(tabIndex: int) { function showWithTab(tabIndex: int) {
if (tabIndex >= 0) if (tabIndex >= 0) {
currentTabIndex = tabIndex; currentTabIndex = tabIndex;
sidebar.autoExpandForTab(tabIndex);
}
visible = true; visible = true;
} }
function showWithTabName(tabName: string) { function showWithTabName(tabName: string) {
var idx = sidebar.resolveTabIndex(tabName); var idx = sidebar.resolveTabIndex(tabName);
if (idx >= 0) if (idx >= 0) {
currentTabIndex = idx; currentTabIndex = idx;
sidebar.autoExpandForTab(idx);
}
visible = true; visible = true;
} }