mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
added new image and define new color for delete button
This commit is contained in:
parent
de1c043ec8
commit
b56fabbf8c
4 changed files with 31 additions and 0 deletions
|
|
@ -51,6 +51,9 @@
|
|||
"border-hover": "rgba(168, 175, 189, .3)",
|
||||
"border-focus": "rgb(92, 173, 214)",
|
||||
|
||||
"delete-btn-bg": "rgb(201, 54, 54)",
|
||||
"delete-btn-bg-disabled": "rgba(201, 54, 54, 64)",
|
||||
|
||||
"tab-widget": {
|
||||
"bg": "#21252B",
|
||||
"bg-selected": "#434a56",
|
||||
|
|
|
|||
|
|
@ -713,6 +713,13 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
|
|||
background: {color:bg-view-hover};
|
||||
}
|
||||
|
||||
#DeleteButton {
|
||||
background: {color:delete-btn-bg};
|
||||
}
|
||||
#DeleteButton:disabled {
|
||||
background: {color:delete-btn-bg-disabled};
|
||||
}
|
||||
|
||||
/* Launcher specific stylesheets */
|
||||
#IconView[mode="icon"] {
|
||||
/* font size can't be set on items */
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
from Qt import QtCore, QtGui
|
||||
|
||||
from openpype.style import get_objected_colors
|
||||
from avalon.vendor import qtawesome
|
||||
|
||||
|
||||
|
|
@ -90,6 +91,17 @@ class ResourceCache:
|
|||
icon.addPixmap(disabled_pix, QtGui.QIcon.Disabled, QtGui.QIcon.Off)
|
||||
return icon
|
||||
|
||||
@classmethod
|
||||
def get_warning_pixmap(cls):
|
||||
src_image = get_warning_image()
|
||||
colors = get_objected_colors()
|
||||
color_value = colors["delete-btn-bg"]
|
||||
|
||||
return paint_image_with_color(
|
||||
src_image,
|
||||
color_value.get_qcolor()
|
||||
)
|
||||
|
||||
|
||||
def get_remove_image():
|
||||
image_path = os.path.join(
|
||||
|
|
@ -100,6 +112,15 @@ def get_remove_image():
|
|||
return QtGui.QImage(image_path)
|
||||
|
||||
|
||||
def get_warning_image():
|
||||
image_path = os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
"images",
|
||||
"warning.png"
|
||||
)
|
||||
return QtGui.QImage(image_path)
|
||||
|
||||
|
||||
def paint_image_with_color(image, color):
|
||||
"""TODO: This function should be imported from utils.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue