mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
used IconButton for edit
This commit is contained in:
parent
51f50cc5f4
commit
012e62c370
2 changed files with 11 additions and 3 deletions
|
|
@ -97,6 +97,11 @@ QPushButton[btn-type="tool-item"]:hover {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QPushButton[btn-type="tool-item-icon"] {
|
||||||
|
border: 0px solid #bfccd6;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
QPushButton[btn-type="expand-toggle"] {
|
QPushButton[btn-type="expand-toggle"] {
|
||||||
background: #1d272f;
|
background: #1d272f;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import json
|
||||||
import collections
|
import collections
|
||||||
from Qt import QtWidgets, QtCore, QtGui
|
from Qt import QtWidgets, QtCore, QtGui
|
||||||
from .widgets import (
|
from .widgets import (
|
||||||
|
IconButton,
|
||||||
ExpandingWidget,
|
ExpandingWidget,
|
||||||
NumberSpinBox,
|
NumberSpinBox,
|
||||||
PathInput,
|
PathInput,
|
||||||
|
|
@ -2021,10 +2022,12 @@ class ModifiableDictItem(QtWidgets.QWidget, SettingObject):
|
||||||
edit_btn = None
|
edit_btn = None
|
||||||
remove_btn = None
|
remove_btn = None
|
||||||
if self.labeled_items:
|
if self.labeled_items:
|
||||||
edit_btn = QtWidgets.QPushButton("Edit")
|
edit_btn = IconButton(
|
||||||
|
"fa.edit", QtCore.Qt.lightGray, QtCore.Qt.white
|
||||||
|
)
|
||||||
edit_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
edit_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||||
edit_btn.setProperty("btn-type", "tool-item")
|
edit_btn.setProperty("btn-type", "tool-item-icon")
|
||||||
edit_btn.setFixedSize(self._btn_size, self._btn_size)
|
edit_btn.setFixedHeight(self._btn_size)
|
||||||
else:
|
else:
|
||||||
remove_btn = QtWidgets.QPushButton("-")
|
remove_btn = QtWidgets.QPushButton("-")
|
||||||
remove_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
remove_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue