KRTirtho / spotube

🎧 Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile!
https://spotube.krtirtho.dev/
Other
28.74k stars 1.19k forks source link

hidpi support for linux #1179

Open Aneeqasif opened 7 months ago

Aneeqasif commented 7 months ago

Is there an existing issue for this?

Current Behavior

on high resolution aka retina display text and ui is too small compared to other apps

Expected Behavior

automatic ui scalling based on linux X11 Xft.dpi: 133 or wayland scaling factor

OR

a slider/dropdown or any way to set the scalling factor in application that will be agnostic to wayland or X11 and easy to maintain

Steps to reproduce

n/a

Operating System

Linux - Arch

Spotube version

v3.4.1

Installation source

Arch User Repository (AUR)

Additional information

No response

Self grab

KRTirtho commented 7 months ago

I don't think this is something that can be done by us. This is something that will require to change the Flutter's linux embedder's config. Which uses gtk4 to embed flutter views in windows. linux/my_application.cc contains those config.

But I doubt we've to send the the scaling factors to the Skia rendering engine itself for this. Which will require the Flutter team to involve.

There should be some issues regarding this in Flutter's GH repo. I can't find it unfortunately (forgot the title)

Aneeqasif commented 7 months ago

i am so i cannot offer help on this i am just a guy running linux trying out software and filing bug reports here and there

khlsvr commented 7 months ago

Is there any workaround solutions to getting bigger fonts or scaling the UI?

I have couple workarounds for QT and GDK apps as I am victim of this issue with many apps, but neither is working with spotube. I guess this is exactly what you were talking about but I'll add them here anyway. So with QT I just run QT_SCALE_FACTOR=1.5 <app name> and with gdk apps I run GDK_DPI_SCALE=1.5 <app name>. Based on some console output it seems as if though spotube is a gdk app but I guess this flutter comes into mix in the spotube's case.

The other solution is just setting a bigger font. With some apps they have a dedicated section in the apps settings page for setting font and font size, but I can't find these options in spotube's settings page.

Only workaround solutions I can think of is to run an external magnifier glass app or change the resolution of one workspace where spotube would be (if that's possible on arch linux with i3 wm). Any other ways?

Aneeqasif commented 7 months ago

Is there any workaround solutions to getting bigger fonts or scaling the UI?

I have couple workarounds for QT and GDK apps as I am victim of this issue with many apps, but neither is working with spotube. I guess this is exactly what you were talking about but I'll add them here anyway. So with QT I just run QT_SCALE_FACTOR=1.5 <app name> and with gdk apps I run GDK_DPI_SCALE=1.5 <app name>. Based on some console output it seems as if though spotube is a gdk app but I guess this flutter comes into mix in the spotube's case.

The other solution is just setting a bigger font. With some apps they have a dedicated section in the apps settings page for setting font and font size, but I can't find these options in spotube's settings page.

Only workaround solutions I can think of is to run an external magnifier glass app or change the resolution of one workspace where spotube would be (if that's possible on arch linux with i3 wm). Any other ways?

i donot think per workspace resolution is possibele on i3

devs have to think about more subtle solutions for this issue, i have seen some electron apps adding the scalling factor settings but with flutter idk.

leoriohub commented 6 months ago

Hi, just want to comment that this is a big issue for me as I have reduced vision and the UI is way to small in my hidpi display :(. Already tried the classic scale GTK and QT env variables and they won't work. I would be really nice to have a scale parameter or any other method to scale the UI.

fabiscafe commented 6 months ago

Hm I have a 4k display I run with (interger scaling 2x) as well as a non scaled display right next to it. I can move Spotube from one to another and it jumps to the right scaling.

@all have you tried wayland? This might be another case of X11 is the problem.

KRTirtho commented 6 months ago

I tried digging the issue and finding possible fixes. There's a plugin flutter_screenutil which provides extra extension to scale passed size values according to the screen size but I doubt if it actually fixes the issue we're facing here