"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Pinta.Core/Managers/PaletteManager.cs" between
pinta-1.7.tar.gz and pinta-1.7.1.tar.gz

About: Pinta is a powerful image drawing and editing program (modeled after Paint.NET).

PaletteManager.cs  (pinta-1.7):PaletteManager.cs  (pinta-1.7.1)
skipping to change at line 28 skipping to change at line 28
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
using System; using System;
using Gtk;
using Cairo; using Cairo;
namespace Pinta.Core namespace Pinta.Core
{ {
public class PaletteManager public class PaletteManager
{ {
private Color primary; private Color primary;
private Color secondary; private Color secondary;
private Palette palette; private Palette palette;
skipping to change at line 74 skipping to change at line 75
return palette; return palette;
} }
} }
public PaletteManager () public PaletteManager ()
{ {
PrimaryColor = new Color (0, 0, 0); PrimaryColor = new Color (0, 0, 0);
SecondaryColor = new Color (1, 1, 1); SecondaryColor = new Color (1, 1, 1);
} }
public void DoKeyPress (object o, KeyPressEventArgs e)
{
if (e.Event.State.FilterModifierKeys() == Gdk.ModifierTyp
e.None && e.Event.Key.ToUpper() == Gdk.Key.X) {
Color temp = PintaCore.Palette.PrimaryColor;
PintaCore.Palette.PrimaryColor = PintaCore.Palett
e.SecondaryColor;
PintaCore.Palette.SecondaryColor = temp;
e.RetVal = true;
}
}
#region Protected Methods #region Protected Methods
protected void OnPrimaryColorChanged () protected void OnPrimaryColorChanged ()
{ {
if (PrimaryColorChanged != null) if (PrimaryColorChanged != null)
PrimaryColorChanged.Invoke (this, EventArgs.Empty ); PrimaryColorChanged.Invoke (this, EventArgs.Empty );
} }
protected void OnSecondaryColorChanged () protected void OnSecondaryColorChanged ()
{ {
if (SecondaryColorChanged != null) if (SecondaryColorChanged != null)
 End of changes. 2 change blocks. 
0 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)