feat: add theme-matching sidebar icon, cover aspect settings and hidden games option
Build / build (push) Canceled after 0s
Crowdin / sync (push) Canceled after 0s

- Sidebar icon follows the theme's colours and hover/selected shades by default;
  colored, white and black icons can be chosen in the settings
- Aspect ratio and stretch mode settings for collection posters and game covers,
  with presets (DVD Box, Epic, GOG Galaxy 2.0, IGDB, Square, Steam, Twitch)
- Option to include hidden games in a dynamic collection, off by default
- Bump version to 1.4.0
This commit is contained in:
X4Lo committed 2026-11-24 14:42:53 +00:00
1 parent 089f3e0f23
commit 792ec393ca
26 files changed
+633 -46

No files matched your search

+17 -1
View File
@@ -117,7 +117,23 @@ Version history: **1** was the initial format (extension 1.0.0); **2** added `Ga
`GameCollectionsSettings` is saved by Playnite to `config.json`. Add a property using `SetValue`, and bind to
`Settings.<Name>` in `GameCollectionsSettingsView.xaml`. Mark state that shouldn't be saved with `[DontSerialize]`.
Themes can read these properties through `{PluginSettings Plugin=GameCollections, Path=<Name>}`.
`SettingsChanged` fires after the settings dialog is saved or cancelled.
`SettingsChanged` fires after the settings dialog is saved or cancelled. The plugin uses it to swap the sidebar
icon and to call `CollectionsRootViewModel.OnDisplaySettingsChanged`, which passes poster and cover changes on to
the open pages.
- **Aspect ratios** are stored as two numbers each (`CollectionPosterAspectWidth/Height`,
`GameCoverAspectWidth/Height`). Views read the computed `CollectionPosterRatio` and `GameCoverRatio` (height per
unit of width), which fall back to 2:3 for invalid values and are clamped to between 1:4 and 4:1.
`VerifySettings` rejects values that aren't greater than 0. The **Presets** menus come from
`GameCollectionsSettingsViewModel.Presets` and are built in the settings view's code-behind; picking one sets both
numbers.
- **Stretch modes** are WPF `Stretch` values, applied by `PosterImage.Stretch` to its image brush.
- **Sidebar icons**: `icon-white.png` and `icon-black.png` sit next to `icon.png` and are copied to the output by
the `icon*.png` item in the project file. They were made from `icon.png` with the folder solid and the cards
behind it in fainter tones, so regenerate them if the icon changes.
- **Match theme** (`SidebarIconStyle.Theme`) uses `ThemedSidebarIcon` instead of a path: a rectangle filled with the
inherited `Foreground` and masked by `icon-black.png`'s opacity, sized by the inherited font size. Themes change the
sidebar button's `Foreground` on hover and selection, so it follows those shades the way font glyph icons do.
## Manual order
+27 -1
View File
@@ -25,6 +25,31 @@ Click **Collections** in the sidebar. The page keeps its state (open collection,
Deleting a collection never deletes or changes any games.
## Appearance settings
In the extension's settings (*Add-ons → Extension settings → Generic → Game Collections*):
- **Sidebar → Icon**: **Match theme** (default) draws the icon in the same colours as the theme's other sidebar
icons, including their hover and selected shades. You can also choose the **Colored** icon, or a fixed **White**
or **Black** version. It changes as soon as you save.
- **Collection posters**: the shape of posters on the Collections page and in a collection's header, as an
**aspect ratio** (width : height, default 2 : 3), and the **stretch mode**.
- **Game covers on a collection's page**: the same for the game cards. The card size slider sets their width, and
the ratio sets their height.
| Stretch mode | What the image does |
|---|---|
| None | Keeps its original size, centered. It may be cut off or leave empty space. |
| Fill | Fills the shape exactly; the image is squashed or stretched if its shape differs. |
| Uniform | Fits inside the shape without being cut off, leaving empty space at the sides or top and bottom. |
| Uniform to fill (default) | Covers the shape without distortion, cutting off whatever doesn't fit. |
Ratios can be decimals, such as 1.85 : 1. Very thin or tall shapes are limited to between 4 : 1 and 1 : 4.
**Presets**, next to each ratio, fills in a common shape: DVD Box (27 : 38), Epic Games Store (3 : 4),
GOG Galaxy 2.0 (22 : 31), IGDB (3 : 4), Square (1 : 1), Steam Banner (92 : 43), Steam Vertical Cover (2 : 3) or
Twitch (3 : 4). The preset matching the current ratio is ticked.
## Creating and editing a collection
| Field | Notes |
@@ -46,7 +71,8 @@ editing a collection.
- Between blocks, choose **AND** or **OR**. Blocks combine from top to bottom, so
*A OR B AND C* means *(A or B) and C*.
- The bar at the bottom shows how many games currently match, and some of their names.
- Hidden games are never included.
- Games hidden in Playnite are left out unless you tick **Include hidden games** below the blocks. When it's on,
the collection's rules summary says *(including hidden games)*. Hiding or unhiding a game updates the collection.
| You can filter by | Conditions |
|---|---|