Merge branch 'hotfix-1.4.1' into develop
This commit is contained in:
		
						commit
						ef38c45895
					
				@ -1346,6 +1346,27 @@ namespace nana{	namespace widgets
 | 
				
			|||||||
				impl_->counterpart.buffer.make(r.dimension());
 | 
									impl_->counterpart.buffer.make(r.dimension());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			impl_->capacities.behavior->pre_calc_lines(width_pixels());
 | 
								impl_->capacities.behavior->pre_calc_lines(width_pixels());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (points_.offset.x > 0)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									auto maxline = textbase().max_line();
 | 
				
			||||||
 | 
									nana::size text_size = _m_text_extent_size(textbase().getline(maxline.first).c_str(), maxline.second);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									text_size.width += 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									points_.offset.x = (std::max)(0,
 | 
				
			||||||
 | 
										static_cast<int>(text_size.width + 1) - static_cast<int>(this->width_pixels())
 | 
				
			||||||
 | 
										);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (points_.offset.y > 0)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									auto const lines = impl_->capacities.behavior->take_lines();
 | 
				
			||||||
 | 
									auto const scr_lines = this->screen_lines();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									_m_offset_y((std::max)(static_cast<int>(lines)-static_cast<int>(scr_lines), 0));
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			_m_scrollbar();
 | 
								_m_scrollbar();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			move_caret(points_.caret);
 | 
								move_caret(points_.caret);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user