On 2/7/2017 11:42 AM, Jon Evans wrote: > I can think of a few ways to approach it: > > 1) Don't change how color works in the UI of pcbnew for now. Change to > wxColour under the hood, but keep the current color selections -- no > user visible change, no problems, but also no new feature in pcbnew GAL. > > 2) Allow using the new color picker in GAL canvas of pcbnew. When user > changes from legacy to GAL, no problem. When user changes from GAL to > legacy, now there is the question of what to do. We could: > > 2a) Reset layer colors to the legacy defaults
Probably the safest bet albeit annoying for users who switch between canvases. > 2b) Set layer colors to the "closest" legacy default to what the user > set in GAL (how to define "closest" requires some testing I think) -- > optionally give a notice to the user that their colors have been > modified because of the switch to legacy. I don't know how successfully you will be able to choose the nearest color and still have the legacy canvas look reasonable. There may be a way to test this but it could be tricky. This would be my preference if it can be implemented correctly. > 2c) Warn the user that they have changed to colors that won't work right > in legacy canvas, and advise them to manually reset their layer colors. > Things will look weird until the user does so. Please under no circumstances should we be popping up warning dialogs between canvas switches. That would be really annoying. > > Any preference for the above? > > -Jon > > On Tue, Feb 7, 2017 at 11:20 AM, Wayne Stambaugh <[email protected] > <mailto:[email protected]>> wrote: > > I'm not sure how you would prevent "bad" legacy colors from being > selected without limiting the color selection in the gal canvas. If you > can pull it off without the code limiting colors in gal, still be useful > in legacy, and have a reasonable design than I'm OK with it. Given that > we are nearing a feature freeze for the next stable release, if you > cannot have this ready reasonably soon (next month or two), then it will > have to be pushed back to the version 6 release. > > Cheers, > > Wayne > > On 2/7/2017 10:27 AM, Jon Evans wrote: > > Would you accept the patch to move to wxColour if it were not possible > > to choose "bad" colors in the the layout tool? It would be easy to > > restrict the colors to the current set in the pcb/footprint editors and > > just allow user selection in the schematic/symbol editors for now. > > > > On Tue, Feb 7, 2017 at 10:19 AM, Wayne Stambaugh <[email protected] > <mailto:[email protected]> > > <mailto:[email protected] <mailto:[email protected]>>> wrote: > > > > On 2/7/2017 9:00 AM, Chris Pavlina wrote: > > > On Tue, Feb 07, 2017 at 08:57:23AM -0500, Jon Evans wrote: > > >> Hi Simon, JP, > > >> > > >> I understand the issue with the colors chosen for OR-mixing. I > thought a > > >> good first step would be to set the framework for the future > when that is > > >> no longer relevant (i.e. when there is no legacy canvas > anymore). It can > > >> be a "under the hood" change only in pcbnew, until the legacy > canvas is > > >> removed. > > >> > > >> BTW Chris, I also have some ideas for improving the > visualization of very > > >> busy (dense and high layer count) boards, I will play with them > soon... > > > > > > Nice! I look forward to that. Definitely an area we can improve > on. > > > > Since the schematic editor canvas doesn't support transparency, you > > could make the colors anything you want. In the board editor, the > layer > > managers handles colors for both legacy and gal canvases so I'm not > sure > > it makes sense until the legacy canvas is deprecated. > > > > > > > >> > > >> -Jon > > >> > > >> On Tue, Feb 7, 2017 at 6:32 AM, Chris Pavlina > > <[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>>> > > >> wrote: > > >> > > >>> Let people choose. Have the default colors be wxDC-friendly. > > Trust me, > > >>> nobody is choosing to work with eight-layer boards in legacy. > > >>> > > >>> On Tue, Feb 07, 2017 at 09:01:10AM +0100, jp charras wrote: > > >>>> Le 07/02/2017 à 06:31, Simon Wells a écrit : > > >>>>> i thought this wasn't possible due to wxDC limitations > > >>>> > > >>>> Exactly, wxDC does not have a transparency feature to > draw items. > > >>>> > > >>>> In this case, when you want to draw board layers with a > > transparency > > >>> effect, the only one other way > > >>>> to do that is to use logic combination between colors (for > > transparency: > > >>> the OR operation.) > > >>>> > > >>>> In other to achieve a good result, you cannot use any > color for > > layers. > > >>>> You have to choose a set of colors which allows this good > result. > > >>>> (by adjusting the 32 bits binary values of each color to > ensure > > a good > > >>> result when 2 or more color > > >>>> values are ORed) > > >>>> > > >>>> There are not a lot of suitable binary values. > > >>>> In all cases the background must be black (when using OR or > > >>> transparency). > > >>>> > > >>>> Note also Eeschema does not use currently transparency, > and the > > choice > > >>> of colors is not critical. > > >>>> > > >>>>> > > >>>>> On 7 February 2017 at 17:00, Chris Pavlina > > <[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>>> > > >>> wrote: > > >>>>>> I'm working on an eight-layer board and really can't > wait for > > this to > > >>>>>> hit pcbnew too. It's bloody impossible to tell layers > apart with > > >>> KiCad's > > >>>>>> state-of-the-80s-art color system. > > >>>> > > >>>> I have made a few boards with 8 and one with 16 layers. > > >>>> There is no perfect way to see all layers. > > >>>> > > >>>> I used Pcbnew and Altium (in a company which has a Altium > > license) to > > >>> design a 8 layers board (2 > > >>>> very similar boards, one with Pcbnew, the other with Altium, > > because > > >>> this company used Altium). > > >>>> > > >>>> Altium allows arbitrary colors and transparency, but a 8 > layers > > board is > > >>> not easy to manage. > > >>>> > > >>>> So do not expect allowing arbitrary colors and transparency > > will fix > > >>> your problem. > > >>>> (In the best case, it slightly helps). > > >>>> > > >>>> > > >>>> Having said that, using a selected set of colors does not > imply > > using > > >>> EDA_COLOR_T in Kicad code. > > >>>> wxColor can be used instead of. > > >>>> > > >>>> This is only the *color choice* in Pcbnew which is > constrained > > in legacy > > >>> canvas. > > >>>> > > >>>> EDA_COLOR_T comes from the fact the legacy graphic > primitives where > > >>> written for an other library, > > >>>> not for wxWidgets. > > >>>> (Kicad was started before wxWidgets exists) > > >>>> > > >>>>>> > > >>>>>> On Mon, Feb 06, 2017 at 10:03:11PM -0500, Jon Evans wrote: > > >>>>>>> Hi all, > > >>>>>>> > > >>>>>>> I started working on the idea of a color theme system > for KiCad, > > >>> starting > > >>>>>>> with the schematic editor. > > >>>>>>> > > >>>>>>> This change relies on a complete removal of > EDA_COLOR_T from the > > >>> code, and > > >>>>>>> replacement with a color structure that can handle > arbitrary > > >>> colors. I > > >>>>>>> think this is important and the right path for the future, > > but since > > >>> it's a > > >>>>>>> significant change, I wanted to get buy-in before > going any > > farther > > >>> down > > >>>>>>> this road. I can understand the reasons for using an > enum for > > >>>>>>> color--especially since it lets the developers > restrict the > > colors > > >>> to those > > >>>>>>> that will work well with the drawing technique of the > legacy > > >>> canvases. > > >>>>>>> But, since the new canvases will have no problem > supporting > > arbitrary > > >>>>>>> colors, I think it makes sense to start setting up the > > groundwork > > >>> for that. > > >>>>>>> > > >>>>>>> In my test code, I have replaced EDA_COLOR_T with > wxColour, > > since > > >>> that is > > >>>>>>> used internally in a few places already, and it was pretty > > simple > > >>> (although > > >>>>>>> somewhat time-consuming) to replace all usages. wxColour > > has the > > >>> nice > > >>>>>>> property of serializing/deserializing from hex color > codes like > > >>> "#80FC62" > > >>>>>>> so that's what I use for storing in the settings for now > > (eventually > > >>> I > > >>>>>>> think color settings should be in their own files so that > > they can be > > >>>>>>> traded by users). Plus, there is a canned > wxColourPicker widget > > >>> that I can > > >>>>>>> use in place of the custom color picker buttons that are > > used in the > > >>>>>>> settings today. > > >>>>>>> > > >>>>>>> You can see some screenshots of the (work-in-progress) > settings > > >>> dialog > > >>>>>>> changes, and an example of a custom color theme in the > schematic > > >>> editor, > > >>>>>>> here: > > >>>>>>> http://imgur.com/a/MxMmb > > >>>>>>> > > >>>>>>> So, any feedback from the core team? Any reason why I > > shouldn't move > > >>>>>>> forward with preparing a patch to move from EDA_COLOR_T to > > wxColour > > >>> across > > >>>>>>> the board? > > >>>>>>> > > >>>>>>> Best, > > >>>>>>> Jon > > >>>>>> > > >>>>>> > > >>>>>> _______________________________________________ > > >>>>>> Mailing list: https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > >>>>>> Post to : [email protected] > <mailto:[email protected]> > > <mailto:[email protected] > <mailto:[email protected]>> > > >>>>>> Unsubscribe : https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > >>>>>> More help : https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp> > > <https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp>> > > >>>>> > > >>>>> _______________________________________________ > > >>>>> Mailing list: https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > >>>>> Post to : [email protected] > <mailto:[email protected]> > > <mailto:[email protected] > <mailto:[email protected]>> > > >>>>> Unsubscribe : https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > >>>>> More help : https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp> > > <https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp>> > > >>>>> > > >>>> > > >>>> > > >>>> -- > > >>>> Jean-Pierre CHARRAS > > >>>> > > >>>> _______________________________________________ > > >>>> Mailing list: https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > >>>> Post to : [email protected] > <mailto:[email protected]> > > <mailto:[email protected] > <mailto:[email protected]>> > > >>>> Unsubscribe : https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > >>>> More help : https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp> > > <https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp>> > > >>> > > >>> _______________________________________________ > > >>> Mailing list: https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > >>> Post to : [email protected] > <mailto:[email protected]> > > <mailto:[email protected] > <mailto:[email protected]>> > > >>> Unsubscribe : https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > >>> More help : https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp> > > <https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp>> > > >>> > > > > > > _______________________________________________ > > > Mailing list: https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > > Post to : [email protected] > <mailto:[email protected]> > > <mailto:[email protected] > <mailto:[email protected]>> > > > Unsubscribe : https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > > More help : https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp> > > <https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp>> > > > > > > > _______________________________________________ > > Mailing list: https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > Post to : [email protected] > <mailto:[email protected]> > > <mailto:[email protected] > <mailto:[email protected]>> > > Unsubscribe : https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers> > > <https://launchpad.net/~kicad-developers > <https://launchpad.net/~kicad-developers>> > > More help : https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp> > > <https://help.launchpad.net/ListHelp > <https://help.launchpad.net/ListHelp>> > > > > > > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

