Merge branch 'dankan1890-develop_2' into develop
This commit is contained in:
		
						commit
						ea102d8886
					
				@ -235,7 +235,7 @@ namespace nana{	namespace drawerbase
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
					if(shortkey)
 | 
										if(shortkey)
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						unsigned off_w = (shortkey_pos ? graph.text_extent_size(mbstr.c_str(), static_cast<unsigned>(shortkey_pos)).width : 0);
 | 
											unsigned off_w = (shortkey_pos ? graph.text_extent_size(mbstr.c_str(), shortkey_pos).width : 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						wchar_t keystr[2] = {nana::utf::char_at(mbstr.c_str() + shortkey_pos, 0, 0), 0};
 | 
											wchar_t keystr[2] = {nana::utf::char_at(mbstr.c_str() + shortkey_pos, 0, 0), 0};
 | 
				
			||||||
						auto shortkey_size = graph.text_extent_size(keystr, 1);
 | 
											auto shortkey_size = graph.text_extent_size(keystr, 1);
 | 
				
			||||||
 | 
				
			|||||||
@ -393,7 +393,7 @@ namespace nana
 | 
				
			|||||||
					int n = trace_.logic_pos.y * rows + trace_.logic_pos.x + 1;
 | 
										int n = trace_.logic_pos.y * rows + trace_.logic_pos.x + 1;
 | 
				
			||||||
					if (page_mode::date == page)
 | 
										if (page_mode::date == page)
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						if (n < 8) return false; //Here is week title bar
 | 
											if (n < 8) return 0; //Here is week title bar
 | 
				
			||||||
						int dw = nana::date::day_of_week(view_month_.year, view_month_.month, 1);
 | 
											int dw = nana::date::day_of_week(view_month_.year, view_month_.month, 1);
 | 
				
			||||||
						n -= (dw ? dw + 7 : 14);
 | 
											n -= (dw ? dw + 7 : 14);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
				
			|||||||
@ -155,7 +155,7 @@ namespace nana
 | 
				
			|||||||
									--(state_.index);
 | 
														--(state_.index);
 | 
				
			||||||
								else if(recycle)
 | 
													else if(recycle)
 | 
				
			||||||
								{
 | 
													{
 | 
				
			||||||
									state_.index = static_cast<unsigned>(module_->items.size() - 1);
 | 
														state_.index = module_->items.size() - 1;
 | 
				
			||||||
									state_.offset_y = last_offset_y;
 | 
														state_.offset_y = last_offset_y;
 | 
				
			||||||
								}
 | 
													}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -173,7 +173,7 @@ namespace nana
 | 
				
			|||||||
								}
 | 
													}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
								if(state_.index >= state_.offset_y + module_->max_items)
 | 
													if(state_.index >= state_.offset_y + module_->max_items)
 | 
				
			||||||
									state_.offset_y = static_cast<unsigned>(state_.index - module_->max_items + 1);
 | 
														state_.offset_y = state_.index - module_->max_items + 1;
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
						else
 | 
											else
 | 
				
			||||||
 | 
				
			|||||||
@ -212,7 +212,7 @@ namespace nana
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
						if (hotkey)
 | 
											if (hotkey)
 | 
				
			||||||
						{
 | 
											{
 | 
				
			||||||
							unsigned off_w = (hotkey_pos ? graph.text_extent_size(text.c_str(), static_cast<unsigned>(hotkey_pos)).width : 0);
 | 
												unsigned off_w = (hotkey_pos ? graph.text_extent_size(text.c_str(), hotkey_pos).width : 0);
 | 
				
			||||||
							nana::size hotkey_size = graph.text_extent_size(text.c_str() + hotkey_pos, 1);
 | 
												nana::size hotkey_size = graph.text_extent_size(text.c_str() + hotkey_pos, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							unsigned ascent, descent, inleading;
 | 
												unsigned ascent, descent, inleading;
 | 
				
			||||||
 | 
				
			|||||||
@ -751,7 +751,7 @@ namespace nana
 | 
				
			|||||||
					if((pos == npos) || (pos >= list_.size()))
 | 
										if((pos == npos) || (pos >= list_.size()))
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						this->list_.emplace_back();
 | 
											this->list_.emplace_back();
 | 
				
			||||||
						pos = static_cast<unsigned>(list_.size() - 1);
 | 
											pos = list_.size() - 1;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					else
 | 
										else
 | 
				
			||||||
						list_.emplace(iterator_at(pos));
 | 
											list_.emplace(iterator_at(pos));
 | 
				
			||||||
 | 
				
			|||||||
@ -140,13 +140,13 @@ namespace paint
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		unsigned font::height() const
 | 
							unsigned font::height() const
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if(empty()) return false;
 | 
								if(empty()) return 0;
 | 
				
			||||||
			return (impl_->font_ptr->height);
 | 
								return (impl_->font_ptr->height);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		unsigned font::weight() const
 | 
							unsigned font::weight() const
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if(empty()) return false;
 | 
								if(empty()) return 0;
 | 
				
			||||||
			return (impl_->font_ptr->weight);
 | 
								return (impl_->font_ptr->weight);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -413,7 +413,7 @@ namespace paint
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		nana::size	graphics::text_extent_size(const std::wstring& text)	const
 | 
							nana::size	graphics::text_extent_size(const std::wstring& text)	const
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			return text_extent_size(text.c_str(), static_cast<unsigned>(text.length()));
 | 
								return text_extent_size(text.c_str(), text.length());
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		nana::size	graphics::text_extent_size(const wchar_t* str, std::size_t len)	const
 | 
							nana::size	graphics::text_extent_size(const wchar_t* str, std::size_t len)	const
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user