Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-osd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-shell-osd
Commits
3e899e72
Verified
Commit
3e899e72
authored
Mar 28, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
osd: animate progress bar transitionsosd: animate progress bar transitions
parent
cb5986a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
osd-content.vala
src/osd-content.vala
+15
-1
No files found.
src/osd-content.vala
View file @
3e899e72
...
@@ -11,6 +11,7 @@ namespace XimperShellOsd {
...
@@ -11,6 +11,7 @@ namespace XimperShellOsd {
private
Gtk
.
Image
icon
;
private
Gtk
.
Image
icon
;
private
Gtk
.
ProgressBar
progress
;
private
Gtk
.
ProgressBar
progress
;
private
Gtk
.
Label
label
;
private
Gtk
.
Label
label
;
private
Adw
.
TimedAnimation
?
progress_anim
;
public
OsdContent
()
{
public
OsdContent
()
{
Object
(
Object
(
...
@@ -53,8 +54,21 @@ namespace XimperShellOsd {
...
@@ -53,8 +54,21 @@ namespace XimperShellOsd {
break
;
break
;
}
}
progress
.
fraction
=
value
.
clamp
(
0.0
,
1.0
);
animate_progress
(
value
.
clamp
(
0.0
,
1.0
)
);
label
.
label
=
text
;
label
.
label
=
text
;
}
}
private
void
animate_progress
(
double
target
)
{
if
(
progress_anim
!=
null
)
{
progress_anim
.
pause
();
}
var
cb
=
new
Adw
.
CallbackAnimationTarget
((
val
)
=>
{
progress
.
fraction
=
val
;
});
progress_anim
=
new
Adw
.
TimedAnimation
(
progress
,
progress
.
fraction
,
target
,
150
,
cb
);
progress_anim
.
easing
=
Adw
.
Easing
.
EASE_OUT_CUBIC
;
progress_anim
.
play
();
}
}
}
}
}
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