mirror of
				https://github.com/9ParsonsB/Pulsar.git
				synced 2025-11-03 15:26:43 -05:00 
			
		
		
		
	Update position when window is shown (#107)
This commit is contained in:
		@@ -72,6 +72,18 @@ namespace Observatory.UI.Views
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public override void Show()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            base.Show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // Refresh the position when the window is opened (required
 | 
				
			||||||
 | 
					            // on Linux to show the notification in the right position)
 | 
				
			||||||
 | 
					            if (DataContext is NotificationViewModel nvm)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                AdjustPosition(nvm.Notification.XPos / 100, nvm.Notification.YPos / 100);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private void NotificationView_DataContextChanged(object sender, EventArgs e)
 | 
					        private void NotificationView_DataContextChanged(object sender, EventArgs e)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            var notification = ((NotificationViewModel)DataContext).Notification;
 | 
					            var notification = ((NotificationViewModel)DataContext).Notification;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user