Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-03-16 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated March 16, 2015, 11:21 p.m.)


Status
--

This change has been marked as submitted.


Review request for Okular and Albert Astals Cid.


Changes
---

Submitted with commit 1eafe4feb151c713e8f7747164348c25886480bf by Albert Astals 
Cid on behalf of Saheb Preet Singh to branch master.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs
-

  doc/index.docbook 3237849 
  part.h 594eb44 
  part.cpp 36438af 
  shell/shell.h 224acfe 
  shell/shell.cpp f7675fd 
  ui/pageview.h a8adb2c 
  ui/pageview.cpp 2dd8cf1 
  ui/sidebar.h cf5dfc6 
  ui/sidebar.cpp 0c722a9 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-03-01 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated March 1, 2015, 2:36 p.m.)


Review request for Okular and Albert Astals Cid.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs (updated)
-

  doc/index.docbook 3237849 
  part.h 594eb44 
  part.cpp 36438af 
  shell/shell.h 224acfe 
  shell/shell.cpp f7675fd 
  ui/pageview.h a8adb2c 
  ui/pageview.cpp 2dd8cf1 
  ui/sidebar.h cf5dfc6 
  ui/sidebar.cpp 0c722a9 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-02-27 Thread Saheb Preet Singh


 On Dec. 15, 2014, 2:28 a.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?
 
 Albert Astals Cid wrote:
 I honestly think that it's not needed.
 
 Saheb Preet Singh wrote:
 i think keeping it as a shortcut would be a good idea
 
 Albert Astals Cid wrote:
 Now we need to think of a default shortcut. Any suggestion?
 
 Saheb Preet Singh wrote:
 ctrl + E or ctrl + shift + F
 
 Albert Astals Cid wrote:
 ctrl + shift + F is obviously out of question since it's already used
 
 What's the rationale behind Ctrl+E?
 
 Saheb Preet Singh wrote:
 oh I am sorry for suggesting ctrl + shift + F. We can use something like 
 ctrl + alt + F.
 
 I suggested ctrl + E as it is already being used in gimp for shrink wrap.
 
 Albert Astals Cid wrote:
 Hmmm, my gimp uses Ctrl+J ? Which gimp version do you use?
 
 Saheb Preet Singh wrote:
 oops sorry, it works with ctrl + j only. So can we use ctrl + j ?
 
 Albert Astals Cid wrote:
 Ctrl+J seems good, can you make it the patch before this wednesday that 
 is the Feature Freeze for the next release? If not please tell and i'll try 
 to find time to do it myself.

i am really very sorry for the late reply. I tried my best to do it till 
wednesday but couldn't do it. It will take me two to three days more to create 
the final patch.


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On Nov. 25, 2014, 12:47 p.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Nov. 25, 2014, 12:47 p.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == 

Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-02-22 Thread Albert Astals Cid


 On des. 14, 2014, 8:58 p.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?
 
 Albert Astals Cid wrote:
 I honestly think that it's not needed.
 
 Saheb Preet Singh wrote:
 i think keeping it as a shortcut would be a good idea
 
 Albert Astals Cid wrote:
 Now we need to think of a default shortcut. Any suggestion?
 
 Saheb Preet Singh wrote:
 ctrl + E or ctrl + shift + F
 
 Albert Astals Cid wrote:
 ctrl + shift + F is obviously out of question since it's already used
 
 What's the rationale behind Ctrl+E?
 
 Saheb Preet Singh wrote:
 oh I am sorry for suggesting ctrl + shift + F. We can use something like 
 ctrl + alt + F.
 
 I suggested ctrl + E as it is already being used in gimp for shrink wrap.
 
 Albert Astals Cid wrote:
 Hmmm, my gimp uses Ctrl+J ? Which gimp version do you use?
 
 Saheb Preet Singh wrote:
 oops sorry, it works with ctrl + j only. So can we use ctrl + j ?

Ctrl+J seems good, can you make it the patch before this wednesday that is the 
Feature Freeze for the next release? If not please tell and i'll try to find 
time to do it myself.


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On nov. 25, 2014, 7:17 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated nov. 25, 2014, 7:17 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet 

Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-02-21 Thread Saheb Preet Singh


 On Dec. 15, 2014, 2:28 a.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?
 
 Albert Astals Cid wrote:
 I honestly think that it's not needed.
 
 Saheb Preet Singh wrote:
 i think keeping it as a shortcut would be a good idea
 
 Albert Astals Cid wrote:
 Now we need to think of a default shortcut. Any suggestion?
 
 Saheb Preet Singh wrote:
 ctrl + E or ctrl + shift + F
 
 Albert Astals Cid wrote:
 ctrl + shift + F is obviously out of question since it's already used
 
 What's the rationale behind Ctrl+E?
 
 Saheb Preet Singh wrote:
 oh I am sorry for suggesting ctrl + shift + F. We can use something like 
 ctrl + alt + F.
 
 I suggested ctrl + E as it is already being used in gimp for shrink wrap.
 
 Albert Astals Cid wrote:
 Hmmm, my gimp uses Ctrl+J ? Which gimp version do you use?

oops sorry, it works with ctrl + j only. So can we use ctrl + j ?


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On Nov. 25, 2014, 12:47 p.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Nov. 25, 2014, 12:47 p.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-01-27 Thread Albert Astals Cid


 On des. 14, 2014, 8:58 p.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?
 
 Albert Astals Cid wrote:
 I honestly think that it's not needed.
 
 Saheb Preet Singh wrote:
 i think keeping it as a shortcut would be a good idea
 
 Albert Astals Cid wrote:
 Now we need to think of a default shortcut. Any suggestion?
 
 Saheb Preet Singh wrote:
 ctrl + E or ctrl + shift + F
 
 Albert Astals Cid wrote:
 ctrl + shift + F is obviously out of question since it's already used
 
 What's the rationale behind Ctrl+E?
 
 Saheb Preet Singh wrote:
 oh I am sorry for suggesting ctrl + shift + F. We can use something like 
 ctrl + alt + F.
 
 I suggested ctrl + E as it is already being used in gimp for shrink wrap.

Hmmm, my gimp uses Ctrl+J ? Which gimp version do you use?


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On nov. 25, 2014, 7:17 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated nov. 25, 2014, 7:17 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-01-26 Thread Albert Astals Cid


 On des. 14, 2014, 8:58 p.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?
 
 Albert Astals Cid wrote:
 I honestly think that it's not needed.
 
 Saheb Preet Singh wrote:
 i think keeping it as a shortcut would be a good idea
 
 Albert Astals Cid wrote:
 Now we need to think of a default shortcut. Any suggestion?
 
 Saheb Preet Singh wrote:
 ctrl + E or ctrl + shift + F

ctrl + shift + F is obviously out of question since it's already used

What's the rationale behind Ctrl+E?


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On nov. 25, 2014, 7:17 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated nov. 25, 2014, 7:17 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-01-26 Thread Saheb Preet Singh


 On Dec. 15, 2014, 2:28 a.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?
 
 Albert Astals Cid wrote:
 I honestly think that it's not needed.
 
 Saheb Preet Singh wrote:
 i think keeping it as a shortcut would be a good idea
 
 Albert Astals Cid wrote:
 Now we need to think of a default shortcut. Any suggestion?
 
 Saheb Preet Singh wrote:
 ctrl + E or ctrl + shift + F
 
 Albert Astals Cid wrote:
 ctrl + shift + F is obviously out of question since it's already used
 
 What's the rationale behind Ctrl+E?

oh I am sorry for suggesting ctrl + shift + F. We can use something like ctrl + 
alt + F.

I suggested ctrl + E as it is already being used in gimp for shrink wrap.


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On Nov. 25, 2014, 12:47 p.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Nov. 25, 2014, 12:47 p.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-01-08 Thread Albert Astals Cid


 On des. 14, 2014, 8:58 p.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?
 
 Albert Astals Cid wrote:
 I honestly think that it's not needed.
 
 Saheb Preet Singh wrote:
 i think keeping it as a shortcut would be a good idea

Now we need to think of a default shortcut. Any suggestion?


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On nov. 25, 2014, 7:17 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated nov. 25, 2014, 7:17 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-01-08 Thread Saheb Preet Singh


 On Dec. 15, 2014, 2:28 a.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?
 
 Albert Astals Cid wrote:
 I honestly think that it's not needed.

i think keeping it as a shortcut would be a good idea


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On Nov. 25, 2014, 12:47 p.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Nov. 25, 2014, 12:47 p.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-01-02 Thread Albert Astals Cid


 On des. 14, 2014, 8:58 p.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?
 
 Saheb Preet Singh wrote:
 Before deciding its position on menus I have a doubt. I reviewed the bug 
 description and found this
 
 'Zoom in fit window to page mode causes the whole window to magnify or 
 shrink accordingly.'
 
 Should I work on implementing the movement of window on zoom in and zoom 
 out ?

I honestly think that it's not needed.


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On nov. 25, 2014, 7:17 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated nov. 25, 2014, 7:17 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2015-01-01 Thread Saheb Preet Singh


 On Dec. 15, 2014, 2:28 a.m., Albert Astals Cid wrote:
  This looks pretty solid now :)
  
  Two minor things:
   * You should add it to the manual, i.e. add something to doc/index.docbook
   * I'm not convinced of it's position on the menus. At the moment it's 
  close to other fit things, but those are permanent, while this is an 
  instant action and it works over the window size and not over the zoom 
  value like the others. I'm undecided about two options: A) Don't show it on 
  the menus at all and give it a shortcut so people can use it (Since i think 
  this is a pretty advanced/notcommon option) B) Put it at the end of the 
  View menu in it's own group (i.e. with a separator). What do you think?

Before deciding its position on menus I have a doubt. I reviewed the bug 
description and found this

'Zoom in fit window to page mode causes the whole window to magnify or shrink 
accordingly.'

Should I work on implementing the movement of window on zoom in and zoom out ?


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


On Nov. 25, 2014, 12:47 p.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Nov. 25, 2014, 12:47 p.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-12-14 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review72005
---


This looks pretty solid now :)

Two minor things:
 * You should add it to the manual, i.e. add something to doc/index.docbook
 * I'm not convinced of it's position on the menus. At the moment it's close to 
other fit things, but those are permanent, while this is an instant action 
and it works over the window size and not over the zoom value like the others. 
I'm undecided about two options: A) Don't show it on the menus at all and give 
it a shortcut so people can use it (Since i think this is a pretty 
advanced/notcommon option) B) Put it at the end of the View menu in it's own 
group (i.e. with a separator). What do you think?

- Albert Astals Cid


On nov. 25, 2014, 7:17 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated nov. 25, 2014, 7:17 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   shell/shell.cpp f7675fd 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 17e66f4 
   ui/sidebar.h cf5dfc6 
   ui/sidebar.cpp 0c722a9 
   part.h 594eb44 
   part.cpp 50a1b20 
   part.rc 60f86e5 
   shell/shell.h 224acfe 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-11-24 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated Nov. 25, 2014, 12:47 p.m.)


