first commit

This commit is contained in:
Kivy Signage Player
2025-09-26 17:04:17 +03:00
parent 7bdc706915
commit e052f4d068
2 changed files with 152 additions and 90 deletions

View File

@@ -390,10 +390,16 @@ class SignagePlayer(Widget):
return super(SignagePlayer, self).on_touch_move(touch)
def show_controls(self):
"""Show control buttons"""
"""Show control buttons and cursor"""
if self.controls_timer:
self.controls_timer.cancel()
# Show cursor
try:
Window.show_cursor = True
except:
pass
# Fade in controls
Animation(opacity=1, duration=0.3).start(self.ids.controls_layout)
@@ -408,8 +414,14 @@ class SignagePlayer(Widget):
self.controls_timer = Clock.schedule_once(self.hide_controls, 3)
def hide_controls(self, dt=None):
"""Hide control buttons"""
"""Hide control buttons and cursor"""
Animation(opacity=0, duration=0.5).start(self.ids.controls_layout)
# Hide cursor after controls are hidden
try:
Window.show_cursor = False
except:
pass
def show_settings(self, instance=None):
"""Show settings popup"""
@@ -424,13 +436,30 @@ class SignagePlayer(Widget):
class SignagePlayerApp(App):
def build(self):
# Set window to fullscreen
# Get screen resolution info
Logger.info(f"SignagePlayerApp: Screen size: {Window.size}")
Logger.info(f"SignagePlayerApp: Available screen size: {Window.system_size if hasattr(Window, 'system_size') else 'N/A'}")
# Set window to fullscreen and borderless
Window.fullscreen = 'auto'
Window.borderless = True
# Hide cursor after 3 seconds of inactivity
Clock.schedule_once(self.hide_cursor, 3)
return SignagePlayer()
def hide_cursor(self, dt):
"""Hide the mouse cursor"""
try:
Window.show_cursor = False
except:
pass # Some platforms don't support cursor hiding
def on_start(self):
# Log final window info
Logger.info(f"SignagePlayerApp: Final window size: {Window.size}")
Logger.info(f"SignagePlayerApp: Fullscreen: {Window.fullscreen}")
Logger.info("SignagePlayerApp: Application started")
def on_stop(self):