intro about entry infobar: fix coding style and whitespace
This commit is contained in:
parent
6c354b2473
commit
f7a7276fcc
|
@ -20,11 +20,11 @@ using System.Drawing;
|
|||
using System.IO;
|
||||
using System.Timers;
|
||||
|
||||
using Mono.Unix;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.ObjCRuntime;
|
||||
using MonoMac.WebKit;
|
||||
using Mono.Unix;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
||||
|
|
|
@ -69,11 +69,9 @@ namespace SparkleShare {
|
|||
|
||||
private void CreateAbout ()
|
||||
{
|
||||
|
||||
Gdk.Color color = Style.Foreground (StateType.Insensitive);
|
||||
string secondary_text_color = SparkleUIHelpers.GdkColorToHex (color);
|
||||
|
||||
|
||||
EventBox box = new EventBox ();
|
||||
box.ModifyBg (StateType.Normal, new TreeView ().Style.Base (StateType.Normal));
|
||||
|
||||
|
@ -86,7 +84,6 @@ namespace SparkleShare {
|
|||
|
||||
box.Add (header);
|
||||
|
||||
|
||||
Version = new Label () {
|
||||
Markup = "<small>Checking for updates...</small>",
|
||||
Xalign = 0,
|
||||
|
@ -152,10 +149,6 @@ namespace SparkleShare {
|
|||
vbox.PackStart (button_bar, false, false, 0);
|
||||
|
||||
Add (vbox);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// You should have received a copy of the GNU General private License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
using Gtk;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
@ -26,7 +27,6 @@ namespace SparkleShare {
|
|||
|
||||
public SparkleEntry ()
|
||||
{
|
||||
|
||||
ExampleTextActive = true;
|
||||
|
||||
FocusGrabbed += delegate { OnEntered (); };
|
||||
|
@ -39,37 +39,27 @@ namespace SparkleShare {
|
|||
|
||||
if (ExampleTextActive)
|
||||
UseExampleText ();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void OnEntered ()
|
||||
{
|
||||
|
||||
if (ExampleTextActive) {
|
||||
|
||||
ExampleTextActive = false;
|
||||
Text = "";
|
||||
UseNormalTextColor ();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public string ExampleText
|
||||
{
|
||||
|
||||
get {
|
||||
|
||||
return pExampleText;
|
||||
|
||||
}
|
||||
|
||||
set {
|
||||
|
||||
pExampleText = value;
|
||||
|
||||
if (ExampleTextActive) {
|
||||
|
@ -77,36 +67,26 @@ namespace SparkleShare {
|
|||
UseExampleText ();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void UseExampleText ()
|
||||
{
|
||||
|
||||
Text = pExampleText;
|
||||
UseSecondaryTextColor ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void UseSecondaryTextColor ()
|
||||
{
|
||||
|
||||
ModifyText (StateType.Normal, Style.Foreground (StateType.Insensitive));
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void UseNormalTextColor ()
|
||||
{
|
||||
|
||||
ModifyText (StateType.Normal, Style.Foreground (StateType.Normal));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,23 +14,21 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
using Gtk;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
||||
// An infobar
|
||||
public class SparkleInfobar : EventBox
|
||||
{
|
||||
public class SparkleInfobar : EventBox {
|
||||
|
||||
public SparkleInfobar (string icon_name, string title, string text)
|
||||
{
|
||||
|
||||
Window window = new Window (WindowType.Popup) {
|
||||
Name = "gtk-tooltip"
|
||||
};
|
||||
|
||||
window.EnsureStyle ();
|
||||
|
||||
Style = window.Style;
|
||||
|
||||
Label label = new Label () {
|
||||
|
@ -47,9 +45,6 @@ namespace SparkleShare {
|
|||
hbox.PackStart (label, false, false, 0);
|
||||
|
||||
Add (hbox);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue