windows statusicon: use regular styled checkbox for toggling notifications. See #640

This commit is contained in:
Hylke Bons 2012-03-18 16:00:39 +00:00
parent 82ebe7e497
commit dbc5e14cc4
4 changed files with 15 additions and 10 deletions

View file

@ -112,16 +112,15 @@ namespace SparkleShare {
this.canvas = new Canvas ();
Content = this.canvas;
this.canvas.Children.Add (size_label);
Canvas.SetLeft (size_label, 24);
Canvas.SetTop (size_label, 4);
this.canvas.Children.Add (this.size_label_value);
Canvas.SetLeft (this.size_label_value, 22 + size_label_rect.Width);
Canvas.SetTop (this.size_label_value, 4);
this.canvas.Children.Add (history_label);
Canvas.SetLeft (history_label, 130);
Canvas.SetTop (history_label, 4);

View file

@ -268,10 +268,10 @@ namespace SparkleShare {
grid_view.ColumnHeaderContainerStyle = header_style;
foreach (SparklePlugin plugin in Controller.Plugins) {
BitmapFrame image = BitmapFrame.Create (
// FIXME: images are blurry
BitmapFrame image = BitmapFrame.Create (
new Uri (plugin.ImagePath)
);
list_view.Items.Add (
new {

View file

@ -217,13 +217,19 @@ namespace SparkleShare {
SparkleMenuItem notify_item = new SparkleMenuItem () {
Header = "Notifications",
IsCheckable = true,
IsChecked = Program.Controller.NotificationsEnabled
StaysOpenOnClick = true
};
CheckBox notify_check_box = new CheckBox () {
Margin = new Thickness (6,0,0,0),
IsChecked = Program.Controller.NotificationsEnabled
};
notify_item.Icon = notify_check_box;
notify_item.Click += delegate {
Program.Controller.ToggleNotifications ();
CreateMenu ();
notify_check_box.IsChecked = Program.Controller.NotificationsEnabled;
};
SparkleMenuItem about_item = new SparkleMenuItem () {

View file

@ -3,7 +3,7 @@
<plugin>
<info>
<_name>Github</_name>
<_description>Free public Git repositories with collaborator management</_description>
<_description>Collaborate on projects hosted on github.com</_description>
<icon>github.png</icon>
<backend>Git</backend>
</info>