sylikc / jpegview

Fork of JPEGView by David Kleiner - fast and highly configurable viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF and TIFF images with a minimal GUI. Basic on-the-fly image processing is provided - allowing adjusting typical parameters as sharpness, color balance, rotation, perspective, contrast and local under-/overexposure.
Other
1.92k stars 113 forks source link

Suggestion - Add Dark theme & Mica backdrop to the Title Bar #180

Open MG240 opened 1 year ago

MG240 commented 1 year ago

Documentation:

https://learn.microsoft.com/windows/apps/desktop/modernize/apply-windows-themes https://learn.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute

sylikc commented 1 year ago

This is a duplicate of #71 and it's currently known issue.

I've looked into those API calls and stuff, but it's no easy feat.

Even the windows implementation says, it's not like windows automatically helps you draw things inverted, but rather, the application needs to be built with dark theme in mind.

My first approach would be to make the menu dark and possibly the title bar, but this is pending and not priority at the moment.

MG240 commented 1 year ago

Temporarily, I tried using MicaForEveryone by adding "Process Rule :JPEGView" to add Dark Titlebar & Mica Backdrop and it works. But JPEGView loses the theme after reopening.

20230331_113647002

oTnTh commented 1 year ago

Please take a look at this: https://github.com/ysc3839/win32-darkmode

I've tried and made a patch for jpegview: dark.patch.zip

Title bar and right-click menu worked in MainDlg, but FileOpenDialog didn't.

001 002

If anyone wanna try: JPEGView.x64.zip

sylikc commented 1 year ago

Thanks for the initial work @oTnTh let me look into the patch.