slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.55k stars 601 forks source link

The color scheme is always detected incorrectly after initialization #4198

Closed foreverRuns closed 9 months ago

foreverRuns commented 10 months ago

The color scheme is always detected incorrectly after initialization.

  1. start the application, the color scheme is detected correctly. (light mode)
  2. change the windows to dark mode, the application detect light mode.
  3. change the windows to light mode, the application detect dark mode.
import { StyleMetrics } from "std-widgets.slint";

export global Theme  {
  in-out property <brush> app-background: StyleMetrics.dark-color-scheme ? #243238 : #EEEEEE;
}

LineEdit and TextEdit component can not use 'ctrl + v' to paste in caps lock mode

it can use in Slint: 1.2.2 version.

Using

tronical commented 10 months ago

Thank you for the report. Could you describe a little more in detail how you're changing the mode? I've tried changing it in the Windows 11 settings, and for example our gallery adjusts correctly, as you can see in the clip below:

https://github.com/slint-ui/slint/assets/1486/6e8168c5-3f2e-4888-98d0-b48e649d46fe

foreverRuns commented 10 months ago

Thanks for your reply. I change the mode as follows.

https://github.com/slint-ui/slint/assets/17795989/8e9c9a9b-e42d-4544-b4b8-3992959919fa

ogoffart commented 10 months ago

This is strange. The dark/light detection comes from winit though. This might be a winit bug.

Could you try if the theme example from the winit reprository works correctly?

LineEdit and TextEdit component can not use 'ctrl + v' to paste in caps lock mode

Reported a different issue for it to track it differently: https://github.com/slint-ui/slint/issues/4221

ogoffart commented 9 months ago

Since we can't reproduce this problem, we don't really know how to fix it. Have you tried to find out if this also happens in the winit example?

ogoffart commented 9 months ago

I'm going to close this issue since it's not really actionable without further information. Please comment with more information if you can still reproduce.