Fix command button height to prevent text cutoff
- Set fixed height of 28px on all command action buttons - Increase vertical padding from 4px to 6px - Add min-height: 20px in stylesheet for safety 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,8 +56,9 @@ class CommandItem(QWidget):
|
|||||||
background-color: {THEME['button_bg']};
|
background-color: {THEME['button_bg']};
|
||||||
color: {THEME['fg_color']};
|
color: {THEME['fg_color']};
|
||||||
border: none;
|
border: none;
|
||||||
padding: 4px 8px;
|
padding: 6px 8px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
min-height: 20px;
|
||||||
}}
|
}}
|
||||||
QPushButton:hover {{
|
QPushButton:hover {{
|
||||||
background-color: {THEME['highlight_color']};
|
background-color: {THEME['highlight_color']};
|
||||||
@@ -65,20 +66,20 @@ class CommandItem(QWidget):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
edit_btn = QPushButton("Edit")
|
edit_btn = QPushButton("Edit")
|
||||||
edit_btn.setFixedWidth(50)
|
edit_btn.setFixedSize(50, 28)
|
||||||
edit_btn.setStyleSheet(btn_style)
|
edit_btn.setStyleSheet(btn_style)
|
||||||
edit_btn.clicked.connect(self.edit_clicked.emit)
|
edit_btn.clicked.connect(self.edit_clicked.emit)
|
||||||
layout.addWidget(edit_btn)
|
layout.addWidget(edit_btn)
|
||||||
|
|
||||||
up_btn = QPushButton("^")
|
up_btn = QPushButton("^")
|
||||||
up_btn.setStyleSheet(btn_style)
|
up_btn.setStyleSheet(btn_style)
|
||||||
up_btn.setFixedWidth(30)
|
up_btn.setFixedSize(30, 28)
|
||||||
up_btn.clicked.connect(self.move_up_clicked.emit)
|
up_btn.clicked.connect(self.move_up_clicked.emit)
|
||||||
layout.addWidget(up_btn)
|
layout.addWidget(up_btn)
|
||||||
|
|
||||||
down_btn = QPushButton("v")
|
down_btn = QPushButton("v")
|
||||||
down_btn.setStyleSheet(btn_style)
|
down_btn.setStyleSheet(btn_style)
|
||||||
down_btn.setFixedWidth(30)
|
down_btn.setFixedSize(30, 28)
|
||||||
down_btn.clicked.connect(self.move_down_clicked.emit)
|
down_btn.clicked.connect(self.move_down_clicked.emit)
|
||||||
layout.addWidget(down_btn)
|
layout.addWidget(down_btn)
|
||||||
|
|
||||||
@@ -88,14 +89,15 @@ class CommandItem(QWidget):
|
|||||||
background-color: #dc3545;
|
background-color: #dc3545;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
padding: 4px 8px;
|
padding: 6px 8px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
min-height: 20px;
|
||||||
}}
|
}}
|
||||||
QPushButton:hover {{
|
QPushButton:hover {{
|
||||||
background-color: #c82333;
|
background-color: #c82333;
|
||||||
}}
|
}}
|
||||||
""")
|
""")
|
||||||
del_btn.setFixedWidth(30)
|
del_btn.setFixedSize(30, 28)
|
||||||
del_btn.clicked.connect(self.delete_clicked.emit)
|
del_btn.clicked.connect(self.delete_clicked.emit)
|
||||||
layout.addWidget(del_btn)
|
layout.addWidget(del_btn)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user