|
|
|
|
@ -188,28 +188,6 @@ class WordRibbon(QFrame):
|
|
|
|
|
self.init_style_preview_group()
|
|
|
|
|
self.add_separator()
|
|
|
|
|
|
|
|
|
|
# ---------- 快速样式组 ----------
|
|
|
|
|
quick_style_group, quick_style_layout = self.create_ribbon_group("快速样式")
|
|
|
|
|
|
|
|
|
|
# 创建样式按钮
|
|
|
|
|
self.heading1_btn = self.create_style_button("标题1")
|
|
|
|
|
self.heading2_btn = self.create_style_button("标题2")
|
|
|
|
|
self.heading3_btn = self.create_style_button("标题3")
|
|
|
|
|
self.heading4_btn = self.create_style_button("标题4")
|
|
|
|
|
self.body_text_btn = self.create_style_button("正文")
|
|
|
|
|
|
|
|
|
|
# 添加到布局
|
|
|
|
|
quick_style_layout.addWidget(self.heading1_btn)
|
|
|
|
|
quick_style_layout.addWidget(self.heading2_btn)
|
|
|
|
|
quick_style_layout.addWidget(self.heading3_btn)
|
|
|
|
|
quick_style_layout.addWidget(self.heading4_btn)
|
|
|
|
|
quick_style_layout.addWidget(self.body_text_btn)
|
|
|
|
|
quick_style_layout.addStretch()
|
|
|
|
|
layout.addWidget(quick_style_group)
|
|
|
|
|
self.add_separator()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ---------- 编辑组 ----------
|
|
|
|
|
editing_group, editing_layout = self.create_ribbon_group("编辑")
|
|
|
|
|
self.find_btn = QToolButton()
|
|
|
|
|
|