Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties share between different rules using codes in themes. #1626

Closed
whatevenisthat opened this issue Mar 8, 2022 · 1 comment
Closed
Labels
area: kbd-theme Keyboard theme related stuff bug A bug report bug-confirmed A confirmed and reproducible bug report

Comments

@whatevenisthat
Copy link

whatevenisthat commented Mar 8, 2022

Short description

Having 1 key code in 2 different rules will share the properties between the 2 rules for keys that aren't set in both of them. In the screenshot only 10 is set to have blue background but 113 and 114 have it too.

Steps to reproduce

  1. Create a new theme.
  2. Make a rule for key, set foreground to ffffffff and font size to 22.
  3. Add rule for key and add any code (10 in screenshot).
  4. Add any property to the rule (background blue in screenshot)
  5. Create another key rule with the same code from the previous rule then add other codes (113 and 114 in screenshot)
  6. Results

Environment information

  • FlorisBoard Version: 0.3.14-beta14
  • Install Source: IzzyOnDroid Repo
  • Device: Nokia 7.1
  • Android: 10, Stock

Screenshot_20220308-221330

@whatevenisthat whatevenisthat added the bug A bug report label Mar 8, 2022
@patrickgold patrickgold added bug-confirmed A confirmed and reproducible bug report area: kbd-theme Keyboard theme related stuff labels Mar 19, 2022
@patrickgold
Copy link
Member

Thanks for your bug report!

This bug was a particular nasty one, as it is the result of a simplified merging logic. I now adjusted the stylesheet compiler and rule matcher and now using your given example it does behave as intended and no incorrect sharing is occuring.

Note that the rules are applied in the same order as shown in the stylesheet order - meaning if you define a background=RED for key[code=10] and background=BLUE for key[10,113,114], the enter key (code 10) will have a blue background.

Will be released in 0.3.14-rc03.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: kbd-theme Keyboard theme related stuff bug A bug report bug-confirmed A confirmed and reproducible bug report
Projects
None yet
Development

No branches or pull requests

2 participants