mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 16:18:55 +01:00 
			
		
		
		
	Don't use full-width page sheet on big landscape screens
This commit is contained in:
		@@ -1,6 +1,8 @@
 | 
			
		||||
package eu.kanade.tachiyomi.ui.reader
 | 
			
		||||
 | 
			
		||||
import android.os.Bundle
 | 
			
		||||
import android.support.design.widget.BottomSheetDialog
 | 
			
		||||
import android.view.ViewGroup
 | 
			
		||||
import com.afollestad.materialdialogs.MaterialDialog
 | 
			
		||||
import eu.kanade.tachiyomi.R
 | 
			
		||||
import eu.kanade.tachiyomi.source.model.Page
 | 
			
		||||
@@ -28,6 +30,14 @@ class ReaderPageSheet(
 | 
			
		||||
        save_layout.setOnClickListener { save() }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    override fun onCreate(savedInstanceState: Bundle?) {
 | 
			
		||||
        super.onCreate(savedInstanceState)
 | 
			
		||||
        val width = context.resources.getDimensionPixelSize(R.dimen.bottom_sheet_width)
 | 
			
		||||
        if (width > 0) {
 | 
			
		||||
            window?.setLayout(width, ViewGroup.LayoutParams.MATCH_PARENT)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Sets the image of this page as the cover of the manga.
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user