I'm trying to find the proper way of positioning labels/buttons in the center of the Sequencer's Tool Settings bar.
I have a code that can easily add buttons/labels to the bar, but I can't figure out how to position them in the center, kind of like the dropdown with the shuffle option in the header(marked with the blue line in the attached picture). What would be the proper way of setting it up in the code?
Thank you so much!
import bpy
def draw_buttons(self, context):
original_SEQUENCER_HT_tool_header_draw_tool_settings(self, context)
row = self.layout.row()
row.label(text = "BUTTON 1")
row.label(text = "BUTTON 2")
original_SEQUENCER_HT_tool_header_draw_tool_settings = bpy.types.SEQUENCER_HT_tool_header.draw_tool_settings
def register():
bpy.types.SEQUENCER_HT_tool_header.draw_tool_settings = draw_buttons
def unregister():
bpy.types.SEQUENCER_HT_tool_header.draw_tool_settings = original_SEQUENCER_HT_tool_header_draw_tool_settings
if __name__ == "__main__":
register()
View
>Tool Settings
, you get the Tool header and the buttons. $\endgroup$