فهرست منبع

add unclutter, add scrolling to palylist page

tuanchris 3 ماه پیش
والد
کامیت
0e3a1f2b59
3فایلهای تغییر یافته به همراه50 افزوده شده و 6 حذف شده
  1. 2 0
      dune-weaver-touch/dune-weaver-touch.service
  2. 32 0
      dune-weaver-touch/install.sh
  3. 16 6
      dune-weaver-touch/qml/pages/ModernPlaylistPage.qml

+ 2 - 0
dune-weaver-touch/dune-weaver-touch.service

@@ -11,6 +11,8 @@ WorkingDirectory=/home/pi/dune-weaver-touch
 Environment=DISPLAY=:0
 Environment=QT_QPA_PLATFORM=eglfs
 Environment=QT_QPA_EGLFS_ALWAYS_SET_MODE=1
+Environment=QT_QPA_EGLFS_HIDECURSOR=1
+Environment=QT_QPA_FB_HIDECURSOR=1
 ExecStart=/home/pi/dune-weaver-touch/venv/bin/python /home/pi/dune-weaver-touch/main.py
 Restart=always
 RestartSec=5

+ 32 - 0
dune-weaver-touch/install.sh

@@ -151,6 +151,36 @@ EOF
     echo "   👆 Touch rotation configured (180°)"
 }
 
+# Function to hide mouse cursor
+hide_mouse_cursor() {
+    echo "🖱️  Configuring mouse cursor hiding..."
+
+    # Install unclutter for hiding mouse cursor when idle
+    echo "   📦 Installing unclutter..."
+    apt install -y unclutter > /dev/null 2>&1
+
+    # Create autostart directory if it doesn't exist
+    local AUTOSTART_DIR="$USER_HOME/.config/autostart"
+    mkdir -p "$AUTOSTART_DIR"
+    chown -R "$ACTUAL_USER:$ACTUAL_USER" "$USER_HOME/.config"
+
+    # Create unclutter autostart entry
+    cat > "$AUTOSTART_DIR/unclutter.desktop" << 'EOF'
+[Desktop Entry]
+Type=Application
+Name=Unclutter
+Comment=Hide mouse cursor when idle
+Exec=unclutter -idle 0.1 -root
+Hidden=false
+NoDisplay=false
+X-GNOME-Autostart-enabled=true
+EOF
+
+    chown "$ACTUAL_USER:$ACTUAL_USER" "$AUTOSTART_DIR/unclutter.desktop"
+
+    echo "   🖱️  Mouse cursor hiding configured"
+}
+
 # Function to setup kiosk optimizations
 setup_kiosk_optimizations() {
     echo "🖥️  Setting up kiosk optimizations..."
@@ -254,6 +284,7 @@ install_scripts
 setup_systemd
 configure_boot_settings
 setup_touch_rotation
+hide_mouse_cursor
 setup_kiosk_optimizations
 
 echo ""
@@ -263,6 +294,7 @@ echo ""
 echo "✅ Python virtual environment created at: $SCRIPT_DIR/venv"
 echo "✅ System scripts installed in /usr/local/bin/"
 echo "✅ Systemd service configured for auto-start"
+echo "✅ Mouse cursor hiding configured (Qt + unclutter)"
 echo "✅ Kiosk optimizations applied"
 echo ""
 echo "🔧 Service Management:"

+ 16 - 6
dune-weaver-touch/qml/pages/ModernPlaylistPage.qml

@@ -498,24 +498,36 @@ Page {
                             // Settings section
                             Rectangle {
                                 Layout.fillWidth: true
-                                Layout.preferredHeight: 280
+                                Layout.fillHeight: true
                                 Layout.minimumHeight: 250
                                 radius: 10
                                 color: "#f8f9fa"
                                 border.color: "#e5e7eb"
                                 border.width: 1
-                                
+
                                 ColumnLayout {
                                     anchors.fill: parent
                                     anchors.margins: 15
                                     spacing: 15
-                                    
+
                                     Label {
                                         text: "Settings"
                                         font.pixelSize: 14
                                         font.bold: true
                                         color: "#333"
                                     }
+
+                                    // Scrollable settings content
+                                    ScrollView {
+                                        Layout.fillWidth: true
+                                        Layout.fillHeight: true
+                                        clip: true
+
+                                        ScrollBar.vertical.policy: ScrollBar.AsNeeded
+
+                                        ColumnLayout {
+                                            width: parent.width
+                                            spacing: 15
                                     
                                     // Run mode
                                     Column {
@@ -817,9 +829,7 @@ Page {
                                             }
                                         }
                                     }
-                                    
-                                    Item {
-                                        Layout.fillHeight: true
+                                        }
                                     }
                                 }
                             }