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

Use a dropdown for active layout widget #1036

Merged

Conversation

andreizhvaleuski
Copy link
Contributor

@andreizhvaleuski andreizhvaleuski commented Sep 26, 2024

  • This code is up-to-date with the main branch.
  • I have updated relevant (if any) areas in the docs.

This PR fixes #665

Update the logic of the active layout widget to use a combo box element instead of a button. The logic itself is ready and works, but I'm not so good at styling XAML via resources, so need to see what are mmy options to make it look better.

This is how it looks now.

Closed state:
image

Opened state:
image

@dalyIsaac
Copy link
Owner

This looks awesome!

A couple of thoughts after a brief first look:

If you open the dropdown then click another window, the dropdown doesn't hide. If this isn't built into WinUI, you can hide the dropdown when the focused window changes.

I'm not so good at styling XAML via resources

After primarily using HTML and CSS, I find XAML somewhat infuriating so I sympathize with this.

Screen.Recording.2024-09-27.222608.mp4

Each item in the dropdown appears to have padding greater than the bar height - is it possible to trim this down? If not, no worries - I can make another issue and chuck it somewhere on the backlog.

@dalyIsaac dalyIsaac force-pushed the gh-665-layout-engine-dropdown-widget branch from a860fb8 to 171f6ce Compare November 5, 2024 03:31
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 54.00000% with 46 lines in your changes missing coverage. Please review.

Project coverage is 80.38%. Comparing base (8206b19) to head (a69468e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/Whim.Bar/DropDown.xaml.cs 0.00% 46 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1036      +/-   ##
==========================================
- Coverage   80.58%   80.38%   -0.21%     
==========================================
  Files         283      283              
  Lines       12418    12495      +77     
  Branches     1434     1440       +6     
==========================================
+ Hits        10007    10044      +37     
- Misses       2226     2267      +41     
+ Partials      185      184       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dalyIsaac dalyIsaac marked this pull request as ready for review November 5, 2024 10:26
@dalyIsaac dalyIsaac merged commit 09f8cd3 into dalyIsaac:main Nov 5, 2024
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make layout engine bar widget a dropdown
2 participants