added a change function color parameter for issue #151#153
added a change function color parameter for issue #151#153AlexandreArduino wants to merge 2 commits intoUpsilonNumworks:upsilon-devfrom AlexandreArduino:upsilon-dev-color-functions
Conversation
|
|
I think something like this (numworks#1385) or this (numworks#1741) will be more readable, and you wrote “vertt” instead of “vert”, but thanks you for this pull request |
|
it is aleady corrected for the "vertt" :p and for numworks#1741 i agree with you, i'll try to modify it later |
Sorry :p Btw, I think that a more "compact" solution like the one used in numworks#1385 (comment) should be rather used that a list view. |
|
Yes sure but if we want to have the same ui in the whole calculator (numworks#1385 (comment) as said artaxxx) it's better to use a list view but you're right that it's not very compact :p |
|
I think the implementation that Redglow showed is indeed better. |
|
okay no problem :p |
However, I'm not personally convinced in the square selector (the idea is very good, but it can be a bit not User friendly) |
| if(color == KDColorBlack) return Message(0); | ||
| if(color == KDColorBlue) return Message(1); | ||
| if(color == KDColorRed) return Message(2); | ||
| if(color == KDColorPurple) return Message(3); | ||
| if(color == KDColorGreen) return Message(4); | ||
| if(color == KDColorOrange) return Message(5); | ||
| if(color == KDColorYellow) return Message(6); | ||
| if(color == KDColorWhite) return Message(7); | ||
| return Message(2); |
There was a problem hiding this comment.
yes I had this idea but sometimes in the code you use many if(...) instead of a switch so I thought it was what I had to do but 🤔 but i correct it
There was a problem hiding this comment.
finally I tried the switch but I've got an error : error: call to non-‘constexpr’ function ‘KDColor::operator uint16_t() const’
case KDColorWhite: return Message(7);
So for now, I remove it :p
|
| HideDerivativeColumn = "Ableitungsfunktion ausblenden" | ||
| AllowedCharactersAZaz09 = "Erlaubt: A..Z, a..z, 0..9, _" | ||
| ReservedName = "Reserviertes Wort" | ||
| FunctionColorBlack = "schwarz" |
There was a problem hiding this comment.
Is it possible to start the colors with a capital letter?
There was a problem hiding this comment.
I don't know how to do that 🤣 no i'm joking but you think this pr is still valid ? bc it is not very compact 🤔 as said @RedGl0w
There was a problem hiding this comment.
I don't know how to do that
Just change the text...
| FunctionColorBlack = "schwarz" | |
| FunctionColorBlack = "Schwarz" |
(and add a line at the end of each file please)
There was a problem hiding this comment.
For the name of the colors, instead of somehow duplicating them, couldn't you rather use the pythonColors ?
There was a problem hiding this comment.
I think it is better to move the Python colour names in the shared i18n file in this case to can build without the Python app.
| FunctionColorGreen = "grün" | ||
| FunctionColorOrange = "Orange" | ||
| FunctionColorYellow = "gelb" | ||
| FunctionColorWhite = "weiß" No newline at end of file |
There was a problem hiding this comment.
Add carriage return (for all files which don't have it)
| #include "color_list.h" | ||
| #include "apps/i18n.h" | ||
|
|
||
| namespace Graph { |
There was a problem hiding this comment.
Don't indent after namespace (for all files)
|
|
||
| namespace Graph { | ||
| I18n::Message Message(int index) { | ||
| static constexpr I18n::Message message[NumberOfColors] = { |
There was a problem hiding this comment.
Indentation should be made of 2 spaces (for all files)
| @@ -0,0 +1,12 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
| #pragma once | |
| #ifndef GRAPH_COLOR_LIST_H | |
| #define GRAPH_COLOR_LIST_H |
This should be done in all header
|
Can you add a space before the function colour arrow ? (it is ugly without space) |

You can now change the function color as asked in the issue
nw_function_color.mp4