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
2454beb3
Unverified
Commit
2454beb3
authored
Mar 13, 2025
by
Erik Reider
Committed by
GitHub
Mar 13, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed MPRIS widget side fade (#527)
parent
6af582b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
+0
-46
mpris.vala
src/controlCenter/widgets/mpris/mpris.vala
+0
-46
No files found.
src/controlCenter/widgets/mpris/mpris.vala
View file @
2454beb3
...
...
@@ -59,7 +59,6 @@ namespace SwayNotificationCenter.Widgets.Mpris {
visible
=
true
,
};
carousel
.
allow_scroll_wheel
=
true
;
carousel
.
draw
.
connect
(
carousel_draw_cb
);
carousel
.
page_changed
.
connect
((
index
)
=>
{
GLib
.
List
<
weak
Gtk
.
Widget
>
children
=
carousel
.
get_children
();
int
children_length
=
(
int
)
children
.
length
();
...
...
@@ -122,51 +121,6 @@ namespace SwayNotificationCenter.Widgets.Mpris {
}
}
private
bool
carousel_draw_cb
(
Cairo
.
Context
cr
)
{
Gtk
.
Allocation
alloc
;
carousel
.
get_allocated_size
(
out
alloc
,
null
);
Cairo
.
Pattern
left_fade_gradient
=
new
Cairo
.
Pattern
.
linear
(
0
,
0
,
1
,
0
);
left_fade_gradient
.
add_color_stop_rgba
(
0
,
1
,
1
,
1
,
1
);
left_fade_gradient
.
add_color_stop_rgba
(
1
,
1
,
1
,
1
,
0
);
Cairo
.
Pattern
right_fade_gradient
=
new
Cairo
.
Pattern
.
linear
(
0
,
0
,
1
,
0
);
right_fade_gradient
.
add_color_stop_rgba
(
0
,
1
,
1
,
1
,
0
);
right_fade_gradient
.
add_color_stop_rgba
(
1
,
1
,
1
,
1
,
1
);
cr
.
save
();
cr
.
push_group
();
// Draw widgets
carousel
.
draw
.
disconnect
(
carousel_draw_cb
);
carousel
.
draw
(
cr
);
carousel
.
draw
.
connect
(
carousel_draw_cb
);
/// Draw vertical fade
// Top fade
cr
.
save
();
cr
.
scale
(
FADE_WIDTH
,
alloc
.
height
);
cr
.
rectangle
(
0
,
0
,
FADE_WIDTH
,
alloc
.
height
);
cr
.
set_source
(
left_fade_gradient
);
cr
.
set_operator
(
Cairo
.
Operator
.
DEST_OUT
);
cr
.
fill
();
cr
.
restore
();
// Bottom fade
cr
.
save
();
cr
.
translate
(
alloc
.
width
-
FADE_WIDTH
,
0
);
cr
.
scale
(
FADE_WIDTH
,
alloc
.
height
);
cr
.
rectangle
(
0
,
0
,
FADE_WIDTH
,
alloc
.
height
);
cr
.
set_source
(
right_fade_gradient
);
cr
.
set_operator
(
Cairo
.
Operator
.
DEST_OUT
);
cr
.
fill
();
cr
.
restore
();
cr
.
pop_group_to_source
();
cr
.
paint
();
cr
.
restore
();
return
true
;
}
/**
* Forces the carousel to reload its style_context.
* Fixes carousel items not redrawing when window isn't visible.
...
...
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