Review request for Okular and Albert Astals Cid.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs (updated)
-

  shell/shell.cpp f7675fd 
  ui/pageview.h a8adb2c 
  ui/pageview.cpp 17e66f4 
  ui/sidebar.h cf5dfc6 
  ui/sidebar.cpp 0c722a9 
  part.h 594eb44 
  part.cpp 50a1b20 
  part.rc 60f86e5 
  shell/shell.h 224acfe 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-09-28 Thread Albert Astals Cid


 On ago. 9, 2014, 9:24 p.m., Albert Astals Cid wrote:
  It still doesn't seem to work 100%, see the before and after images.
  Before: http://i.imgur.com/IhdXPe6.png
  After: http://i.imgur.com/tf0TMCS.png
  
  Can you reproduce this behaviour?
 
 Albert Astals Cid wrote:
 Saheb?
 
 Saheb Preet Singh wrote:
 Sorry for late reply. The previous mail got bounced somewhere.
 
 Yes I can reproduce the same thing. I tried to fix it initially but 
 couldn't get it. I will try to fix it again though.
 
 Saheb Preet Singh wrote:
 Hi,
 
 I tried to figure out the problem and I found that the width of the left 
 side list for table of contents, bookmarks etc. is resizing when I resize the 
 main window. That is why the resizing is not doing perfect.
 
 I have tried to figure out if I could know in what ratios or how this 
 left side panel resize with respect to the main window but couldn't make it 
 work perfect.
 
 Any suggestions for making it work??

have you tried remembering the size of the sidebar and restoring it afterwards?


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review64131
---


On jun. 9, 2014, 10:20 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated jun. 9, 2014, 10:20 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 19c0d3e 
   part.cpp d9f1682 
   part.rc 60f86e5 
   shell/shell.h f25b3d8 
   shell/shell.cpp 9ee422a 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 9073139 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-09-20 Thread Saheb Preet Singh


 On Aug. 10, 2014, 2:54 a.m., Albert Astals Cid wrote:
  It still doesn't seem to work 100%, see the before and after images.
  Before: http://i.imgur.com/IhdXPe6.png
  After: http://i.imgur.com/tf0TMCS.png
  
  Can you reproduce this behaviour?
 
 Albert Astals Cid wrote:
 Saheb?
 
 Saheb Preet Singh wrote:
 Sorry for late reply. The previous mail got bounced somewhere.
 
 Yes I can reproduce the same thing. I tried to fix it initially but 
 couldn't get it. I will try to fix it again though.

Hi,

I tried to figure out the problem and I found that the width of the left side 
list for table of contents, bookmarks etc. is resizing when I resize the main 
window. That is why the resizing is not doing perfect.

I have tried to figure out if I could know in what ratios or how this left side 
panel resize with respect to the main window but couldn't make it work perfect.

Any suggestions for making it work??


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review64131
---


On June 9, 2014, 3:50 p.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated June 9, 2014, 3:50 p.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 19c0d3e 
   part.cpp d9f1682 
   part.rc 60f86e5 
   shell/shell.h f25b3d8 
   shell/shell.cpp 9ee422a 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 9073139 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-09-08 Thread Albert Astals Cid


 On ago. 9, 2014, 9:24 p.m., Albert Astals Cid wrote:
  It still doesn't seem to work 100%, see the before and after images.
  Before: http://i.imgur.com/IhdXPe6.png
  After: http://i.imgur.com/tf0TMCS.png
  
  Can you reproduce this behaviour?

Saheb?


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review64131
---


On jun. 9, 2014, 10:20 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated jun. 9, 2014, 10:20 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 19c0d3e 
   part.cpp d9f1682 
   part.rc 60f86e5 
   shell/shell.h f25b3d8 
   shell/shell.cpp 9ee422a 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 9073139 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-09-08 Thread Saheb Preet Singh


 On Aug. 10, 2014, 2:54 a.m., Albert Astals Cid wrote:
  It still doesn't seem to work 100%, see the before and after images.
  Before: http://i.imgur.com/IhdXPe6.png
  After: http://i.imgur.com/tf0TMCS.png
  
  Can you reproduce this behaviour?
 
 Albert Astals Cid wrote:
 Saheb?

Sorry for late reply. The previous mail got bounced somewhere.

Yes I can reproduce the same thing. I tried to fix it initially but couldn't 
get it. I will try to fix it again though.


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review64131
---


