Coder Social home page Coder Social logo

Gtk-WARNING for GtkPaned about pympress HOT 3 CLOSED

cimbali avatar cimbali commented on July 18, 2024
Gtk-WARNING for GtkPaned

from pympress.

Comments (3)

Cimbali avatar Cimbali commented on July 18, 2024

Yeah the first message has been around for ages. It comes do from the way we build the UI and try to restore the pane handle positions. It originates in Builder.replace_layout() where we recursively insert children based on the config string, then move the panel handles.

In order to set the panel handles, the Gtk.Paned need sizes, thus all the queue_resize/show_now/check_resize calls. If you remove the two last for loops from this function, the warning disappears (and Pympress won't remember where you last left your pane handle when closing the last time).

I think ideally the resizing loop shouldn't exist, and we should figure out the correct event (something like map, map-event or realize) that happens after size negotiation but before drawing the widget, and insert there the pane resizing (i.e. the last loop of replace_layout).

This would not just remove the warning if done properly, but also enable something that doesn't work right now: remembering and restoring the size of a Gtk.Paned child of another Gtk.Paned with both the same orientation. That is, this works [ |☰] but this doesn't: [ |[ ⏐ ]]

from pympress.

Cimbali avatar Cimbali commented on July 18, 2024

Turns out size-allocate is a good signal to do this.

from pympress.

FriedrichFroebel avatar FriedrichFroebel commented on July 18, 2024

Thanks for the quick fix. The warnings seem to have gone.

from pympress.

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.