Code Monkey home page Code Monkey logo

Comments (5)

timholy avatar timholy commented on June 26, 2024 1

Sounds cool. If you have some code that gets started and submit it as a PR, I'd be happy to advise on how to finish it off.

from gtkreactive.jl.

timholy avatar timholy commented on June 26, 2024

Your "silly" approach may not be so silly: http://stackoverflow.com/questions/41598292/gtk-time-picker-widget

from gtkreactive.jl.

yakir12 avatar yakir12 commented on June 26, 2024

Alas, now I really wish I could get that orientation glitch to work for the spinbutton I "made"... The vertical orientation really makes sense in this context.

from gtkreactive.jl.

yakir12 avatar yakir12 commented on June 26, 2024

So while life does go on, one feature the above solution lacks is a single Instant behind the three widgets (in the specific case of hours:minutes:seconds, but everything here can be extended to any combination and number of temporal units). What I mean is that the 3 widgets should affect a single Instant, that then should parse into the 3 temporal units, and finally update the displays on the 3 widgets.
This structure would result in nifty behaviors such as:

  1. Scrolling up (in the, say, vertical orientation) in the seconds widget, all the way up to "60", and then it will magically nullify and the minutes widget will go up one unit (potentially affecting the hours widget). And vice versa (scrolling down).
  2. In addition, this structure prohibits any impossible temporal combinations (e.g. -33:68:172) in a simpler way than limiting the scroll to 0--59. This is especially cool if the user wants to include dates (think about the 31 of February).
  3. Not to get ahead of myself, but this could (easily?) be extended to other units, such as tons:kg:grams.

from gtkreactive.jl.

yakir12 avatar yakir12 commented on June 26, 2024

Sheesh, I tried to just use existing spinbutton widgets, but I'm running into (obvious) chicken-and-the-egg problems: updating one of the three widgets (hh:mm:ss) updates the main time, which update all three widgets sequentially, which then goes into an infinite loop...
I guess I should attempt to write a whole new type (like Player) and use all the basic Gtk functions...

from gtkreactive.jl.

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.