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| {
|
.on_click(cx.listener(move |_, _, window, cx| {
|
||||||
window.open_dialog(cx, move |dialog, window, cx| {
|
window.open_dialog(cx, move |dialog, window, cx| {
|
||||||
dialog
|
dialog
|
||||||
.h(px(450.))
|
.w(px(720.))
|
||||||
|
.h(px(600.))
|
||||||
.overlay(dialog_overlay)
|
.overlay(dialog_overlay)
|
||||||
.overlay_closable(overlay_closable)
|
.overlay_closable(overlay_closable)
|
||||||
.title("Dialog with scrollbar")
|
.title("Dialog with scrollbar")
|
||||||
|
|
|
||||||
|
|
@ -231,6 +231,14 @@ impl Dialog {
|
||||||
self
|
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.
|
/// Sets the width of the dialog, defaults to 480px.
|
||||||
pub fn width(mut self, width: Pixels) -> Self {
|
pub fn width(mut self, width: Pixels) -> Self {
|
||||||
self.width = width;
|
self.width = width;
|
||||||
|
|
@ -502,7 +510,7 @@ impl RenderOnce for Dialog {
|
||||||
.id("contents")
|
.id("contents")
|
||||||
.pl(paddings.left)
|
.pl(paddings.left)
|
||||||
.pr(paddings.right)
|
.pr(paddings.right)
|
||||||
.overflow_scrollbar()
|
.overflow_y_scrollbar()
|
||||||
.child(self.content),
|
.child(self.content),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue