Merge pull request #1338 from ramox81/codex/properties-hyperlink-control

Fix Properties hyperlink collection editing
This commit is contained in:
Hakan Seven committed 2026-09-18 18:52:37 +03:00
commit 37b24296d8
11 files changed
+272 -13

No files matched your search

+13
View File
@@ -854,6 +854,7 @@ impl PropertiesPanel {
PropValue::EditText(val) | PropValue::PlainText(val) => {
self.render_edit_row(label, prop.field, val)
}
PropValue::Hyperlink(val) => render_hyperlink_row(label, val),
PropValue::ReadOnly(val) if prop.field == "annotative_scale" => {
render_annotative_scale_row(label, val)
}
@@ -1892,6 +1893,18 @@ fn render_annotative_scale_row<'a>(
prop_row_widget(label, controls.into())
}
fn render_hyperlink_row<'a>(label: &'a str, value: &'a str) -> Element<'a, Message> {
let field = crate::ui::read_only::field(value, FONT_SZ, Length::Fill);
let manage = button(text("...").size(FONT_SZ))
.on_press(Message::PropHyperlinkOpen)
.style(button::secondary)
.padding([2, 7]);
let controls = row![field, manage, iced::widget::space().width(10)]
.spacing(2)
.align_y(iced::Center)
.width(Length::Fill);
prop_row_widget(label, controls.into())
}
fn render_ro_row<'a>(label: &'a str, value: &'a str) -> Element<'a, Message> {
// A read-only value is shown as a non-editable but selectable field: no
// on_input means the caret never appears, but the text can be selected