Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wpf: Allow ToolItem and MenuItem to have different icon sizes #2481

Merged

Conversation

cwensley
Copy link
Member

@cwensley cwensley commented May 19, 2023

This allows ToolItem and MenuItem to have different icon sizes other than 16,16. Note that the MenuItem icon size is hard coded in WPF, so changing the size may not have an affect unless you define your own MenuItem styling.

This also removes the gripper as it is useless and adjusts the margins a little between the label and image and with splitters.

You can use Eto styles to define the sizes for individual items, or change the default like so:

// change for all
Eto.Wpf.Forms.ToolBar.ToolItemHandler.DefaultImageSize = new Size(24, 24);

// change only for specific items
Styles.Add<ButtonToolItemHandler>("my-style", c => c.ImageSize = new Size(24, 24));

@cwensley cwensley added this to the 2.8.0 milestone May 19, 2023
@cwensley cwensley merged commit 82b5ea5 into picoe:develop May 19, 2023
@cwensley cwensley deleted the curtis/wpf-toolbar-and-menu-icon-sizes branch May 19, 2023 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant