[haiku-commits] Re: haiku: hrev45690 - src/kits/interface

  • From: Siarzhuk Zharski <zharik@xxxxxx>
  • To: <haiku-commits@xxxxxxxxxxxxx>
  • Date: Thu, 16 May 2013 23:02:10 +0200

jscipione@xxxxxxxxx писал 16.05.2013 02:05:
hrev45690 adds 1 changeset to branch 'master'
old head: ad6158096cc2a81e355597469c319b05a27eb7d8
new head: 01636e8f2af4878e9181ff1a18721494e5222e75
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=01636e8+%5Ead61580


01636e8: Adjust menu field's menu bar height in auto mode

On IRC diver pointed out to me that KeymapSwitcher had a menu field that was drawing as just a line since my recent change to BMenuField. I did a little research and discovered that this was because the menu field in KeymapSwitch was not using the layout APIs and it's frame rect was set to
  0 height.

  I did a little more research and experimented with menu fields in
BeOS R5. I discovered that in R5 if the menu field is set to auto-size mode then the menu bar inside ignores the height of the menu field frame
  and uses the BMenuBar's preferred height instead.

So, I adjusted the BMenuField code in Haiku accordingly. This should make Haiku match the behavior of BeOS R5 in auto-size mode. For fixed-size mode it should also work the same, although some more testing is needed to
  see if there are any regressions there.

I have just checked the Shortcut selector in KeymapSwitcher Settings in latest revision and found that now it looks like 1 pixel width _vertical_ line. Looks like not only height but width must be auto-resized too for non-layouted BMenuFields.

Kind Regards,

Other related posts: