Giter VIP home page Giter VIP logo

Comments (6)

hnesk avatar hnesk commented on July 21, 2024

This is possible with Gtk.Paned: https://developer.gnome.org/gtk3/stable/GtkPaned.html , but it only has two panes.
To use Gtk.Paned for more views, it would be necessary to put Gtk.Paned inside of other Gtk.Paned and do some bookkeeping where to "pane" next. Quite possible but not trivial.
Another idea: Make it possible to open a new window per view and let the window manager do the placement, sizing, etc.. (GIMP style). I will look into it.

from browse-ocrd.

bertsky avatar bertsky commented on July 21, 2024

This is possible with Gtk.Paned: https://developer.gnome.org/gtk3/stable/GtkPaned.html , but it only has two panes.
To use Gtk.Paned for more views, it would be necessary to put Gtk.Paned inside of other Gtk.Paned and do some bookkeeping where to "pane" next. Quite possible but not trivial.

Yes, maybe even in a mix of vertical and horizontal panes. Indeed not trivial to implement and also probably tricky to use (cmp. awful manual control of column sliders in windows explorer and the like).

As an alternative, you could use a Grid view, and have two instead of one button for adding views: insert/add to row vs insert/add to column.

Another idea: Make it possible to open a new window per view and let the window manager do the placement, sizing, etc.. (GIMP style). I will look into it.

Yes, absolutely no objection here (but I already use a tiling window manager anyway).

from browse-ocrd.

bertsky avatar bertsky commented on July 21, 2024

This is possible with Gtk.Paned: https://developer.gnome.org/gtk3/stable/GtkPaned.html , but it only has two panes.
To use Gtk.Paned for more views, it would be necessary to put Gtk.Paned inside of other Gtk.Paned and do some bookkeeping where to "pane" next. Quite possible but not trivial.

How about the following: besides the view_menu_button in the header_bar to add views to the view_container as Gtk.Box, add two similar buttons to each view's action_bar (left of CloseButton):

  • a button to re-spawn the current box as a Gtk.HPaned with the existing view on the left and the new view on the right
  • a button to re-spawn the current box as a Gtk.VPaned with the existing view on the top and the new view on the bottom

Thus, the user could easily set up her own horizontal and vertical layout, adapting sizes via sliders. (Some bookkeeping would still be necessary, of course.)

from browse-ocrd.

hnesk avatar hnesk commented on July 21, 2024

I'm on it...

from browse-ocrd.

hnesk avatar hnesk commented on July 21, 2024

A prototype which initially spawns an empty view, from which a new view can be selected, is here: https://github.com/hnesk/browse-ocrd/tree/resizable-views
Still needs some polish ad testing.

from browse-ocrd.

bertsky avatar bertsky commented on July 21, 2024

This looks fantastic – thanks!

from browse-ocrd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.