mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-31 08:52:49 -05:00
Add weather card click-through
This commit is contained in:
@@ -37,10 +37,10 @@ DankPopout {
|
|||||||
triggerY: Theme.barHeight - 4 + SettingsData.topBarSpacing + Theme.spacingS
|
triggerY: Theme.barHeight - 4 + SettingsData.topBarSpacing + Theme.spacingS
|
||||||
triggerWidth: 80
|
triggerWidth: 80
|
||||||
positioning: "center"
|
positioning: "center"
|
||||||
screen: triggerScreen
|
|
||||||
shouldBeVisible: dashVisible
|
shouldBeVisible: dashVisible
|
||||||
visible: shouldBeVisible
|
visible: shouldBeVisible
|
||||||
|
|
||||||
|
|
||||||
onDashVisibleChanged: {
|
onDashVisibleChanged: {
|
||||||
if (dashVisible) {
|
if (dashVisible) {
|
||||||
open()
|
open()
|
||||||
@@ -172,6 +172,13 @@ DankPopout {
|
|||||||
|
|
||||||
OverviewTab {
|
OverviewTab {
|
||||||
id: overviewTab
|
id: overviewTab
|
||||||
|
|
||||||
|
onSwitchToWeatherTab: {
|
||||||
|
if (SettingsData.weatherEnabled) {
|
||||||
|
tabBar.currentIndex = 2
|
||||||
|
tabBar.tabClicked(2)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaPlayerTab {
|
MediaPlayerTab {
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import qs.Widgets
|
|||||||
Card {
|
Card {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
signal clicked()
|
||||||
|
|
||||||
Component.onCompleted: WeatherService.addRef()
|
Component.onCompleted: WeatherService.addRef()
|
||||||
Component.onDestruction: WeatherService.removeRef()
|
Component.onDestruction: WeatherService.removeRef()
|
||||||
|
|
||||||
@@ -79,4 +81,11 @@ Card {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: root.clicked()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,8 @@ Item {
|
|||||||
implicitWidth: 700
|
implicitWidth: 700
|
||||||
implicitHeight: 410
|
implicitHeight: 410
|
||||||
|
|
||||||
|
signal switchToWeatherTab()
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
// Clock - top left (narrower and shorter)
|
// Clock - top left (narrower and shorter)
|
||||||
@@ -29,6 +31,8 @@ Item {
|
|||||||
width: SettingsData.weatherEnabled ? parent.width * 0.3 : 0
|
width: SettingsData.weatherEnabled ? parent.width * 0.3 : 0
|
||||||
height: 100
|
height: 100
|
||||||
visible: SettingsData.weatherEnabled
|
visible: SettingsData.weatherEnabled
|
||||||
|
|
||||||
|
onClicked: root.switchToWeatherTab()
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserInfo - top middle-right (extend when weather disabled)
|
// UserInfo - top middle-right (extend when weather disabled)
|
||||||
|
|||||||
Reference in New Issue
Block a user