Fix label text align not work (#111)
<img width="1668" alt="image" src="https://github.com/user-attachments/assets/e1bbad88-40c3-4701-bfd0-38381e2ed67b">
This commit is contained in:
parent
f3fdfae002
commit
bc4e5732a0
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ use gpui::{
|
|||
Styled, WindowContext,
|
||||
};
|
||||
|
||||
use crate::theme::ActiveTheme;
|
||||
use crate::{h_flex, theme::ActiveTheme};
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum TextAlign {
|
||||
|
|
@ -25,7 +25,7 @@ pub struct Label {
|
|||
impl Label {
|
||||
pub fn new(label: impl Into<SharedString>) -> Self {
|
||||
Self {
|
||||
base: div().line_height(rems(1.25)),
|
||||
base: h_flex().line_height(rems(1.25)),
|
||||
label: label.into(),
|
||||
multiple_lines: true,
|
||||
align: TextAlign::default(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue