Skip to content

Add a dark theme for the Options dialog#1178

Open
kcinickgx wants to merge 19 commits into
Aleksoid1978:masterfrom
kcinickgx:dark-options-theme
Open

Add a dark theme for the Options dialog#1178
kcinickgx wants to merge 19 commits into
Aleksoid1978:masterfrom
kcinickgx:dark-options-theme

Conversation

@kcinickgx

@kcinickgx kcinickgx commented Jul 4, 2026

Copy link
Copy Markdown

What

Makes the Options property sheet (the O dialog) follow the dark look of the rest of the player instead of always rendering in the light system style.

It covers the whole dialog:

  • the navigation tree and the property pages
  • group boxes, static text, edits and combo boxes
  • list controls, check lists, spin buttons, sliders, tab headers and checkboxes
  • the scrollbars, drawn flat through the bundled CoolSB so they match the playlist

The sheet also re-themes live when the setting is toggled while it is open (Interface → Use the "dark" theme → Apply), so it never ends up half light / half dark.

How it's gated

Everything is gated on the existing "Use the 'dark' theme" setting (bUseDarkTheme) and reuses the existing ThemeRGB() palette. With the flag off, every control falls back to its original light appearance, so there is no behavioural change — it's purely visual and opt-in.

Implementation notes

  • A new helper, controls/DarkTheme.*, centralises the theming (immersive dark mode + WM_CTLCOLOR* + a few owner-drawn/subclassed controls), so most of the ~26 pages are covered from CPPageBase / CPPageSheet with very little per-page code.
  • Small, flag-gated tweaks to bundled code:
    • coolsb: expose one global (fThemeRGB) as extern so the header can be included from more than one translation unit.
    • TreePropSheet page frame: dark caption / background colours.

Screenshot

image image image

@kcinickgx kcinickgx force-pushed the dark-options-theme branch from 2d8e803 to 9fca02e Compare July 4, 2026 03:54
@v0lt

v0lt commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Quick observations:

  1. The order of controls in the "Formats" settings panel has changed. This has broken automatic translation synchronization, and some strings are no longer translated.
  2. Some of the "Online media service" settings are not visible until the user hovers their mouse over them. Some text is not always visible.
  3. The "Select filter" dialog has changed.

@kcinickgx kcinickgx force-pushed the dark-options-theme branch from 9fca02e to ff8cf9b Compare July 4, 2026 20:17
@kcinickgx

Copy link
Copy Markdown
Author

Thanks for the feedback! I've pushed an update that addresses all three points, and here's a build so people can try it:

Test build (x64 installer): https://github.com/kcinickgx/MPC-BE/releases/tag/dark-options-test

On the observations:

  1. Formats page — control order changed / broke translation sync. Reverted. Reordering those controls wasn't part of the dark theme, so the layout is back exactly as it was on master and the translation sync is no longer affected.

  2. Online media services — some controls not visible until you hover over them. Fixed. The cause was the owner-drawn (dark-filled) group box: on that page it's defined after the controls it frames, so it sat above them in the z-order and its background fill painted over them (they only reappeared once individually invalidated, e.g. on hover or an enable toggle). It's now pushed to the bottom of the sibling z-order (with WS_CLIPSIBLINGS) so it is drawn behind the controls it contains.

  3. Select filter dialog changed. Reverted to the original multi-column list — that change wasn't needed for the theme either.

The .rc diff is now limited to the dark theme itself (no layout or behavioural changes to those dialogs). Let me know if anything else comes up — thanks for taking a look!

@kcinickgx

Copy link
Copy Markdown
Author

Good idea — added a portable ZIP to the same release:

Portable (x64, ZIP): https://github.com/kcinickgx/MPC-BE/releases/download/dark-options-test/MPC-BE.1.9.0.24.x64.zip

Just extract and run mpc-be64.exe, no installation needed. The installer is still there too: https://github.com/kcinickgx/MPC-BE/releases/tag/dark-options-test

@tsubasanouta

tsubasanouta commented Jul 4, 2026

Copy link
Copy Markdown

On several option pages, when I make changes and press Apply, some of the text labels become invisible.

@Freem-di

Freem-di commented Jul 4, 2026

Copy link
Copy Markdown
  1. Button corner rounding disappears.
  2. Button icon is missing.
1
  1. Dropdown list colors (seems to be partially taken from OS settings).
3
  1. Filter selection form artifact remains after adding an external filter.
