DrewNaylor / UXL-Launcher

An app launcher meant to launch Microsoft Office 2010, 2013, 2016, 2019 desktop software/apps, including ones from Office 365. Not associated with Microsoft.
Apache License 2.0
7 stars 1 forks source link

Add support for rounded buttons (and other controls) when a theme is using flat buttons. #214

Open DrewNaylor opened 2 years ago

DrewNaylor commented 2 years ago

Rounded controls would help make things look right in Windows 11. As much as I don't like that version, it bothers me that my stuff looks wrong when using dark themes with my theme engine.

Here are some examples: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control.region?view=netframework-4.7.2 https://stackoverflow.com/a/51533925

I need to make sure the buttons go back to the regular size before switching themes. Maybe I can add a Boolean like ButtonsAreRounded that gets set to True when a theme that wants to use rounded buttons is loaded and the buttons are rounded. Then, when loading another theme, we'll check if the Boolean is True and not round the buttons again if the new theme also wants round buttons, or if the theme doesn't want to use round buttons or doesn't want to use buttons with a FlatStyle of Flat, we'll put them back to the default shape. I don't know how to make sure that they end up squared off on Windows 10 but rounded on Windows 11 if the theme doesn't want to use flat buttons. Maybe I should just check the Registry to see which version of Windows is running. For best results, I need to check if it's 8.1 or 10 and square them off, but have everything else (7 and 11) be rounded.

Users should have the option to not use rounded corners even if requested by a theme. Turning that option off may require a restart of the app for best results, but I'll try to make it so that everything looks ok as much as possible without a restart. Actually, there should be four choices: