Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent maximize when mouse double clicked #25

Open
wants to merge 27 commits into
base: experimental
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: GOXR3PLUSTUDIO
open_collective: # Replace with a single Open Collective username
ko_fi: goxr3plusstudio
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: https://www.paypal.me/GOXR3PLUSCOMPANY
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Java CI

on: [push]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macOS-latest, windows-latest]
java: [8]
fail-fast: false
max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Test with Maven
run: mvn verify -B --file pom.xml
...
52 changes: 32 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# FX-BorderlessScene
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Q5Q3WBIC)

---

<h3 align="center" > FX-BorderlessScene ( Library )</h3>
<p align="center">
💠
</p>
<p align="center">
<sup>
<b> Undecorated JavaFX Scene with implemented move, resize, minimise, maximise, close and Windows Aero Snap controls. </b>
<b> Implement any style you want for your JavaFX application using custom css or default . <b>
</sup>
</p>

---

[![Latest Version](https://img.shields.io/github/release/goxr3plus/FX-BorderlessScene.svg?style=flat-square)](https://github.com/goxr3plus/FX-BorderlessScene/releases)
[![GitHub contributors][contributors-image]][contributors-url]
Expand All @@ -10,24 +25,27 @@
[contributors-image]: https://img.shields.io/github/contributors/goxr3plus/FX-BorderlessScene.svg


Undecorated JavaFX Scene with :

**1)** implemented move

**2)** resize, minimise, maximise, close
![java_2019-04-30_17-43-54](https://user-images.githubusercontent.com/20374208/56970311-8b0df380-6b6f-11e9-83f1-65a5e4a03b8a.png)

**3)** Windows Aero Snap controls.
### Donate if you love me

**4)** Styling Aero Snap window
<a href="https://patreon.com/preview/8adae1b75d654b2899e04a9e1111f0eb" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a>
<a href="https://www.paypal.me/GOXR3PLUSCOMPANY" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a>

**5)** Styling Main window
## Features
- **Done ✔️**
- Implemented drag and move
- resize, minimise, maximise, close
- Windows Aero Snap controls.
- Styling Aero Snap window
- Styling Main window
- **TODO 🚧**
- Multiple Screens Support
- Fix lagging on resizing

This project has been forked and further developed from [this](https://github.com/NicolasSenetLarson/BorderlessScene) github repository


![java_2019-04-30_17-43-54](https://user-images.githubusercontent.com/20374208/56970311-8b0df380-6b6f-11e9-83f1-65a5e4a03b8a.png)


### Use it with Maven , Gradle etc ... with

https://jitpack.io/#goxr3plus/FX-BorderlessScene
Expand All @@ -48,7 +66,7 @@ Add the dependency :
<dependency>
<groupId>com.github.goxr3plus</groupId>
<artifactId>FX-BorderlessScene</artifactId>
<version>4.2.0</version>
<version>4.4.0</version>
</dependency>
```

Expand All @@ -58,7 +76,7 @@ Main Window -> [here](https://github.com/goxr3plus/FX-BorderlessScene/blob/maste

Main Window Controller -> [here](https://github.com/goxr3plus/FX-BorderlessScene/blob/master/src/main/java/com/goxr3plus/fxborderlessscene/application/MainWindowController.java)

### > Simple example
### Simple example

``` JAVA
import javafx.application.Application;
Expand Down Expand Up @@ -153,9 +171,3 @@ public class Main extends Application {
|:-:|
| [![First](https://user-images.githubusercontent.com/20374208/48313813-34fdc180-e5ca-11e8-9da7-c6148dc0cbe5.png)](https://www.youtube.com/watch?v=7Hai7cavmUY) |
---


### Donate if you love me

<a href="https://patreon.com/preview/8adae1b75d654b2899e04a9e1111f0eb" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a>
<a href="https://www.paypal.me/GOXR3PLUSCOMPANY" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.github.goxr3plus</groupId>
<artifactId>FX-BorderlessScene</artifactId>
<version>4.3.1</version>
<version>4.4.0</version>
<name>FX-BorderlessScene</name>
<description>Undecorated JavaFX Scene with implemented move, resize, minimise, maximise, close and Windows Aero Snap controls.</description>
<url>https://github.com/goxr3plus/FX-BorderlessScene</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javafx.beans.binding.BooleanBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.geometry.Rectangle2D;
import javafx.scene.Node;
Expand Down Expand Up @@ -289,7 +290,11 @@ protected void setMoveControl(final Node node) {
} else {
//--------------------------Check here for Transparent Window--------------------------
//Rectangle2D wholeScreen = Screen.getScreensForRectangle(m.getScreenX(), m.getScreenY(), 1, 1).get(0).getBounds()
Rectangle2D screen = Screen.getScreensForRectangle(m.getScreenX(), m.getScreenY(), 1, 1).get(0).getVisualBounds();
ObservableList<Screen> screens = Screen.getScreensForRectangle(m.getScreenX(), m.getScreenY(), 1, 1);
if (screens.isEmpty()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great one i haven't noticed this case :)

return;
}
Rectangle2D screen = screens.get(0).getVisualBounds();

//----------TO BE ADDED IN FUTURE RELEASE , GAVE ME CANCER implementing them ..----------------

Expand Down