Skip to content

Commit

Permalink
PlayerPage: fix aspect ratio (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored May 22, 2024
1 parent 382a0fc commit f89d775
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
player-page {
background: black;
}

popover.preview contents {
background: black;
border: none;
Expand Down
8 changes: 6 additions & 2 deletions src/Widgets/Player/PlayerPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ namespace Audience {

private uint hiding_timer = 0;

class construct {
set_css_name ("player-page");
}

construct {
var playback_manager = PlaybackManager.get_default ();

Expand All @@ -53,9 +57,9 @@ namespace Audience {
};

var picture = new Gtk.Picture.for_paintable (playback_manager.gst_video_widget) {
content_fit = CONTAIN,
hexpand = true,
vexpand = true,
keep_aspect_ratio = false
vexpand = true
};

var overlay = new Gtk.Overlay () {
Expand Down
2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ executable(
dependency('gstreamer-pbutils-1.0'),
dependency('gstreamer-video-1.0'),
dependency('gstreamer-tag-1.0'),
dependency('gtk4'),
dependency('gtk4', version: '>= 4.8'),
dependency('libadwaita-1'),

meson.get_compiler('vala').find_library('posix'),
Expand Down

0 comments on commit f89d775

Please sign in to comment.