feat: UI layout
This commit is contained in:
@@ -19,21 +19,17 @@ class VOICEVOX_PT_main_panel(Panel):
|
||||
layout = self.layout
|
||||
props = context.scene.voicevox
|
||||
|
||||
# 接続設定
|
||||
box = layout.box()
|
||||
box.label(text="VoiceVox Engine", icon='NETWORK_DRIVE')
|
||||
row = box.row()
|
||||
row.prop(props, "voicevox_host")
|
||||
row.prop(props, "voicevox_port")
|
||||
box.operator("voicevox.test_connection", icon='FILE_REFRESH')
|
||||
|
||||
layout.separator()
|
||||
|
||||
# テキスト入力
|
||||
box = layout.box()
|
||||
box.label(text="Text to Speech", icon='FILE_TEXT')
|
||||
box.prop(props, "text", text="")
|
||||
|
||||
# 生成ボタン(テキスト入力の直下)
|
||||
col = box.column(align=True)
|
||||
col.scale_y = 1.5
|
||||
col.operator("voicevox.generate_speech", icon='PLAY_SOUND', text="Generate Speech & Subtitle")
|
||||
col.operator("voicevox.add_subtitle", icon='FONT_DATA', text="Add Subtitle Only")
|
||||
|
||||
layout.separator()
|
||||
|
||||
# 音声設定
|
||||
@@ -80,8 +76,10 @@ class VOICEVOX_PT_main_panel(Panel):
|
||||
|
||||
layout.separator()
|
||||
|
||||
# アクション
|
||||
col = layout.column(align=True)
|
||||
col.scale_y = 1.5
|
||||
col.operator("voicevox.generate_speech", icon='PLAY_SOUND', text="Generate Speech & Subtitle")
|
||||
col.operator("voicevox.add_subtitle", icon='FONT_DATA', text="Add Subtitle Only")
|
||||
# 接続設定(最下部)
|
||||
box = layout.box()
|
||||
box.label(text="VoiceVox Engine", icon='NETWORK_DRIVE')
|
||||
row = box.row()
|
||||
row.prop(props, "voicevox_host")
|
||||
row.prop(props, "voicevox_port")
|
||||
box.operator("voicevox.test_connection", icon='FILE_REFRESH')
|
||||
|
||||
Reference in New Issue
Block a user