Jyers / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
http://marlinfw.org
GNU General Public License v3.0
2.14k stars 387 forks source link

Pop-up highlight colour not following menu selection #562

Closed gothcha closed 3 years ago

gothcha commented 3 years ago

As I was taking the photos @Jyers requested I noticed that the Confirm/Cancel pop-up and the Confirm pop-up had the default highlight rather than the colour specified in the Visuals Menu. This makes it difficult to see.

IMG_5520

I edited the following in creality_dwin.cpp to define the correct colours

void CrealityDWINClass::Popup_Select() { _const uint16_t c1 = (selection==0) ? GetColor(eeprom_settings.highlight_box, Color_White) : Color_Bg_Window, c2 = (selection==0) ? Color_Bg_Window : GetColor(eeprom_settings.highlight_box, ColorWhite);

void CrealityDWINClass::Draw_Print_confirm() { Draw_Print_Screen(); process = Confirm; popup = Complete; DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 252, 263, 351); DWIN_ICON_Show(ICON, ICON_Confirm_E, 87, 283); _DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 86, 282, 187, 321); DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, ColorWhite), 85, 281, 188, 322);

This is how the pop-ups look now IMG_5537 IMG_5538 IMG_5539

AngleV commented 3 years ago

Very nice. We missed that.

@gothcha Thank you

gothcha commented 3 years ago

My pleasure, in fact I was trying to improve the 'Confirm' icon as it is very hard to see the white on the blue, I created some new icons but was unable to incorporate them into the 9.ICO, they come out blank. I tried Gimp and Affinity Photo and I know the .jpg format is tricky.

These are the proposed icons

089-ICON_Confirm_E 087-ICON_Cancel_E 085-ICON_Continue_E

The fixed highlight box will make it easy to determine the active icon and the black on blue should be more visible.

Maybe you can merge them into the 9.ICO for me and if you like them include in your set?

AngleV commented 3 years ago

a-haaa..

This is nice to hear it because in fact i was thinking the same thing about those icons but i was too bored to fix them. I will merge them and i will upload a new 9.ico file for everyone interesting in the next days.

Jyers commented 3 years ago

Thanks for the catch, either me or @AngleV will incorporate the fix into his latest PR.

gothcha commented 3 years ago

@tititopher68 sounds neat - look forward to testing it. Am I correct in thinking you are now not using the 9.ICO icon but instead printing boxes and text? Sounds a good plan and more adaptable, nice work. This firmware is getting so slick! Just love your ideas.

gothcha commented 3 years ago

Great well done, coincidentally we have a guide dog puppy which we are training, so do quite a bit with UK Guide Dogs and have quite a few VI friends. I will give this code a try and let you know how it looks. I can take some more photos if it would be helpful to it demonstrate the new look. Damian

AngleV commented 3 years ago

@tititopher68

Thats nice !!!

gothcha commented 3 years ago

Neat, is the code on your repo? When I checked earlier I couldn’t find the relevant .cpp & .h files. I would love to give it a go

gothcha commented 3 years ago

Can you change the background of the Cancel button too? This code makes it flexible and no need to change icons. The text is very clear.

gothcha commented 3 years ago

Excellent thank you I shall try and test it out :)

gothcha commented 3 years ago

@tititopher68 Just compiled your code, it works perfectly! Wow yes there are a lot of choices now. I have configured it to my liking and it certainly solves the original visibility issue. I shall keep this for now until @Jyers has a new release. There are so many updates/improvements it is hard to keep up!! Thank you

gothcha commented 3 years ago

@AngleV I have enhanced a few more of the icons and added one for the Probe to use in the advanced menu. I cleaned up the warning icons and the BLTouch icons as they were rather fuzzy and dull!

I successfully packed and loaded these after editing them using Paint.

IMG_5614 IMG_5615 IMG_5616 Custom Icon data.zip

IMG_5617 IMG_5618

gothcha commented 3 years ago

Great, nice to have a bit of colour!

AngleV commented 3 years ago

@gothcha it looks awesome !!!

gothcha commented 3 years ago

Thank you, I will keep working to perfect them and keep a design pattern going. Gradually we will lose some of the blue on grey look! Any suggestions will be taken on board guys.

Jyers commented 3 years ago

@gothcha Those look great! I'm going to be organizing the display firmware folder soon and making a place for different "themes" or icon packs people have made. Would love to have this be one of them if that's cool with you :)

gothcha commented 3 years ago

Thanks Jacob, I would be honoured, it is a pleasure to help your great work, it must take up a lot of your precious time! I will work on completing the set and send you a final copy. I know having a distinctive look is important and sets this repo apart. It appears to be exploding based on the increase in the comments & questions.

gothcha commented 3 years ago

OK guys I have cleaned up and enhanced most of the icons. The one I love in particular is the speed icon. I could never understand the original one, so now there is a cute racing hare!! I quite like the overall look, without going over the top! Let me know if you have any comments or suggestions.

This is the main selection. IMG_5622 IMG_5625 IMG_5626 IMG_5627 IMG_5629

I will use it for a few days and see if there are any issues then I will release a file set to you Jacob.

Tuncay-Ayhan commented 3 years ago

OK guys I have cleaned up and enhanced most of the icons. The one I love in particular is the speed icon. I could never understand the original one, so now there is a cute racing hare!! I quite like the overall look, without going over the top! Let me know if you have any comments or suggestions.

I will use it for a few days and see if there are any issues then I will release a file set to you Jacob.

That looks awesome! Thanks for sharing!

Jyers commented 3 years ago

Looks great! Can't wait :)

Tuncay-Ayhan commented 3 years ago

What do you think about that ?

Damn. That looks amazing. Don't tease me like that xD

gothcha commented 3 years ago

@tititopher68 Well done!

gothcha commented 3 years ago

I agree, it is the same for me, it doesn't hang but the icons are not displayed or mis-formed!! I am sure it was working previously. I shall test with the official DWIN and see what happens

gothcha commented 3 years ago

I tried re-saving the jpg files and this fixed the one that was distorted but the others are still not displaying. Do you know what the file limit size is?

gothcha commented 3 years ago

Interestingly when I initially added the Probe Icon as 255 it didn't work! So maybe it is related. The one that works AxisBR is 250. I don't know why there is a gap in the numbers above 205. Maybe try moving them to lower numbers?

gothcha commented 3 years ago

Christophe - when I used the 9.ICO from the 'Mlevel-arrows' folder it works! This is 230KB the one that I modified that does not is 236KB. Did you try the one from this folder?

gothcha commented 3 years ago

Looks like you are correct, if I keep the file to 227KB it is fine. Some of the new icons are larger files due to colour etc. Will have to do some more work to keep them below the limit!

Jyers commented 3 years ago

We can drop all the text image files to save space. I swapped all image copy text for string draws a while ago.

gothcha commented 3 years ago

That’s a big help, I was about to try this too, I will go through the .h file and see which icons Jacob is not actually using, I found one yesterday as I was editing them

gothcha commented 3 years ago

@Jyers If you use Christopher’s mods to replace the Confirm, Continue and Cancel popups that will save three more!

gothcha commented 3 years ago

I will do the same, I have already made some changes to the .py file

Jyers commented 3 years ago

@tititopher68 Interesting, I'll have to take a look at that...

gothcha commented 3 years ago

@tititopher68 @Jyers

Gotcha_Custom Icons.zip

I have attached my updated icons. Incorporate these as you think best, it looks like you have a great handle on the DWIN file structures now.

As a note I found that the current icon choices may not be ideal so I made the following changes

Draw_Menu_Item(row, ICON_Speed, (char*)"Max Speed", NULL, true);

case TUNE_FLOW: if (draw) { Draw_Menu_Item(row, ICON_MaxSpeedE, (char*)"Flow Rate");

case MOTION_FLOW: if (draw) { Draw_Menu_Item(row, ICON_MaxSpeedE, (char*)"Flow Rate");

I think I am correct that 'Flow Rate' relates to the extruder?

Good luck and I look forward to seeing the final release.

gothcha commented 3 years ago

@tititopher68 I was able to use all my icons and the manual level additions in a single 9.ICO by deleting the chinese and other unused icons. I will use this setup for now. Marlin 2.0.8 update list is amazing, I assume almost all of it was in the latest bug fix. Makes me realise why odd things sometimes happen when Jyers releases new versions inc upstream mods!

Jyers commented 3 years ago

@gothcha What icons did you delete? When I was organizing the icon packs, I noticed even with the Chinese and unknown icons deleted, the .ICO file was still over 226, which @tititopher68 determined to be the max.

gothcha commented 3 years ago

I deleted 34,77,82,83,84,86 & 88 This saved around 10K. From my checks you were not calling any of these.

9.ICO.zip

My addition/updates then took the file to 217K. Strangely the default DWIN in your repo is 229KB, and the MLArrows is 230KB. So it doesn't seem quite logical, it may be due to the index requirements and memory layout?

gothcha commented 3 years ago

Neat! Mind you I cannot imagine that after loading the custom icons that anyone would switch back to the stock ones? Or am I biased?? It makes it easier to switch but they still have to load a custom DWIN.

gothcha commented 3 years ago

Christophe where did you find the data on the 3,6 & 9.ICO I searched for ages and didn’t manage to find much useful?

it is certainly a great idea to have a couple of distinct custom sets, the dark/light is interesting. Can the icon numbers be spread over the ICO files, I know the limit is 256 files in an individual file. How does the switching work?

gothcha commented 3 years ago

Adaptor - Very smart but simple idea, I was getting tired of this too! I think I will give this a go.
I do take your point on the colour choices.

Yes I get it now, no I hadn’t seen the ICON definition, this is a very simple method. Well done. Useful to extend number/size of icons too. You will certainly impress your French users with these upgrades 👍