On June 9, 2014, 3:50 p.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated June 9, 2014, 3:50 p.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 19c0d3e 
   part.cpp d9f1682 
   part.rc 60f86e5 
   shell/shell.h f25b3d8 
   shell/shell.cpp 9ee422a 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 9073139 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-08-09 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review64131
---


It still doesn't seem to work 100%, see the before and after images.
Before: http://i.imgur.com/IhdXPe6.png
After: http://i.imgur.com/tf0TMCS.png

Can you reproduce this behaviour?

- Albert Astals Cid


On jun. 9, 2014, 10:20 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated jun. 9, 2014, 10:20 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 19c0d3e 
   part.cpp d9f1682 
   part.rc 60f86e5 
   shell/shell.h f25b3d8 
   shell/shell.cpp 9ee422a 
   ui/pageview.h a8adb2c 
   ui/pageview.cpp 9073139 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-06-09 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated June 9, 2014, 10:20 a.m.)


Review request for Okular and Albert Astals Cid.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs (updated)
-

  part.h 19c0d3e 
  part.cpp d9f1682 
  part.rc 60f86e5 
  shell/shell.h f25b3d8 
  shell/shell.cpp 9ee422a 
  ui/pageview.h a8adb2c 
  ui/pageview.cpp 9073139 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-04-28 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review56807
---



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment39653

can you name them kPage to make it more clear they are some kind of special 
value (i.e. a constant)?



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment39652

These occurrences of 6 and 12 should be replaced by your new static too.



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment39650

We don't need this, do we?



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment39651

Maybe add a break inside the if so we don't continue looping?


- Albert Astals Cid


On March 18, 2014, 5:59 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated March 18, 2014, 5:59 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 010e9de 
   part.cpp 4ce7e28 
   part.rc 60f86e5 
   shell/shell.h 3b9aae0 
   shell/shell.cpp 01a9f1b 
   ui/pageview.h 577b908 
   ui/pageview.cpp dd41994 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-03-18 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated March 18, 2014, 5:59 a.m.)


Review request for Okular and Albert Astals Cid.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs (updated)
-

  part.h 010e9de 
  part.cpp 4ce7e28 
  part.rc 60f86e5 
  shell/shell.h 3b9aae0 
  shell/shell.cpp 01a9f1b 
  ui/pageview.h 577b908 
  ui/pageview.cpp dd41994 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-03-17 Thread Albert Astals Cid


 On March 12, 2014, 9:42 p.m., Albert Astals Cid wrote:
  ui/pageview.cpp, line 4925
  https://git.reviewboard.kde.org/r/115283/diff/5/?file=245959#file245959line4925
 
  please move the declaration inside the foreach
 
 Saheb Preet Singh wrote:
 If I would move pageItem inside foreach declaration then i might not be 
 able to use it outside the foreach loop for getting the uncropped width and 
 height. How should I go about that???

That way of using the foreach has two problems:
 * If there's pageItems it'll crash since you'll use uninitizlied memory
 * If there's no visible pageItem it'll use the last one

Please move the declaration of the iterator to the foreach and use a 
different pageItem variable that is initialzed to null in the beginning of the 
function and set to non null in the if that has the break.


- Albert


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review52845
---


On Feb. 25, 2014, 7:02 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Feb. 25, 2014, 7:02 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 6df835b 
   part.cpp 283e91a 
   part.rc 0b9cee5 
   shell/shell.h 3b9aae0 
   shell/shell.cpp 8226153 
   ui/pageview.h 9c15af6 
   ui/pageview.cpp 65967bf 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-03-16 Thread Saheb Preet Singh


 On March 12, 2014, 9:42 p.m., Albert Astals Cid wrote:
  ui/pageview.cpp, line 4925
  https://git.reviewboard.kde.org/r/115283/diff/5/?file=245959#file245959line4925
 
  please move the declaration inside the foreach

