ungoogled-software / ungoogled-chromium-android

Android build for ungoogled-chromium
GNU General Public License v3.0
495 stars 42 forks source link

option to switch between tablets ui and smartphones ui #56

Closed DI555 closed 3 years ago

DI555 commented 3 years ago

Please describe the feature you would like to have

unfortunately we don't have an option to switch between ui for smartfones and ui for tablets((( i have many tablets that think they're smartphones(( so i haven't the tabs ui there((, and i have some 'big sized screen' smartphones where not possible to use tabs ui(from tablets), and also great to be using tabs ui(from tablets) on usual smartphones!!!

Describe the solution you'd like

Great to be an option to switch between tablets ui and smartphones ui!!!

Describe alternatives you've considered

or the swith in about:flags would solve that problem also!!!

wchen342 commented 3 years ago

What is a tablet UI? I've seen some mentioning of it in the codes but I think it is only for ChromeOS, not for regular Chromium.

DI555 commented 3 years ago

nope, chromium imo asks system's type of device, and pushes different ui'es for tablets and smartphones(( for tablets it looks like this(with tabs): url

wchen342 commented 3 years ago

I see. If I can find a simple way to switch then I can add a flag.

BTW the extensions will probably stop working that way because currently the tab api is hardcoded to the normal android tab models. But if you don't use extension version then it should not be a problem.

DI555 commented 3 years ago

in logic, imo it won't touch the extensions work, it's just a ui, all elements id'es must be the same , and tab api also ;) ... and in another way, kiwi team wouldn't released the extensions support if were no support for tablets ;)

i may test the current 'extensions' version of UC on my tablet that shows itself as a tablet a bit later, and write about it...

wchen342 commented 3 years ago

Well the extension system is more complicated then that. It is hard to explain in several sentences but basically the whole api was broken because internally there are two tabs systems, one used for Android and one used for desktop, and the extensions only use the desktop one before, so they didn't work on Android because the calls simply cannot find any tabs and browsers (the browser is another concept that only apply to desktop).

Anyway this is fixable, just needs more time.

wchen342 commented 3 years ago

I managed to force the tablet mode, but during my tests if the device width is not large enough the tab bar will not show. You need to test this out yourself.

wchen342 commented 3 years ago

Added in 81966c5.

DI555 commented 3 years ago

i'll test it well, but shouldn't be any problems - today's smartphones have a lots of pixels in width ;)

DI555 commented 3 years ago

@wchen342 , i wanted to ask about one subthing... if there will be a flag, could you please to add there and 'force smartphone UI' also,... just for those who want the usual smartphone ui on their tablets!

wchen342 commented 3 years ago

I can change it to a three options switch. It should be simple.

wchen342 commented 3 years ago

@DI555 It turns out add a three option preference is more complicated than I thought. The native multi-option cannot be read from java and the java one is not easily movable. Can you explain why you need to force mobile ui? I think that will not usually happen because the screen needs to be quite wide for tablet ui to activate.

DI555 commented 3 years ago

oh, i thought that if you have a tablet but whant to have a minimized ui with tabs button!

i tested tablet mode in some tablets and i have a thought that the best way is in combination of theese separated switches:

  1. tablet's tabs bar on/off and
  2. smartphone's or tablet's ui view of adress bar

so, that could be possible to get the multiple combinations of ui views!!! could it be possible to realize in case of just switching inner ui blocks?

wchen342 commented 3 years ago

It's not simply doable. The current option is a hack which tricks chromium think it is on a tablet resolution. It is technically not a corret solution. The tablet UI has a different set of resources than the phone UI, they cannot be mixed together.