omz / Pythonista-Issues

Issue tracker for Pythonista (iOS)
169 stars 14 forks source link

Present style= 'sheet' the corner_radius of the view can not be defined #152

Closed Phuket2 closed 7 years ago

Phuket2 commented 8 years ago

I am not sure you should be able to define the corner_radius of a sheet. But it would be helpful if you could . Eg, if you try to make a std view in a sheet, the corner_radius gets in the way. On the bottom of the view, also on the top of the view if you set 'hide_title_bar' = True. I can see why sheet is like this for iOS. But I think in Pythonista the sheet can be thought of a little differently. Meaning people may choose to implement a full interface in a sheet view, I am guessing this never happens in iOS.
But the below is not nice.

class UIToolBar(ui.View):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.border_color = self.tint_color
        self.border_width = 1

    def layout(self):
        if self.superview:
            sv = self.superview
            self.width = sv.bounds.width
            self.height = 44
            self.x = sv.bounds.min_y
            self.y = self.superview.bounds.max_y - self.height 
            #self.corner_radius = 14
zrzka commented 7 years ago

I think that Pythonista sheets should behave in the same way as iOS sheets do. Closing this one.