mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Check display area before moving window to the last saved position. #2600
This commit is contained in:
		
							parent
							
								
									fe4f79ba90
								
							
						
					
					
						commit
						e61deb3673
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -47,8 +47,14 @@ sub new {
 | 
			
		|||
        $self->Fit;
 | 
			
		||||
        $self->SetMinSize([760, 490]);
 | 
			
		||||
        if (defined $Slic3r::GUI::Settings->{_}{main_frame_size}) {
 | 
			
		||||
            $self->SetSize([ split ',', $Slic3r::GUI::Settings->{_}{main_frame_size}, 2 ]);
 | 
			
		||||
            $self->Move([ split ',', $Slic3r::GUI::Settings->{_}{main_frame_pos}, 2 ]);
 | 
			
		||||
            my $size = [ split ',', $Slic3r::GUI::Settings->{_}{main_frame_size}, 2 ];
 | 
			
		||||
            $self->SetSize($size);
 | 
			
		||||
            
 | 
			
		||||
            my $display = Wx::Display->new->GetClientArea();
 | 
			
		||||
            my $pos = [ split ',', $Slic3r::GUI::Settings->{_}{main_frame_pos}, 2 ];
 | 
			
		||||
            if (($pos->[X] + $size->[X]/2) < $display->GetRight && ($pos->[Y] + $size->[Y]/2) < $display->GetBottom) {
 | 
			
		||||
                $self->Move($pos);
 | 
			
		||||
            }
 | 
			
		||||
            $self->Maximize(1) if $Slic3r::GUI::Settings->{_}{main_frame_maximized};
 | 
			
		||||
        } else {
 | 
			
		||||
            $self->SetSize($self->GetMinSize);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue