group_box: Fix incorrect h_full in GroupBox. (#1253)
Also fix the notifications example.
This commit is contained in:
parent
5ddaa9f5aa
commit
3c39641486
2 changed files with 6 additions and 5 deletions
|
|
@ -1,13 +1,13 @@
|
|||
use gpui::{
|
||||
div, App, AppContext, Context, Entity, FocusHandle, Focusable, InteractiveElement as _,
|
||||
IntoElement, ParentElement, Render, Styled, Window,
|
||||
App, AppContext, Context, Entity, FocusHandle, Focusable, InteractiveElement as _, IntoElement,
|
||||
ParentElement, Render, Styled, Window,
|
||||
};
|
||||
|
||||
use gpui_component::{
|
||||
button::{Button, ButtonVariants},
|
||||
notification::{Notification, NotificationType},
|
||||
text::TextView,
|
||||
ContextModal as _,
|
||||
v_flex, ContextModal as _,
|
||||
};
|
||||
|
||||
use crate::section;
|
||||
|
|
@ -57,10 +57,11 @@ impl Focusable for NotificationStory {
|
|||
|
||||
impl Render for NotificationStory {
|
||||
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
div()
|
||||
v_flex()
|
||||
.id("notification-story")
|
||||
.track_focus(&self.focus_handle)
|
||||
.size_full()
|
||||
.gap_3()
|
||||
.child(
|
||||
section("Simple Notification").child(
|
||||
Button::new("show-notify-0")
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ impl RenderOnce for GroupBox {
|
|||
|
||||
v_flex()
|
||||
.id(self.id.unwrap_or("group-box".into()))
|
||||
.size_full()
|
||||
.w_full()
|
||||
.when(has_paddings, |this| this.gap_3())
|
||||
.when(!has_paddings, |this| this.gap_4())
|
||||
.refine_style(&self.style)
|
||||
|
|
|
|||
Loading…
Reference in a new issue