Skip to content

Use a dropdown for active layout widget#1036

Merged
dalyIsaac merged 16 commits intodalyIsaac:mainfrom
AndreiZhvaleuski:gh-665-layout-engine-dropdown-widget
Nov 5, 2024
Merged

Use a dropdown for active layout widget#1036
dalyIsaac merged 16 commits intodalyIsaac:mainfrom
AndreiZhvaleuski:gh-665-layout-engine-dropdown-widget

Conversation

@AndreiZhvaleuski
Copy link
Copy Markdown
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
Copy Markdown
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.

@codecov
Copy link
Copy Markdown

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
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