First iteration of the new screens and also added a hotreloader.

This commit is contained in:
simplePCBuilding
2022-03-07 15:51:35 +01:00
parent 0ac77f238f
commit 1397a25707
6 changed files with 20 additions and 11 deletions

0
bin/startup.py Normal file
View File

BIN
data/Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -12,7 +12,7 @@ BoxLayout:
size_hint_x: .3 size_hint_x: .3
path: app.path_to_kv_file path: app.path_to_kv_file
errors: True errors: True
errors_text_color: 1, 1, 0, 1 errors_text_color: 1, 0, 0, 1
errors_background_color: app.theme_cls.bg_dark errors_background_color: app.theme_cls.bg_dark
''' '''

View File

@@ -1,22 +1,31 @@
MDScreen: MDScreen:
name: "Config" name: "Config"
md_bg_color: (0,0,1,0.3) # md_bg_color: app.theme_cls.accent_color
md_bg_color: (0, 0, 0, 1)
MDFloatLayout: MDFloatLayout:
cols:1 cols:1
MDFlatButton: MDFlatButton:
text: "Back" text: "Back"
pos_hint: {"x": 0.07, "y": 0.07} pos_hint: {"x": 0.07, "y": 0.07}
font_size: 20 font_size: 20
md_bg_color: (0, 0, 0, 1) md_bg_color: app.theme_cls.primary_color
size_hint: 0.1, 0.05 size_hint: 0.1, 0.05
on_release: on_release:
app.root.current = "HomeScreen" app.root.current = "HomeScreen"
root.manager.transition.direction = "left" root.manager.transition.direction = "left"
Spinner:
text: "Haupt-Anwendungsbereich"
size_hint: 0.3, 0.1
pos_hint: {"x": 0.6, "y": 0.8}
values: ["Gaming", "Videobearbeitung", "Fotobearbeitung", "Live-Streaming", "Office/Internet"]
Spinner:
text: ""
size_hint: 0.3, 0.1
MDTextField: MDTextField:
hint_text: "Test" hint_text: "Budget"
id: test id: test
size_hint: 0.2, 0.1 size_hint: 0.3, 0.1
pos_hint: {"x": 0.4, "y": 0.2} pos_hint: {"x": 0.1, "y": 0.8}
MDCheckbox: MDCheckbox:
size_hint: 0.05, 0.05 size_hint: 0.05, 0.05
size: "24dp", "24dp" size: "24dp", "24dp"

View File

@@ -11,11 +11,13 @@ MDScreen:
font_size: 40 font_size: 40
color: app.theme_cls.primary_color color: app.theme_cls.primary_color
FloatLayout: FloatLayout:
Label:
text: "Starting..."
pos_hint: {"y":0.1}
BoxLayout: BoxLayout:
pos_hint: {"center_y": .3, "center_x": .5} pos_hint: {"center_y": .3, "center_x": .5}
padding: "10dp" padding: "10dp"
size_hint_x: .7 size_hint_x: .7
MDProgressBar: MDProgressBar:
id: progress id: progress
orientation: "horizontal" orientation: "horizontal"

View File

@@ -1,9 +1,8 @@
# This is the main runtime of the simplePCBuilding-PC-Configurator # This is the main runtime of the simplePCBuilding-PC-Configurator
# IMPORTS # IMPORTS
import time import time
from kivy.uix.screenmanager import Screen, ScreenManager from kivy.uix.screenmanager import ScreenManager
from kivy.uix.popup import Popup from kivy.uix.popup import Popup
from kivy.app import App
from kivy.lang import Builder from kivy.lang import Builder
from kivy.clock import mainthread from kivy.clock import mainthread
from kivymd.app import MDApp from kivymd.app import MDApp
@@ -11,7 +10,6 @@ from kivymd.uix.screen import MDScreen
from kivy.clock import Clock from kivy.clock import Clock
version = "alpha 1.0" version = "alpha 1.0"
print(f"Launching the simplePCBuilding-PC-Configurator Version {version}!...\nthis might take some time...")
########### ###########
@@ -43,7 +41,7 @@ class PCConfigurator(MDApp):
self.title = "simplePCBuilding-PC-Configurator" self.title = "simplePCBuilding-PC-Configurator"
self.theme_cls.primary_palette = "Blue" self.theme_cls.primary_palette = "Blue"
self.theme_cls.accent_palette = "BlueGray" self.theme_cls.accent_palette = "BlueGray"
# self.icon = "./BiogasControllerAppLogo.png" self.icon = "./data/Logo.png"
screen_manager.add_widget(Builder.load_file("./gui_main/splashscreen.kv")) screen_manager.add_widget(Builder.load_file("./gui_main/splashscreen.kv"))
screen_manager.add_widget(Builder.load_file("./gui_main/main-gui.kv")) screen_manager.add_widget(Builder.load_file("./gui_main/main-gui.kv"))
screen_manager.add_widget(Builder.load_file("./gui_main/configurator.kv")) screen_manager.add_widget(Builder.load_file("./gui_main/configurator.kv"))