Start the Qt Quick rewrite of the launcher in qt/
A QML UI with feature parity as the goal: home grid that fills the screen with dense packing and pinned cells, drag to reorder or into an empty cell, widget resize handles snapping to the grid, the app drawer with search and long-press menu, sheets, and the widget picker. HomeActivity (a QtActivity) keeps the Android parts and hosts native widget views over the QML slots, as the WebView shell did. A desktop backend serves the demo data, so qt/tests/e2e.cpp drives the UI end to end offscreen; CI runs it and builds an APK that installs next to the current launcher as ultra Home (Qt). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiQsCq11CwCPnKPp9D
This commit is contained in:
33 files changed
+3680
No files matched your search
@@ -0,0 +1,69 @@
|
||||
import QtQuick
|
||||
|
||||
// A panel that rises from the bottom over a dimmed screen (long-press menus, the
|
||||
// widget picker). Its children go in a column; tapping outside closes it.
|
||||
Item {
|
||||
id: root
|
||||
property bool open: false
|
||||
property string title: ""
|
||||
property real bottomInset: 0
|
||||
property real maxWidth: 560
|
||||
default property alias content: column.data
|
||||
signal closeRequested()
|
||||
anchors.fill: parent
|
||||
visible: open || panel.y < height
|
||||
enabled: open
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
opacity: root.open ? .45 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 150 } }
|
||||
MouseArea { anchors.fill: parent; onClicked: root.closeRequested() }
|
||||
}
|
||||
Rectangle {
|
||||
id: panel
|
||||
width: Math.min(root.width, root.maxWidth)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: Math.min(root.height * .7, column.implicitHeight + 36 + root.bottomInset + 16)
|
||||
y: root.open ? root.height - height : root.height
|
||||
Behavior on y { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } }
|
||||
radius: 20
|
||||
color: "#18181b"
|
||||
MouseArea { anchors.fill: parent } // keep taps on the sheet off the overlay
|
||||
// square off the bottom corners
|
||||
Rectangle { anchors.bottom: parent.bottom; width: parent.width; height: 20; color: parent.color }
|
||||
Rectangle {
|
||||
width: 36; height: 5; radius: 3
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 12
|
||||
color: "#3f3f46"
|
||||
}
|
||||
Flickable {
|
||||
id: flick
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 28
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
anchors.bottomMargin: root.bottomInset + 16
|
||||
contentHeight: column.implicitHeight
|
||||
clip: true
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
Column {
|
||||
id: column
|
||||
width: flick.width
|
||||
Text {
|
||||
visible: root.title.length > 0
|
||||
text: root.title
|
||||
color: "#fafafa"
|
||||
font.pixelSize: 16
|
||||
font.weight: Font.DemiBold
|
||||
leftPadding: 8
|
||||
bottomPadding: 8
|
||||
width: parent.width
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user