If I would move pageItem inside foreach declaration then i might not be able to 
use it outside the foreach loop for getting the uncropped width and height. How 
should I go about that???


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review52845
---


On Feb. 25, 2014, 7:02 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Feb. 25, 2014, 7:02 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 6df835b 
   part.cpp 283e91a 
   part.rc 0b9cee5 
   shell/shell.h 3b9aae0 
   shell/shell.cpp 8226153 
   ui/pageview.h 9c15af6 
   ui/pageview.cpp 65967bf 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-03-12 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review52845
---



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment37220

can you give the variable a better name? singlePageViewMode maybe?



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment37219

spacing is wrong



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment37218

please move the declaration inside the foreach



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment37217

Should this todo be removed now that you're disabling the action?


- Albert Astals Cid


On Feb. 25, 2014, 7:02 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Feb. 25, 2014, 7:02 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 6df835b 
   part.cpp 283e91a 
   part.rc 0b9cee5 
   shell/shell.h 3b9aae0 
   shell/shell.cpp 8226153 
   ui/pageview.h 9c15af6 
   ui/pageview.cpp 65967bf 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-02-25 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review50878
---


Ok, let's disable in facing / review mode

- Albert Astals Cid


On Feb. 25, 2014, 7:02 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Feb. 25, 2014, 7:02 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 6df835b 
   part.cpp 283e91a 
   part.rc 0b9cee5 
   shell/shell.h 3b9aae0 
   shell/shell.cpp 8226153 
   ui/pageview.h 9c15af6 
   ui/pageview.cpp 65967bf 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-02-15 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review49827
---


You don't seem to be progressing much so i decided to do part of the work, 
please get http://paste.kde.org/pemrn4nyo and finish the TODOs

- Albert Astals Cid


On Feb. 11, 2014, 10:53 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Feb. 11, 2014, 10:53 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 6df835b 
   part.cpp 283e91a 
   part.rc 0b9cee5 
   shell/shell.h 3b9aae0 
   shell/shell.cpp 8226153 
   ui/pageview.h 9c15af6 
   ui/pageview.cpp 65967bf 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-02-11 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated Feb. 11, 2014, 10:53 a.m.)


Review request for Okular and Albert Astals Cid.


Changes
---

rebased the patch with current code.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs (updated)
-

  part.h 6df835b 
  part.cpp 283e91a 
  part.rc 0b9cee5 
  shell/shell.h 3b9aae0 
  shell/shell.cpp 8226153 
  ui/pageview.h 9c15af6 
  ui/pageview.cpp 65967bf 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-02-09 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review49391
---


The patch does not cleanly apply on master anymore. Can you please rebase it?

- Albert Astals Cid


On Jan. 28, 2014, 3:09 p.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Jan. 28, 2014, 3:09 p.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 4b3aafd 
   part.cpp 88e2c41 
   part.rc 6b1f44e 
   shell/shell.h c065c56 
   shell/shell.cpp 1708501 
   ui/pageview.h 9c15af6 
   ui/pageview.cpp 65967bf 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-01-28 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated Jan. 28, 2014, 3:09 p.m.)


Review request for Okular and Albert Astals Cid.


Changes
---

eliminated spaces from signals and slots.

chained signal flow in part.cpp.

disabled fit page to view when continuous mode is checked.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs (updated)
-

  part.h 4b3aafd 
  part.cpp 88e2c41 
  part.rc 6b1f44e 
  shell/shell.h c065c56 
  shell/shell.cpp 1708501 
  ui/pageview.h 9c15af6 
  ui/pageview.cpp 65967bf 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-01-27 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated Jan. 27, 2014, 8:21 a.m.)


Review request for Okular and Albert Astals Cid.


Changes
---

