Skip to content

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

@DrewNaylor

Description

@DrewNaylor

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:

  • Never use rounded corners, even if requested by a theme
  • Use rounded corners if requested by a theme and you're using a version of Windows with rounded corners in the default theme (default)
  • Use rounded corners if requested by a theme, even if your version of Windows doesn't feature them in its default theme
  • Always use rounded corners

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions