Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
pitivi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
200
Issues
200
List
Boards
Labels
Service Desk
Milestones
Merge Requests
27
Merge Requests
27
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
pitivi
Commits
3f78e856
Commit
3f78e856
authored
Jan 10, 2014
by
Alexandru Băluț
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ruler: Show the hours and millis only if useful
parent
ec18c353
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
pitivi/timeline/ruler.py
pitivi/timeline/ruler.py
+8
-2
pitivi/timeline/timeline.py
pitivi/timeline/timeline.py
+1
-0
No files found.
pitivi/timeline/ruler.py
View file @
3f78e856
...
...
@@ -325,6 +325,7 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
style
=
self
.
get_style_context
()
setCairoColor
(
context
,
style
.
get_color
(
state
))
y_bearing
=
context
.
text_extents
(
"0"
)[
1
]
millis
=
scale
<
1
def
split
(
x
):
# Seven elements: h : mm : ss . mmm
...
...
@@ -337,13 +338,18 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
while
paintpos
<
width
:
context
.
move_to
(
int
(
paintpos
),
1
-
y_bearing
)
current
=
split
(
time_to_string
(
long
(
current_time
)))
self
.
_drawTime
(
context
,
current
,
previous
)
self
.
_drawTime
(
context
,
current
,
previous
,
millis
)
previous
=
current
paintpos
+=
spacing
current_time
+=
interval
def
_drawTime
(
self
,
context
,
current
,
previous
):
def
_drawTime
(
self
,
context
,
current
,
previous
,
millis
):
hour
=
int
(
current
[
0
])
for
index
,
(
element
,
previous_element
)
in
enumerate
(
zip
(
current
,
previous
)):
if
index
<=
1
and
not
hour
:
continue
if
index
>=
5
and
not
millis
:
break
if
element
==
previous_element
:
color
=
self
.
_color_dimmed
else
:
...
...
pitivi/timeline/timeline.py
View file @
3f78e856
...
...
@@ -718,6 +718,7 @@ class Timeline(Gtk.Grid, Zoomable, Loggable):
self
.
_projectmanager
=
None
self
.
_project
=
None
self
.
pipeline
=
None
self
.
bTimeline
=
None
self
.
_createUi
()
self
.
_createActions
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment