mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
define max thumbnails in class variable
This commit is contained in:
parent
0a7c20398c
commit
1c604ee1be
1 changed files with 3 additions and 3 deletions
|
|
@ -33,6 +33,7 @@ class ThumbnailWidget(QtWidgets.QWidget):
|
|||
height_ratio = 2.0
|
||||
border_width = 1
|
||||
offset_sep = 4
|
||||
max_thumbnails = 3
|
||||
|
||||
def __init__(self, controller, parent):
|
||||
# Missing implementation for thumbnail
|
||||
|
|
@ -182,9 +183,8 @@ class ThumbnailWidget(QtWidgets.QWidget):
|
|||
draw_dashes = False
|
||||
pixes_to_draw = self._current_pixes
|
||||
|
||||
max_pix = 3
|
||||
if len(pixes_to_draw) > max_pix:
|
||||
pixes_to_draw = pixes_to_draw[:-max_pix]
|
||||
if len(pixes_to_draw) > self.max_thumbnails:
|
||||
pixes_to_draw = pixes_to_draw[:-self.max_thumbnails]
|
||||
pixes_len = len(pixes_to_draw)
|
||||
|
||||
width_offset, height_offset = self._get_pix_offset_size(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue