-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#187: adds simple app to provide a clean background for screencasts
- Loading branch information
1 parent
ab1ee1d
commit b185707
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="ScreenCastBackgroundApp" type="Application" factoryName="Application"> | ||
<option name="MAIN_CLASS_NAME" value="app.logorrr.docs.ScreenCastBackgroundApp" /> | ||
<module name="docs" /> | ||
<option name="VM_PARAMETERS" value="-Xmx4g -Djava.util.logging.config.file=develop-logging.properties -Djava.library.path=$PROJECT_DIR$/native/native-osx/target -Duser.language=en --module-path $PROJECT_DIR$/env/target/javafx-sdk-21.0.1/lib --add-modules javafx.controls,javafx.fxml --add-exports javafx.base/com.sun.javafx.binding=ALL-UNNAMED" /> | ||
<extension name="coverage"> | ||
<pattern> | ||
<option name="PATTERN" value="app.logorrr.docs.*" /> | ||
<option name="ENABLED" value="true" /> | ||
</pattern> | ||
</extension> | ||
<method v="2"> | ||
<option name="Make" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> |
40 changes: 40 additions & 0 deletions
40
docs/src/main/scala/app/logorrr/docs/ScreenCastBackgroundApp.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package app.logorrr.docs | ||
|
||
import app.logorrr.docs.Area._ | ||
import app.logorrr.util.CanLog | ||
import javafx.application.Application | ||
import javafx.geometry.Insets | ||
import javafx.scene.Scene | ||
import javafx.scene.layout.{Background, BackgroundFill, BorderPane} | ||
import javafx.scene.paint.Color | ||
import javafx.scene.shape.Rectangle | ||
import javafx.stage.Stage | ||
|
||
/** | ||
* White background for screencasts | ||
*/ | ||
object ScreenCastBackgroundApp { | ||
|
||
def main(args: Array[String]): Unit = { | ||
javafx.application.Application.launch(classOf[ScreenCastBackgroundApp], args: _*) | ||
} | ||
} | ||
|
||
class ScreenCastBackgroundApp extends javafx.application.Application with CanLog { | ||
|
||
def start(stage: Stage): Unit = { | ||
Application.setUserAgentStylesheet("/app/logorrr/LogoRRR.css") | ||
val s0 = R1280x800 | ||
|
||
val rectangle = new Rectangle(s0.width,s0.height) | ||
rectangle.setFill(Color.WHITE) | ||
val pane = new BorderPane(rectangle) | ||
pane.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null))) | ||
pane.setPadding(new Insets(100, 100, 100, 100)) | ||
val scene = new Scene(pane) | ||
stage.setScene(scene) | ||
stage.show() | ||
} | ||
|
||
|
||
} |