Re: Problems building openjfx

2018-11-01 Thread Michael Ennen
Also don't forget about the Windows build script:

https://github.com/javafxports/openjdk-jfx/blob/develop/tools/scripts/build.ps1

It is what I use to automate the process of building OpenJFX on Windows as
much as
possible. Any improvements to the script would be appreciated.

On Wed, Oct 31, 2018 at 7:03 AM  wrote:

> forgot the link to the instruction page, just in case there's another:
>
>
> https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX#BuildingOpenJFX-EnvironmentVariables
>
> Zitat von faste...@swingempire.de:
>
> > first try, following the instructions (for win10) at:
> >
> > that is having downloaded, installed the required tools, added env
> > vars as desribed.
> >
> > Then in cygwin, navigate to the git working dir, typing
> >
> > gradle tasks
> >
> > fails with:
> >
> > FAILURE: Build failed with an exception.
> >
> > * Where:
> > Script
> >
> 'C:\Daten\data-for-work\eclipse\gitrep-openjdk\openjdk-jfx\buildSrc\win.gradle'
> line:
> > 92
> >
> > * What went wrong:
> > A problem occurred evaluating script.
> >> FAIL: WINSDK_DIR not defined
> >
> > to me, it looks the env var WINSDK_DIR is not set - what should go in
> there?
> >
> > Thanks, Jeanette
> >
> > BTW: did I ever mention that I hate command line tools - and they
> > feel it, fighting back with all they got ;)
>
>
>
>

-- 
Michael Ennen


Re: Maybe a TitledPane bug

2018-11-01 Thread David Grieve

On 11/1/18 2:19 PM, Sverre Moe wrote:


scene.getStylesheets().add(getClass().getResource("light.css").toExternalForm());


