added fullscreen showcase screen (currently in development and still buggy

This commit is contained in:
janis
2022-08-24 12:00:07 +02:00
parent 974e11636a
commit e94b38e014
5 changed files with 94 additions and 22 deletions

View File

@@ -6,6 +6,28 @@ RootScreen:
########### ###########
# POPUPS # POPUPS
########### ###########
<QuitPU>:
title: "BiogasControllerApp"
font_size: 50
size_hint: 0.5, 0.4
auto_dismiss: False
GridLayout:
cols:1
Label:
text: "Are you sure you want to leave?"
font_size: 20
GridLayout:
cols:2
Button:
text: "Yes"
font_size: 15
on_release:
app.stop()
Button:
text: "No"
font_size: 15
on_press:
root.dismiss()
<PathMissingPU>: <PathMissingPU>:
title: "NOTICE!" title: "NOTICE!"
@@ -95,20 +117,33 @@ RootScreen:
text: "" text: ""
on_text: on_text:
root.autocomplete() root.autocomplete()
on_text_validate:
root.change_screen()
Label: Label:
text: "" text: ""
pos_hint: {"x": 0.2, "y":1} pos_hint: {"x": 0.2, "y":1}
size_hint: 0.6, 0.3 size_hint: 0.6, 0.3
text_size: self.size text_size: self.size
id: cmd_output id: cmd_output
Button: GridLayout:
text: "Start" cols: 2
color: app.theme_cls.primary_color Button:
font_size: 30 text: "Start"
bold: True color: app.theme_cls.primary_color
background_color: (0.5, 0.5, 0.5, 1) font_size: 30
on_release: bold: True
root.change_screen() background_color: app.theme_cls.accent_dark
on_release:
root.change_screen()
Button:
text: "Quit"
color: app.theme_cls.primary_color
font_size: 30
bold: True
background_color: app.theme_cls.accent_dark
on_release:
root.quitapp()
<Main>: <Main>:
on_pre_enter: root.initialize() on_pre_enter: root.initialize()
@@ -171,6 +206,7 @@ RootScreen:
root.manager.transition.direction = "left" root.manager.transition.direction = "left"
<ShowcaseS>: <ShowcaseS>:
on_leave: root.disablefullscreen()
name: "Showcase" name: "Showcase"
md_bg_color: (0, 0, 0, 1) md_bg_color: (0, 0, 0, 1)
FloatLayout: FloatLayout:
@@ -229,6 +265,7 @@ RootScreen:
text: "Designed and developed by Janis Hutz" text: "Designed and developed by Janis Hutz"
font_size: 7 font_size: 7
pos_hint: {"y": -0.48} pos_hint: {"y": -0.48}
<SettingsS>: <SettingsS>:
name: "Settings" name: "Settings"
md_bg_color: app.theme_cls.accent_color md_bg_color: app.theme_cls.accent_color

View File

@@ -3,9 +3,17 @@
# (lower = more up to date but higher resource usage) # (lower = more up to date but higher resource usage)
showcaseRefreshRate = 0.5 showcaseRefreshRate = 0.5
[Display]
width = 800
height = 600
launchMaximized = True
[Playback] [Playback]
loopPlayback = 1 loopPlayback = 1
[Info] [Info]
version = V1.1 version = V1.1
subVersion = subVersion =
[Dev Settings]
verbose = True

View File

@@ -1,3 +1,3 @@
0 0
Ancient.mp3,Arm_Candy.mp3,Beach_Disco.mp3,Beach_Walk.mp3,Bird_Therapist.mp3,Carol_of_the_Bells.mp3,Castlevania.mp3,Cats_Searching_for_the_Truth.mp3,Classique.mp3,Cloud_Chaser.mp3,Dragonfly.mp3,Easy_Seas.mp3,Entire.mp3,Eyes_of_Glory.mp3,Finding_Me.mp3,Forgiveness.mp3,Fun_in_the_Sun.mp3,Half_Measures.mp3,Happy_Sixth.mp3,Hear_the_Noise.mp3,Hi_Q.mp3,Hot_Coffee.mp3,How_it_Began.mp3,I_ll_Follow_You.mp3,If_I_Had_a_Chicken.mp3,Jal_Edge_of_Water.mp3,Juno_In_The_Space_Maze.mp3,Ladybug.mp3,Late_Night_Drive.mp3,Meteor.mp3,Modern_Situations.mp3,Move_Out.mp3,Official_National_Anthem.mp3,Plenty_Step.mp3,Point_Green_Getdown.mp3,Retrograde.mp3,Right_Here_Beside_You.mp3,Safety_Net.mp3,Same_Time.mp3,Static.mp3,Stranger_Danger.mp3,Subharmonic_Bliss.mp3,Sun_Machine_One.mp3,The_Computer_Has_Feelings.mp3,Thinking_Of_Us.mp3,This_is_Not_IDM.mp3,This_is_Not_Jazz.mp3,This_is_Not_a_Ballad.mp3,Time_s_Up.mp3,Triumph.mp3,Unstoppable.mp3,Western_Spaghetti.mp3,Zameen_Movement_of_Earth.mp3,bensound-clearday.mp3,bensound-endlessmotion.mp3,bensound-energy.mp3,bensound-happyrock.mp3 The Day You Went Away.mp3,sha la la.mp3
161.23936462402344 221.12362670898438
1 0
2 Ancient.mp3,Arm_Candy.mp3,Beach_Disco.mp3,Beach_Walk.mp3,Bird_Therapist.mp3,Carol_of_the_Bells.mp3,Castlevania.mp3,Cats_Searching_for_the_Truth.mp3,Classique.mp3,Cloud_Chaser.mp3,Dragonfly.mp3,Easy_Seas.mp3,Entire.mp3,Eyes_of_Glory.mp3,Finding_Me.mp3,Forgiveness.mp3,Fun_in_the_Sun.mp3,Half_Measures.mp3,Happy_Sixth.mp3,Hear_the_Noise.mp3,Hi_Q.mp3,Hot_Coffee.mp3,How_it_Began.mp3,I_ll_Follow_You.mp3,If_I_Had_a_Chicken.mp3,Jal_Edge_of_Water.mp3,Juno_In_The_Space_Maze.mp3,Ladybug.mp3,Late_Night_Drive.mp3,Meteor.mp3,Modern_Situations.mp3,Move_Out.mp3,Official_National_Anthem.mp3,Plenty_Step.mp3,Point_Green_Getdown.mp3,Retrograde.mp3,Right_Here_Beside_You.mp3,Safety_Net.mp3,Same_Time.mp3,Static.mp3,Stranger_Danger.mp3,Subharmonic_Bliss.mp3,Sun_Machine_One.mp3,The_Computer_Has_Feelings.mp3,Thinking_Of_Us.mp3,This_is_Not_IDM.mp3,This_is_Not_Jazz.mp3,This_is_Not_a_Ballad.mp3,Time_s_Up.mp3,Triumph.mp3,Unstoppable.mp3,Western_Spaghetti.mp3,Zameen_Movement_of_Earth.mp3,bensound-clearday.mp3,bensound-endlessmotion.mp3,bensound-energy.mp3,bensound-happyrock.mp3 The Day You Went Away.mp3,sha la la.mp3
3 161.23936462402344 221.12362670898438

View File

@@ -1 +1 @@
/mnt/DATA/Music/Videos/Songs/ /mnt/DATA/Music/
1 /mnt/DATA/Music/Videos/Songs/ /mnt/DATA/Music/

View File

@@ -1,7 +1,17 @@
import multiprocessing
import os import os
import configparser
config = configparser.ConfigParser()
config.read('./data/settings.ini')
co = config['Dev Settings']['verbose']
if co == "True":
pass
else:
os.environ["KIVY_NO_CONSOLELOG"] = "1"
import signal import signal
os.environ["KIVY_NO_CONSOLELOG"] = "1" import multiprocessing
from kivy.core.window import Window, Config from kivy.core.window import Window, Config
from kivy.uix.screenmanager import ScreenManager from kivy.uix.screenmanager import ScreenManager
from kivymd.uix.screen import MDScreen from kivymd.uix.screen import MDScreen
@@ -14,12 +24,6 @@ import bin.filepathanalysis
import bin.player import bin.player
import math import math
import bin.autocomplete import bin.autocomplete
import configparser
config = configparser.ConfigParser()
config.read('./data/settings.ini')
version_app = f"Music Player {config['Info']['version']}{config['Info']['subVersion']}"
pl = bin.player.Player() pl = bin.player.Player()
@@ -27,6 +31,7 @@ pa = bin.filepathanalysis.PathAnalysis()
cvr = bin.csv_parsers.CsvRead() cvr = bin.csv_parsers.CsvRead()
cvw = bin.csv_parsers.CsvWrite() cvw = bin.csv_parsers.CsvWrite()
ac = bin.autocomplete.AutoComplete() ac = bin.autocomplete.AutoComplete()
version_app = f"Music Player {config['Info']['version']}{config['Info']['subVersion']}"
########### ###########
@@ -34,6 +39,10 @@ ac = bin.autocomplete.AutoComplete()
########### ###########
class QuitPU(Popup):
pass
class PathMissingPU(Popup): class PathMissingPU(Popup):
pass pass
@@ -107,6 +116,9 @@ class Home(MDScreen):
def reloadf(self, dt): def reloadf(self, dt):
self.ids.filepath.text = self.output self.ids.filepath.text = self.output
def quitapp(self):
QuitPU().open()
class Main(MDScreen): class Main(MDScreen):
def __init__(self, **kwargs): def __init__(self, **kwargs):
@@ -137,6 +149,12 @@ class Main(MDScreen):
self.manager.transition.direction = "left" self.manager.transition.direction = "left"
else: else:
pass pass
elif self.key == "f" and self.manager.current == "Showcase":
if Window.fullscreen == 'auto':
Window.fullscreen = False
else:
Window.fullscreen = 'auto'
Window.maximize()
else: else:
pass pass
@@ -255,7 +273,8 @@ class Main(MDScreen):
class ShowcaseS(MDScreen): class ShowcaseS(MDScreen):
pass def disablefullscreen(self):
Window.fullscreen = False
class RootScreen(ScreenManager): class RootScreen(ScreenManager):
@@ -277,12 +296,20 @@ class MusicPlayer(MDApp):
if __name__ == "__main__": if __name__ == "__main__":
if config['Display']['launchMaximized'] == "True":
Window.maximize()
else:
pass
try:
Window.size = (int(config['Display']['width']), int(config['Display']['height']))
except Exception as e:
print("Unvalid config string found for in Display settings")
Config.set('graphics', 'width', '800') Config.set('graphics', 'width', '800')
Config.set('graphics', 'height', '600') Config.set('graphics', 'height', '600')
Config.set('graphics', 'resizable', True) Config.set('graphics', 'resizable', True)
Config.set('kivy', 'exit_on_escape', '0') Config.set('kivy', 'exit_on_escape', '0')
Config.set('input', 'mouse', 'mouse,multitouch_on_demand') Config.set('input', 'mouse', 'mouse,multitouch_on_demand')
Config.set('graphics', 'window_state', 'normal') Config.set('graphics', 'window_state', 'normal')
Config.set('graphics', 'fullscreen', False)
Config.write() Config.write()
MusicPlayer().run() MusicPlayer().run()