windows eventlog: position on right side of screen
This commit is contained in:
parent
330e80c22b
commit
49fb72ec71
|
@ -51,15 +51,20 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public SparkleEventLog ()
|
public SparkleEventLog ()
|
||||||
{
|
{
|
||||||
Title = "Recent Changes";
|
Title = "Recent Changes";
|
||||||
Height = 640;
|
Height = 640;
|
||||||
Width = 480;
|
Width = 480;
|
||||||
ResizeMode = ResizeMode.NoResize;
|
ResizeMode = ResizeMode.NoResize; // TODO
|
||||||
Background = new SolidColorBrush (Color.FromRgb (240, 240, 240));
|
Background = new SolidColorBrush (Color.FromRgb (240, 240, 240));
|
||||||
AllowsTransparency = false;
|
AllowsTransparency = false;
|
||||||
|
Icon = SparkleUIHelpers.GetImageSource("sparkleshare-app", "ico");
|
||||||
|
|
||||||
// TODO: right side of screen and 90% of height like on Mac
|
int x = (int) (SystemParameters.PrimaryScreenWidth * 0.61);
|
||||||
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
int y = (int) (SystemParameters.PrimaryScreenHeight * 0.5 - (Height * 0.5));
|
||||||
|
|
||||||
|
WindowStartupLocation = WindowStartupLocation.Manual;
|
||||||
|
Left = x;
|
||||||
|
Top = y;
|
||||||
|
|
||||||
WriteOutImages ();
|
WriteOutImages ();
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,15 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public static BitmapFrame GetImageSource (string name)
|
public static BitmapFrame GetImageSource (string name)
|
||||||
{
|
{
|
||||||
Assembly assembly = Assembly.GetExecutingAssembly ();
|
return GetImageSource (name, "png");
|
||||||
Stream image_stream = assembly.GetManifestResourceStream ("SparkleShare.Pixmaps." + name + ".png");
|
}
|
||||||
return BitmapFrame.Create (image_stream);
|
|
||||||
|
|
||||||
|
public static BitmapFrame GetImageSource (string name, string type)
|
||||||
|
{
|
||||||
|
Assembly assembly = Assembly.GetExecutingAssembly();
|
||||||
|
Stream image_stream = assembly.GetManifestResourceStream("SparkleShare.Pixmaps." + name + "." + type);
|
||||||
|
return BitmapFrame.Create(image_stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue