mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8db9f3d9e2 | |||
| 80d3ad208d | |||
| 66217ff9b6 |
@@ -244,7 +244,7 @@ def settings_dialog(self):
|
||||
download_path.text(),
|
||||
down_speed_limit.value(),
|
||||
up_speed_limit.value(),
|
||||
# image_path.text(),
|
||||
None,
|
||||
autoresume_checkbox.isChecked(),
|
||||
max_connections.value(),
|
||||
max_downloads.value(),
|
||||
|
||||
@@ -84,10 +84,19 @@ def _table_stylesheet(view_type="QTableWidget"):
|
||||
{view_type}::item {{
|
||||
border-bottom: 1px solid {c["border"]};
|
||||
padding: 6px 14px;
|
||||
outline: none;
|
||||
{color_rule}
|
||||
}}
|
||||
{view_type}::item:selected {{
|
||||
background: {c["selected"]};
|
||||
outline: none;
|
||||
border: none;
|
||||
border-bottom: 1px solid {c["border"]};
|
||||
}}
|
||||
{view_type}::item:focus {{
|
||||
outline: none;
|
||||
border: none;
|
||||
border-bottom: 1px solid {c["border"]};
|
||||
}}
|
||||
QHeaderView {{
|
||||
background: transparent;
|
||||
@@ -449,21 +458,27 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
||||
|
||||
class HoverRowDelegate(QStyledItemDelegate):
|
||||
def paint(self, painter, option, index):
|
||||
opt = QtWidgets.QStyleOptionViewItem(option)
|
||||
opt.state &= ~QtWidgets.QStyle.StateFlag.State_HasFocus
|
||||
opt.state &= ~QtWidgets.QStyle.StateFlag.State_Selected
|
||||
if index.row() == MainWindow._instance._hovered_row:
|
||||
painter.save()
|
||||
painter.fillRect(option.rect, _theme_colors()["hover"])
|
||||
painter.fillRect(opt.rect, _theme_colors()["hover"])
|
||||
painter.restore()
|
||||
super().paint(painter, option, index)
|
||||
super().paint(painter, opt, index)
|
||||
|
||||
class PauseResumeDelegate(QStyledItemDelegate):
|
||||
clicked = Signal(int)
|
||||
|
||||
def paint(self, painter, option, index):
|
||||
opt = QtWidgets.QStyleOptionViewItem(option)
|
||||
opt.state &= ~QtWidgets.QStyle.StateFlag.State_HasFocus
|
||||
opt.state &= ~QtWidgets.QStyle.StateFlag.State_Selected
|
||||
if index.row() == MainWindow._instance._hovered_row:
|
||||
painter.save()
|
||||
painter.fillRect(option.rect, _theme_colors()["hover"])
|
||||
painter.fillRect(opt.rect, _theme_colors()["hover"])
|
||||
painter.restore()
|
||||
super().paint(painter, option, index)
|
||||
super().paint(painter, opt, index)
|
||||
|
||||
def setEditorData(self, editor, index):
|
||||
button = editor.findChild(QtWidgets.QPushButton)
|
||||
|
||||
Reference in New Issue
Block a user