Skip to content

Commit

Permalink
video items list changes ozmartian#2
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhakovanton committed Oct 17, 2023
1 parent e5ffb7e commit e27736d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vidcutter/VideoSlider.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, parent=None):
self._regionSelected = -1
self._handleHover = False
self._cutStarted = False
self.showThumbs = False
self.showThumbs = True
self.thumbnailsOn = False
self.offset = 6
self.setOrientation(Qt.Horizontal)
Expand All @@ -93,7 +93,7 @@ def __init__(self, parent=None):
self.end = QPoint()
self.currentRectangleIndex = -1

self.widgetWidth: int
self.widgetWidth = int()
self.frameCounterMaximum = -1

self.thumbsize = QSize()
Expand All @@ -112,7 +112,8 @@ def initStyle(self) -> None:
bground = 'rgba(200, 213, 236, 0.85)' if self._cutStarted else 'transparent'
height = 25
handle = 'handle-select.png' if self._handleHover else 'handle.png'
handle_height = 10
handle_height = 0
margin = 0
timeline = ''
self._regionHeight = 15
if not self.thumbnailsOn:
Expand Down Expand Up @@ -191,7 +192,8 @@ def paintEvent(self, event: QPaintEvent) -> None:
painter.drawLine(x, y, x, y - h)
if self.parent.mediaAvailable and i % 10 == 0 and (x + 4 + 50) < self.width():
painter.setPen(Qt.white if self.theme == 'dark' else Qt.black)
timecode = QStyle.sliderValueFromPosition(self.minimum(), self.maximum(), x - self.offset, self.width() - (self.offset * 2))
timecode = QStyle.sliderValueFromPosition(self.minimum(), self.maximum(), x - self.offset,
self.width() - (self.offset * 2))
timecode = self.parent.delta2QTime(timecode).toString(self.parent.runtimeformat)
painter.drawText(x + 4, y + 6, timecode)
if x + 30 > self.width():
Expand Down

0 comments on commit e27736d

Please sign in to comment.