parent
118a0f500e
commit
36b229068d
2 changed files with 12 additions and 3 deletions
|
|
@ -359,7 +359,8 @@ impl Render for DialogStory {
|
|||
.on_click(cx.listener(move |_, _, window, cx| {
|
||||
window.open_dialog(cx, move |dialog, window, cx| {
|
||||
dialog
|
||||
.h(px(450.))
|
||||
.w(px(720.))
|
||||
.h(px(600.))
|
||||
.overlay(dialog_overlay)
|
||||
.overlay_closable(overlay_closable)
|
||||
.title("Dialog with scrollbar")
|
||||
|
|
|
|||
|
|
@ -231,6 +231,14 @@ impl Dialog {
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the width of the dialog, defaults to 480px.
|
||||
///
|
||||
/// See also [`Self::width`]
|
||||
pub fn w(mut self, width: Pixels) -> Self {
|
||||
self.width = width;
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the width of the dialog, defaults to 480px.
|
||||
pub fn width(mut self, width: Pixels) -> Self {
|
||||
self.width = width;
|
||||
|
|
@ -502,7 +510,7 @@ impl RenderOnce for Dialog {
|
|||
.id("contents")
|
||||
.pl(paddings.left)
|
||||
.pr(paddings.right)
|
||||
.overflow_scrollbar()
|
||||
.overflow_y_scrollbar()
|
||||
.child(self.content),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue