add crypto
This commit is contained in:
parent
90cbe489f6
commit
af6a3bce3e
120 changed files with 24616 additions and 462 deletions
|
|
@ -0,0 +1,125 @@
|
|||
import QtQuick
|
||||
import "../../tabs" as Tabs
|
||||
|
||||
// Tab container with sliding animation
|
||||
Item {
|
||||
id: tabContainer
|
||||
|
||||
// Properties from parent
|
||||
required property var shell
|
||||
required property bool isRecording
|
||||
required property var triggerMouseArea
|
||||
property int currentTab: 0
|
||||
|
||||
// Signals to forward
|
||||
signal recordingRequested()
|
||||
signal stopRecordingRequested()
|
||||
signal systemActionRequested(string action)
|
||||
signal performanceActionRequested(string action)
|
||||
|
||||
// Hover detection combining all tab hovers
|
||||
property bool isHovered: {
|
||||
const tabHovers = [
|
||||
mainDashboard.isHovered,
|
||||
true, // Calendar tab should stay open when active
|
||||
true, // Clipboard tab should stay open when active
|
||||
true, // Notification tab should stay open when active
|
||||
true, // Wallpaper tab should stay open when active
|
||||
true, // Music tab should stay open when active
|
||||
true // Settings tab should stay open when active
|
||||
]
|
||||
return tabHovers[currentTab] || false
|
||||
}
|
||||
|
||||
// Track when text inputs have focus for keyboard management
|
||||
property bool textInputFocused: currentTab === 6 && settingsTab.anyTextInputFocused
|
||||
|
||||
clip: true
|
||||
|
||||
// Sliding content container
|
||||
Row {
|
||||
id: slidingRow
|
||||
width: parent.width * 7 // 7 tabs wide
|
||||
height: parent.height
|
||||
spacing: 0
|
||||
|
||||
// Animate horizontal position based on current tab
|
||||
x: -tabContainer.currentTab * tabContainer.width
|
||||
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
// Tab 0: Main Dashboard
|
||||
Tabs.MainDashboard {
|
||||
id: mainDashboard
|
||||
width: tabContainer.width
|
||||
height: parent.height
|
||||
|
||||
shell: tabContainer.shell
|
||||
isRecording: tabContainer.isRecording
|
||||
triggerMouseArea: tabContainer.triggerMouseArea
|
||||
|
||||
onRecordingRequested: tabContainer.recordingRequested()
|
||||
onStopRecordingRequested: tabContainer.stopRecordingRequested()
|
||||
onSystemActionRequested: function(action) { tabContainer.systemActionRequested(action) }
|
||||
onPerformanceActionRequested: function(action) { tabContainer.performanceActionRequested(action) }
|
||||
}
|
||||
|
||||
// Tab 1: Calendar
|
||||
Tabs.CalendarTab {
|
||||
id: calendarTab
|
||||
width: tabContainer.width
|
||||
height: parent.height
|
||||
shell: tabContainer.shell
|
||||
isActive: tabContainer.currentTab === 1 || Math.abs(tabContainer.currentTab - 1) <= 1
|
||||
}
|
||||
|
||||
// Tab 2: Clipboard
|
||||
Tabs.ClipboardTab {
|
||||
id: clipboardTab
|
||||
width: tabContainer.width
|
||||
height: parent.height
|
||||
shell: tabContainer.shell
|
||||
isActive: tabContainer.currentTab === 2 || Math.abs(tabContainer.currentTab - 2) <= 1
|
||||
}
|
||||
|
||||
// Tab 3: Notifications
|
||||
Tabs.NotificationTab {
|
||||
id: notificationTab
|
||||
width: tabContainer.width
|
||||
height: parent.height
|
||||
shell: tabContainer.shell
|
||||
isActive: tabContainer.currentTab === 3 || Math.abs(tabContainer.currentTab - 3) <= 1
|
||||
}
|
||||
|
||||
// Tab 4: Wallpapers
|
||||
Tabs.WallpaperTab {
|
||||
id: wallpaperTab
|
||||
width: tabContainer.width
|
||||
height: parent.height
|
||||
isActive: tabContainer.currentTab === 4 || Math.abs(tabContainer.currentTab - 4) <= 1
|
||||
}
|
||||
|
||||
// Tab 5: Music
|
||||
Tabs.MusicTab {
|
||||
id: musicTab
|
||||
width: tabContainer.width
|
||||
height: parent.height
|
||||
shell: tabContainer.shell
|
||||
isActive: tabContainer.currentTab === 5 || Math.abs(tabContainer.currentTab - 5) <= 1
|
||||
}
|
||||
|
||||
// Tab 6: Settings
|
||||
Tabs.SettingsTab {
|
||||
id: settingsTab
|
||||
width: tabContainer.width
|
||||
height: parent.height
|
||||
shell: tabContainer.shell
|
||||
isActive: tabContainer.currentTab === 6 || Math.abs(tabContainer.currentTab - 6) <= 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
import QtQuick
|
||||
import "root:/Data" as Data
|
||||
|
||||
// Tab navigation sidebar
|
||||
Item {
|
||||
id: tabNavigation
|
||||
|
||||
property int currentTab: 0
|
||||
property var tabIcons: []
|
||||
property bool containsMouse: sidebarMouseArea.containsMouse || tabColumn.containsMouse
|
||||
|
||||
MouseArea {
|
||||
id: sidebarMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
propagateComposedEvents: true
|
||||
}
|
||||
|
||||
// Tab button background - matches system controls
|
||||
Rectangle {
|
||||
width: 38
|
||||
height: tabColumn.height + 12
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
color: Qt.lighter(Data.ThemeManager.bgColor, 1.15)
|
||||
radius: 19
|
||||
border.width: 1
|
||||
border.color: Qt.lighter(Data.ThemeManager.bgColor, 1.3)
|
||||
|
||||
// Subtle inner shadow effect
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 1
|
||||
color: Qt.darker(Data.ThemeManager.bgColor, 1.05)
|
||||
radius: parent.radius - 1
|
||||
opacity: 0.3
|
||||
}
|
||||
}
|
||||
|
||||
// Tab icon buttons
|
||||
Column {
|
||||
id: tabColumn
|
||||
spacing: 6
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 6
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
property bool containsMouse: {
|
||||
for (let i = 0; i < tabRepeater.count; i++) {
|
||||
const tab = tabRepeater.itemAt(i)
|
||||
if (tab && tab.mouseArea && tab.mouseArea.containsMouse) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: tabRepeater
|
||||
model: 7
|
||||
delegate: Rectangle {
|
||||
width: 30
|
||||
height: 30
|
||||
radius: 15
|
||||
|
||||
// Dynamic background based on state
|
||||
color: {
|
||||
if (tabNavigation.currentTab === index) {
|
||||
return Data.ThemeManager.accentColor
|
||||
} else if (tabMouseArea.containsMouse) {
|
||||
return Qt.rgba(Data.ThemeManager.accentColor.r, Data.ThemeManager.accentColor.g, Data.ThemeManager.accentColor.b, 0.15)
|
||||
} else {
|
||||
return "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
// Subtle shadow for active tab
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: parent.radius
|
||||
color: "transparent"
|
||||
border.color: Qt.rgba(Data.ThemeManager.accentColor.r, Data.ThemeManager.accentColor.g, Data.ThemeManager.accentColor.b, 0.3)
|
||||
border.width: tabNavigation.currentTab === index ? 0 : (tabMouseArea.containsMouse ? 1 : 0)
|
||||
visible: tabNavigation.currentTab !== index
|
||||
}
|
||||
|
||||
property alias mouseArea: tabMouseArea
|
||||
|
||||
MouseArea {
|
||||
id: tabMouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
tabNavigation.currentTab = index
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: tabNavigation.tabIcons[index] || ""
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 16
|
||||
color: {
|
||||
if (tabNavigation.currentTab === index) {
|
||||
return Data.ThemeManager.bgColor
|
||||
} else if (tabMouseArea.containsMouse) {
|
||||
return Data.ThemeManager.accentColor
|
||||
} else {
|
||||
return Qt.rgba(Data.ThemeManager.fgColor.r, Data.ThemeManager.fgColor.g, Data.ThemeManager.fgColor.b, 0.7)
|
||||
}
|
||||
}
|
||||
|
||||
// Smooth color transitions
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: 150 }
|
||||
}
|
||||
}
|
||||
|
||||
// Smooth transitions
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: 150 }
|
||||
}
|
||||
|
||||
// Subtle scale effect on hover
|
||||
scale: tabMouseArea.containsMouse ? 1.05 : 1.0
|
||||
Behavior on scale {
|
||||
NumberAnimation { duration: 150; easing.type: Easing.OutCubic }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue