Commit graph

8 commits

Author SHA1 Message Date
Ian O'Neill 9662bc6910
Ensure the background image path is displayed in the settings UI (#11580)
## Summary of the Pull Request
Ensures that the background image path is displayed in the settings UI.

## References
One of the items on #11353

## PR Checklist
* [x] Closes #11541
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA

## Validation Steps Performed
Set the background image path and saw that it was displayed in the settings UI.
2021-10-25 11:17:48 +00:00
Marcel Wagner 8ab3422b57
[settings-editor] Switch to function bindings instead of Converter objects (#10846)
## Validation Steps Performed
Clicked around, validated that settings still behave the same (as far as
I can tell with my limited terminal configuration expertise)

Closes #10387
2021-08-03 22:25:23 +00:00
Marcel Wagner becc254f67
Add percentage sign to opacity slider values (#10369)
This PR adds a new PercentageSignConverter that appends the percentage sign to a number. The new converter is being used by the Acrylic opacity slider label and the Background image opacity slider label.

* [x] Closes #10289
2021-06-09 22:45:06 +00:00
Carlos Zamora 22fd06e19b
Introduce ActionMap to Terminal Settings Model (#9621)
This entirely removes `KeyMapping` from the settings model, and builds on the work done in #9543 to consolidate all actions (key bindings and commands) into a unified data structure (`ActionMap`).

## References
#9428 - Spec
#6900 - Actions page

Closes #7441

## Detailed Description of the Pull Request / Additional comments
The important thing here is to remember that we're shifting our philosophy of how to interact/represent actions. Prior to this, the actions arrays in the JSON would be deserialized twice: once for key bindings, and again for commands. By thinking of every entry in the relevant JSON as a `Command`, we can remove a lot of the context switching between working with a key binding vs a command palette item.

#9543 allows us to make that shift. Given the work in that PR, we can now deserialize all of the relevant information from each JSON action item. This allows us to simplify `ActionMap::FromJson` to simply iterate over each JSON action item, deserialize it, and add it to our `ActionMap`.

Internally, our `ActionMap` operates as discussed in #9428 by maintaining a `_KeyMap` that points to an action ID, and using that action ID to retrieve the `Command` from the `_ActionMap`. Adding actions to the `ActionMap` automatically accounts for name/key-chord collisions. A `NameMap` can be constructed when requested; this is for the Command Palette.

Querying the `ActionMap` is fairly straightforward. Helper functions were needed to be able to distinguish an explicit unbinding vs the command not being found in the current layer. Internally, we store explicitly unbound names/key-chords as `ShortcutAction::Invalid` commands. However, we return `nullptr` when a query points to an unbound command. This is done to hide this complexity away from any caller.

The command palette still needs special handling for nested and iterable commands. Thankfully, the expansion of iterable commands is performed on an `IMapView`, so we can just expose `NameMap` as a consolidation of `ActionMap`'s `NameMap` with its parents. The same can be said for exposing key chords in nested commands.

## Validation Steps Performed

All local tests pass.
2021-05-04 21:50:13 -07:00
Carlos Zamora 177430272c
Polish settings UI localized text (#9124)
Updates the following text in the settings UI
- focus follow mouse mode is introduced to be more instructional
- focus follow mouse mode tooltip removed
- avoid double negative in "disable pane animation"

Closes #8900 
Updates #6459 Settings UI text
2021-02-19 14:27:30 -08:00
PankajBhojwani b50df20cfe
Add a slider for the padding setting in the SUI (#8851)
Replaces the textbox used for the padding setting with a slider

References #8764
2021-01-26 02:22:24 +00:00
Mike Griese 9293867a06
Persist selected color scheme on navigation; Don't gray-out color swatches (#8799)
## Summary of the Pull Request

This PR fixes two of the components of #8765. 

> * [ ] Edit a color scheme -> Hit 'apply' -> the selected color scheme resets to the first color scheme in the list (instead of the one just edited)

This was fixed by storing the navigation state as a singleton in MainPage, and having the color schemes page update the selected scheme on that singleton. That way, a subsequent navigation to the schemes page could re-use the existing state.

> * [ ] The buttons turn gray on rollover covering up what color I'm looking at (I have dark mode)

This one was tricky. We're binding the resource for this button, to the color the button is bound to. We're also running a converter on that color, as to change the alpha slightly. This allows us to still have visual feedback on pointerover, without obscuring the color entirely. 

## PR Checklist
* [x] I work here
* [x] Tested manually
2021-01-19 19:18:07 +00:00
Mike Griese 2b4b8dd1bd
Polish the Background Image settings (#8778)
## Summary of the Pull Request

Two parts:
* Hide the BG image settings when no image is specified
* Add a checkbox for "Use desktop wallpaper". When that's checked, the BG image path input is hidden. Unchecking that box restores the path to what it was before.

## PR Checklist
* [x] Closes #8763
* [x] I work here

## Validation Steps Performed
Tested manually
2021-01-18 22:34:07 +00:00