fixed above stated issues.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs (updated)
-

  ui/pageview.cpp 65967bf 
  shell/shell.cpp 1708501 
  ui/pageview.h 9c15af6 
  shell/shell.h c065c56 
  part.rc 6b1f44e 
  part.h 4b3aafd 
  part.cpp 88e2c41 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-01-27 Thread Saheb Preet Singh


 On Jan. 24, 2014, 7:24 p.m., Albert Astals Cid wrote:
  I don't think there's any problem with resizing, i'd say it's only your 
  math that is wrong
  int xOffset = pageViewSize.width() - pageSize.width();
  int yOffset = pageViewSize.height() - pageSize.height();
  resize( width() - xOffset, height() - yOffset );
  seems to be what you should really be doing, it doesn't perfectly work, but 
  it may just be because the sizes you're using are not the correct.
  
  Also I think this feature only makes sense when you're in non continuous 
  view.
 

Probably the arguments of resize function would be same in both cases ( in 
yours as well as mine ).
width() - xOffset = width() - pageViewSize.width() + pageSize.width(), when 
xOffset = pageViewSize.width() - pageSize.width();
pageSize.width() + xOffset = width() - pageViewSize.width() + pageSize.width(), 
when xOffset = width() - pageViewSize.width();
same in the case of height.

I changed the implementation as you have stated above.

The feature is not working perfectly because the xOffset (width other than 
pageViewSize) is changing with window's size whereas here xOffset and yOffsets 
are assumed to be constant. This mostly happens when thumbnails or toc etc. are 
open. I can't find out a way in which I can get the final size of these side 
widgets when the window will be resized or some porportionality factor with 
which there width is changing with respect to the whole window.


But the problem that I have stated above persists on my laptop. Steps to 
reproduce the problem :-
== open okular and maximize the window.
== change the zoom level, preferably very large from the current zoom level or 
very small.
== select fit window to page option. Window will be restored but will not be 
resized.
== If nothing happens then move the window and then again select fit window to 
page. Now the window will be resized, even if size of window is changed or the 
window is maximized.


- Saheb


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review48238
---


On Jan. 27, 2014, 8:21 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Jan. 27, 2014, 8:21 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   ui/pageview.cpp 65967bf 
   shell/shell.cpp 1708501 
   ui/pageview.h 9c15af6 
   shell/shell.h c065c56 
   part.rc 6b1f44e 
   part.h 4b3aafd 
   part.cpp 88e2c41 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-01-27 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

(Updated Jan. 27, 2014, 8:24 a.m.)


Review request for Okular and Albert Astals Cid.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs
-

  ui/pageview.cpp 65967bf 
  shell/shell.cpp 1708501 
  ui/pageview.h 9c15af6 
  shell/shell.h c065c56 
  part.rc 6b1f44e 
  part.h 4b3aafd 
  part.cpp 88e2c41 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-01-27 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review48420
---



part.cpp
https://git.reviewboard.kde.org/r/115283/#comment34245

signal() and slot() should not have spaces, it seems it makes the moc stuff 
a bit slower for no reason, see how we have the spaces collapsed in all the 
other connect()s



part.cpp
https://git.reviewboard.kde.org/r/115283/#comment34244

You don't need this, you can just chain signal to signal in the connect 
statement



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment34246

I'd prefer we disabled/enabled the action depending if we are in continuous 
mode or not, otherwise you end up with an enabled action that does nothing. 
That is pretty bad user wise.


- Albert Astals Cid


On Jan. 27, 2014, 8:24 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Jan. 27, 2014, 8:24 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   ui/pageview.cpp 65967bf 
   shell/shell.cpp 1708501 
   ui/pageview.h 9c15af6 
   shell/shell.h c065c56 
   part.rc 6b1f44e 
   part.h 4b3aafd 
   part.cpp 88e2c41 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


