kiwix / kiwix-xulrunner

[ARCHIVED] Legacy Kiwix desktop solution for Windows/macOS/Linux
https://download.kiwix.org/release/kiwix-xulrunner/
GNU General Public License v3.0
111 stars 28 forks source link

UI should be also in "night mode" #353

Closed kelson42 closed 7 years ago

kelson42 commented 7 years ago

The night mode allows to have the content in reverted colors - most of the case with a dark background. Unfortunately the UI does not follow: action menu and side bars (bookmarks and index) do keep there white background. It would be grate to have them also in inverted colors. Same for the settings.

Night mode should also apply correctly to:

Ticket was firstly reported here:

EladKeyshawn commented 7 years ago

@kelson42 nice ,very logical actually 😄

mhutti1 commented 7 years ago

@EladKeyshawn This should probably be accomplished with themes but I don't have much experience with them.

EladKeyshawn commented 7 years ago

@mhutti1 you mean make preset themes for reg mode and night mode ?

mhutti1 commented 7 years ago

@EladKeyshawn Yes. But we could also look at http://www.androidpolice.com/2016/02/24/android-support-library-v23-2-adds-auto-switching-daynight-theme-support-for-vector-drawables-and-much-more/ I am not sure whether it would work for us though.

EladKeyshawn commented 7 years ago

@mhutti1 Yeah but we support older versions so we might need to implement both methods

mhutti1 commented 7 years ago

@EladKeyshawn Yeah. We also need to give the user the choice to force day or force night as well.

EladKeyshawn commented 7 years ago

@mhutti1 I did not understand what'd you mean by that?

mhutti1 commented 7 years ago

@EladKeyshawn I havn't looked into it much but the options we should provide are:

EladKeyshawn commented 7 years ago

@mhutti1 You mean autoswitch by daytime ?

mhutti1 commented 7 years ago

@EladKeyshawn Yeah time of day

EladKeyshawn commented 7 years ago

@mhutti1 Yeah we can add that ;)

kelson42 commented 7 years ago

@EladKeyshawn @mhutti1 Please open a separate ticket for the "autoswitch" mode and implement it separatly. I do not think that implementing this based on the time is a good idea because this will fail in many cases (travelling people, dark room, etc...). If you really want to implement this just try to make a picture with the front camera and compute the level of luminosity. In general I think this is a gadget feature.

mhutti1 commented 7 years ago

@kelson42 @EladKeyshawn Android's Day/Night theme should do all the heavy lifting for us. Opening a feature ticket is a good idea but I don't think we can just use android's inbuilt implementation instead of writing our own and provide the user with all 3 options.

mhutti1 commented 7 years ago

354

kelson42 commented 7 years ago

FYI https://code.google.com/p/android/issues/detail?id=5237

mhutti1 commented 7 years ago

@kelson42 The UI is now in night mode. If you have any color change suggestions feel free to make them though.

kelson42 commented 7 years ago

@mhutti1 font color should be switched from "black" to something with more light (grey maybe) ?

EladKeyshawn commented 7 years ago

@mhutti1 Yes the text is black and can barely be seen.

mhutti1 commented 7 years ago

@kelson42 @EladKeyshawn I am confused. How would changing back on gray background to gray on gray background make it more readable?

kelson42 commented 7 years ago

@mhutti1 the font should be change to something lighter. The background is fine IMO

EladKeyshawn commented 7 years ago

@mhutti1 I meant the text should be white;)

mhutti1 commented 7 years ago

There is also a white bar above some activity's that i need to fix.

mhutti1 commented 7 years ago

@kelson42 sorry for the delay but i've come across several version specific visual glitches that I'm working on fixing,

mhutti1 commented 7 years ago

@kelson42 Ok so I think I got them all (tested on 4 android versions on all activities) but will need a bit more testing and a short beta before releasing.

mhutti1 commented 7 years ago

Found another bug where ZIM manager tab content is cut off. Will need to fix.

kelson42 commented 7 years ago

@mhutti1 The help page does not display correctly in night mode

kelson42 commented 7 years ago

@mhutti1 nice, just go ahead with a beta update as soon as your are ready!

mhutti1 commented 7 years ago

@kelson42 still a few more issues unfortunately. Lots of XML issues and there's not much documentation on the newer appcompat features so it's trial and error. I think I'm almost there though. Hopefully push a new build to beta by tonight.

kelson42 commented 7 years ago

@mhutti1 perfect, thx!

mhutti1 commented 7 years ago

@kelson42 So I have fixed the majority of the bugs. There are still 2 issues that I can see though. The first is that the drawers don't resize properly when the toolbar is hidden. The second is that scrolling when the toolbar is hidden causes text to be highlighted. I have an event this weekend and likely won't be able to fix this till Tuesday.

kelson42 commented 7 years ago

@mhutti1 ok, thant let's way for this two fixes left next week to make a new release. Thx and happy WE!