improves performance and makes the code cleaner
* add parameters instead of calling methods afterwards
* remove a a lot of size requests
* remove parameters that are being set to the default value
* simplify dialogs containers
Refactor post_requrest
Switching to TreeView
More spool info
redesign toggle buttons
Allow spoolman while printing
Styling checkbox as switch
render Toggle switch-like
Fixed wrong timezones
Filtering spools
Removed translations of Spoolman
Spool image can be overided in theme
Added switch-on/off symbols to toggle
rename iter to i to avoid shadowing built-in function
remove redundant parenthesis
convert spoolcompare to static
merge check and treeview shared props
reduce spacing of buttons very useful for vertical/portrait
fix issue with remainings
add spoolman shortcut to extrude
Using backports.zoneinfo for python < 3.9
use decorators for properties
extract format_date function
change top row
last used sort
rebase on upstream
Fix for never used spools
Co-authored-by: alfrix <alfredomonclus@gmail.com>
this removes create_panel function from panels and mandates a class name Panel
remove panel_type param and only use a panel_name that is it's filename
remove load_panel dict
always reinit panel, (simpler and safer but slower)
* Preserve manual capitalization
Avoid re-capitalizing names that already include uppercase letters.
This improves the presentation of names like "TMC2209", etc. when the
user has manually capitalized the name.
* Use title case
Use title case instead of only capitalizing the first character.
Ex. `heater_bed` now becomes "Heater Bed" instead of "Heater bed".
* Add current heater power % to job status
* Add show_heater_power config option and move update_temp()s to ScreenPanel
* Add the option to the UI config instead of the docs
* Prefer extra items on job_status over the power
There is not a lot of space, it's a trade off, and people will likely prefer extra_items
* Remove the comma, none of the other buttons have it
* job_status: inherit the parent config
* screen: create reload_panels to avoid some service restarts
* extrude: fix power breaking multi-extruder setups
* main and temp: remove degrees char from the table
* main and temp: revert removal of the header
Co-authored-by: alfrix <alfredomonclus@gmail.com>
Use f-strings
Avoid unnecessary casts to str()bool()int()
Ensure file closure
Merge nested ifs
Simplify for-assigns-appends with comprehensions and internal functions
Avoid shadowing internal function names
Initialize variables
Return value directly instead of assign then return
Make some methods static