]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Word wrap for vote titles (#31248)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Wed, 21 Aug 2024 14:50:49 +0000 (16:50 +0200)
committerGitHub <noreply@github.com>
Wed, 21 Aug 2024 14:50:49 +0000 (10:50 -0400)
Content.Client/Voting/UI/VotePopup.xaml
Content.Client/Voting/UI/VotePopup.xaml.cs

index 39817bd553f95610bbc81b717930aaf215cbdf36..fd40d7b790c591663227a5cf7583f516add1e598 100644 (file)
@@ -1,8 +1,8 @@
-<Control xmlns="https://spacestation14.io" MinWidth="300">
+<Control xmlns="https://spacestation14.io" MinWidth="300" MaxWidth="500">
     <PanelContainer StyleClasses="AngleRect" />
     <BoxContainer Margin="4" Orientation="Vertical">
         <Label Name="VoteCaller" />
-        <Label Name="VoteTitle" />
+        <RichTextLabel Name="VoteTitle" />
 
         <GridContainer Columns="3" Name="VoteOptionsContainer" />
         <BoxContainer Orientation="Horizontal">
index e82675eeba6740a61794400a91f1f32271b2659d..6bcd18165a11e3b36d573bdc7988c498a1aaeae2 100644 (file)
@@ -8,6 +8,7 @@ using Robust.Shared.IoC;
 using Robust.Shared.Localization;
 using Robust.Shared.Maths;
 using Robust.Shared.Timing;
+using Robust.Shared.Utility;
 
 namespace Content.Client.Voting.UI
 {
@@ -48,7 +49,7 @@ namespace Content.Client.Voting.UI
 
         public void UpdateData()
         {
-            VoteTitle.Text = _vote.Title;
+            VoteTitle.SetMessage(FormattedMessage.FromUnformatted(_vote.Title));
             VoteCaller.Text = Loc.GetString("ui-vote-created", ("initiator", _vote.Initiator));
 
             for (var i = 0; i < _voteButtons.Length; i++)