Ask / Submit
6

ComboBox with >6 menuItems always opens in portrait orientation

asked 2014-07-09 23:32:05 +0200

mholo65 gravatar image

updated 2014-07-09 23:32:42 +0200

Silica ComboBox with >6 menuItems always opens in portrait orientation. This can be reproduced by adding allowedOrientations to Orientation.All in ComboBox page in ComponentGallery Demo.

Is there a quick fix for this or should I start hacking the Silica ComboBox implementation?

edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted
4

answered 2019-03-16 21:33:27 +0200

rinigus gravatar image

In SFOS 3, ComboBox fails to open at all in landscape if

  • combobox has many items
  • page allows landscape orientation using its allowedOrientations property
  • user had page oriented in landscape when pressing combobox selector

As a result, user will get empty page. Affected applications are Pure Maps, OSM Scout Server, Webcat. Issue reported by @XOleg at TMO.

As a workaround, one can specify

_defaultPageOrientations: defaultAllowedOrientations

for the application. Without this internal property set, combobox doesn't work. Its clearly a bug in Silica, please fix.

edit flag offensive delete publish link more
1

answered 2019-03-04 21:18:37 +0200

I've stumbled upon the same issue and it looks like it's pretty easy to fix: just change _page to comboBox._page at ComboBox.qml:231.

allowedOrientations: _page ? _page.allowedOrientations : Orientation.All

to

allowedOrientations: comboBox._page ? comboBox._page.allowedOrientations : Orientation.All

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2014-07-09 23:32:05 +0200

Seen: 333 times

Last updated: Mar 16