Skip to content

Allow creating multiple selectors in PlasmaSVG YAML files

Arjen Hiemstra requested to merge work/ahiemstra/svgselectors into master
  • input/plasmasvg: Use ToolButton styling for SpinBox buttons

This is now easy to with multiple selectors

  • input/plasmasvg: Finish porting ToolButton to new YAML syntax

  • input/plasmasvg: Cleanup ToolBar definition

  • input/plasmasvg: Finish porting TextArea to new YAML syntax

  • input/plasmasvg: Port TabBar and TabButton to new YAML syntax

  • input/plasmasvg: Update several files to new selector syntax

  • Theme: Sort matched rules by weight

So more specific rules are applied first

  • Get rid of some use of deprecated _qs string literals

  • weight

  • Selector: Add weight

Weight is an indicator of how specific a selector is, with higher weight meaning more specific. This can be used to sort a list of matched rules to ensure that more specific selectors are applied first.

  • selectorlist

  • input/plasmasvg: Use append{Any,All}Of as appropriate for selectors

Makes the code a little simpler.

  • Selector: Add appendAllOf/appendAnyOf methods

These are convenience methods to append a SelectorList wrapped in AnyOf or AllOf. Mainly, these encode the handling of not wrapping the selector if we only append a list with a single item.

  • Selector: Turn SelectorList into a proper subclass

Rather than a typedef, so we can add methods to it.

  • input/plasmasvg: Make declaring selectors in YAML explicit and a list

This solves an ambiguity between properties used for selectors and for other things. Additionally, it allows us to declare that the structure applies for multiple selectors, allowing reuse of structure.

  • input/plasmasvg: Log yaml file origin of error when it happens

This makes it clearer where errors come from

  • input/plasmasvg: Use a dedicated RYML parser object so we can set options

Most importantly this allows us to specify that we want source location tracking so we can print the origin of errors.

Merge request reports

Loading