Code Monkey home page Code Monkey logo

atlantafx's People

Contributors

codedead avatar ennerf avatar mikehearn avatar mimoguz avatar mkpaz avatar patresss avatar zhangrickstudio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atlantafx's Issues

NotificationSkin

The maximum width of NotificationSkin's messageText is currently: messagetext.setmaxWidth (Region.USE_PREF_SIZE);
It should be set to messageText.setMaxWidth(Double.MAX_VALUE);

Resize ikons with font

In the Sampler app resizing the fonts works beautifully when zooming in/out. However ikons don't. Found the corresponding code but it doesn't work.

Sampler leaks non-daemon threads

TypographyPage and ColorPalette use the construct new Timer().schedule(new TimerTask() { ... });. This leaks the timer thread, which is not a daemon thread, i.e. if you change the font size the sampler app won't shut down cleanly anymore.

AtlantaFX themes prevent Ikonli's FontIcon from being configurable

Summary

When using an AtlantaFX theme (NordDark in my case), usage of Ikonli's FontIcon size/color setters are ignored.

Preview

FontIcon graphic = FontIcon.of(icon, 16, Color.RED /* or any color */); // will be 18px and white
// graphic.setStyle("-fx-icon-color: red;"); // overrides the color to red, but breaks the icon, making it a red square

With NordDark applied:

image

Without:

image

Diagnosis

Inside NordDark is the following snippet:

.ikonli-font-icon {
  -fx-icon-color: -color-fg-default;
  -fx-fill: -color-fg-default;
  -fx-icon-size: 18px;
}

It'd be nice if these were defaults, not forced values. I'm not sure why defining these properties prevents configuration in FontIcon. Typically when a control is styled in CSS and you use an explicit setColor(...) the call to the setter will override what is in the CSS. Perhaps this an issue on Ikonli's side?

Add dense TreeView

This would be great to have. I'm looking at adding this to a project I have, and right now, the TreeView is a bit too large for usability purposes. Adding a dense style class to TreeView like ListView would be awesome.

Also, awesome project!

suggestion: switch to MATLAB's chart colors

I didn't see a reference for where the chart colors came from, but in my tests I thought that the MATLAB chart colors and dark mode version work a bit better. Here are some definitions for trying it out.

.root {

  /* default MATLAB 'colororder' */
  -color-matlab-1-light: rgb(0, 114, 189);
  -color-matlab-2-light: rgb(217, 83, 25);
  -color-matlab-3-light: rgb(237, 177, 32);
  -color-matlab-4-light: rgb(126, 47, 142);
  -color-matlab-5-light: rgb(119, 172, 48);
  -color-matlab-6-light: rgb(77, 190, 238);
  -color-matlab-7-light: rgb(162, 20, 47);

  /* from https://de.mathworks.com/matlabcentral/fileexchange/86533-dark-mode-plot */
  -color-matlab-1-dark: rgb(89, 149, 189);
  -color-matlab-2-dark: rgb(217, 115, 71);
  -color-matlab-3-dark: rgb(237, 177, 32);
  -color-matlab-4-dark: rgb(218, 81, 245);
  -color-matlab-5-dark: rgb(119, 172, 48);
  -color-matlab-6-dark: rgb(77, 190, 238);
  -color-matlab-7-dark: rgb(162, 137, 141);

  /* pick based on theme */
  -color-matlab-1: ladder(-color-bg-default, -color-matlab-1-dark 49%, -color-matlab-1-light 50%);
  -color-matlab-2: ladder(-color-bg-default, -color-matlab-2-dark 49%, -color-matlab-2-light 50%);
  -color-matlab-3: ladder(-color-bg-default, -color-matlab-3-dark 49%, -color-matlab-3-light 50%);
  -color-matlab-4: ladder(-color-bg-default, -color-matlab-4-dark 49%, -color-matlab-4-light 50%);
  -color-matlab-5: ladder(-color-bg-default, -color-matlab-5-dark 49%, -color-matlab-5-light 50%);
  -color-matlab-6: ladder(-color-bg-default, -color-matlab-6-dark 49%, -color-matlab-6-light 50%);
  -color-matlab-7: ladder(-color-bg-default, -color-matlab-7-dark 49%, -color-matlab-7-light 50%);
}

Compatibility with other JavaFX libraries

One issue that I have run into is that several other javafx libraries expect modena color scheme definitions to be present. For example, https://github.com/dlsc-software-consulting-gmbh/PreferencesFX will print out all kinds of errors when used with AtlantaFX.
My current solution is to define the manually like this:

* {
-fx-text-fill: -color-fg-default;
-fx-highlight-text-fill:  -color-fg-default;
-fx-highlight-fill: -color-neutral-muted;
-fx-prompt-text-fill: -color-neutral-muted;
-fx-text-box-border:-color-neutral-muted;
-fx-control-inner-background: -color-neutral-muted;
-fx-body-color: -color-neutral-muted;
-fx-inner-border: -color-accent-fg;
}

Maybe they can be defined automatically by AtlantaFX. It doesn't have to be a perfect match, just some default colors that come close to the modena theme.

Demo theme switching options are kind of hidden

In the demo application, I don't see the reason why the different theme options are located in another submenu when there is plenty of space in the parent menu. I'm talking about the the menu in the toolbar.

RadioButton Background Color

I found radio-button has a backgournd color,I think it should have no background,it should be transparent

.radio-button {
-fx-background-color: -color-bg-default;
-fx-text-fill: -color-fg-default;
-fx-label-padding: 2px 2px 0 6px;
}

Popover.show() throws NPE when screen bounds are null

Popover init logic:

popoverPreview = new Popover(new Label(replacement));
popoverPreview.setHeaderAlwaysVisible(true);
popoverPreview.setTitle("Replacement text");
popoverPreview.show(searchInput);

When the logic above is triggered when searchInput is not visible/on-screen the following exception occurs:

java.lang.NullPointerException: Cannot invoke "javafx.geometry.Bounds.getMaxX()" because "bounds" is null
	at atlantafx.base.controls.Popover.show(Popover.java:257)
	at atlantafx.base.controls.Popover.show(Popover.java:232)
	at software.coley.recaf.ui.control.richtext.search.SearchBar$Bar.lambda$new$7(SearchBar.java:239)

Perhaps a null check on bounds and then yell at the developer "hey you can't do that".

Obvious work-around is to not call show() when the passed Node is not visible.

Components in Scene Builder

Does the library will be fully in scene builder as I saw, there are only 5-6 components right now
By the way amazing job

Tree and Table selection highlighting on lost focus

Both components Tree and Table do not highlight the selected element on losing focus.

I have implemented tables row editing as a popup dialog and when it has shown I do not see what exactly I'm trying to edit.

11

Music player in sampler fails with exception

In the sampler application, when clicking on the music player, you will get the following exception:

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      at [email protected]/atlantafx.sampler.layout.MainLayer.loadPage(MainLayer.java:176)
      at [email protected]/atlantafx.sampler.layout.MainLayer.lambda$initListeners$2(MainLayer.java:114)
      at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
      at javafx.base@20/javafx.beans.property.ObjectPropertyBase.set(Unknown Source)
      at [email protected]/atlantafx.sampler.layout.MainModel.navigate(MainModel.java:316)
      at [email protected]/atlantafx.sampler.layout.NavTree.lambda$new$0(NavTree.java:36)
      at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
      at javafx.base@20/javafx.beans.property.ObjectPropertyBase.set(Unknown Source)
      at javafx.controls@20/javafx.scene.control.SelectionModel.setSelectedItem(Unknown Source)
      at javafx.controls@20/javafx.scene.control.MultipleSelectionModelBase.lambda$new$0(Unknown Source)
      at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.ReadOnlyIntegerPropertyBase.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.ReadOnlyIntegerWrapper.fireValueChangedEvent(Unknown Source)
      at javafx.base@20/javafx.beans.property.IntegerPropertyBase.markInvalid(Unknown Source)
      at javafx.base@20/javafx.beans.property.IntegerPropertyBase.set(Unknown Source)
      at javafx.controls@20/javafx.scene.control.SelectionModel.setSelectedIndex(Unknown Source)
      at javafx.controls@20/javafx.scene.control.MultipleSelectionModelBase.select(Unknown Source)
      at javafx.controls@20/javafx.scene.control.MultipleSelectionModelBase.clearAndSelect(Unknown Source)
      at javafx.controls@20/javafx.scene.control.TreeView$TreeViewBitSetSelectionModel.clearAndSelect(Unknown Source)
      at javafx.controls@20/com.sun.javafx.scene.control.behavior.CellBehaviorBase.simpleSelect(Unknown Source)
      at javafx.controls@20/com.sun.javafx.scene.control.behavior.CellBehaviorBase.doSelect(Unknown Source)
      at javafx.controls@20/com.sun.javafx.scene.control.behavior.CellBehaviorBase.mousePressed(Unknown Source)
      at javafx.controls@20/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
      at javafx.base@20/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
      at javafx.base@20/javafx.event.Event.fireEvent(Unknown Source)
      at javafx.graphics@20/javafx.scene.Scene$MouseHandler.process(Unknown Source)
      at javafx.graphics@20/javafx.scene.Scene.processMouseEvent(Unknown Source)
      at javafx.graphics@20/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
      at javafx.graphics@20/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
      at javafx.graphics@20/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
      at java.base/java.security.AccessController.doPrivileged(Unknown Source)
      at javafx.graphics@20/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
      at javafx.graphics@20/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
      at javafx.graphics@20/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
      at javafx.graphics@20/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
      at javafx.graphics@20/com.sun.glass.ui.View.notifyMouse(Unknown Source)
      at javafx.graphics@20/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at javafx.graphics@20/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
      at java.base/java.lang.Thread.run(Unknown Source)
  Caused by: java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
      at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
      at [email protected]/atlantafx.sampler.layout.MainLayer.loadPage(MainLayer.java:150)
      ... 63 more
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class atlantafx.sampler.page.showcase.musicplayer.Model
      at [email protected]/atlantafx.sampler.page.showcase.musicplayer.MusicPlayerPage.<init>(MusicPlayerPage.java:25)
      ... 69 more
  Caused by: java.lang.ExceptionInInitializerError: Exception java.nio.file.FileSystemNotFoundException: Provider "jar" not installed [in thread "JavaFX Application Thread"]
      at java.base/java.nio.file.Path.of(Unknown Source)
      at java.base/java.nio.file.Paths.get(Unknown Source)
      at [email protected]/atlantafx.sampler.page.showcase.musicplayer.Model.<clinit>(Model.java:22)
      ... 70 more

I think you have to require the jdk.zipfs module to fix that.

Text highlight barely visible in Nord theme

Highlighting text in TextField or TextArea components is barely visible in Nord theme, especially in Dark mode. This is very visible even in the Sampler app.

NB: This is also true for selection color in ListView, TableView etc components, most visibly in striped mode. I think it would be worth revisiting the global highlight color.

Modal pane does not have a lot of contrast in dark themes

So I tried using the ModalPane and it works great so far. However, I find that when using dark themes, the modal pane does not stand out as much as when using a light theme. Maybe the background can be made even darker in dark themes?

Popover does not take dark theme

When using NordDark theme, popover does not use dark theme. It looks like background remains white, making text and controls look broken.

This is sample screenshot for dark theme:
dark-theme-test

For light theme, it looks OK:
light-theme-test

This is the sample code I used:

public class TestApp extends Application {

    @Override
    public void start(Stage stage) throws Exception {
        var bp = new BorderPane();
        var hbox = new HBox();
        hbox.getChildren().add(new Label("Label"));
        hbox.getChildren().add(new TextField());
        var popup = new PopOver(hbox);
        popup.setArrowLocation(PopOver.ArrowLocation.TOP_CENTER);
        var button = new Button("Click me");
        button.setOnAction(e -> popup.show(button));

        bp.setCenter(button);
        Application.setUserAgentStylesheet(new NordDark().getUserAgentStylesheet());
        stage.setTitle("Dark theme test");
        var scene = new Scene(bp, 600, 400.0);
        stage.setScene(scene);
        stage.show();
    }
}

