Use px size instead of w+h reqs for poster images
The old method worked only by accident on older GTK4 versions.
This commit is contained in:
parent
96ea810ace
commit
6df7530b33
3 changed files with 36 additions and 7 deletions
|
|
@ -27,6 +27,7 @@ impl < A : MediaAdapter > CollatedMediaGrid <A> {
|
|||
let grid_widget = flow_box ! (
|
||||
@ orientation : Horizontal ;
|
||||
@ homogeneous : true ;
|
||||
@ css_classes : & [ "collatable-container" ] ;
|
||||
@ selection_mode : SelectionMode :: None ;
|
||||
) ;
|
||||
let media_widget_pairs = RefCell :: new ( Vec :: new () ) ;
|
||||
|
|
@ -60,6 +61,7 @@ impl < A : MediaAdapter > CollatedMediaGrid <A> {
|
|||
& g_box ! (
|
||||
@ option_children ;
|
||||
@ orientation : Vertical ;
|
||||
@ valign : Center ; // I.e. do not fill parent vertically
|
||||
@ margin_top : 20 ;
|
||||
@ margin_bottom : 20 ;
|
||||
|
||||
|
|
@ -80,10 +82,9 @@ impl < A : MediaAdapter > CollatedMediaGrid <A> {
|
|||
|
||||
match poster_texture {
|
||||
Ok (poster_texture) => Some ( image ! (
|
||||
@ paintable : & poster_texture ;
|
||||
@ width_request : 300 ;
|
||||
@ height_request : 300 ;
|
||||
@ margin_bottom : 10 ;
|
||||
@ pixel_size : 300 ;
|
||||
@ paintable : & poster_texture ;
|
||||
) ) ,
|
||||
Err (error) => {
|
||||
if error . matches ( IOErrorEnum :: NotFound ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue