diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-12-04 21:25:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-12-04 21:26:27 +0100 |
| commit | cbd59509a766b46f36ce0886ac57d822bb8078ce (patch) | |
| tree | 2844fcb64b920d008eabfcf7f5c4f609b6cde48f /src | |
| parent | addd5e1625fce3477736b54356f0edeaa0f6cc5d (diff) | |
Omit valign properties when they are the default.
This is already done for halign.
Diffstat (limited to 'src')
| -rw-r--r-- | src/subtitle_asset_internal.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/subtitle_asset_internal.cc b/src/subtitle_asset_internal.cc index f88a051a..484e75ac 100644 --- a/src/subtitle_asset_internal.cc +++ b/src/subtitle_asset_internal.cc @@ -183,10 +183,12 @@ position_align (xmlpp::Element* e, order::Context& context, HAlign h_align, floa } } - if (context.standard == Standard::SMPTE) { - e->set_attribute ("Valign", valign_to_string (v_align)); - } else { - e->set_attribute ("VAlign", valign_to_string (v_align)); + if (v_align != VAlign::CENTER) { + if (context.standard == Standard::SMPTE) { + e->set_attribute("Valign", valign_to_string(v_align)); + } else { + e->set_attribute("VAlign", valign_to_string(v_align)); + } } if (fabs(v_position) > ALIGN_EPSILON) { |
