atarw / material-ui-swing

A modern, Material Design UI for Java Swing
MIT License
653 stars 86 forks source link

JScrollbar mouse hover problem #77

Closed Reap00r closed 5 years ago

Reap00r commented 5 years ago

@vincenzopalazzo I just noticed that the problem still exists that was fixed here: https://github.com/atarw/material-ui-swing/issues/75 But this time it is for JScrollbar

vincenzopalazzo commented 5 years ago

Hi @Reap00r,

Thanks the problem is the border button, I have not noticed this before, sorry I will correct as soon as you give me more info on #73 so as to correct both

vincenzopalazzo commented 5 years ago

@Reap00r I hope this bug no longer exists :)

Reap00r commented 5 years ago

@vincenzopalazzo, unfortunately your fix did not completely remove this bug, see the GIF GIFScrollbar

Maybe this is related to Windows / Linux again

vincenzopalazzo commented 5 years ago

Hi @Reap00r,

Sorry for this problem, I was not able to reproduce this error and so I didn't know what nature it was, I made the same changes that I had placed in the previous components but I see that it wasn't enough.

Sorry if I can't give you a pull request where all the problems are solved, I'll work on it. Sorry

vincenzopalazzo commented 5 years ago

Hi @Reap00r,

Before running the pull request can you test if the bug has been fixed with this version? https://github.com/vincenzopalazzo/material-ui-swing/releases/tag/V9.9

This is an example my fix

Reap00r commented 5 years ago

Hi @vincenzopalazzo, I just downloaded v9.9 and it is still not fixed. I can see in your example that is seems to work, but unfortunately not for me :/ Could it be related to the color of the button (mine is blue and the border around the scrollbar turns blue as well)

vincenzopalazzo commented 5 years ago

@Reap00r,

Very probable that the bug is not in the jscrollbar but in the mouse hover effect, I will try to look at the code and propose a new solution, unfortunately when I release the solution you'll have to act as a tester :) since I can't reproduce your error on Windows and Linux.

Reap00r commented 5 years ago

Hi @vincenzopalazzo,

no problem. Just tell me when you got an update and I will test it asap ;)

vincenzopalazzo commented 5 years ago

Hi @Reap00r,

I released another fix for this problem, I introduce a new component MaterialUIStaticMoviment , this component haven't a wake effect, it was thought for the effect mouse hover on the button for component static, an example: JSpinner, JScrollBar, KComboBox.

The version fixed (I hope)

I attend your feedback for creating an official pull request :)

Reap00r commented 5 years ago

Hi @vincenzopalazzo,

unfortunately this is still not fixed. I didn't have a closer look into the code changes, but I saw that you added a swing set to your new version. Would this be necessary for the fix? See my test results here: GIFScrollbar GIFScrollbar2

vincenzopalazzo commented 5 years ago

@atarw can you reopen this issue, please?

Hi @Reap00r, The swing set is the first version demo for this theme, it's not necessary for the function od the look and feel.

Before refactoring the code I would like to ask you about things, in this version a good rule was introduced, before creating new effects with MaterialUIMoviment you have to clean up all the listeners. So I will now ask you if you have added new effects to any buttons because if it were so could you kindly use this code before adding the mouse hover effect to the button?

MaterialManagerListener. removeAllMouseListener(yourButton);
yourButton.addMouseListener(MaterialUIMovement.getMovement(yourButton, MaterialColors.YOUR_COLOR));

if you added the listener whit MaterialUiMovement, try this code.

Yesterday I added a new fix into look and feel (the brach atarw) for problem pixeled font, If you have time can you tell me even if the fix has paid off?

I attend your feedback

Reap00r commented 5 years ago

Hi @vincenzopalazzo,

at first I pulled the latest changed and tried the new version but it still didn't work.

Now I tried a few things: At first, this is the current version: GIFScrollpaneBroken

Now I removed the All the mouse listeners as you mentioned (WITHOUT adding one) GIFRemovingMouselisteners

Now I removed them and added one (note that the button with the icon to the right was NOT changed, but I was testing it with the button on top) GIFScrollpaneAfterRemove

I hope that helps

vincenzopalazzo commented 5 years ago

Thanks, @Reap00r,

in this example, the effect is wrong, right?

Now I removed the All the mouse listeners as you mentioned (WITHOUT adding one)

Thanks for this example and another question, you have change a color mouse hover with the LITE_BLUE? if you change the mouse hover color on button into equals color mouse hover JScroll bar you have a Effect OK, right?

Reap00r commented 5 years ago

Hi @vincenzopalazzo,

in all of my examples the effect is wrong. it should stay gray without the strange border.

Even changing the button hovercolor to grey, it still get partly painted in blue (maybe cause of the normal color of the button) I am pretty sure this is related to the color the buttons / icons have that I recently hovered or I will hover over before/after leaving. GIFScrollpaneBroken2

vincenzopalazzo commented 5 years ago

@Reap00r I repaint new border, try this version and if it's work I will create a pull request This is version https://github.com/vincenzopalazzo/material-ui-swing/releases/tag/V9.9

Reap00r commented 5 years ago

Hi @vincenzopalazzo, I tried your version and it still doesn't work unfortunately. In my test I didn't remove all the mouse listeners, because I wouldn't be able to handle this in my project. GIFScrollpaneBroken3

vincenzopalazzo commented 5 years ago

Hi @Reap00r,

I added new change, you try it https://github.com/vincenzopalazzo/material-ui-swing/releases/tag/V9.9 if the error persists, I will create a version for debugging your application so by analyzing the output we will be able to understand what's wrong, in the meantime I have removed the BasicButtonArrow and I set the icons manually, try and let me know

Reap00r commented 5 years ago

Hi @vincenzopalazzo, just to be sure I am doing this stuff right. When I click on the link you provided, I see this: vincenzopalazzo released this 11 days ago Now when I download your asset (material ui design), is this the latest version?

Since I was not sure about that I cloned your project and build the version myself today in the morning. Now I tried to pull and build it myself but there were no changes that I could pull.

Thanks for helping me figuring that out

vincenzopalazzo commented 5 years ago

Hi @Reap00r,

The jar should be the one I loaded, but to avoid working on projects that are not up to date I will now commit the latest version, which you can easily build the jar with maven

vincenzopalazzo commented 5 years ago

@Reap00r the version are online, I attend your feedback :)

Reap00r commented 5 years ago

@vincenzopalazzo, hopefully I wasn't the problem all along. I just saw that I used your fixedsomeissue branch and not the master and maybe that's the reason why your changes didn't work.. maybe because they were not in my version?!

Well.. anyway.. with the master branch it is WORKING :D

Great work and thanks for your help as always!

vincenzopalazzo commented 5 years ago

@Reap00r The branch fixedsomeissue is the version allineated with atawr, the branch master is the my version.

Well, I'm happy of the my last change worked, the problem was the ButtonArrow, because paint the her border, now the ButtonArrow is remove.

I will create a pull request when I'm fixing this issues

Thank you for help me learning

Great work and thanks for your help as always!

vincenzopalazzo commented 5 years ago

Now I Creating a pull request, the pull request resolve this problem, @atarw can you close this issue, please?