mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 00:40:06 +00:00 
			
		
		
		
	Enable loading color palettes from embedded Qt resources
This commit is contained in:
		
							parent
							
								
									1f9392e9f6
								
							
						
					
					
						commit
						1d597eb120
					
				
					 8 changed files with 88 additions and 9 deletions
				
			
		|  | @ -8,6 +8,7 @@ | |||
| #include <scwx/qt/settings/settings_interface.hpp> | ||||
| #include <scwx/qt/ui/radar_site_dialog.hpp> | ||||
| #include <scwx/qt/util/color.hpp> | ||||
| #include <scwx/qt/util/file.hpp> | ||||
| #include <scwx/util/logger.hpp> | ||||
| #include <scwx/util/threads.hpp> | ||||
| 
 | ||||
|  | @ -557,8 +558,10 @@ void SettingsDialogImpl::LoadColorTablePreview(const std::string& key, | |||
|    scwx::util::async( | ||||
|       [key, value, imageLabel]() | ||||
|       { | ||||
|          std::unique_ptr<std::istream>       is = util::OpenFile(value); | ||||
|          std::shared_ptr<common::ColorTable> colorTable = | ||||
|             common::ColorTable::Load(value); | ||||
|             common::ColorTable::Load(*is); | ||||
| 
 | ||||
|          if (colorTable->IsValid()) | ||||
|          { | ||||
|             auto&   conversions = kColorTableConversions_.at(key); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat