Skip to content

Always-on-Top mode implemented#579

Merged
joseartrivera merged 36 commits intomicrosoft:masterfrom
greedyAI:always-on-top
Jul 31, 2019
Merged

Always-on-Top mode implemented#579
joseartrivera merged 36 commits intomicrosoft:masterfrom
greedyAI:always-on-top

Conversation

@greedyAI
Copy link
Copy Markdown
Contributor

@greedyAI greedyAI commented Jul 10, 2019

Implemented the 2nd most user requested new feature: the ability for users to pin Calculator on top of other windows.

Description of the changes:

  • A Button has been added to TitleBar and styled identical to the other TitleBar buttons. This button only appears in Standard calculator mode. Clicking on this button calls ViewModePreferences API to switch the window into CompactOverlay mode (and back, when exiting from Always-on-Top mode).
  • The ViewModel is updated accordingly when the button is pressed. These updates propagate dependency properties and observable variables back to the UI to show/hide and enable/disable certain UI elements (eg. buttons) and keyboard shortcuts.
  • The screen size is stored in LocalSettings whenever the user resizes the screen in Always-on-Top mode. This is used for restoring the last used screen size when the user enters Always-on-Top mode.
  • AdaptiveTriggers and SizedChanged event handlers are used to implement a responsive UI: certain buttons are hidden when the screen shrinks and the font sizes vary based on the screen size as well.
  • The main expression in the Always-on-Top mode combines an ItemsControl and a TextBlock to render the desired mathematical result/expression. This scrollable expression shows the full mathematical expression when edited. When the user presses the "=" button, it shows the final computed result.
  • The resulting functionality matches that as specified in the PM spec here.

How changes were validated:

  • Manual testing.

Fixes #78

@greedyAI greedyAI marked this pull request as ready for review July 11, 2019 00:20
grochocki
grochocki previously approved these changes Jul 25, 2019
Copy link
Copy Markdown
Contributor

@grochocki grochocki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving UX

grochocki
grochocki previously approved these changes Jul 30, 2019
joseartrivera
joseartrivera previously approved these changes Jul 30, 2019
joseartrivera
joseartrivera previously approved these changes Jul 30, 2019
Copy link
Copy Markdown

@liangchen07 liangchen07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve from the PM perspective.

@joseartrivera joseartrivera merged commit 796d171 into microsoft:master Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the ability for users to pin Calculator on top of other windows

8 participants