64 Commits

Author SHA1 Message Date
alfrix
d21033ad55 menu: directly return enable condition do not save in a variable 2024-04-04 11:30:08 -03:00
Alfredo Monclus
14a02e5bcf
widgets: create autogrid: a custom grid that arranges itself (#1307) 2024-03-20 23:14:43 -03:00
alfrix
6cf639c083 refactor widget creation
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
2024-01-02 08:14:51 -03:00
alfrix
1c5b215d25 menu: refactor for efficiency 2023-10-03 00:05:08 -03:00
alfrix
a475a184a9 menu: allow users to unset variables for replacing panels 2023-09-27 23:03:43 -03:00
alfrix
35e2a46852 menu: fit 4 rows
needs to be better
create all the items on activate?
2023-08-26 13:05:44 -03:00
alfrix
8053e97d10 camera: add support for moonraker cameras, deprecates camera_url
this also adds support for flipping and rotation (configured in moonraker)
close #976
2023-08-18 11:48:37 -03:00
alfrix
8d9236a2df screen: simplify panel loading
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)
2023-07-30 12:22:58 -03:00
Alfredo Monclus
6190581101
Reorganization (#1029) 2023-07-02 15:16:36 -03:00
alfrix
2241b54153 use only one jinja env
slightly improves performance
2023-06-16 10:05:24 -03:00
alfrix
c1d8a4f033 menu: get rid of initalize 2023-06-13 13:39:23 -03:00
alfrix
1e741ee439 fix menu items not evaluating fixes #959 2023-05-11 08:39:36 -06:00
alfrix
0f97f6e32c menu: don't create items if enable is false, previously it was just not shown 2023-03-24 08:35:11 -06:00
alfrix
122752b000 leakfix 2023-03-09 07:32:46 -06:00
alfrix
d6693fbecc make the menu icon non-mandatory
this was caused by #866
fixes #902
2023-02-20 07:57:45 -06:00
Geoffrey Young
3d7e92f507
add ability to style and template menu buttons (#866)
* add ability to select button style for menu items

* allow for jinja template rendering for (nearly) all menu options
this shuffles params json checks to display time instead of config time
2023-02-13 21:06:33 -06:00
alfrix
502d9699bd fix actions not appearing in printers without name after last commit fix #838 2022-12-11 15:25:28 -03:00
alfrix
d2d2c82041 feat: camera support, using mpv as backend
it should be able to play any video or stream that mpv itself can handle

close #67 close #129
2022-12-11 09:20:06 -03:00
alfrix
593d8c678b gtk: merge buttonimage and button 2022-11-22 14:55:42 -03:00
alfrix
d0d79a64df base_panel: simplify action bar buttons enable-disable 2022-11-21 09:20:05 -03:00
alfrix
fc0f153023 reorder imports 2022-11-20 07:28:05 -03:00
alfrix
7ca37c56b6 websocket: refactor how the connection is handled 2022-11-18 12:56:05 -03:00
alfrix
5215c8f985 menu: less logging 2022-11-18 01:17:57 -03:00
alfrix
1db6388798 menu: use None 2022-11-18 00:53:53 -03:00
alfrix
bdafb31522 menu: simplify enable 2022-11-18 00:53:53 -03:00
alfrix
45ab86204b panels: remove initialize from the panels that do not have a menu 2022-11-18 00:53:53 -03:00
alfrix
78f76d659c menu: log a more descriptive item enable status 2022-11-09 10:37:30 -03:00
alfrix
44623b44d1 menu: reduce logging 2022-11-04 18:13:06 -03:00
alfrix
d3d7104ec4 languages: refactor
- No full restart requirement just reload
- Fix some systems not loading the language
- Fix RTL not applied if the lang was not set by the system
2022-10-26 22:36:52 -03:00
alfrix
1305b40c41 refactors and cleanup 2022-10-14 13:27:01 -03:00
alfrix
38ceea5204 gtk: improve wrapping of labels 2022-09-02 19:58:35 -03:00
alfrix
200dca9dd3 dump more info during exceptions 2022-08-10 10:49:23 -03:00
alfrix
6510b2ec6b Refactor
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
2022-08-01 12:23:40 -03:00
alfrix
5ad82a64d4 Translations: install _() 2022-07-03 12:03:50 -03:00
alfrix
0f4f56bb9f Fix paused state
close #607
fix #611
2022-05-31 11:14:42 -03:00
alfrix
33195f203f Simplify code 2022-05-31 11:14:42 -03:00
alfrix
5a36729b76 PEP8, typos and warnings fixes 2022-05-31 11:14:42 -03:00
alfrix
ea3e7ad3d1 splash_screen: use moonraker for actions if connected, hide system panel if it isn't connected
use systemctl if moonraker isn't available close #615
2022-05-31 11:14:42 -03:00
alfrix
2e16193292 menu: fix portrait issues 2022-03-25 13:41:22 -03:00
alfrix
bc366b708d menu and printer_select: support more than 8 items 2022-03-25 12:02:19 -03:00
alfrix
5899c8feab Optimize imports 2022-03-15 12:41:21 -03:00
Alfredo Monclus
dd027c0583
Vertical mode (#480) 2022-02-24 16:00:51 -03:00
Alfredo Monclus
c1372c1839
Start in configurations without fans or extruders or temp devices
A bunch of conditionals that makes KS start and not stay in the splash screen
2022-01-30 10:55:05 -03:00
Alfredo Monclus
86fc0f9988
Menu: Arrange 3 x 2 and 2 x 2 (#442)
* Arrange 3 x 3 and 2 x 2

* typo
2022-01-17 01:12:54 -05:00
Jordan
70d8315539 Update code style 2021-09-11 17:25:38 -04:00
Jordan Ruthe
c0b4b464bd Changes to logging implementation 2021-02-21 12:19:30 -05:00
Jordan Ruthe
90c84d5f17 menu: Fix issue in updating j2_data for moonraker connection 2021-01-20 16:27:02 -05:00
Jordan Ruthe
a087ecfa30 menu/main_menu: Better RTL support 2021-01-08 19:02:49 -05:00
Jordan Ruthe
b57cbc8352 Language support for RTL and he_IL 2021-01-03 16:04:26 -05:00
Jordan Ruthe
3c2bdee22a Update to allow translations from config file. Updates to use translations from config file. 2021-01-03 12:43:53 -05:00