feat: UI layout
This commit is contained in:
parent
17127fc778
commit
b53a5753bd
28
panels.py
28
panels.py
|
|
@ -19,21 +19,17 @@ class VOICEVOX_PT_main_panel(Panel):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
props = context.scene.voicevox
|
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 = layout.box()
|
||||||
box.label(text="Text to Speech", icon='FILE_TEXT')
|
box.label(text="Text to Speech", icon='FILE_TEXT')
|
||||||
box.prop(props, "text", 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()
|
layout.separator()
|
||||||
|
|
||||||
# 音声設定
|
# 音声設定
|
||||||
|
|
@ -80,8 +76,10 @@ class VOICEVOX_PT_main_panel(Panel):
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
# アクション
|
# 接続設定(最下部)
|
||||||
col = layout.column(align=True)
|
box = layout.box()
|
||||||
col.scale_y = 1.5
|
box.label(text="VoiceVox Engine", icon='NETWORK_DRIVE')
|
||||||
col.operator("voicevox.generate_speech", icon='PLAY_SOUND', text="Generate Speech & Subtitle")
|
row = box.row()
|
||||||
col.operator("voicevox.add_subtitle", icon='FONT_DATA', text="Add Subtitle Only")
|
row.prop(props, "voicevox_host")
|
||||||
|
row.prop(props, "voicevox_port")
|
||||||
|
box.operator("voicevox.test_connection", icon='FILE_REFRESH')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user