Smaller touch interface: the same pixel density as on the desktop
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bd956a4f57
commit
9804e24015
1 file changed
+3
-2
+3
-2
@@ -970,8 +970,9 @@ async fn main() {
|
|||||||
// pixel look: the interface on a virtual screen whose pixels are whole parts of the world's
|
// pixel look: the interface on a virtual screen whose pixels are whole parts of the world's
|
||||||
let rows = if [270, 360, 480].contains(&app.settings.pixel_rows) { app.settings.pixel_rows as u32 } else { 360 };
|
let rows = if [270, 360, 480].contains(&app.settings.pixel_rows) { app.settings.pixel_rows as u32 } else { 360 };
|
||||||
// the interface needs room: the smallest whole multiple of the world's rows with at least
|
// the interface needs room: the smallest whole multiple of the world's rows with at least
|
||||||
// 900 rows on a desktop (360 -> 1080) and 540 on a touch screen (360 -> 720)
|
// 900 rows (360 -> 1080), on a desktop and on a touch screen alike (a phone has about
|
||||||
let need: u32 = if touch_mode { 540 } else { 900 };
|
// 1080 device rows in landscape; a smaller screen draws in device pixels)
|
||||||
|
let need: u32 = 900;
|
||||||
ui::set_virtual_rows(rows * need.div_ceil(rows));
|
ui::set_virtual_rows(rows * need.div_ceil(rows));
|
||||||
if touch_mode {
|
if touch_mode {
|
||||||
// the pointer is the finger, or the position of this frame's gesture
|
// the pointer is the finger, or the position of this frame's gesture
|
||||||
|
|||||||
Reference in new issue
Block a user