按钮样式
()
| 40 | |
| 41 | |
| 42 | def get_button_style() -> str: |
| 43 | """按钮样式""" |
| 44 | return f""" |
| 45 | QPushButton {{ |
| 46 | background-color: {COLORS['primary']}; |
| 47 | color: white; |
| 48 | border: none; |
| 49 | border-radius: 8px; |
| 50 | padding: 12px 24px; |
| 51 | font-weight: bold; |
| 52 | min-height: 20px; |
| 53 | }} |
| 54 | |
| 55 | QPushButton:hover {{ |
| 56 | background-color: {COLORS['primary_hover']}; |
| 57 | }} |
| 58 | |
| 59 | QPushButton:pressed {{ |
| 60 | background-color: {COLORS['primary_hover']}; |
| 61 | padding-top: 13px; |
| 62 | padding-bottom: 11px; |
| 63 | }} |
| 64 | |
| 65 | QPushButton:disabled {{ |
| 66 | background-color: {COLORS['text_disabled']}; |
| 67 | color: {COLORS['text_secondary']}; |
| 68 | }} |
| 69 | |
| 70 | QPushButton.secondary {{ |
| 71 | background-color: {COLORS['secondary']}; |
| 72 | }} |
| 73 | |
| 74 | QPushButton.secondary:hover {{ |
| 75 | background-color: {COLORS['secondary_hover']}; |
| 76 | }} |
| 77 | |
| 78 | QPushButton.warning {{ |
| 79 | background-color: {COLORS['warning']}; |
| 80 | }} |
| 81 | |
| 82 | QPushButton.warning:hover {{ |
| 83 | background-color: {COLORS['warning_hover']}; |
| 84 | }} |
| 85 | |
| 86 | QPushButton.success {{ |
| 87 | background-color: {COLORS['success']}; |
| 88 | }} |
| 89 | |
| 90 | QPushButton.success:hover {{ |
| 91 | background-color: #047857; |
| 92 | }} |
| 93 | """ |
| 94 | |
| 95 | |
| 96 | def get_combobox_style() -> str: |
no outgoing calls
no test coverage detected