Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-notification-center
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-notification-center
Commits
7e34c752
Commit
7e34c752
authored
Jul 16, 2025
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide MPRIS Carousel dots when one or less player is visible
parent
99d7d9df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mpris.vala
src/controlCenter/widgets/mpris/mpris.vala
+6
-2
No files found.
src/controlCenter/widgets/mpris/mpris.vala
View file @
7e34c752
...
@@ -95,7 +95,8 @@ namespace SwayNotificationCenter.Widgets.Mpris {
...
@@ -95,7 +95,8 @@ namespace SwayNotificationCenter.Widgets.Mpris {
carousel_dots
=
new
Adw
.
CarouselIndicatorDots
();
carousel_dots
=
new
Adw
.
CarouselIndicatorDots
();
carousel_dots
.
set_carousel
(
carousel
);
carousel_dots
.
set_carousel
(
carousel
);
carousel_dots
.
show
();
carousel_dots
.
set_halign
(
Gtk
.
Align
.
CENTER
);
carousel_dots
.
set_valign
(
Gtk
.
Align
.
CENTER
);
append
(
carousel_dots
);
append
(
carousel_dots
);
// Config
// Config
...
@@ -204,11 +205,13 @@ namespace SwayNotificationCenter.Widgets.Mpris {
...
@@ -204,11 +205,13 @@ namespace SwayNotificationCenter.Widgets.Mpris {
if
(
carousel
.
n_pages
>
1
)
{
if
(
carousel
.
n_pages
>
1
)
{
button_prev
.
show
();
button_prev
.
show
();
button_next
.
show
();
button_next
.
show
();
carousel_dots
.
set_visible
(
true
);
// Scroll to the new player
// Scroll to the new player
carousel
.
scroll_to
(
player
,
false
);
carousel
.
scroll_to
(
player
,
false
);
}
}
if
(!
visible
)
show
();
if
(!
visible
)
show
();
}
}
private
void
add_player
(
string
name
,
MprisSource
source
)
{
private
void
add_player
(
string
name
,
MprisSource
source
)
{
...
@@ -242,6 +245,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
...
@@ -242,6 +245,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
if
(
children_length
<=
1
)
{
if
(
children_length
<=
1
)
{
button_prev
.
hide
();
button_prev
.
hide
();
button_next
.
hide
();
button_next
.
hide
();
carousel_dots
.
set_visible
(
false
);
}
}
}
}
...
...
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