4
  1. File association edit form has a different color.
5
  1. Scrollbars look different (seems related to item 1)

Makes the Options property sheet (the "O" dialog) follow the dark look of
the rest of the player instead of always rendering in the light system
style. It covers the whole dialog: the navigation tree, the property pages,
group boxes, edits/combos, list controls, spin buttons, sliders, tab
headers, checkboxes and the scrollbars (flat, drawn through the bundled
CoolSB, matching the playlist). The sheet also re-themes live when the
setting is toggled while it is open.

Everything is gated on the existing "Use the 'dark' theme" setting
(bUseDarkTheme) and reuses the existing ThemeRGB() palette, so when the
flag is off every control falls back to its original light appearance and
there is no behavioural change.

A new helper (controls/DarkTheme.*) centralises the theming so most of the
~26 pages are covered from CPPageBase / CPPageSheet. Small, flag-gated
tweaks are made to the bundled coolsb (expose one global as extern so the
header can be included from more than one TU) and to the TreePropSheet
page frame (dark caption/background colours).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx kcinickgx force-pushed the dark-options-theme branch from ff8cf9b to d9bf9c9 Compare July 4, 2026 22:27
…alogs

- Scrollbars: drop the CoolSB custom scrollbar for the native dark one
  (SetWindowTheme "DarkMode_Explorer"). The custom bar fought the OS repaint and
  flickered/froze while dragging; the native bar is solid and consistent.
- Palette is now fixed and independent of the R/G/B/Brightness sliders (those tint
  the player only), so the Options dialog never half-repaints or blackens its text.
- Theme each page once on first activation instead of every activation, so
  switching pages is instant.
- Owner-drawn push buttons: keep the Win11 rounding + icon, stay dark when enabled
  (Apply no longer flashes white), and honour BS_MULTILINE captions.
- Dark-theme the internal/external filter configuration sheets (CComPropertySheet):
  frame, owner-drawn dark tab, page background/controls, and light radio captions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

kcinickgx commented Jul 5, 2026

Copy link
Copy Markdown
Author

Pushed an update (31da57cb3) and refreshed the test builds:

Main change: I dropped the custom (CoolSB) scrollbar and switched the Options dialog to the native dark scrollbar (SetWindowTheme "DarkMode_Explorer"). The custom bar fought the OS repaint and flickered/froze while dragging and left phantom bars; the native one is rock-solid and consistent, and removes that whole class of bugs (@Freem-di item 6).

