Skip to content

Commit f9affaa

Browse files
committed
Apply SubtitleLabel Style in DisplaySubtitleCheckBox_CheckedChange
1 parent 5291c0e commit f9affaa

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Silhouette.b4j

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,9 +1261,9 @@ End Sub
12611261

12621262
private Sub UpdateSubtitleLabel
12631263
If DisplaySubtitleCheckBox.Checked Then
1264-
SubtitleLabel.Style = Utils.getPref("subtitle_css",$"-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,1.0) , 1, 1 , 0 , 0 );"$)
12651264
Dim line As Map = currentProject.GetLine(selectedRowID - 1)
12661265
SubtitleLabel.Text = line.Get("source")&CRLF&line.Get("target")
1266+
ApplySubtitleLabelStyle
12671267
End If
12681268
End Sub
12691269

@@ -2907,9 +2907,14 @@ Private Sub DisplaySubtitleCheckBox_CheckedChange(Checked As Boolean)
29072907
Dim jo As JavaObject = SubtitleLabel
29082908
jo.RunMethod("setTextAlignment", Array("CENTER"))
29092909
SubtitleLabel.Visible = Checked
2910+
ApplySubtitleLabelStyle
2911+
End Sub
2912+
2913+
private Sub ApplySubtitleLabelStyle
29102914
If Utils.getPrefMap.ContainsKey("subtitle_font_size") Then
29112915
SubtitleLabel.Font = fx.DefaultFont(Utils.getPref("subtitle_font_size",16))
29122916
End If
2917+
SubtitleLabel.Style = Utils.getPref("subtitle_css",$"-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,1.0) , 1, 1 , 0 , 0 );"$)
29132918
End Sub
29142919

29152920
private Sub AddKeyEventListener(n As Node)

0 commit comments

Comments
 (0)