Here is the CSS content for light.css
.titled-pane > .title {
    -fx-color: rgb(220, 220, 220);

Well, there you go. Your 'light.css' style trumps the setBackground. The 
reason for this is that this allows an application to be deployed with 
explicitly set, styleable properties - e.g. titleNode.setBackground(...) 
- but still allow that application to be styled from a stylesheet.


From the JavaFX CSS reference:

The implementation allows designers to style an application by using style
sheets to override property values set from code. This has implications for
the cascade; particularly, when does a style from a style sheet override a
value set from code? The JavaFX CSS implementation applies the following
order of precedence; a style from a user agent style sheet has lower
priority than a value set from code, which has lower priority than a Scene
or Parent style sheet. Inline styles have highest precedence. Style sheets
from a Parent instance are considered to be more specific than those styles
from Scene style sheets.
 



Re: Maybe a TitledPane bug

2018-11-01 Thread Sverre Moe
I am now not so sure it is a bug. Seems the problem is the hover pseudo
state that resets the background color.
>From modena.css
.titled-pane > .title:hover {
-fx-color: -fx-hover-base;
}

Try this example:

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TitledPane;
import javafx.scene.control.ToggleButton;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.Region;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;

public class TitledPaneApplication extends Application {

public static void main(String[] args) {
launch(args);
}

@Override
public void start(Stage primaryStage) throws Exception {
final StackPane root = new StackPane();

final TitledPane titledPane = new TitledPane();
titledPane.setText("Title");
titledPane.setAnimated(false);
titledPane.setCollapsible(false);
root.getChildren().add(titledPane);

final ToggleButton button = new ToggleButton("Change");
button.setOnAction(event -> {
boolean selected = button.isSelected();
final Region titleNode = (Region) titledPane.lookup(".title");
if (selected) {
titleNode.setBackground(new Background(new
BackgroundFill(Color.GREEN, null, null)));
} else {
titleNode.setBackground(null);
}
});

button.setSelected(false);
titledPane.setContent(button);

final Scene scene = new Scene(root, 400, 400);

scene.getStylesheets().add(getClass().getResource("light.css").toExternalForm());

primaryStage.setScene(scene);
primaryStage.setTitle("TestApplication");
primaryStage.show();
}

}

Here is the CSS content for light.css
.titled-pane > .title {
-fx-color: rgb(220, 220, 220);
}

/Sverre


Den tor. 1. nov. 2018 kl. 14:45 skrev David Grieve :

> It's hard to tell without some short, self-contained, correct example.
> This sample I crafted here doesn't reproduce the issue.
>
> @Override public void start(Stage primaryStage) {
>
>  final TitledPane titledPane =new TitledPane("Button Pane",new
> Button("Button"));
>  final HBox root =new HBox();
>  root.getChildren().add(titledPane);
>
>  primaryStage.setTitle("Maybe a TitledPane bug");
>  primaryStage.setScene(new Scene(root,300,250));
>  primaryStage.show();
>
>  final Region titleNode = (Region)titledPane.lookup("*.title");
>  titleNode.setBackground(new Background(new
> BackgroundFill(Color.GREEN,null,null)));
> }
>
>
>
> On 10/31/18 6:58 PM, Sverre Moe wrote:
> > I am not sure if I have stumbled upon a bug in JavaFX, or perhaps it is
> > simply something I am doing wrong.
> >
> > After setting the TitledPane title background programmatically, then when
> > hovering the background color is reset to the previous value from CSS.
> > I get same behavior in both JavaFX 8 and JavaFX 11.
> >
> > Color color = Color.valueOf("#00ff11");
> > titleNode.setBackground(new Background(new BackgroundFill(color, null,
> > null)));
> >
> > titleNode.setStyle("-fx-background-color:#00ff11;");
> >
> > Setting the style property seems to work, but why doesn't the
> > programmatically approach work?
> >
> >
> https://stackoverflow.com/questions/53083005/javafx-titledpane-changed-title-background-is-reset-on-mouse-entered/
> >
> > /Sverre
>
>


Re: Maybe a TitledPane bug

2018-11-01 Thread David Grieve
It's hard to tell without some short, self-contained, correct example. 
This sample I crafted here doesn't reproduce the issue.


@Override public void start(Stage primaryStage) {

final TitledPane titledPane =new TitledPane("Button Pane",new 
Button("Button"));
final HBox root =new HBox();
root.getChildren().add(titledPane);

primaryStage.setTitle("Maybe a TitledPane bug");
primaryStage.setScene(new Scene(root,300,250));
primaryStage.show();

final Region titleNode = (Region)titledPane.lookup("*.title");
titleNode.setBackground(new Background(new 
BackgroundFill(Color.GREEN,null,null)));
}



On 10/31/18 6:58 PM, Sverre Moe wrote:

I am not sure if I have stumbled upon a bug in JavaFX, or perhaps it is
simply something I am doing wrong.

After setting the TitledPane title background programmatically, then when
hovering the background color is reset to the previous value from CSS.
I get same behavior in both JavaFX 8 and JavaFX 11.

Color color = Color.valueOf("#00ff11");
titleNode.setBackground(new Background(new BackgroundFill(color, null,
null)));

titleNode.setStyle("-fx-background-color:#00ff11;");

Setting the style property seems to work, but why doesn't the
programmatically approach work?

https://stackoverflow.com/questions/53083005/javafx-titledpane-changed-title-background-is-reset-on-mouse-entered/

/Sverre




RE: Problems building openjfx

2018-11-01 Thread carl
I’ve just been compiling 8 for Windows since I can get 11 from openjfx.io.  I’m 
going to compile 8 for the Mac and Linux in the next week or two.   I’ll post 
my notes again for these platforms.

 

-Carl

 

From: Johan Vos  
Sent: Thursday, November 1, 2018 6:58 AM
To: Nir Lisker ; Carl Walker 
Cc: openjfx-dev@openjdk.java.net Mailing 
Subject: Re: Problems building openjfx

 

 

On Wed, Oct 31, 2018 at 7:34 PM Nir Lisker mailto:nlis...@gmail.com> > wrote:

I think we should focus on 11 on the wiki, so it's really good you have
instructions for 8 on your site. But the 11 instructions on the wiki should
be working for everyone who wants to build 11. 

 

There are instructions for 8 on the wiki too, though I don't know if they are 
correct.

As for 11, in the"Platform Prerequisites" section, I only updated the Win 
instructions because that's what I have. Someone should look at Mac and Linux.

 

 

Great, thanks for that. @Carl, can you confirm the instructions on the wiki for 
11 are correct? Or do you only build for 8?

 

Thanks,

 

- Johan 



Re: Problems building openjfx

2018-11-01 Thread Johan Vos
On Wed, Oct 31, 2018 at 7:34 PM Nir Lisker  wrote:

> I think we should focus on 11 on the wiki, so it's really good you have
>> instructions for 8 on your site. But the 11 instructions on the wiki
>> should
>> be working for everyone who wants to build 11.
>
>
> There are instructions for 8 on the wiki too, though I don't know if they
> are correct.
> As for 11, in the"Platform Prerequisites" section, I only updated the Win
> instructions because that's what I have. Someone should look at Mac and
> Linux.
>
>>
>>
Great, thanks for that. @Carl, can you confirm the instructions on the wiki
for 11 are correct? Or do you only build for 8?

Thanks,

- Johan