Image viewer: handle images without known w/h
There's no way to know in advance the real size for HTTP image previews and m.image events sent by some clients
This commit is contained in:
		
							
								
								
									
										1
									
								
								TODO.md
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								TODO.md
									
									
									
									
									
								
							@@ -1,7 +1,6 @@
 | 
			
		||||
# TODO
 | 
			
		||||
 | 
			
		||||
- Image viewer: 
 | 
			
		||||
    - support http urls
 | 
			
		||||
    - open externally in context menu in timeline thumbnail
 | 
			
		||||
    - fix: gif always closes?
 | 
			
		||||
    - hflickable support kinetic scrolling disabler and speed/decel settings
 | 
			
		||||
 
 | 
			
		||||
@@ -84,10 +84,14 @@ HMxcImage {
 | 
			
		||||
 | 
			
		||||
                overallSize: Qt.size(
 | 
			
		||||
                    loader.singleMediaInfo.media_width ||
 | 
			
		||||
                    loader.singleMediaInfo.thumbnail_width,
 | 
			
		||||
                    loader.singleMediaInfo.thumbnail_width ||
 | 
			
		||||
                    implicitWidth ||
 | 
			
		||||
                    800,
 | 
			
		||||
 | 
			
		||||
                    loader.singleMediaInfo.media_height ||
 | 
			
		||||
                    loader.singleMediaInfo.thumbnail_height,
 | 
			
		||||
                    loader.singleMediaInfo.thumbnail_height ||
 | 
			
		||||
                    implicitHeight ||
 | 
			
		||||
                    600,
 | 
			
		||||
                )
 | 
			
		||||
            },
 | 
			
		||||
            obj => { obj.openExternallyRequested.connect(openUrlExternally) },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user