johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.17k stars 287 forks source link

Make HdyViewSwitcher look more like GtkViewSwitcher? #416

Closed digitalethics closed 4 years ago

digitalethics commented 4 years ago

Would you consider changing to a more button-like view switcher implementing a visual toggle to "turn off" libhandy to switch to GtkViewSwitcher for those who run a Flatpak or Snap exclusively on their desktop computers? I think view switchers look the GtkViewSwitcher looks more minimalist and create creates a more solid feel whereas the current implementation with tabs HdyViewSwitcher feels a bit too playful. More specifically, there are three small issues:

¹Maybe an option in the future to allow users to have a font-only or icon-only view switcher but until then, I'd prefer font-only.

viewswitcher

johnfactotum commented 4 years ago

It is a view switcher. It's called HdyViewSwitcher, libhandy's view switcher. Mainly it's designed to fit when the available space is narrow. GTK's view switcher is too wide and can't be used when the window is narrow.

If you don't like how they look, you can perhaps make suggestions by, for example, opening an issue on their issue tracker.

Note that currently, if you don't install libhandy, it will just fallback to GTK's view switcher. So it's already optional.

digitalethics commented 4 years ago

It is a view switcher. It's called HdyViewSwitcher, libhandy's view switcher.

Ah, I see! It's fantastic that you always give such detailed feedback. I guess I've learnt more in your repository than in any other.

Note that currently, if you don't install libhandy, it will just fallback to GTK's view switcher. So it's already optional.

Would it be possible to toggle libhandy on and off from within Foliate (since it is already optional) so that those who only use the Flatpak on their desktop could easily change the view switcher?

Regarding these two of my own suggestions:

changing the font weight into bold and back to normal creates visual unsteadiness icons and text can each better play out their strengths if kept separate

Are there any configuration options that come with using HdyViewSwitcher or is the aesthetic pretty much set as it is?

johnfactotum commented 4 years ago

Are there any configuration options that come with using HdyViewSwitcher or is the aesthetic pretty much set as it is?

There's no API for changing the appearance for HdyViewSwitcher (apart from setting narrow/wide mode). The appearance of the widget is controlled by CSS, which can be set anywhere from the toolkit itself to user stylesheets. libhandy ships a default style, but it's possible to change it with themes. With some work you can probably make it look like GtkViewSwitcher.

digitalethics commented 4 years ago

With some work you can probably make it look like GtkViewSwitcher.

Alternatively, would it be possible to "toggle" libhandy on and off from within Foliate to switch between the two or this doesn't make any sense?

johnfactotum commented 4 years ago

HdyViewSwitcher is already adopted by several core GNOME apps so it's pretty much the standard widget to use now. It doesn't make sense to add an option for something so trivial.

We'd certainly want to use a different widget when "Use traditional titlebar" is enabled (if that is ever implement for the library window). But that is an entirely different problem.