mirror of
https://github.com/transmission/transmission
synced 2025-02-21 13:46:52 +00:00
(trunk gtk) #3585 -- in torrent_cell_renderer_get_size(), set x_offset and y_offset even if cell_area is NULL
This commit is contained in:
parent
aa605b655c
commit
4bdd0860cc
1 changed files with 5 additions and 7 deletions
|
@ -520,13 +520,11 @@ torrent_cell_renderer_get_size( GtkCellRenderer * cell,
|
||||||
if( height )
|
if( height )
|
||||||
*height = h;
|
*height = h;
|
||||||
|
|
||||||
if( cell_area ) {
|
if( x_offset )
|
||||||
if( x_offset ) *x_offset = 0;
|
*x_offset = cell_area ? cell_area->x : 0;
|
||||||
if( y_offset ) {
|
|
||||||
*y_offset = 0.5 * ( cell_area->height - ( h + ( 2 * cell->ypad ) ) );
|
if( y_offset )
|
||||||
*y_offset = MAX( *y_offset, 0 );
|
*x_offset = cell_area ? (int)((cell_area->height - (cell->ypad*2 +h)) / 2.0) : 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue