forked from Shinonome/dots-hyprland
sidebar: add empty placeholder (#2804)
This commit is contained in:
@@ -48,6 +48,7 @@ Item {
|
|||||||
spacing: sidebarPadding
|
spacing: sidebarPadding
|
||||||
|
|
||||||
Toolbar {
|
Toolbar {
|
||||||
|
visible: tabButtonList.length > 0
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
enableShadow: false
|
enableShadow: false
|
||||||
ToolbarTabBar {
|
ToolbarTabBar {
|
||||||
@@ -83,9 +84,10 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
contentChildren: [
|
contentChildren: [
|
||||||
...((root.aiChatEnabled || (!root.translatorEnabled && !root.animeEnabled)) ? [aiChat.createObject()] : []),
|
...(root.aiChatEnabled ? [aiChat.createObject()] : []),
|
||||||
...(root.translatorEnabled ? [translator.createObject()] : []),
|
...(root.translatorEnabled ? [translator.createObject()] : []),
|
||||||
...(root.animeEnabled ? [anime.createObject()] : [])
|
...(root.animeEnabled ? [anime.createObject()] : []),
|
||||||
|
...(root.tabButtonList.length === 0 ? [placeholder.createObject()] : [])
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -102,6 +104,15 @@ Item {
|
|||||||
id: anime
|
id: anime
|
||||||
Anime {}
|
Anime {}
|
||||||
}
|
}
|
||||||
|
Component {
|
||||||
|
id: placeholder
|
||||||
|
Item {
|
||||||
|
StyledText {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: Translation.tr("Enjoy your empty sidebar...")
|
||||||
|
color: Appearance.colors.colSubtext
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user