Is there something I'm missing in this code? Because in sampler app this works fine.
I'm running this on Kubuntu with Java 19 and JavaFX 19.0.2.1. In additon, this happens for all dark themes, not just NordDark.

Scene Builder integration not working

First of all Thank You from the bottom of my heart for this beautiful app. Today I tried to integrate AtlantaFX into Scene Builder, all went smooth, but the Builder is not starting after this operation:(

Scene Builder Version 20
AtlantaFX Version 2.0.0

I understand that it is a problem on Scene Builder side, but just wanted to let You know that it is not working with the latest Scene Builder.

Have a nice day:)

Wrong package names in resources directory

The directories in the resources folder start with "assets", but the module-info.java exports them like this:

 // resources
    opens atlantafx.sampler.assets.fonts;
    opens atlantafx.sampler.assets.highlightjs;
    opens atlantafx.sampler.assets.styles;

Add some shadow or border for context menu

A "context menu" component does not have any shadow and especially in the case of "table view" it's difficult to distinguish where is data and where is a context menu.

image
image

Some incompatibility with ControlsFX

I just attempted to give AtlantaFX a try in one of my applications but I got a lot of errors (see attachment) which all originated in ControlsFX. I don't know how to react to that. Does it mean that ControlsFX cannot be used with AtlantaFX or is there anything that can be done to avoid them?

errors.txt

java: module not found: atlantafx.base

I confirmed that the dependency was added to Maven, but the following error occurred.

"requires atlantafx.base;" in module-info.java If you build by adding , the following error occurs.

module ~~~~~ {
...
requires atlantafx.base;

...
}

Error : java: module not found: atlantafx.base

If I delete the module-info.java file and build, the following error occurs.

java: cannot access atlantafx.base.theme.PrimerDark
bad class file: /Users/sharkvary/.m2/repository/io/github/mkpaz/atlantafx-base/1.2.0/atlantafx-base-1.2.0.jar!/atlantafx/base/theme/PrimerDark.class
class file has wrong version 61.0, should be 55.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

AtlantaFX themes cause ClassCastException with scrollbars, listview and scrollbar

Getting occasional exceptions when using the AtlantaFX themes like Dracula and Cupertino with scrollbars, listviews, comboboxes and scrollbars:

Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-border-color' from rule '*.list-view' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-effect' from rule '*.combo-box-popup>*.list-view' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.combo-box-popup>*.list-view' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-color-fg-default' while resolving lookups for '-fx-text-fill' from rule '*.combo-box-popup>*.list-view>*.virtual-flow>*.clipped-container>*.sheet>*.list-cell' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.combo-box-popup>*.list-view>*.virtual-flow>*.clipped-container>*.sheet>*.list-cell' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-color-fg-emphasis' while resolving lookups for '-fx-text-fill' from rule '*.combo-box-popup>*.list-view>*.virtual-flow>*.clipped-container>*.sheet>*.list-cell:hover:filled:selected' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.combo-box-popup>*.list-view>*.virtual-flow>*.clipped-container>*.sheet>*.list-cell:hover:filled:selected' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-color-fg-default' while resolving lookups for '-fx-text-fill' from rule '*.combo-box-popup>*.list-view>*.virtual-flow>*.clipped-container>*.sheet>*.list-cell' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.combo-box-popup>*.list-view>*.virtual-flow>*.clipped-container>*.sheet>*.list-cell' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-color-fg-default' while resolving lookups for '-fx-text-fill' from rule '*.list-view *.list-cell' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.list-view *.list-cell' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.thumb' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.thumb' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss
Jul 08, 2023 4:02:23 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.list-view>*.virtual-flow>*.corner' in stylesheet jar:file:///home/deadline/.gradle/caches/modules-2/files-2.1/io.github.mkpaz/atlantafx-base/2.0.1/51d2bfa35150921fe5b8b5e3c1a1bf78a6d57684/atlantafx-base-2.0.1.jar!/atlantafx/base/theme/dracula.bss

For an example project, check out:
https://github.com/CodeDead/opal/tree/development

Dependencies:

  • AtlantaFX 2.0.1
  • JavaFX 20.0.1
  • JDK 20.0.1
  • GNU/Linux Fedora 38 (Wayland)
  • GNU/Linux kernel 6.3.8-200.fc38.x86_64

Cause:

First, set the theme to the old Modena or Caspian theme included in JavaFX, then switch the theme back to any AtlantaFX based theme like Dracula or Cupertino. Sometimes, this also happens when switching between Caspian and Modena.

Application.setUserAgentStylesheet(Application.STYLESHEET_CASPIAN);
Application.setUserAgentStylesheet(new Dracula().getUserAgentStylesheet());

Thoughts:

It does not happen every time and the issue seems to be very sporadic, as in it comes and goes. It can also occur when switching from Caspian to Modena.

ModalPane allows focus to escape under it

Noticed while playing around in the sampler app, when a ModalPane is visible its possible to shift the focus using tab somewhere under it and then activate buttons using spacebar. I'd imagine focus should shift only inside the dialog. Not sure if this can be limited with some existing property?

In the sampler app, its possible to lock the page UI by opening the persistent ModalPane, shifting the focus to some other button and opening a different dialog that doesn't have a close button. Update: noticed that reopening the page is still possible and it fixes the issue, so I guess its not entirely locked.

LightTheme: incorrect -color-border-muted

primer-light.css has issues parsing -color-border-muted: hsl(210deg, 18%, 87%);:

WARNING: CSS Error parsing jar:file:/<repo>/io/github/mkpaz/atlantafx-base/0.1.0-SNAPSHOT/atlantafx-base-0.1.0-SNAPSHOT.jar!/atlantafx/base/theme/primer-light.css: Unexpected function 'hsl(' while parsing '-color-border-muted' at [10,23]

and

WARNING: Could not resolve '-color-border-muted' while resolving lookups for '-fx-stroke' from rule '*.chart *.chart-horizontal-grid-lines' in stylesheet jar:file:/<repo>/io/github/mkpaz/atlantafx-base/0.1.0-SNAPSHOT/atlantafx-base-0.1.0-SNAPSHOT.jar!/atlantafx/base/theme/primer-light.css

primer-dark.css loads without issues.

Implement inner border radius

  Hi.

First, please let me say that you're doing a tremendous job. Kudos, and thank you!

Now, my suggestion: define an inner border radius config. Right now for many components' borders are drawn using multiple backgrounds. The problem is, both outer and inner backgrounds have the same radius. This causes noticeable artifacts with rounded borders, like this (at %400):

checkbox1

As you can see, borders are much thicker at corners.

I think this can safely be fixed by defining an inner corner radius like this (pardon my Sass):

// _config.scss
$inner-border-radius: math.max($border-radius - $border-width, 0) !default;

// _checkbox.scss
-fx-background-radius: cfg.$border-radius, cfg.$inner-border-radius;

checkbox2

I have a fork with fixes if you want to take a look: https://github.com/mimoguz/atlantafx

Originally posted by @mimoguz in #22

Demo tooltip behavior is buggy

When hovering the mouse over the Position -> Top Left element on the Tooltip page, the tooltip appears and hides in a loop.

SceneBuilder path

I just saw the SceneBuilder integration. That's nice ๐Ÿ‘ The current version is unfortunately broken on Windows and macOS because the directory structure does not match the expected lib/app directory. It'd probably also be good to have it intitialized to the standard installation path.

image

I just checked multiple systems and the default installation looks like this:

Windows

var installDir = System.getProperty("user.home") + "/AppData/Local/SceneBuilder/";
var cfgDir =  installDir + "app/";
var cfgFile = cfgDir  + "SceneBuilder.cfg"

macOS

var installDir = "/Applications/SceneBuilder.app/";
var cfgDir =  installDir + "Contents/app/";
var cfgFile = cfgDir  + "SceneBuilder.cfg"

Ubuntu

var installDir = "/opt/scenebuilder/";
var cfgDir =  installDir + "lib/app/";
var cfgFile = cfgDir  + "SceneBuilder.cfg"

UseragentStylesheet required?

Small question,

does Atlantafx also work, when not setting the useragent stylesheet? Can it also work by only setting the stylesheet of the Scene?

I thought about adding an AtlantaFX Demo to the JPro Website, but changing the user agent stylesheet, would also affect the other demos.

Run time UI errors

hi, so I have cloned the repo to test but I am getting this view as I have attached the image.

yes I did run npm install and also resolved all java maven dependencies .

jdk liberica-18.0.1.1

image

Styling TableView cell with ikonli

Hello mkpaz,
I have some issues with tableview styling and I was wondering if you can provide some help.

I'm trying to build a tableview with an icon in a cell, using ikonli package.
I would also style that icon with a color based on a status variabile in the pojo class.
I can only get a white icon (using nord-dark theme), no color is set.

In the Sampler App (2.0) there is no example of this.

My code:

Pojo class

public FontIcon getStatusFontIcon() {
	statusFI = new FontIcon(Material2AL.LENS);
	statusFI.getStyleClass().add(status == 0 ? Styles.ACCENT : Styles.DANGER);
	return statusFI;
}

Controller class

@FXML
private TableColumn<AccountBalance, FontIcon> colStatus;

...

colStatus.setCellValueFactory(new PropertyValueFactory<>("statusFI"));
colStatus.setCellFactory(FontIconTableCell.forTableColumn());

Am I missing something or doing wrong?

Thanks in advance.
Mattia

SceneBuilder theme support

Using AtlantaFX with FXML/SceneBuilder is a bit annoying as there is no support for custom themes, and loading the theme as a separate css file on top of Modena behaves differently from loading it as an agent stylesheet. I didn't see a way to add themes without modifying the source code, but fortunately it's just loading resources that are simple to overwrite.

It's a bit of a hack, but below are some instructions in case anyone else like to use SceneBuilder. It might make sense to automate building the zip-file and/or try to get better support upstream once things are stable.

  1. Download atlantafx-scenebuilder-themes.zip to SceneBuilder's $APPDIR
    (e.g. %HOMEPATH%/Local/SceneBuilder/app/ on Windows)
  2. open $APPDIR/SceneBuilder.cfg
  3. add $APPDIR/atlantafx-scenebuilder-themes.zip to the beginning of app.classpath

Resources in the zip get loaded first and overwrite the Caspian buttons with the 4 AtlantaFX themes

SceneBuilder Caspian High Contrast (FX2) AtlantaFX
Caspian Embedded (FX2) no Primer Light
Caspian Embedded (FX2) yes Primer Dark
Caspain Embedded QVGA (FX2) no Nord Light
Caspian Embedded QVGA (FX2) yes Nord Dark

image

Could the next releases use regular version numbers?

Heya,

I totally understand that AtlantaFX is in an early development phase, but versions like 0.1-SNAPSHOT2 aren't compatible with most packaging systems. As you can see, in conveyor.conf I had to override the version number to avoid that issue. If you could do releases with versions that consist purely of numbers (0.1, 0.2 etc) then that'd be appreciated and make things easier.

Sampler app not installable on Ubuntu 23.04

Selecting previously unselected package atlantafx-sampler.
(Reading database ... 259459 files and directories currently installed.)
Preparing to unpack atlantafx-sampler_1.2.0-91_amd64.deb ...
Unpacking atlantafx-sampler (1.2.0-91) ...
dpkg: dependency problems prevent configuration of atlantafx-sampler:
 atlantafx-sampler depends on libavformat58; however:
  Package libavformat58 is not installed.
 atlantafx-sampler depends on libavcodec-extra58 | libavcodec58; however:
  Package libavcodec-extra58 is not installed.
  Package libavcodec58 is not installed.

dpkg: error processing package atlantafx-sampler (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu5) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Errors were encountered while processing:
 atlantafx-sampler

Then when i try manually installing failing dependancies, this happens:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 atlantafx-sampler : Depends: libavformat58
 libavcodec-extra58 : Depends: libavutil56 (= 7:4.4.2-0ubuntu0.22.04.1+esm1) but it is not going to be installed
                      Depends: libdav1d5 (>= 0.2.1) but it is not installable
                      Depends: libswresample3 (= 7:4.4.2-0ubuntu0.22.04.1+esm1) but it is not going to be installed
                      Depends: libx264-163 (>= 2:0.163.3060+git5db6aa6) but it is not installable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.