Opened 3 years ago

Closed 14 months ago

Last modified 14 months ago

#14087 closed defect (fixed)

wxAUI on Mac - wrong sizing of wxRadioBox when docked

Reported by: craigstark Owned by: csomor
Priority: normal Milestone: 3.0.0
Component: wxOSX (any toolkit) Version: 2.9.5
Keywords: Cc: lsoltero@…
Blocked By: Blocking:
Patch: no

Description

The attached screencaps show the issue. This pane is created entirely with standard sizers and shows in the floating format just fine on the Mac (Carbon). When docked, however, the wxRadioBox elements shrink. The size of the pane remains the same - just the RadioBox items are improperly sized. The same code on Windows shows the expected behavior.

Attachments (6)

Screen shot 2012-03-10 at 3.36.44 PM.jpg download (64.7 KB) - added by craigstark 3 years ago.
Mac - undocked
Screen shot 2012-03-10 at 3.36.56 PM.jpg download (41.1 KB) - added by craigstark 3 years ago.
Mac - docked
Screen shot 2012-03-10 at 3.37.28 PM.jpg download (34.5 KB) - added by craigstark 3 years ago.
Windows - docked
auidemo.diff download (1.1 KB) - added by craigstark 3 years ago.
Screen Shot 2013-08-06 at 7.42.45 AM.png download (97.7 KB) - added by lsoltero 17 months ago.
wxRadioBox in Wizard
Screen Shot 2013-08-06 at 7.43.12 AM.png download (96.1 KB) - added by lsoltero 17 months ago.
wxRadioBox in PropertySheet

Download all attachments as: .zip

Change History (17)

Changed 3 years ago by craigstark

Mac - undocked

Changed 3 years ago by craigstark

Mac - docked

Changed 3 years ago by craigstark

Windows - docked

comment:1 Changed 3 years ago by vadz

  • Component changed from wxAui to wxOSX-Carbon
  • Summary changed from wxAUI on Mac - strange sizing of RadioBox when docked to wxAUI on Mac - wrong sizing of wxRadioBox when docked

As usual, it would be great to have a reproducible test case for this, e.g. a patch to the aui sample.

Otherwise I can only guess that there is a problem in DoGetBestSize() implementation in src/osx/radiobox_osx.cpp but I don't see what could it be. Perhaps you could try to debug the height calculations there?

Finally, it would be also interesting to test this with wxOSX/Cocoa.

Changed 3 years ago by craigstark

comment:2 Changed 3 years ago by craigstark

Sorry - I didn't have a chance to put together a patch of the demo to show it before. I've put one up here now. Starting up, the new dialog will correctly be sized and on the lower-left. Pull it off and all is fine. But put it back and you'll see the issue. I can't test it well under Cocoa as you can't re-dock something under Cocoa (another bug report is in on that).

Craig

comment:3 Changed 3 years ago by csomor

  • Status changed from new to infoneeded_new

is the redocking still not solved in svn trunk ? I've rewritten the mouse handling there ..

comment:4 Changed 3 years ago by craigstark

  • Status changed from infoneeded_new to new

It does not appear to be fixed in the SVN, no.

comment:5 Changed 3 years ago by csomor

ok, found #14086, I'll look at it

comment:6 Changed 3 years ago by craigstark

FWIW, with #14086 fixed (and thus working on the current revision) the sizing bug remains.

comment:7 Changed 3 years ago by csomor

  • Owner set to csomor
  • Status changed from new to accepted

Changed 17 months ago by lsoltero

wxRadioBox in Wizard

Changed 17 months ago by lsoltero

wxRadioBox in PropertySheet

comment:8 Changed 17 months ago by lsoltero

  • Cc lsoltero@… added
  • Component changed from wxOSX-Carbon to wxOSX (any toolkit)
  • Version changed from 2.9.3 to 2.9.5

having the same issue when using wxRadioBox in wizards and property sheets using wxOSX/Cocoa and wxWidgets 2.9.5.

i have attached screen shots depicting the issue.

here is a link to the forum with more details.

http://forums.wxwidgets.org/viewtopic.php?f=1&t=37826

comment:9 Changed 17 months ago by vadz

  • Milestone set to 3.0

It looks like the radio box doesn't use the correct font, doesn't it?

In any case, it would be definitely great to fix this in time for 3.0, it's a pretty bad (as very user-visible) breakage.

comment:10 Changed 14 months ago by VZ

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [75148]) Fix positioning of radio buttons inside wxOSX radio boxes in some cases.

If the previous radio box size was too small (notably (0,0) as it happened
during AUI relayout), the buttons were positioned without taking the box
margins into account, resulting in visually broken display.

Recompute the full size after setting the new size but before positioning the
buttons in wxRadioBox::DoSetSize() to avoid this.

Closes #14087.

comment:11 Changed 14 months ago by VZ

(In [75149]) Fix positioning of radio buttons inside wxOSX radio boxes in some cases.

If the previous radio box size was too small (notably (0,0) as it happened
during AUI relayout), the buttons were positioned without taking the box
margins into account, resulting in visually broken display.

Recompute the full size after setting the new size but before positioning the
buttons in wxRadioBox::DoSetSize() to avoid this.

Closes #14087.

Note: See TracTickets for help on using tickets.