Fix 'Recent Changes' dialog placement

On multi-monitor setups this was messed up, especially if one monitor
is below the other. Now get dimensions of 1st monitor and place based
on those. Preserve existing (strange?) placement logic.
Use SetDefaultSize rather than SetSizeRequest to allow resizing.
This commit is contained in:
Jack Leigh 2013-09-26 15:58:36 +01:00
parent d5a87c8d1d
commit 30bd28fa43

View file

@ -44,10 +44,11 @@ namespace SparkleShare {
public SparkleEventLog () : base ("")
{
SetSizeRequest (480, (int) (Gdk.Screen.Default.Height * 0.8));
Gdk.Rectangle monitor_0_rect = Gdk.Screen.Default.GetMonitorGeometry(0);
SetDefaultSize (480, (int) (monitor_0_rect.Height * 0.8));
int x = (int) (Gdk.Screen.Default.Width * 0.61);
int y = (int) (Gdk.Screen.Default.Height * 0.5 - (HeightRequest * 0.5));
int x = (int) (monitor_0_rect.Width * 0.61);
int y = (int) (monitor_0_rect.Height * 0.5 - (HeightRequest * 0.5));
Move (x, y);