Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery: zoom small images beyond display resoulution #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions maintained/gallery-zoom-beyond-display-resolution/patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "Zoom gallery-images beyond display resolution",
"description": "Allow zooming of images in gallery beyond display resolution - especially usefull for zooming small images like boarding-pass-QR-codes.",
"category": "gallery",
"infos": {
"maintainer": "darvari"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- original/usr/share/jolla-gallery/pages/FlickableImageView.qml 2014-09-30 11:22:03.000000000 +0200
+++ patched/usr/share/jolla-gallery/pages/FlickableImageView.qml 2014-09-30 11:14:51.000000000 +0200
@@ -147,8 +147,8 @@
enableZoom: !view.moving

active: mediaItem.active
- maximumWidth: model.width
- maximumHeight: model.height
+ maximumWidth: model.width * 10
+ maximumHeight: model.height * 10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't look good for me. better replace it with Math.max(model.width, view.width)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am 30.09.14 12:51, schrieb CODeRUS:

it doesn't look good for me. better replace it with
Math.max(model.width, view.width)

Ok, I did.
I wrote:

            maximumWidth: Math.max(model.width, view.width)
            maximumHeight: Math.max(model.height, view.height)

but I don't like the result.

Below is a link to my owncloud, showing a video with all 3 variants:

  1. original style
  2. my patch with * 10
  3. your suggestion (if I understand it right)

You will notice that variant 3 creates an unwanted rescaling which does
not respect the aspect ratio.

Besides I want to zoom really a lot.

And my patch is quite ugly, but it works and has only one minor
side-effect: you can not zoom out to original resolution, that means if
image is smaller than screen you can not view it at
1 pixel image = 1 pixel on screen.

Darvari


onClicked: view.clicked()
}