From 629320a40b4812f9f77322663f80ab696f9c10f1 Mon Sep 17 00:00:00 2001 From: "SND\\eagleeyestudios_cp" Date: Sat, 8 Mar 2014 15:05:44 +0000 Subject: [PATCH] Applied patch 15966 by KorsarNek, thanks for that! Patch Notes: Small fix that just removes the flicker of the Content Compiler gui for Linux systems. --- Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs b/Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs index 8c81031d..ffc2664b 100644 --- a/Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs +++ b/Tools/ANXContentCompilerGUI/Controls/ArrowButton.cs @@ -3,6 +3,7 @@ using System; using System.ComponentModel; using System.Windows.Forms; using ANX.Framework.NonXNA.Development; +using System.Drawing; #endregion // This file is part of the EES Content Compiler 4, @@ -12,9 +13,11 @@ using ANX.Framework.NonXNA.Development; namespace ANX.ContentCompiler.GUI.Controls { + //Reclaimer: on systems other than windows, mono 3.x is needed to make this class not crash on creation. + //For ubuntu, see this: http://stackoverflow.com/questions/13365158/installing-mono-3-x-3-0-x-and-or-3-2-x [Developer("SilentWarrior/Eagle Eye Studios")] [PercentageComplete(100)] - [TestState(TestStateAttribute.TestState.Tested)] //TODO: Fix the strange flickering with mono that makes the button unusable as seen on Linux + [TestState(TestStateAttribute.TestState.Tested)] public partial class ArrowButton : UserControl { public ArrowButton() @@ -39,7 +42,13 @@ namespace ANX.ContentCompiler.GUI.Controls private void ArrowButtonMouseLeave(object sender, EventArgs e) { - BorderStyle = BorderStyle.None; + //Because we trigger this on multiple contained controls and we want to act as they would be one, we have to make sure that we left our main control and + //not just the child controls. Otherwise, moving from label to pictureBox would cause the border to disappear. + //With this solution, we also don't get any flicker on ubuntu systems, it may cause some ghosting, but otherwise it works fine. + if (!this.ClientRectangle.Contains(this.PointToClient(Control.MousePosition))) + { + BorderStyle = BorderStyle.None; + } } private void ArrowButtonMouseDown(object sender, MouseEventArgs e)