1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:57:44 +00:00

FontEditor+ClipboardHistory: Use system-wide Clipboard

Glyphs can now be copied between editors.
This commit is contained in:
thankyouverycool 2021-04-07 12:07:46 -04:00 committed by Andreas Kling
parent ebf3ce7806
commit 08f11d01d9
3 changed files with 60 additions and 20 deletions

View file

@ -95,6 +95,18 @@ GUI::Variant ClipboardHistoryModel::data(const GUI::ModelIndex& index, GUI::Mode
builder.append("]");
return builder.to_string();
}
if (data_and_type.mime_type.starts_with("glyph/")) {
StringBuilder builder;
builder.append("[");
builder.append(data_and_type.metadata.get("width").value_or("?"));
builder.append("x");
builder.append(data_and_type.metadata.get("height").value_or("?"));
builder.append("] ");
builder.append("(");
builder.append(data_and_type.metadata.get("char").value_or(""));
builder.append(")");
return builder.to_string();
}
return "<...>";
case Column::Type:
return data_and_type.mime_type;