malisipi / mui

A Cross-Platform UI Library
https://malisipi.github.io/mui/
Apache License 2.0
102 stars 10 forks source link

Native theme for Win11 & Linux #17

Closed malisipi closed 1 year ago

malisipi commented 1 year ago

Note: This pr is draft and will be for awhile. This pr's purpose is making more native the MUI for Windows (especially 11). The windows and widgets will be use native colors, native APIs, native pop-ups and will be more harmoniousness with Windows.

malisipi commented 1 year ago

Examples: image image

Wajinn commented 1 year ago

One concern that I have about this, though I think it's a fantastic idea and the example looks really good, is when a user makes a cross-platform program for different OSes. They might want a consistent look across the OSes, as oppose to a distinct look for each OS. There can be contrasting and opposing desires from various users.

Hopefully, the selection of themes and APIs for particular OSes would not be so heavy, as to cause issues. Maybe "light themes", might be enough. And when using, from the user perspective, they just select "Windows theme", "macOS theme", "Android theme", etc... Or go with the default or their own custom theme. Of course there are various ways to go about this. Since this is so early phase, just mentioning it as maybe something to think about, from how a user might look at it too. Of course, your view is the most important.

malisipi commented 1 year ago

MUI's OS themes actually not more than a few native APIs and special config that created before. Cross-platform theme/config is default. If developers wants, native UI settings can be activated. And native settings/components shouldn't broke any cross-platform API. If they do, that brokes the main goal of MUI. So, I mean MUI always focused cross-platform and a cross-platform compability shouldn't will be broken with native APIs. And platform specific-APIs will not public to protect compability.

malisipi commented 1 year ago

image

MUI works on Linux with Windows 11 dark theme

With the latest commit, native themes can works by across OSs with/without native calls. Native calls if not available the system calls will be replaced with MUI implementations.

malisipi commented 1 year ago

Linux theme support is on the way. I referenced from Yaru theme colors that used in Ubuntu.

image image

Also you can see not so different than Windows theme except colors.