Re: [Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-01-24 Thread Albert Astals Cid

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/#review48238
---


I don't think there's any problem with resizing, i'd say it's only your math 
that is wrong
int xOffset = pageViewSize.width() - pageSize.width();
int yOffset = pageViewSize.height() - pageSize.height();
resize( width() - xOffset, height() - yOffset );
seems to be what you should really be doing, it doesn't perfectly work, but it 
may just be because the sizes you're using are not the correct.

Also I think this feature only makes sense when you're in non continuous view.



part.h
https://git.reviewboard.kde.org/r/115283/#comment34126

const  in both params



part.h
https://git.reviewboard.kde.org/r/115283/#comment34127

spacing is off



part.cpp
https://git.reviewboard.kde.org/r/115283/#comment34128

can't you just use size() ?



part.rc
https://git.reviewboard.kde.org/r/115283/#comment34132

You need to increaase the version



part.rc
https://git.reviewboard.kde.org/r/115283/#comment34133

You should add some code somewhere to enable/disable the action only then 
there's a document open



shell/shell.cpp
https://git.reviewboard.kde.org/r/115283/#comment34129

const  in both params



ui/pageview.h
https://git.reviewboard.kde.org/r/115283/#comment34130

this can probably be const



ui/pageview.cpp
https://git.reviewboard.kde.org/r/115283/#comment34131

this for loop needs spacing and {}, actually you may even use a foreach and 
save yourself the need to declare the iterators


- Albert Astals Cid


On Jan. 24, 2014, 7:50 a.m., Saheb Preet Singh wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/115283/
 ---
 
 (Updated Jan. 24, 2014, 7:50 a.m.)
 
 
 Review request for Okular and Albert Astals Cid.
 
 
 Bugs: 326844
 http://bugs.kde.org/show_bug.cgi?id=326844
 
 
 Repository: okular
 
 
 Description
 ---
 
 okular do not have a feature to resize the current window to the current page 
 size.
 
 The bug is solved upto some extent, the window is resizing as desired.
 
 resize method of qwidget class is used to resize 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 the 
 zoom level is changed, 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
 
 Also, there is one more issue, the fit window to page button in the view menu 
 is enabled by default. It should not be enabled when no document is open. 
 Where should the code for enabling this button should be implemented.
 
 
 Diffs
 -
 
   part.h 4b3aafd 
   part.cpp 88e2c41 
   part.rc 6b1f44e 
   shell/shell.h c065c56 
   shell/shell.cpp 1708501 
   ui/pageview.h 9c15af6 
   ui/pageview.cpp 65967bf 
 
 Diff: https://git.reviewboard.kde.org/r/115283/diff/
 
 
 Testing
 ---
 
 
 tested when
 == window is maximized and restored.
 == thumbnails, table of content are opened and closed.
 == various toolbars are shown and hidden.
 == for all the zoom levels shown in the toolbar and custom zoom level ( 
 example 123.23% ).
 
 
 Thanks,
 
 Saheb Preet Singh
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


[Okular-devel] Review Request 115283: implemented a feature in okular to resize window to current page size.

2014-01-23 Thread Saheb Preet Singh

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115283/
---

Review request for Okular and Albert Astals Cid.


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


Repository: okular


Description
---

okular do not have a feature to resize the current window to the current page 
size.

The bug is solved upto some extent, the window is resizing as desired.

resize method of qwidget class is used to resize 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 the zoom 
level is changed, 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

Also, there is one more issue, the fit window to page button in the view menu 
is enabled by default. It should not be enabled when no document is open. Where 
should the code for enabling this button should be implemented.


Diffs
-

  part.h 4b3aafd 
  part.cpp 88e2c41 
  part.rc 6b1f44e 
  shell/shell.h c065c56 
  shell/shell.cpp 1708501 
  ui/pageview.h 9c15af6 
  ui/pageview.cpp 65967bf 

Diff: https://git.reviewboard.kde.org/r/115283/diff/


Testing
---


tested when
== window is maximized and restored.
== thumbnails, table of content are opened and closed.
== various toolbars are shown and hidden.
== for all the zoom levels shown in the toolbar and custom zoom level ( 
example 123.23% ).


Thanks,

Saheb Preet Singh

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel