-
Couldn't load subscription status.
- Fork 149
Theme implementation to SpectraPlot and TICPlot #43
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
Conversation
when did this happen?
# Conflicts: # src/main/java/io/github/mzmine/gui/chartbasics/chartthemes/ChartThemeParameters.java # src/main/java/io/github/mzmine/modules/dataprocessing/featdet_manual/XICManualPickerDialog.java
|
Awesome, thanks a lot! |
|
I am not sure why we need the "Add default" button. The default palettes should always be there and non-changeable. You can also remove the "Color palettes (color blindness mode)" parameter. |
|
I think you can remove the blindness parameter in this PR, and instead make three (not one) default palettes, which correspond to the different settings of the old blindness parameter. Regarding adding colors, perhaps it would make sense to place the Color, Add color, and Remove color components right under the color palette. The Name parameter can be in the top. And the Accept and Cancel buttons can be in the bottom. |
|
Regarding the cancel button: |
|
Looks great. Can you drag and drop the colors to change the order? |
Yes you can. Without the abbreviations the component would get pretty large I think. |
|
Thanks @SteffenHeu ! Removing all colors from the palette leads to exceptions and weird behavior. By the way, with your current code I see these errors during MZmine startup. Please check the code for loading/saving of the values. |
|
@tomas-pluskal The warnings you are receiving are intended behaviour. They should be caused, because you have older versions of the color palettes saved in your xml files, that did not contain the neg/pos/neu colors. So the values cannot be read from the xml. The exception is handled here: https://github.com/SteffenHeu/mzmine3/blob/bbef859edeb36e993e4b22057c18c84474fdb2e0/src/main/java/io/github/mzmine/util/color/SimpleColorPalette.java#L288 Should i remove the logging of the error message itself and just log that the color was not loaded? |
| delegate.add(Color.web(clr)); | ||
| } | ||
| } catch (Exception e) { | ||
| logger.warning(e.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When logging an exception (Throwable), please use this method:
https://docs.oracle.com/en/java/javase/13/docs/api/java.logging/java/util/logging/Logger.html#log(java.util.logging.Level,java.lang.String,java.lang.Throwable)
That way you can log the error message and the exception at the same time.
| double y = this.sceneToLocal(exit).getY(); | ||
| int rows = (int) ((RECT_HEIGHT * palette.size()) / getWidth() + 1); | ||
|
|
||
| logger.info("rows: " + rows); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clean up these messages, they are not informative enough to be logged at INFO level
| x = (x < 0) ? 0 : x; | ||
| y = (y < 0) ? 0 : y; | ||
| y = (y / RECT_HEIGHT <= rows) ? y : rows; | ||
| logger.info("y: " + y); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here
|
Awesome improvements! I noticed this warning when I opened the dialog: I just opened the dialog after starting MZmine, so I think this should not cause a warning. By the way, you could indicate the drag&drop procedure visually using the setDragView() and setOpacity() functions. See here: |
|
I also noticed these log messages, which probably should be more informative: |
Thanks @tomas-pluskal, that made me understand how the drag & drop works properly. I will change the whole drag & drop implementation now to make it proper! Edit: Where exactly are you getting that |
worked fine once, afterwards this exception happened Exception in thread "JavaFX Application Thread" java.lang.IllegalStateException: Cannot start drag and drop on node that is not in scene
- before, it was not possible to move a color to the end - move method was simplified in the process - d&d problem was that the rectangles were updated before the d&d was finished. this lead to the old ones not being in the scene
|
Thanks @SteffenHeu, I think it looks great now! I noticed the "Show data points" button shows the data points in white color, could you please check why that happens? |
|
Thanks @SteffenHeu ! Are you still working on this or is it ready for merging? |
|
I'd say it's ready. We might find some bugsor inconsistencies at some point, but they can be fixed then. |
|
Thanks @SteffenHeu ! It's a great addition. |
…lipid fix MatchedLipidStatus loading
Hi Tomas,
I moved most of the appearance settings from the individual plot's constructors to the theme settings.
Best
Steffen