enthought / enthought/traitsui
Enum view (w/ custom style and EnumEditor) is compressed to less than its natural size on MacOS
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Using PyQt4 on a Mac, the view of an Enum with `style=custom` and a `EnumEditor` appears compressed:
### Example
```python
from traits.api import *
from traitsui.api import *
class Foo(HasTraits):
_enum_values = List(["alpha", "beta", "gamma"])
_enum_descriptions = Dict(Unicode(), Unicode())
selector = Enum(values="_enum_values")
traits_view = View(
HGroup(
UItem(
'selector',
style="custom",
editor=EnumEditor(name="_enum_descriptions")
),
show_border=True,
label="Foo"
)
)
def __enum_descriptions_default(self):
return dict(
(item, ", ".join([item]*4)) for item in self._enum_values
)
foo = Foo()
foo.configure_traits()
```
This looks like this (note the overlapping radio buttons):

If `resizable=True` is used for the `View`, it becomes apparent that the View can be enlarged to a more natural look (requires user action):

I don't have a mac, so I'm pinging @mdickinson who created the screenshots. Also pinging @flongford for information.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.