Skip to content

Feature/per monitor adjustments refinements - #1483

Closed
ShadoXFM wants to merge 5 commits into
dremin:masterfrom
ShadoXFM:feature/per-monitor-adjustments-refinements
Closed

ShadoXFM wants to merge 5 commits into
dremin:masterfrom
ShadoXFM:feature/per-monitor-adjustments-refinements

Conversation

@ShadoXFM

Copy link
Copy Markdown

No description provided.

claude and others added 5 commits September 19, 2026 05:31
Adds a "Per-Monitor Adjustments" tab to Properties where tagged UI
elements (task icons, media player glyphs/track text/album art, the
tray toggle button) can get a small per-monitor X/Y render nudge,
stored per AppBarScreen.DeviceName, to correct DPI-rounding
differences between monitors without hand-tuned XAML values that can
only ever be right on one monitor at a time. The offset is applied as
a RenderTransform (never a Margin) so it can't affect layout.

Also includes this fork's earlier accumulated customizations (media
player widget with album art/marquee track text, weather display
widget, custom theme) that had not yet been committed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019pP9WJHuGKDDzJQvgQnGq5
…t clipping

Per-monitor adjustments now live in monitor-adjustments.json
(Utilities/MonitorAdjustments.cs) instead of Settings.cs + a Properties
window tab: settings.json is rewritten wholesale on every unrelated
setting change, which made it a bad place for something meant to be
hand-edited, and a text file is easier to tune with instant reload than
a dialog. Removes the old MonitorOffsetRow.cs view model and the
Properties UI for it.

Fixes a memory leak in MonitorOffset.cs where Attach() resubscribed to
MonitorAdjustments.Changed every time an element's Tag value changed,
rather than once per element - previously harmless since no tag ever
changed after initial set, but now exercised by TaskButton's icon/label
tags switching between active/inactive variants.

MediaAlbumArt now renders through a WPF Adorner (Utilities/
UIElementAdorner.cs) attached via an AdornerDecorator wrapping the
taskbar (Taskbar.xaml), instead of as a normal nested child. Adorners
paint above and are never clipped by an ancestor's Padding/
BorderThickness, so a per-monitor Y offset can no longer get the art
silently cropped by the Tray GroupBox's border chain.

TaskButton's icon and label now split into separate MonitorOffset tags
for their active/focused state (TaskIcon/TaskIconActive, TaskLabel/
TaskLabelActive, via the new TaskStateToMonitorTagConverter), since the
active tab's border template nests one layer deeper and can land a
device pixel off from the resting state on non-100%-scale monitors even
with identical DIP values - each state can now be tuned independently.

Also decouples the active/focused tab's content padding from the
IsPressed trigger's (System.xaml's TaskButtonActive style) so an
always-pressed-looking active tab's text/icon no longer sit visibly
offset from every other tab at rest.
…her icons

Media player:
- Add a seek popup (opens on clicking the track text): -10s/+10s buttons,
  a seek slider, a play/pause button, and a time display, styled to match
  the app's retro chrome. Gracefully disables seeking when the source app
  doesn't support it via SMTC.
- Move click-to-activate-app from the track text to the album art, since
  the track text now opens the seek popup instead.
- Fix play/pause reliability: send explicit Play/Pause commands instead of
  a generic Toggle (some SMTC bridges, e.g. foobar2000's, don't honor
  Toggle reliably), read status fresh instead of trusting a cache prone to
  picking the wrong direction, and add a polling fallback for apps that
  don't promptly raise PlaybackInfoChanged.
- Media glyphs (prev/play-pause/next) now use the same foreground color as
  the surrounding text instead of relying on ambient inheritance.

Weather:
- Switch from wttr.in-style colored PNGs to monochrome icons matching the
  app's retro aesthetic, pre-rendered from vector shapes at high
  resolution for crisp downscaling (live WPF vector rendering was tried
  first but came out visibly aliased on at least one real system,
  independent of EdgeMode/rendering-tier/software-rendering settings).
- Regenerate the 8 moon phase icons using a two-arc technique for true
  smooth curves.
- Add a day/night tint that interpolates the icon color between a night
  blue and a day yellow based on how far the current moment is through
  the current day/night period, using real sunrise/sunset times.
- Refresh every 5 minutes instead of 30 seconds.

Per-monitor adjustments (monitor-adjustments.json):
- Add Background, Geometry (vector shape override), and BitmapScaling
  fields to the per-element adjustment schema.
- Add MonitorOffset tags for the media transport buttons and seek popup
  controls (previously only their glyphs were tunable), and for the task
  list's notification-style overlay badge.
- Fix a Thickness parsing bug where Margin values broke under
  non-English locales that use "," as a decimal separator.

Other fixes:
- Fix task buttons silently disappearing when many windows are open, by
  aligning button widths to the physical pixel grid instead of just the
  DIP grid.
- Simplify the tray box's sunken bevel back to a single highlight/shadow
  pair after the 4-line version proved too visually noisy.
…rt cropping

- Fix the tray show/hide toggle button: the active "Windows XFM" theme
  defines its own TrayToggleButton style that overrides System.xaml's,
  so per-monitor offsets on it were silently never applying; rebuilt its
  bevel as four independently-tunable line Rectangles inside a properly
  sized Border instead of two nested partial-stroke Borders, fixing a
  DPI-rounding corner artifact and adding a pressed-state content shift.
- Reuse the main taskbar's MediaGlyphPrevious/PlayPause/Next tags for the
  seek popup's own glyphs, so per-monitor glyph overrides apply to both.
- Toggle the media source app's window between activate and minimize on
  album art click, instead of always just activating it.
- Cap thumbnail decode to whichever axis is larger (not just height), and
  render album art via a Rectangle+ImageBrush inside a clipped, explicitly
  sized Border rather than a raw Image - Image with Stretch=UniformToFill
  can report a DesiredSize larger than its own explicit Width/Height when
  the source aspect ratio doesn't match the box (e.g. a browser's
  widescreen video-frame thumbnail vs. square album art), which both
  inflated the rendered size and anchored the crop off-center.
- Remove the weather icon's day/night color fade; replace the hand-drawn
  weather condition icons with Microsoft's Fluent System Icons weather set.
- Update UIElementAdorner to arrange its child at its own explicit
  Width/Height when set, rather than trusting DesiredSize alone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ShadoXFM ShadoXFM closed this Sep 21, 2026
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.

2 participants