Skip to content

Enhance touchscreen handling, fake deck configuration, and UI styling#512

Draft
designgears wants to merge 26 commits into
StreamController:mainfrom
designgears:fake_deck_changes
Draft

Enhance touchscreen handling, fake deck configuration, and UI styling#512
designgears wants to merge 26 commits into
StreamController:mainfrom
designgears:fake_deck_changes

Conversation

@designgears

@designgears designgears commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR improves touchscreen handling, enhances fake deck configuration capabilities, fixes UI styling to accurately match physical hardware, and resolves a GObject Introspection warning.

Changes

1. Enhance touchscreen handling and fake deck configuration

  • Added safety checks for touchscreen size to prevent errors when touchscreen is not available
  • Updated DeckController and related classes to return None for touchscreen size when not applicable
  • Improved fake deck loading logic to allow for customizable deck types based on settings
  • Refactored settings page to dynamically update deck type selections based on the number of fake decks configured

Files changed:

  • src/backend/DeckManagement/DeckController.py
  • src/backend/DeckManagement/DeckManager.py
  • src/backend/DeckManagement/Subclasses/FakeDeck.py
  • src/windows/Settings/Settings.py
  • src/windows/mainWindow/DeckPlus/ScreenBar.py
  • src/windows/mainWindow/elements/KeyGrid.py

2. Fix GObject Introspection warning

  • Added gi.require_version("Gdk", "4.0") to HelperMethods.py to resolve GObject Introspection version warning

Files changed:

  • src/backend/DeckManagement/HelperMethods.py

Testing

  • Verified touchscreen handling works correctly when touchscreen is available
  • Verified no errors occur when touchscreen is not available
  • Tested fake deck configuration with different deck types
  • Verified settings page correctly updates deck type selections
  • Verified no GObject Introspection warnings appear

Impact

  • Improved reliability: Prevents errors when touchscreen is unavailable
  • Enhanced flexibility: Fake deck configuration is more customizable
  • Code quality: Resolved GObject Introspection warning

Images

Before:
image

After:
image

Fake Decks:
image
image
image
image

Fixed focus logic in ScreenBar to properly detect swipe gestures

Corrected inverted swipe direction (left/right events were swapped)

Added swipe event support for dial inputs (matching existing touch press behavior)
restored deleted code I didn't mean to delete.
clean up whitespace
I need to stop editing on github, it's bad idea.
…es in DeckController and BackgroundVideoCache
- Added checks for touchscreen size to prevent errors when it is not available.
- Updated DeckController and related classes to return None for touchscreen size when not applicable.
- Improved fake deck loading logic to allow for customizable deck types based on settings.
- Enhanced UI components to adapt to real touchscreen sizes, ensuring accurate display and interaction.
- Refactored settings page to dynamically update deck type selections based on the number of fake decks configured.
@Core447

Core447 commented Jan 3, 2026

Copy link
Copy Markdown
Member

First of all, thank you!
Some things I noticed:

  • For the change in Fake Deck Type a restart of the app is required which is a bit annoying. Especially because it isn't noted anywhere. I know that the app doesn't handle it well if we change the deck configuration on the fly. But maybe we can internally remove the old deck and then add the new one on each change?
  • For consistency reasons the keys in the UI should be the same size across the different devices. (I know that they differ on the physical devices, but still).
  • I understand that you prefer black as the background for the keys in the UI, as this is again how it is on the physical deck. However, the old grey looks way cleaner in the app. And I don't see a case where the user would get something from having the black backgrounds. But I actually see a use case where the transparent background is neat: To see if the action uses a transparent background or not. This allows the user to quickly see if a wallpaper or background color would be visible on a key.
  • You replaced all "&" with "and" in locales.csv, even for other languages than English.

I really like that it's not possible to configure the type of fake decks! Great work!

@designgears

designgears commented Jan 3, 2026

Copy link
Copy Markdown
Contributor Author

First of all, thank you! Some things I noticed:

  • For the change in Fake Deck Type a restart of the app is required which is a bit annoying. Especially because it isn't noted anywhere. I know that the app doesn't handle it well if we change the deck configuration on the fly. But maybe we can internally remove the old deck and then add the new one on each change?
  • For consistency reasons the keys in the UI should be the same size across the different devices. (I know that they differ on the physical devices, but still).
  • I understand that you prefer black as the background for the keys in the UI, as this is again how it is on the physical deck. However, the old grey looks way cleaner in the app. And I don't see a case where the user would get something from having the black backgrounds. But I actually see a use case where the transparent background is neat: To see if the action uses a transparent background or not. This allows the user to quickly see if a wallpaper or background color would be visible on a key.
  • You replaced all "&" with "and" in locales.csv, even for other languages than English.

I really like that it's not possible to configure the type of fake decks! Great work!

  1. I noticed this as well and was trying to work around it, it's pretty odd, you can add them all, change the type, remove them all, and add them again and it works. Even before this PR things can end up very slow and a restart is needed to correct that.
  2. Selfish reasons on my part for this one since the keys are larger on the SD+, it's very nice seeing the full resolution of them and the touchbar. An option to render them to the full size would be a good compromise I think.
  3. Selfish reasons again here, it made finding rendering issues easier, but then again I swapped thru a lot of colors while testing. This we can omit, setting the background color per button or deck wide is sufficient.
  4. Didn't think that thru, oof.

This was all rushed together just as a proof of concept, I'll keep hammering on the fake deck type swap and see if I can make that play nice.

Edit: reworked what I was trying to do before, figured out my mistake and made that work pretty well!

…k types

- Added reload_fake_deck method to DeckManager for targeted fake deck updates without reloading all decks.
- Method removes and re-adds specific fake deck at correct position to apply type changes.
- Updated settings page to use reload_fake_deck instead of load_fake_decks for better performance when changing deck types.
- Ensures proper ordering of hardware and fake decks in controller lists and UI.
…xt where there were ampersands."

This reverts commit 5a921a7.
…references components

- Added background color styling to preferenceswindow, preferencespage, and preferencesgroup elements to prevent text rendering artifacts in the settings interface.
- Import html module for entity escaping
- Escape HTML/XML entities in translated strings before returning them to prevent markup parsing issues in GTK labels and UI elements
…d as CSV column separators, causing the column alignment to shift.
@designgears designgears marked this pull request as draft January 3, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants