Re: [Kicad-developers] [RFC] New color selector for GAL canvas, and more easy support of opacity.

2017-10-31 Thread Thomas Kindler
On Mon, July 17, 2017 19:20, jp charras wrote:
> Attached a patch which adds a new (and I hope better) color selector for
> GAL canvas, with support of opacity.

I think I found a small bug - when the opacity is changed using the "{" /
"}" hotkeys, the value in the dialog isn't updated.

best regards,
Thomas

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [RFC] New color selector for GAL canvas, and more easy support of opacity.

2017-07-19 Thread Maciej Sumiński
Hi Jean-Pierre,

On 07/19/2017 11:41 AM, jp charras wrote:
[snip]
> I committed you patch and added a few minor refinements in dialog.
> One can now select a color by clicking on the HS map.

Thank you for implementing it so quickly, it works great!

> About the vertical 'Value' slider versus spin box control, the first version 
> of this dialog was
> using a spin box control.
> A second version used both widgets.
> 
> After testing the dialog, I found the vertical slider much more easy to use, 
> especially if you
> consider it is useful not only for the HS map, but also to adjust the RVB 
> selection.
> 
> I can re-add the spin box value control (it has the advantage the user can 
> edit the value), but the
> 'Value' slider is in any case useful.

Ok, I understand. Let's leave it as it is now and wait for more input.

Regards,
Orson



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [RFC] New color selector for GAL canvas, and more easy support of opacity.

2017-07-19 Thread jp charras
Le 19/07/2017 à 10:01, Maciej Sumiński a écrit :
> Hi Jean-Pierre,
> 
> Thank you, the new color picker looks very nice. I noticed is there is a
> typo in the right sizer ('RGB Values' vs 'HS Values'), and I am getting
> an assert when opening the dialog. Both problems are fixed in the
> attached patch.
> 
> I do not want to be a complainer, but I would consider two things:
> - Turn the vertical 'Value' slider into a spin box control, so the look
> is consistent (RGB and HSV values selectors).
> - Do you think it would be hard to select color by clicking on the HSV map?
> 
> No matter what is the answer to the above questions, I am in favor of
> committing the patch as in the current state it is already an improvement.
> 
> Regards,
> Orson

Thanks Orson,

I committed you patch and added a few minor refinements in dialog.
One can now select a color by clicking on the HS map.

About the vertical 'Value' slider versus spin box control, the first version of 
this dialog was
using a spin box control.
A second version used both widgets.

After testing the dialog, I found the vertical slider much more easy to use, 
especially if you
consider it is useful not only for the HS map, but also to adjust the RVB 
selection.

I can re-add the spin box value control (it has the advantage the user can edit 
the value), but the
'Value' slider is in any case useful.

-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [RFC] New color selector for GAL canvas, and more easy support of opacity.

2017-07-19 Thread Maciej Sumiński
Hi Gaurav,

We currently do, but there is no way to set opacity using the standard
wxWidgets dialog.

Regards,
Orson

On 07/19/2017 10:21 AM, Gaurav Juvekar wrote:
> Hi all,
> 
> I haven't actually seen how it looks, but can't we use 
> http://docs.wxwidgets.org/3.1/classwx_colour_dialog.html directly?
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 




signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [RFC] New color selector for GAL canvas, and more easy support of opacity.

2017-07-19 Thread Gaurav Juvekar
Hi all,

I haven't actually seen how it looks, but can't we use 
http://docs.wxwidgets.org/3.1/classwx_colour_dialog.html directly?

-- 
Regards,
Gaurav Juvekar



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [RFC] New color selector for GAL canvas, and more easy support of opacity.

2017-07-19 Thread Maciej Sumiński
Hi Jean-Pierre,

Thank you, the new color picker looks very nice. I noticed is there is a
typo in the right sizer ('RGB Values' vs 'HS Values'), and I am getting
an assert when opening the dialog. Both problems are fixed in the
attached patch.

I do not want to be a complainer, but I would consider two things:
- Turn the vertical 'Value' slider into a spin box control, so the look
is consistent (RGB and HSV values selectors).
- Do you think it would be hard to select color by clicking on the HSV map?

No matter what is the answer to the above questions, I am in favor of
committing the patch as in the current state it is already an improvement.

Regards,
Orson

On 07/17/2017 08:20 PM, jp charras wrote:
> Hi alls,
> 
> Attached a patch which adds a new (and I hope better) color selector for GAL 
> canvas, with support of
> opacity.
> 
> This patch also ensures the color opacity is now stored in pcbnew config.
> So it should be not lost between sessions,
> and not lost when switching between legacy and gal canvases.
> 
> Of course, because the legacy canvas has no support of opacity, there is no 
> change in legacy canvas,
> unless bug.
> 
> Please test it.
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

From 42b75d3a20e4836795e7f81c9ce92f26d540cada Mon Sep 17 00:00:00 2001
From: Maciej Suminski 
Date: Wed, 19 Jul 2017 09:33:26 +0200
Subject: [PATCH] COLOR4D_PICKER assert and typo fix

---
 common/widgets/color4Dpickerdlg_base.cpp | 27 +--
 common/widgets/color4Dpickerdlg_base.fbp |  6 +++---
 common/widgets/color4Dpickerdlg_base.h   |  2 +-
 3 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/common/widgets/color4Dpickerdlg_base.cpp b/common/widgets/color4Dpickerdlg_base.cpp
index e1f30e958..62d07b49a 100644
--- a/common/widgets/color4Dpickerdlg_base.cpp
+++ b/common/widgets/color4Dpickerdlg_base.cpp
@@ -1,5 +1,5 @@
 ///
-// C++ code generated with wxFormBuilder (version Jul  2 2017)
+// C++ code generated with wxFormBuilder (version Oct 17 2016)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -125,36 +125,35 @@ COLOR4D_PICKER_DLG_BASE::COLOR4D_PICKER_DLG_BASE( wxWindow* parent, wxWindowID i
 	bSizerLowerFreeColors->Add( sbSizerSetRGB, 1, wxEXPAND, 5 );
 	
 	wxStaticBoxSizer* sbSizerSetHSV;
-	sbSizerSetHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, wxT("RGB Values") ), wxHORIZONTAL );
+	sbSizerSetHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, wxT("HS Values") ), wxHORIZONTAL );
 	
-	wxFlexGridSizer* fgSizerHSB;
-	fgSizerHSB = new wxFlexGridSizer( 0, 2, 0, 0 );
-	fgSizerHSB->AddGrowableCol( 0 );
-	fgSizerHSB->AddGrowableCol( 1 );
-	fgSizerHSB->AddGrowableCol( 2 );
-	fgSizerHSB->SetFlexibleDirection( wxBOTH );
-	fgSizerHSB->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+	wxFlexGridSizer* fgSizerHSV;
+	fgSizerHSV = new wxFlexGridSizer( 0, 2, 0, 0 );
+	fgSizerHSV->AddGrowableCol( 0 );
+	fgSizerHSV->AddGrowableCol( 1 );
+	fgSizerHSV->SetFlexibleDirection( wxBOTH );
+	fgSizerHSV->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
 	
 	m_staticTextHue = new wxStaticText( sbSizerSetHSV->GetStaticBox(), wxID_ANY, wxT("Hue"), wxDefaultPosition, wxDefaultSize, 0 );
 	m_staticTextHue->Wrap( -1 );
-	fgSizerHSB->Add( m_staticTextHue, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+	fgSizerHSV->Add( m_staticTextHue, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
 	
 	m_staticTextSat = new wxStaticText( sbSizerSetHSV->GetStaticBox(), wxID_ANY, wxT("Saturation"), wxDefaultPosition, wxDefaultSize, 0 );
 	m_staticTextSat->Wrap( -1 );
-	fgSizerHSB->Add( m_staticTextSat, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+	fgSizerHSV->Add( m_staticTextSat, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
 	
 	m_spinCtrlHue = new wxSpinCtrl( sbSizerSetHSV->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
 	m_spinCtrlHue->SetMinSize( wxSize( 80,-1 ) );
 	
-	fgSizerHSB->Add( m_spinCtrlHue, 0, wxALL|wxEXPAND, 5 );
+	fgSizerHSV->Add( m_spinCtrlHue, 0, wxALL|wxEXPAND, 5 );
 	
 	m_spinCtrlSaturation = new wxSpinCtrl( sbSizerSetHSV->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 255, 128 );
 	m_spinCtrlSaturation->SetMinSize( wxSize( 80,-1 ) );
 	
-	fgSizerHSB->Add( m_spinCtrlSaturation, 0, wxALL|wxEXPAND, 5 );
+	fgSizerHSV->Add( m_spinCtrlSaturation, 0, wxALL|wxEXPAND, 5 );
 	
 	
-	sbSizerSetHSV->Add( fgSizerHSB, 1, wxEXPAND, 5 );
+	sbSizerSetHSV->Add( fgSizerHSV, 1, wxEXPAND, 5 );
 	
 	
 	bSizerLowerFreeColors->Add( sbSizerSetHSV, 1, wxEXPAND, 5 );
diff --git a/common/widgets/color4Dpickerdlg_base.fbp b/common/widgets/color4Dpickerdlg_base.fbp

Re: [Kicad-developers] [RFC] New color selector for GAL canvas, and more easy support of opacity.

2017-07-18 Thread Wayne Stambaugh
JP,

I did some simple testing this and it seems to work fine.  I didn't
check every layer color setting but the transparency setting works on
all of the layers that I did test.  I think it is safe to commit patch
unless there are someone objects.

Thanks,

Wayne

On 7/17/2017 2:20 PM, jp charras wrote:
> Hi alls,
> 
> Attached a patch which adds a new (and I hope better) color selector for GAL 
> canvas, with support of
> opacity.
> 
> This patch also ensures the color opacity is now stored in pcbnew config.
> So it should be not lost between sessions,
> and not lost when switching between legacy and gal canvases.
> 
> Of course, because the legacy canvas has no support of opacity, there is no 
> change in legacy canvas,
> unless bug.
> 
> Please test it.
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp