How to remove the label of tool button I added.

I want to remove the label text of my tool bar button and make the button smaller.

However If I leave the label empty, the button keeps its size so I can not make it smaller.

Is there any way to shrink the button?

We are required to keep the toolbar height narrow originally.

When I assign an icon to a button, the total height of the button is increased significantly because the height of the label is added even if the label is empty.

Strangely, the original toolbar buttons seem to have their label texts, yet they display only the icons and keep their height small..

[Image Removed]

再現手順

  1. Add an asset of Editor​ Utility Tool Menu Entry type.
  2. Set its Menu-property “Sequencer.MainToolBar”, to add the button on the sequencer tool bar.
  3. Leave the Label-property empty, but the button keep its height. (I intended to make this button smaller..)

Hi Yuki Sato,

Sorry about the delay. I’m looking into this now and should get back to you soon.

Best regards,

Vitor

I got it, setting my buttons’ Style Name Override “SequencerToolbar”.

(It works when I add the buttons on the section of “Sequencer.MainToolBar”.)

This override name hides the button label and appears to be the name used by the default buttons on the sequencer.

[Image Removed]

Hi Yuki Sato,

I’m glad you managed to find this. Your approach is correct, all other Sequencer Toolbar buttons use a StyleNameOverride of “SequencerToolBar” (in function SSequencer::PopulateToolBar()). This is the name of the toolbar style (not button or icon style) that should be used by the button. Note that this toolbar style is defined as a chain of overrides:

"SequencerToolBar" --> "AssetEditorToolbar" --> "SlimToolBar"On the other hand, without specifying the override, the buttons are created for a toolbar of default style “ToolBar”, which is not part of the hierarchy above, leading to the difference you noticed. For reference, the definitions for the base styles can be found at FStarshipCoreStyle::SetupMultiboxStyles(), while the definition for “SequencerToolBar” can be found at FStarshipEditorStyle::FStyle::SetupSequencerStyles().

Don’t hesitate to ask if you need any further assitance.

Best regards,

Vitor