viewer: prevent raster decoration background bleed
This commit is contained in:
parent
bb08f3dcb6
commit
5cd34da0c2
1 changed files with 2 additions and 1 deletions
|
@ -185,7 +185,8 @@ class _RasterImageViewState extends State<RasterImageView> {
|
|||
|
||||
final viewSize = _displaySize * viewState.scale;
|
||||
final decorationOffset = ((viewSize - viewportSize) as Offset) / 2 - viewState.position;
|
||||
final decorationSize = applyBoxFit(BoxFit.none, viewSize, viewportSize).source;
|
||||
// deflate as a quick way to prevent background bleed
|
||||
final decorationSize = (applyBoxFit(BoxFit.none, viewSize, viewportSize).source - Offset(.5, .5)) as Size;
|
||||
|
||||
Widget child;
|
||||
final background = settings.rasterBackground;
|
||||
|
|
Loading…
Reference in a new issue