mirror of
https://github.com/penpot/penpot.git
synced 2026-03-13 22:08:27 +00:00
🐛 Fix auto-width/fixed-width regression
This commit is contained in:
@@ -334,8 +334,6 @@
|
||||
:on-cut on-cut
|
||||
:on-focus on-focus
|
||||
:on-blur on-blur
|
||||
;; FIXME on-click
|
||||
;; :on-click on-click
|
||||
:id "text-editor-wasm-input"
|
||||
:class (dm/str (cur/get-dynamic "text" (:rotation shape))
|
||||
" "
|
||||
|
||||
@@ -673,7 +673,7 @@ impl TextContent {
|
||||
});
|
||||
|
||||
let size = TextContentSize::new_with_normalized_line_height(
|
||||
width,
|
||||
width.ceil(),
|
||||
paragraph_height.ceil(),
|
||||
DEFAULT_TEXT_CONTENT_SIZE,
|
||||
normalized_line_height,
|
||||
@@ -708,12 +708,12 @@ impl TextContent {
|
||||
pub fn set_layout_from_result(
|
||||
&mut self,
|
||||
result: TextContentLayoutResult,
|
||||
default_height: f32,
|
||||
default_width: f32,
|
||||
default_height: f32,
|
||||
) {
|
||||
self.layout.set(result.0, result.1);
|
||||
self.size
|
||||
.copy_finite_size(result.2, default_height, default_width);
|
||||
.copy_finite_size(result.2, default_width, default_height);
|
||||
}
|
||||
|
||||
pub fn update_layout(&mut self, selrect: Rect) -> TextContentSize {
|
||||
|
||||
@@ -308,7 +308,6 @@ pub extern "C" fn set_shape_text_content() -> crate::error::Result<()> {
|
||||
#[no_mangle]
|
||||
pub extern "C" fn set_shape_grow_type(grow_type: u8) {
|
||||
let grow_type = RawGrowType::from(grow_type);
|
||||
|
||||
with_current_shape_mut!(state, |shape: &mut Shape| {
|
||||
if let Type::Text(text_content) = &mut shape.shape_type {
|
||||
text_content.set_grow_type(GrowType::from(grow_type));
|
||||
|
||||
Reference in New Issue
Block a user