Coder Social home page Coder Social logo

Comments (5)

developomp avatar developomp commented on August 15, 2024 1

Ah crap pressed enter too early

from pytermgui.

developomp avatar developomp commented on August 15, 2024

fixed

from pytermgui.

bczsalba avatar bczsalba commented on August 15, 2024

Hm. I think this is all up to personal preference. At the moment ASCII characters are used for all default styles if I remember correctly, though not quite sure why. You can manually customize widget characters fairly easily though, so if you could make an example of how it would look I'd gladly look into it!

from pytermgui.

developomp avatar developomp commented on August 15, 2024

I don't think the checkbox widget can be customized without changing the logic in this case.

As for the ASCII characters, the box widgets does not use ASCII characters for its border, so I don't think this will be an issue.

Also, using a single character instead of three gives more space, which is a huge benefit imo since you can only fit so many characters on average displays.

from pytermgui.

bczsalba avatar bczsalba commented on August 15, 2024

I don't think the checkbox widget can be customized without changing the logic in this case

Actually, it can! It's not the cleanest widget in terms of implementation, but it's still customizable the same way. I used this pretty ugly piece of code to mock up what it would look like inside a completely un-styled mockup window:

{                                                                                                                 
  ptg.Checkbox()                                                                            
  .set_char("checked", "▣") 
  .set_char("unchecked", "☐"): "Already registered?" 
}

I'm not sure I like this as a default style, for one main reason. As you can see on the second screenshot below, the character is small enough that it gets almost completely hidden when an average sized mouse cursor is over it. This hides its current state as well, which I don't find optimal.

I find it too small in general, so while it is a nice looking character it feels like it does the job less than [x] does. Though if you don't care about these concerns, you can use the code above (or the proper configuration APIs) to set it so.

Screenshot 2022-01-29 at 9 04 38 Screenshot 2022-01-29 at 9 04 57

I am planning to add support for more out-of-the-box configurations for things other than `Container` and `Window`, probably using some `chars` class.

from pytermgui.

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.