windows eventlog: position on right side of screen
This commit is contained in:
parent
330e80c22b
commit
49fb72ec71
|
@ -51,16 +51,21 @@ namespace SparkleShare {
|
|||
|
||||
public SparkleEventLog ()
|
||||
{
|
||||
Title = "Recent Changes";
|
||||
Height = 640;
|
||||
Width = 480;
|
||||
ResizeMode = ResizeMode.NoResize;
|
||||
Background = new SolidColorBrush (Color.FromRgb (240, 240, 240));
|
||||
AllowsTransparency = false;
|
||||
Title = "Recent Changes";
|
||||
Height = 640;
|
||||
Width = 480;
|
||||
ResizeMode = ResizeMode.NoResize; // TODO
|
||||
Background = new SolidColorBrush (Color.FromRgb (240, 240, 240));
|
||||
AllowsTransparency = false;
|
||||
Icon = SparkleUIHelpers.GetImageSource("sparkleshare-app", "ico");
|
||||
|
||||
int x = (int) (SystemParameters.PrimaryScreenWidth * 0.61);
|
||||
int y = (int) (SystemParameters.PrimaryScreenHeight * 0.5 - (Height * 0.5));
|
||||
|
||||
WindowStartupLocation = WindowStartupLocation.Manual;
|
||||
Left = x;
|
||||
Top = y;
|
||||
|
||||
// TODO: right side of screen and 90% of height like on Mac
|
||||
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
|
||||
WriteOutImages ();
|
||||
|
||||
Label size_label = new Label () {
|
||||
|
|
|
@ -34,15 +34,21 @@ namespace SparkleShare {
|
|||
return string.Format ("#{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static BitmapFrame GetImageSource (string name)
|
||||
{
|
||||
Assembly assembly = Assembly.GetExecutingAssembly ();
|
||||
Stream image_stream = assembly.GetManifestResourceStream ("SparkleShare.Pixmaps." + name + ".png");
|
||||
return BitmapFrame.Create (image_stream);
|
||||
{
|
||||
return GetImageSource (name, "png");
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
public static Drawing.Bitmap GetBitmap (string name)
|
||||
{
|
||||
Assembly assembly = Assembly.GetExecutingAssembly ();
|
||||
|
|
Loading…
Reference in a new issue