Skip to content

Improve small-window layout for package pages#4939

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
strange-resizing-issue
Jun 17, 2026
Merged

Improve small-window layout for package pages#4939
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
strange-resizing-issue

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request improves the responsive layout of the packages page, ensuring that the toolbar and package views adapt gracefully to different window sizes. The main changes include making the toolbar collapse to icon-only mode on narrow windows, and updating the grid and icon views so package cards stretch to fill available space, closely matching WinUI's behavior.

Responsive toolbar and layout improvements:

  • Added logic to track and control the visibility of toolbar button labels in PackagesPageViewModel, allowing the toolbar to collapse to icon-only mode when the window is narrow. This prevents toolbar buttons from overflowing off-screen. (src/UniGetUI.Avalonia/ViewModels/SoftwarePages/PackagesPageViewModel.cs, src/UniGetUI.Avalonia/Views/SoftwarePages/AbstractPackagesPage.axaml.cs, src/UniGetUI/Pages/SoftwarePages/AbstractPackagesPage.xaml.cs)
  • Updated the XAML for the WinUI CommandBar to enable dynamic overflow and automatic overflow button visibility, improving toolbar usability on smaller screens. (src/UniGetUI/Pages/SoftwarePages/AbstractPackagesPage.xaml)

Grid and icons view enhancements:

  • Introduced observable properties for grid and icon card widths in the view model, and added logic to dynamically compute the optimal width for each card based on the available viewport size. This ensures cards stretch to fill each row and reflow as needed, minimizing wasted space. (src/UniGetUI.Avalonia/ViewModels/SoftwarePages/PackagesPageViewModel.cs, src/UniGetUI.Avalonia/Views/SoftwarePages/AbstractPackagesPage.axaml.cs) [
  • Updated the grid and icon views in XAML to bind the ItemWidth property of the WrapPanel to the computed card widths, and removed fixed widths from individual cards to allow them to stretch. (src/UniGetUI.Avalonia/Views/SoftwarePages/AbstractPackagesPage.axaml)

Minor UI adjustments:

  • Adjusted the column widths in the data grid for package name and ID to use proportional sizing, improving table layout consistency. (src/UniGetUI.Avalonia/Views/SoftwarePages/AbstractPackagesPage.axaml)

These changes significantly improve the application's usability and appearance on a range of window sizes, especially for users on smaller screens.

@GabrielDuf Gabriel Dufresne (GabrielDuf) merged commit 76cd98f into main Jun 17, 2026
3 checks passed
@GabrielDuf Gabriel Dufresne (GabrielDuf) deleted the strange-resizing-issue branch June 17, 2026 12:20
@GabrielDuf Gabriel Dufresne (GabrielDuf) linked an issue Jun 17, 2026 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Better Small Window Size Handling

2 participants