Opened 15 years ago

Closed 12 years ago

#4146 closed bug (fixed)

Magnify doesn't resize nicely

Reported by: atmartens Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/Magnify Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

If you make the magnify program small enough, the text runs too far outside the window, and the option button covers some of the text.

Attachments (3)

magnify-resize.png (209.8 KB ) - added by atmartens 15 years ago.
The magnify program doesn't resize as it should
magnify.diff (2.2 KB ) - added by negusnyul 14 years ago.
0001-Fixes-ticket-4146.patch (5.5 KB ) - added by negusnyul 12 years ago.

Download all attachments as: .zip

Change History (15)

by atmartens, 15 years ago

Attachment: magnify-resize.png added

The magnify program doesn't resize as it should

comment:1 by anevilyak, 15 years ago

Component: - GeneralApplications/Magnify

comment:2 by negusnyul, 14 years ago

I attached a patch that automatically hides/shows the information text if needed.

Other solution: place B_AUTO_UPDATE_SIZE_LIMITS in the window constructor

however, thats not the best solution because the user cannot resize the window smaller than the default size - this is why I don't use it in the patch

by negusnyul, 14 years ago

Attachment: magnify.diff added

comment:3 by negusnyul, 14 years ago

patch: 01

comment:4 by axeld, 13 years ago

Sorry for the very late reply; your patch has two issues that would need to be solved (I even tried, but the Magnify code is quite scary):

  • When closing the window while the info is not visible due to the size, it will lose the setting.
  • You make members public to get the preferred size of the widget. While that kind of fits to the coding style within Magnify, it would be much better to actually implement GetPreferredSize() for the info view instead, and use that (including the height of the window) to judge whether or not the info view should be visible.

comment:5 by axeld, 13 years ago

patch: 10

comment:6 by negusnyul, 13 years ago

Thanks for the reply, I will solve the mentioned issues eventually and create a new patch when I'll have the time.

comment:7 by axeld, 13 years ago

Great, thanks! I didn't think you could be motivated to look into this again after that many month, it's appreciated, though!

by negusnyul, 12 years ago

comment:8 by negusnyul, 12 years ago

patch: 01

comment:9 by negusnyul, 12 years ago

It has been a long time but here is the new patch :)

(Created with git format-patch)

in reply to:  9 comment:10 by mmadia, 12 years ago

Replying to negusnyul:

It has been a long time but here is the new patch :)

(Created with git format-patch)

Ping, for a review. comment:4 mentions the concerns with the first patch.

comment:11 by korli, 12 years ago

Coding style issues:

  • isInfoTextVisible() method name should be capitalized
  • there is a space between the if and the parenthesis.
  • braces for a single line if or else block should be dropped (but not in UpdateInfoBarOnResize()).
  • the operator || shouldn't be last on a line.
  • TInfoView::GetPreferredSize() declaration variable names don't match the implementation ones.

comment:12 by mmadia, 12 years ago

Resolution: fixed
Status: newclosed

Thanks for the patch negusnyul! Applied in hrev45301, along with korli's code review.

Note: See TracTickets for help on using tickets.