Skip to content

Commit

Permalink
Close #3. implement outlined text
Browse files Browse the repository at this point in the history
  • Loading branch information
vincemann committed Jan 5, 2021
1 parent 950b9b8 commit 261b51a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public class MovieStageController extends AbstractStageController implements Mov

private static final String BLUE_HALF_TRANSPARENT_BACK_GROUND_STYLE = "-fx-background-color: rgba(0, 100, 100, 0.51); -fx-background-radius: 10;";
private static final String TRANSPARENT_BACKGROUND_STYLE = "-fx-background-color: transparent;";
public static final String OUTLINED_TEXT_STYLE = /*"color: #ff0;"+*/
// "text-shadow: 3px 0 0 #000, 0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000;";
// "-fx-fill: lightseagreen;\n"+
"-fx-stroke: black;\n"+
"-fx-stroke-width: 2px;\n";


@FXML
private VBox movieVBox;
Expand Down Expand Up @@ -203,6 +209,7 @@ public void displaySubtitle(SubtitleText subtitleText) {

log.trace("setting fontcolor: "+ srtFontManager.getFontColor());
text.setFill(srtFontManager.getFontColor());
text.setStyle(OUTLINED_TEXT_STYLE);
movieTextFlow.getChildren().add(text);
movieTextFlow.getChildren().add(new Text(System.lineSeparator()));
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
userDefaultFontPath = fonts/Aileron-Black.otf
userFontSize = 40.0
#rgb
#rgb for white
userFontColor =0xe6e6e6ff

#fonts path that user wants
#user set fonts path
fontsPath = fonts
updaterDelay = 300
lastPath = ""
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/test-application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ defaultSubtitle = ###
#big so io.github.vincemann.gui tests dont click next to text cause its too small
settingsFontSize = 40
fastForwardDelta = 500
userFontColor = 0xccccccff
userDefaultFontPath = /home/root_user/projekte/std/SubtitleDisplayerSimple/fonts/Amaranth.ttf
userFontColor = 0x4d4d4dff
userDefaultFontPath = /home/vince/.local/share/x11docker/local-idea/projekte/important/Subtitle-Buddy/fonts/Aileron-Black.otf
nextClickHotKeyToggled = false
userMovieTextPosition = 0.0:0.0
startStopHotKeyToggled = false
Expand Down

0 comments on commit 261b51a

Please sign in to comment.