Other fixes in this build:

  • The Options palette is now fixed and independent of the R/G/B/Brightness sliders (those tint the player only), so the dialog no longer half-repaints or turns its text black when the colours change.
  • Page switching is instant now — controls are themed once per page instead of on every activation.
  • Push buttons keep their Win11 rounding + icon and stay dark; Apply no longer flashes white when a page is modified (@Freem-di items 1–2, @tsubasanouta's Apply repaint). Multi-line captions ("… configuration") wrap correctly again.
  • The internal/external filter configuration dialogs are dark too now (frame, owner-drawn tab, page background, radio-button captions).

- Colour-well buttons (Interface / OSD / Subtitle Default Style) are push buttons that their
  page fills with the selected colour via NM_CUSTOMDRAW; skip owner-drawing them so they show
  the colour swatch again instead of their "B"/"O" caption.
- Formats checkboxes: render them with the native visual style (unchecked / checked / mixed
  for the partial state) in both light and dark, and move them from the item icon
  (LVSIL_SMALL) to the state image (LVSIL_STATE) so the row-selection highlight no longer
  paints the checkbox. Rebuilt when the dark theme is toggled at runtime. This also changes
  the light-mode Formats checkbox from the custom SVG glyphs to the native ones, to match the
  other checklists.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Another update (e3abafe54) — refreshed the test builds (new 1.9.0.25 filenames):

Fixed:

  • Colour-well buttons (Interface theme colours, OSD font/gradient colours, and Subtitles → Default Style) show their colour swatch again instead of the button caption ("B" / "O" / …). They're painted by their page via NM_CUSTOMDRAW, so they're now skipped by the generic button owner-draw.
  • Formats checkboxes no longer stay dark after the dark theme is turned off, and the row-selection highlight no longer repaints the checkbox (they lived on the item icon; moved to the state-image slot, like a native list-view checkbox).

One heads-up: to make the Formats checkboxes consistent with every other checklist, the light-theme Formats checkbox now uses the native Windows checkbox (unchecked / checked / indeterminate for the "only some extensions registered" state) instead of the old custom SVG glyphs. That's a small change to the non-dark appearance — calling it out explicitly since it touches the light theme.

Thanks again @Freem-di for the detailed reports!

@Aleksoid1978

Copy link
Copy Markdown
Owner

Disabled text look's "bad":
изображение
изображение

Incorrect colors - check the settings and color of the header and toolbar:
изображение

@v0lt

v0lt commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

3. Select filter dialog changed. Reverted to the original multi-column list — that change wasn't needed for the theme either.

This doesn't need to be reverted; it's not a bug. I just mentioned it to highlight the change.

…dressing review

- The Options background now follows the R/G/B/Brightness sliders (ThemeRGB), so it matches
  the player, and the title bar is tinted with DWMWA_CAPTION_COLOR like the player's caption.
  Text stays a fixed readable colour (never driven to black). The sheet re-tints when a slider
  drag ends (repainting standard controls on every tick flickers, and WS_EX_COMPOSITED breaks
  the list controls), so it snaps to the final colour on release while the player follows live.
- Theme sliders are owner-drawn and paint from a committed colour snapshot, so the one being
  dragged doesn't recolour under the cursor; all four move together on release.
- Disabled text labels are owner-drawn flat instead of the embossed grey Windows draws on dark
  (addresses maintainer feedback). All Options text/glyphs are fixed, never tinted.
- Elevated "Modify" Formats dialog now loads bUseDarkTheme, so it matches the theme instead of
  always appearing dark.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Update (bd99f92b9) — new build (1.9.0.26):

Addressing @Aleksoid1978's review:

  • Colours now follow the theme. The Options background and the title bar (via DWMWA_CAPTION_COLOR) track the R/G/B/Brightness sliders, like the player's header/toolbar. Text stays a fixed readable colour so it is never driven to black.
  • Disabled labels are now drawn flat instead of the embossed grey Windows produces on a dark background.

A few honest limitations, up front, since they're inherent to theming the native Win32 controls rather than owner-drawing everything:

  1. Some native controls can't take an arbitrary colour. The scrollbars and the combo-box dropdown lists are painted by Windows / the OS visual style. SetWindowTheme("DarkMode_*") only offers dark, not a tint — there is no API to colour them to the chosen R/G/B — so they stay the dark system colour.
  2. The re-tint isn't live during a slider drag. Repainting the standard controls on every drag tick flickers (they aren't double-buffered like the player's owner-drawn ones), and WS_EX_COMPOSITED — the one flicker-free option — breaks the list-box/list-view controls. So the sheet snaps to the final colour when the drag ends, while the player follows live.

Making it fully live and arbitrarily-coloured would mean owner-drawing every control from scratch (a framework like MPC-HC's CMPCTheme) instead of reusing the native controls — a large separate subsystem. I also looked for an off-the-shelf library that replaces the native controls with tintable ones, and there isn't one: the available "Win32 dark mode" helpers use the same undocumented uxtheme APIs this PR already does (dark only, same limits).

Happy to adjust the trade-off on any of these if you'd prefer something different.

@Aleksoid1978

Copy link
Copy Markdown
Owner
изображение via изображение

The elevation shield set via BCM_SETSHIELD is drawn internally by the button and is not
returned by BM_GETIMAGE, so owner-drawing the button dropped it. Flag the button
(MarkUacShield) and paint IDI_SHIELD ourselves when flagged, so the non-admin Formats
"Modify" button shows its shield again in the dark theme.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Freem-di

Freem-di commented Jul 5, 2026

Copy link
Copy Markdown

Build 1.9.0.26:

  1. Update language files :)
2026-07-05 12_53_58-MPC-BE
  1. Internal filters
2026-07-05 12_55_19-Options
  1. After disabling dark theme, the menu stays black until restart
menu

@kcinickgx

Copy link
Copy Markdown
Author

Fixed the missing UAC shield (56e26586a) — new build 1.9.0.27:

The Formats "Modify" button (shown only to non-admin users) sets its elevation shield via BCM_SETSHIELD, which the button draws internally and does not expose through BM_GETIMAGE — so owner-drawing the button in the dark theme dropped it. The button is now flagged and the owner-draw paints IDI_SHIELD itself, so the shield is back (dark-themed).

Note for testing: the shield only appears when running without administrator rights (that's when the "Modify" elevation button is shown at all).

@kcinickgx

Copy link
Copy Markdown
Author

Re-uploaded the build as 1.9.0.28 — the language files are fixed:

The "translations not compatible with this version" errors were my packaging mistake, not a code issue: I'd only been rebuilding the main binary, so the shipped mpcresources.*.dll were left at an older revision than the exe and MPC-BE rejects them on a version mismatch. This build rebuilds the resources so the exe and all language DLLs are the same version (1.9.0.28). Thanks for catching it.

@Freem-di

Freem-di commented Jul 5, 2026

Copy link
Copy Markdown

Build 1.9.0.28:
Shield icon did not return on the 'Modify' button
2026-07-05 13_47_51-Options

- When the dark theme is turned off at runtime, reset the process-wide preferred app mode
  (FORCELIGHT + FlushMenuThemes) so the main window's immersive-dark menus revert to light
  immediately instead of staying dark until the app is restarted. Re-arm it when turned on.
- Load the UAC shield via SHGetStockIconInfo(SIID_SHIELD) (cached) instead of
  LoadIcon(IDI_SHIELD), which could return null, so the Formats "Modify" button reliably
  shows its shield in the dark theme.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

New build 1.9.0.29 with two more fixes:

@xLn2

xLn2 commented Jul 5, 2026

Copy link
Copy Markdown

External filters have issue with theming. Cursor should hover to trigger repaint some widgets.

i.e XySubFilter , VSFilter/xy-VSFilter

image

Measure the caption width with DT_CALCRECT (which drops the "&" accelerator prefix) instead
of GetTextExtent (which counts it), so single-line owner-drawn push buttons whose caption has
an accelerator (e.g. the Formats "&All" / "A&udio" association buttons) are centred instead of
shifted to the left.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Aleksoid1978

Copy link
Copy Markdown
Owner

Wrong icon size, DPI 175%:
изображение

@Aleksoid1978

Copy link
Copy Markdown
Owner

What about all the other dialogs - Shader Editor, History, etc.?

@tsubasanouta

tsubasanouta commented Jul 5, 2026

Copy link
Copy Markdown

What about other dialogs? - Check for Updates, Command Line Switches, About..., Reset settings

@kcinickgx

Copy link
Copy Markdown
Author

Follow-up build 1.9.0.32: the message-box theming now covers all of them, not just the updater — "Reset settings", "Export settings" and the rest of the MessageBox/AfxMessageBox prompts.

Instead of wrapping ~70 call sites, a single persistent WH_CBT hook on the UI thread themes each standard message box as it appears. It only touches genuine message boxes (class #32770 made up solely of static labels + push buttons) and skips anything that themes itself (the Options sheet and the auxiliary dialogs carry our own subclass), so it can't disturb the real dialogs. It also follows the "Use dark theme" toggle.

# Conflicts:
#	src/apps/mplayerc/MainFrm.cpp
@Aleksoid1978

Copy link
Copy Markdown
Owner
изображение

…s sheet

The owner spotted the Organize Favorites dialog's Files/DVDs tab rendering
with a light body/frame. Native tab controls ignore SetWindowTheme, so
ThemeDialog can't darken them — they need the owner-drawn CDarkTabCtrl.

- Organize Favorites: its CTabCtrl is now a CDarkTabCtrl (drop-in; falls
  back to native when the theme is off).
- File Properties (CPPageFileInfoSheet): the whole property sheet was
  un-themed. Theme the frame + attach CDarkTabCtrl to its tab, and each
  page (Details / Clip / MediaInfo) dark-themes itself in its OnInitDialog
  (the Res page already does, via CPPageBase).

Sweep confirmed these were the last light tabs/sheets: every SysTabControl32
in the app (Organize Favorites, Internal Filters, filter-config sheet) now
uses CDarkTabCtrl, and both CPropertySheet-derived dialogs are themed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Fixed the light Organize Favorites tab @Aleksoid1978 pointed out, and swept for the same issue across the app.

Native tab controls ignore SetWindowTheme, so ThemeDialog can't darken them — they need the owner-drawn CDarkTabCtrl. Rather than just fix the one, I checked every SysTabControl32 and every CPropertySheet:

  • Organize Favorites — its Files/DVDs tab is now a CDarkTabCtrl (drop-in; falls back to native when the theme is off).
  • File Properties (right-click → Properties) — the whole property sheet was un-themed. Now the frame + tab are dark, and each page (Details / Clip / MediaInfo) themes itself (the Res page already did, via CPPageBase).
  • Confirmed the rest were already covered (Internal Filters tab, the filter-config sheet).

Also: the branch is now merged up to the latest master (the only conflict was a cosmetic ° encoding line, resolved to your version), so the PR is conflict-free again.

@Aleksoid1978

Copy link
Copy Markdown
Owner
изображение

@xLn2

xLn2 commented Jul 6, 2026

Copy link
Copy Markdown

[MPC-BE.1.9.0.61]

  1. Listview issues
mpc-be64_WK4GZqulxP mpc-be64_ITF1arumJn
  1. Options > Player > Window size page causes crash

  2. Some sliders don't support on hover and clicked state (visual)

mpc-be64_A8abjE7qfj mpc-be64_RXfE1UBTxF

kcinickgx and others added 2 commits July 6, 2026 04:21
Not a dark-theme issue: commit d4ac8ca (v0lt, "use global arrays for
value sets", came in via the merge with master) populates the scale-level
combo with str.Format(L"%d%", scale). The trailing lone "%" is a malformed
format string; MFC's FormatV calls _vscwprintf, which returns -1, and the
subsequent GetBuffer(-1) crashes. Reproduces with the dark theme off and is
absent from the older official release, confirming it's the upstream change.

Fix the format to L"%d%%" (also what was intended: the combo now shows
"50%" / "100%" / "200%" instead of "50" / "100" / "200"). Should be fixed
upstream in PPageWindowSize.cpp too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…x listview artefacts

Owner-drawn / custom-drawn list content isn't reached by ThemeDialog, and a
couple of list-view rendering artefacts showed up on the dark background:

- Organize Favorites list: it's owner-drawn (OnDrawItem) with fixed light
  colours (COLOR_WINDOW background, black text) -> rows stayed white. Paint
  the rows in the dark palette (dark background, light text, celeste-tinted
  selection).
- Subresync bar grid: custom-drawn with fixed light colours, and the bar
  isn't run through ThemeDialog, so the empty list had a white background,
  border and column header. Remap the per-row colours to the dark palette
  (keeping the play-position / edited-marker / alternating-row semantics) and
  theme the control (dark background / border / header).
- ListViewSubclassProc: fill the empty area below the last item dark, which
  covers the light column separator a report list draws in an empty body
  (the stray vertical line in the empty Organize Favorites list); and offset
  the custom vertical grid lines by the header's scroll origin so they follow
  a horizontal scroll instead of ghosting at the unscrolled column positions
  (the Keys list), forcing a full repaint on WM_HSCROLL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Thanks @xLn2. New build 1.9.0.63:

1. Listview issues — fixed.

  • Organize Favorites: the list is owner-drawn (OnDrawItem) with fixed light colours, so its rows stayed white; they're now painted in the dark palette (with a celeste-tinted selection). The stray light vertical line in the empty list was a report list-view's column separator showing through — the empty area below the last item is now filled dark, which covers it.
  • Keys, horizontal scroll: the custom dark grid lines were drawn from Header_GetItemRect (header-relative), so they stayed at the unscrolled column positions and ghosted when you scrolled. They now use the header's client origin mapped into the list-view, so they follow the scroll (plus a full repaint on WM_HSCROLL).
  • Also themed the Subresync bar grid (custom-drawn, was white) while I was in there.

2. Window Size page crash — fixed, but heads-up @Aleksoid1978: this one isn't from the dark theme. It's a pre-existing typo in CPPageWindowSize::OnInitDialogstr.Format(L"%d%", scale) (from d4ac8ca66, the "global arrays for value sets" refactor, which reached my branch via the merge with master). The trailing lone % is a malformed format string: MFC's FormatV_vscwprintf returns -1 and the following GetBuffer(-1) crashes. It reproduces with the dark theme off and is absent from the current official release, which is how we pinned it. Fixed here as L"%d%%" (also the intended output — the combo now shows 50% / 100% / 200%), but it should be fixed upstream or it'll come back on the next merge.

3. Sliders without hover/pressed state — acknowledged, not done yet. The owner-drawn trackbars paint a static thumb; adding hover/pressed feedback (mouse tracking in the subclass) is the next item.

… them

xLn2 noted some sliders had no hover/pressed feedback, and the ones left on
the native control showed ugly black-on-hover / white-when-pressed thumbs
(the native DarkMode trackbar states).

- TrackbarSubclassProc now tracks the thumb state (WM_MOUSEMOVE + TrackMouse-
  Event for hover over the thumb, WM_LBUTTONDOWN/UP for pressed) and paints
  the thumb lighter on hover / brightest while dragging (disabled overrides).
  The mouse messages pass through to the default proc so dragging still works.
- ThemeControl now owner-draws EVERY trackbar (not just the theme R/G/B and
  subtitle sliders that were explicitly converted), so OSD / Colour correction
  / Sound processing sliders get the same dark celeste thumb + states instead
  of the native black/white ones. Trackbars already subclassed are skipped so
  the theme sliders keep their frozen-colour snapshot flag (dwData = 1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Build 1.9.0.64 — issue 3 (slider hover / pressed state) done.

The owner-drawn sliders painted a static thumb (no feedback), and the sliders still left on the native control showed the native DarkMode thumb's black-on-hover / white-when-pressed states, which looked broken on the dark theme.

@xLn2

xLn2 commented Jul 6, 2026

Copy link
Copy Markdown

1.9.0.64

  1. listview auto size via column gripper cause artefacts
mpc-be64_FPYz6NBloz
  1. Organize fav edit
image
  1. Subresync theming is not look good. Separator is also badly represented.
mpc-be64_vaYi9DGm17
  1. Subtitle styles window via right click Subtitles > Advanced > Styles
image

- Subresync bar list: theme it reversibly (new DarkTheme::RefreshThemeForControl)
  so it follows the "Use dark theme" toggle instead of staying dark (dark header/
  border/background over light rows) after the theme is turned off. The list is
  themed once in Create via control subclasses that paint unconditionally, so they
  must be stripped, not just left installed, when the theme goes off.
- Floating docking bars: apply the dark title once per mini-frame instead of on
  every OnWindowPosChanged, so dragging a floated bar no longer floods the DWM
  (RefreshImmersiveColorPolicyState + DwmSetWindowAttribute) and smears the window.
- Subresync grid: remap the hard-coded light separator/grid-line greys to the dark
  palette - subtle grid lines, a clearly-visible group separator.
- List-views: repaint fully on a column resize (header divider drag / auto-size
  double-click) so the hand-drawn dark grid lines don't ghost.
- List-view in-place label edit (Organize Favorites, ...) now gets the dark edit
  colours via WM_CTLCOLOREDIT instead of showing a white box.
- Subtitle "Styles..." property sheet: new CDarkPropertySheet themes its frame
  (dark tab + title bar + OK/Cancel/Apply); each page already themes itself.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Build 1.9.0.65 — thanks @xLn2, all four addressed.

1. Listview column auto-size artefacts — a column resize (dragging a header divider, or double-clicking the divider gripper to auto-size) bit-blts the rows to the right of the divider, which smeared the hand-drawn dark grid lines. The list now forces a full repaint on HDN_ITEMCHANGED/HDN_ENDTRACK so the lines are redrawn cleanly at the new column widths.

2. Organize Favorites edit — the in-place label-edit control the list-view creates for renaming an item is a child of the list-view, so its WM_CTLCOLOREDIT was sent to the list-view (not the dialog) and stayed a white box. It now gets the dark edit colours. The fix is generic, so it also covers the other in-place list-view edits.

3. Subresync theming / separator — the row grid lines and the group separator were drawn with hard-coded light greys (0xe0e0e0, and 0x404040 for the separator): the former showed as bright near-white lines on the dark rows, the latter was nearly invisible against the dark background. Both now use the dark palette — subtle grid lines and a clearly-visible separator.

I also reworked the Subresync bar's list theming so it's reversible. It was themed once at creation via control subclasses that paint dark unconditionally, so with the dark theme off it stayed dark (dark header/border/background with light rows), and dragging the floated bar flooded the DWM (re-running the immersive dark-mode calls on every WM_WINDOWPOSCHANGED), leaving smear trails. It now follows the "Use dark theme" toggle, and re-themes the floating mini-frame once per float instead of on every move.

4. Subtitle Styles window (Subtitles > Advanced > Styles, and the Subresync right-click → Styles) — that dialog is a stand-alone CPropertySheet, so its frame (tab strip + OK/Cancel/Apply + title bar) stayed light. It now uses a themed sheet (owner-drawn dark tab + dark frame); each style page already themes its own contents.

kcinickgx and others added 2 commits July 6, 2026 23:16
The End (4 px) and Charset (20 px) columns are created far too narrow to
show their values / header captions. Size every column to fit the wider of
its header caption and its first data row, once, right after the whole
subtitle has been inserted (not per line).

Measure the header text + first row by hand instead of SetColumnWidth(
LVSCW_AUTOSIZE): the latter scans every row of all 11 columns (~5 s on a
large subtitle) and forces the list to repaint mid-population, which piled up
ghost separator lines until the load finished. Every row in a time/number
column is the same width, so the first row is representative; columns only
ever grow, so the wide Text column keeps its default width.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Build 1.9.0.74 — merged onto the latest master, plus one Subresync tweak.

  • Merged master (up to a1a6fa9a7) so the branch is current — no conflicts. (The branch still carries the one-line L"%d%%" fix for the CPPageWindowSize format-string crash from d4ac8ca66, in case you want it upstream — it's unrelated to the dark theme.)

  • Subresync columns: the End and Charset columns are created far too narrow (4 px / 20 px) to show their values or even the header caption. Each column now grows once, right after the whole subtitle is loaded, to fit the wider of its header caption and its first data row — measured directly rather than with LVSCW_AUTOSIZE, which scanned every row of all 11 columns (~5 s on a large subtitle) and forced the list to repaint mid-population, leaving ghost separator lines until the load finished. Columns only grow, so the wide Text column keeps its width.

  • Installer: https://github.com/kcinickgx/MPC-BE/releases/download/dark-options-test/MPC-BE.1.9.0.74.x64.exe

  • Portable: https://github.com/kcinickgx/MPC-BE/releases/download/dark-options-test/MPC-BE.1.9.0.74.x64.zip

@Freem-di

Freem-di commented Jul 7, 2026

Copy link
Copy Markdown

Build 1.9.0.74

  1. Internal filter window: on opening and on mouse hover:
2026-07-07 08_20_23-Options 2026-07-07 08_21_04-Options
  1. About window: field borders flicker on mouse movement ("File properties - Details" - same issue):
Запись 2026-07-07 082814

@xLn2

xLn2 commented Jul 7, 2026

Copy link
Copy Markdown

Build 1.9.0.74
Subresync columns: the End and Charset columns are created far too narrow (4 px / 20 px) to show their values or even the header caption. Each column now grows once, right after the whole subtitle is loaded, to fit the wider of its header caption and its first data row — measured directly rather than with LVSCW_AUTOSIZE, which scanned every row of all 11 columns (~5 s on a large subtitle) and forced the list to repaint mid-population, leaving ghost separator lines until the load finished. Columns only grow, so the wide Text column keeps its width.

I like the autosize some column width, but some column were hidden in previously, and now all of them revealed.

image

Some panels need Application restart to behave as is. (after dark interface on > off etc.)

image

Mediainfo prop page issue with frame / border and painting
mpc-be64_CbkECs2C0p

cedits has blink issue (window moved to offscreen to trigger)

chrome_W4nM4AA8jD

Save windows has bad colors (maybe its upstream issue)
image

@Aleksoid1978

Copy link
Copy Markdown
Owner

Maybe no changes are needed for the dark theme - from what I can see, more and more problems are popping up. All these dark dialogs look worse than the native light ones. And judging by the reviews, users don't really need it.

The custom dark 1px border (BorderSubclassProc) was overpainted on top of the
default non-client paint. Themed edits/list boxes repaint their border on hover
/ mouse-move, so the light->dark overpaint strobed (About, File Properties
fields, Internal Filters lists), and on a multiline edit the border got dragged
into the middle of the text by ScrollWindowEx (MediaInfo).

- WM_NCPAINT: for controls WITHOUT scroll bars, skip the default paint entirely
  so the light client-edge is never drawn (no flash); for controls WITH scroll
  bars, let the default paint + validate the frame (so scrolling keeps it), then
  overpaint.
- Don't custom-draw the border on scrolling multiline edits or scrolling list
  boxes at all - the DarkMode_Explorer theme's own border stays put and dark
  enough; the overpaint only fought their scroll/hover repaints.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Fair enough, @Aleksoid1978 — thanks for taking the time to review it, and thanks @xLn2 and @Freem-di for all the testing and screenshots. No problem about not merging; I get it.

I'll just keep it as a fork build for anyone who does want the dark dialogs, and rebase it onto upstream master every so often so it stays current. No need to keep this PR on your plate.

Latest build (1.9.0.75) with this round's fixes — border flicker on the About / File Properties fields, the MediaInfo frame breaking on scroll, and the Subresync bar/column issues:

Thanks again.

@xLn2

xLn2 commented Jul 8, 2026

Copy link
Copy Markdown

I apologize if I seem dissatisfied. My aim is to help developers by reporting all possible issues as quickly as possible. There were also issues with the dark theme in MPC-HC in the past, and it wasn't fixed in one go; there may still be issues that haven't been revealed. So, the theme issue seems quite complex and requires patience.
I think users feedbacks show their willingness to improve this feature.

@Freem-di

Freem-di commented Jul 8, 2026

Copy link
Copy Markdown

Agreed, @xLn2. Too early to stop polishing. We're sending bugs as we find them, so we'll get there.

@Freem-di

Freem-di commented Jul 8, 2026

Copy link
Copy Markdown

"File properties - Details/Clip", "Internal filter - Source/Video/Audio", "Add to Favorites dialog" - border turned white.
And in Internal filters, please fix it already with the filter list :)
2026-07-08 19_35_21-Properties
2026-07-08 19_35_45-Options

Follow-up to the border rework (reviewers saw issues our machine didn't):

- White borders (File Properties Details/Clip big field, Internal Filters lists,
  Add-to-Favorites dropdown): go back to overpainting a dark frame over whatever
  the theme drew, so the border is dark on every machine. Skipping / clipping the
  default paint rendered a white border on some systems.
- Overpaint now self-skips when the control reserves no non-client border (edge
  0, e.g. the MediaInfo NOT-WS_BORDER edit): a frame there lands in the client and
  gets dragged into the text by ScrollWindowEx. So the bordered multiline edits
  (Details/Clip) get a dark frame with no scroll drag, and MediaInfo stays clean.
- Restore the dark border on scrolling list boxes, and add one to combo boxes
  (the CFD combo border stayed light on some machines).
- CDarkCheckListBox: clip a partially-visible last item to the client bottom
  (ETO_CLIPPED) so its row no longer spills below the list box into the page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcinickgx

Copy link
Copy Markdown
Author

Thanks @Freem-di, @xLn2 — appreciate the persistence, and the detailed screenshots really help. 1.9.0.76 fixes this round:

  • White borders (File Properties Details/Clip big field, Internal Filters Source/Video/Audio lists, Add-to-Favorites dropdown): I'd changed the border code to skip/clip the default non-client paint, which looked right on my machine but left a white border on yours — nothing dark was actually painted over the client-edge. Reverted to overpainting a dark frame over whatever the theme drew, so it's dark on every system. The overpaint now self-skips on borderless controls (the MediaInfo dump is NOT WS_BORDER, so a frame there would land in the client and get dragged into the text by ScrollWindowEx) — so the bordered multiline fields (Details/Clip) get a proper dark frame and MediaInfo stays clean on scroll.

  • Combo boxes now get a dark border too (the DarkMode_CFD combo border stayed light on some machines).

  • Internal Filters list "leaving its box": a partially-visible last row was painting its background/text below the list box into the page; clipped it to the client bottom.

  • Installer: https://github.com/kcinickgx/MPC-BE/releases/download/dark-options-test/MPC-BE.1.9.0.76.x64.exe

  • Portable: https://github.com/kcinickgx/MPC-BE/releases/download/dark-options-test/MPC-BE.1.9.0.76.x64.zip

@Freem-di

Copy link
Copy Markdown

Build: 1.9.0.76

  1. "Add to Favorites dialog" - border is still white when the field is active (maybe that's how it should be?). When inactive, it looks normal.
addfav 2026-07-11 11_07_35-Add Favorite
  1. Input fields flicker when moving the mouse:
    Player - History/Network
    Format - format input field
    Keys - Filter/WinLIRC
    Logo - External
    and etc.
    Same issue as in the About window
rec 2026-07-11 111138
  1. Edit hotkeys - white button, dark menu
2026-07-11 11_25_41 - MPC-BE x64 1 9 0 76 dev
  1. Internal filters :D - next filter checkbox is visible
2026-07-11 11_30_34-Options
  1. Language files need to be updated again :)

@Freem-di

Freem-di commented Jul 11, 2026

Copy link
Copy Markdown

The error about language files should also be dark. And maybe not just it.

2026-07-05 12_53_58-MPC-BE

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.

6 participants