-
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.
- Loading branch information
1 parent
d425a5e
commit e8f4921
Showing
20 changed files
with
290 additions
and
271 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
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -10,5 +10,4 @@ trait HasBlockSizeProperty { | |
|
||
def getBlockSize(): Int = blockSizeProperty.get() | ||
|
||
|
||
} |
20 changes: 20 additions & 0 deletions
20
app/src/main/scala/app/logorrr/views/ops/DecreaseBlockSizeButton.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,20 @@ | ||
package app.logorrr.views.ops | ||
|
||
import app.logorrr.views.block.HasBlockSizeProperty | ||
import app.logorrr.views.search.OpsToolBar | ||
import javafx.beans.property.SimpleIntegerProperty | ||
import javafx.scene.paint.Color | ||
|
||
class DecreaseBlockSizeButton(val blockSizeProperty: SimpleIntegerProperty) extends | ||
RectButton(2 * OpsToolBar.blockSizeStep | ||
, 2 * OpsToolBar.blockSizeStep | ||
, Color.GRAY | ||
, "decrease block size") with HasBlockSizeProperty { | ||
|
||
setOnAction(_ => { | ||
if (getBlockSize() - OpsToolBar.blockSizeStep > 0) { | ||
setBlockSize(getBlockSize() - OpsToolBar.blockSizeStep) | ||
} | ||
}) | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
app/src/main/scala/app/logorrr/views/ops/IncreaseBlockSizeButton.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,20 @@ | ||
package app.logorrr.views.ops | ||
|
||
import app.logorrr.views.block.HasBlockSizeProperty | ||
import app.logorrr.views.search.OpsToolBar | ||
import javafx.beans.property.SimpleIntegerProperty | ||
import javafx.scene.paint.Color | ||
|
||
class IncreaseBlockSizeButton(val blockSizeProperty: SimpleIntegerProperty) extends | ||
RectButton(2 * OpsToolBar.blockSizeStep | ||
, 2 * OpsToolBar.blockSizeStep | ||
, Color.GRAY | ||
, "increase block size") with HasBlockSizeProperty { | ||
|
||
setOnAction(_ => { | ||
if (getBlockSize() + OpsToolBar.blockSizeStep < 10 * OpsToolBar.blockSizeStep) { | ||
setBlockSize(getBlockSize() + OpsToolBar.blockSizeStep) | ||
} | ||
}) | ||
|
||
} |
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,22 @@ | ||
package app.logorrr.views.ops | ||
|
||
import app.logorrr.views.search.{FiltersToolBar, OpsToolBar} | ||
import javafx.geometry.Pos | ||
import javafx.scene.layout.HBox | ||
|
||
|
||
/** | ||
* Container to horizontally align search, filters and settings | ||
*/ | ||
class OpsRegion(val opsToolBar: OpsToolBar | ||
, filtersToolBar: FiltersToolBar | ||
, settingsToolBar: SettingsOps) | ||
extends HBox { | ||
|
||
opsToolBar.setMaxHeight(Double.PositiveInfinity) | ||
filtersToolBar.setMaxHeight(Double.PositiveInfinity) | ||
setAlignment(Pos.CENTER_LEFT) | ||
getChildren.addAll(opsToolBar, filtersToolBar) | ||
|
||
} | ||
|
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
5 changes: 3 additions & 2 deletions
5
...a/app/logorrr/views/SettingsToolBar.scala → ...a/app/logorrr/views/ops/SettingsOps.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
23 changes: 23 additions & 0 deletions
23
app/src/main/scala/app/logorrr/views/ops/TextSizeButton.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,23 @@ | ||
package app.logorrr.views.ops | ||
|
||
import app.logorrr.util.LogoRRRFonts | ||
import app.logorrr.views.text.HasFontSizeProperty | ||
import javafx.scene.control.{Button, Label, Tooltip} | ||
import javafx.scene.input.{KeyCode, KeyEvent} | ||
import javafx.scene.paint.Color | ||
|
||
abstract class TextSizeButton(size: Int, tooltipMessage: String) | ||
extends Button | ||
with HasFontSizeProperty { | ||
|
||
private val label = new Label("T") | ||
label.setStyle(LogoRRRFonts.jetBrainsMono(size)) | ||
label.setTextFill(Color.DARKGREY) | ||
setGraphic(label) | ||
setTooltip(new Tooltip(tooltipMessage)) | ||
setOnKeyPressed((event: KeyEvent) => { | ||
if (event.getCode == KeyCode.ENTER) { | ||
fire() | ||
} | ||
}) | ||
} |
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
Oops, something went wrong.