MCPcopy Index your code
hub / github.com/BasicProtein/AugmentCode-Free / _setup_button

Method _setup_button

gui_qt6/components.py:25–39  ·  view source on GitHub ↗

设置按钮样式

(self)

Source from the content-addressed store, hash-verified

23 self._setup_button()
24
25 def _setup_button(self):
26 """设置按钮样式"""
27 self.setFont(get_button_font())
28 self.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
29
30 # 设置CSS类名用于样式表
31 if self.button_type == "secondary":
32 self.setProperty("class", "secondary")
33 elif self.button_type == "warning":
34 self.setProperty("class", "warning")
35 elif self.button_type == "success":
36 self.setProperty("class", "success")
37
38 # 设置最小尺寸
39 self.setMinimumHeight(45)
40
41 def set_enabled_state(self, enabled: bool):
42 """设置按钮启用状态"""

Callers 1

__init__Method · 0.95

Calls 1

get_button_fontFunction · 0.85

Tested by

no test coverage detected