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

Custom Separator Toolbar Item Image #2001

Open
ThioJoe opened this issue Sep 3, 2024 · 0 comments
Open

Custom Separator Toolbar Item Image #2001

ThioJoe opened this issue Sep 3, 2024 · 0 comments

Comments

@ThioJoe
Copy link

ThioJoe commented Sep 3, 2024

System information

  • Windows OS version: Windows 11 26100.1591
  • ImageGlass version: Version: 9.1.8.723 (64-bit)
  • ImageGlass release: MS Store

Describe the feature

I want to put a bigger separator between certain groups of icons in the toolbar. I would like to be able to use a custom "image" property for the "separator" type toolbar item.

Alternatively, perhaps there could be a way to define the separator width via a new config property just for Separator types, since separators seem to be created with the .NET "ToolStripSeparator" object which allows for an override of the separator thickness, as seen in ToolStripSeparator.cs:

/// <summary>
///  Deriving classes can override this to configure a default size for their control.
///  This is more efficient than setting the size in the control's constructor.
/// </summary>
protected override Size DefaultSize => new(SeparatorThickness, SeparatorThickness);

protected internal override Padding DefaultMargin => Padding.Empty;

How to use feature

  1. Perhaps in the igconfig.json file, since "Separator" types already have an "image" property, just make be used when the user sets a path in the property.
  • Space width could be determined by the user by simply adjusting the aspect ratio of the SVG file they create.

Additional context

I tried adding a custom separator type item via Settings > Layout > Toolbar > "Add a Custom Button", where I put the type "Separator" and a path to a custom svg in the "Image" property, but it writes to the config as a regular separator and ignores any properties set.

@ThioJoe ThioJoe changed the title Custom Separator Menu Item Custom Separator Toolbar Item Image Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant