[Okular-devel] About bug 326844

saheb preet singh saheb.preet at gmail.com
Wed Jan 22 13:34:40 UTC 2014


hi,

I was working on bug number 326844.

https://bugs.kde.org/show_bug.cgi?id=326844

It was a feature request to resize the window to fit the current page size.

I solved this bug up to some extent and was stuck in a small problem from
last two three days. Here are some screenshot of what is happening.

Before selecting resize window to fit page:-

[image: Inline image 3]

After selecting resize to fit page:-

[image: Inline image 4]

I am using the resize method for resizing the window.

The window is resizing  as required but sometimes it doesn't resizes . It
has to be moved by mouse and then again click on the button in the menu to
resize the window again.  Once it is moved by mouse, it works fine. Now,
when i change the zoom level of the current page, the problem starts again.

I think the problem occurs due to something happening in the other portion
of the code.

I searched about it on the internet and nobody was able to answer the
solution to people with same problem. There are some alternative solutions
to the problem:-

==> Use set geometry instead of resize which works fine. but would have to
be taken care of the size of the screen and the original position of the
window. Also, repainting the portion outside the window when the window is
resized to a smaller window.

==> Use a timer which will signal a slot which in turn will resize the
window, but that might require qsignalmapper to map the width and height to
the slot. ( I didn't tried this solution ).

The best solution i could find on the internet is this
http://qt-project.org/forums/viewthread/25648

Please guide me how should I solve this problem. Should I use such methods
which don't appear to be clean.

Thanks,
Saheb Preet Singh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140122/6b780822/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 319197 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140122/6b780822/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 375228 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140122/6b780822/attachment-0003.png>


More information about the Okular-devel mailing list