Giter VIP home page Giter VIP logo

Comments (9)

evgenyneu avatar evgenyneu commented on June 2, 2024 5

Hi @acecilia, no, unfortunately the star sizes are not adjusted to the size of the cosmos view at the moment. It works the other way around, you set the size of a single star and the view adjusts its size to that. It works similar to a UILabel where you adjust the font size.

cosmosView.settings.starSize = 30

But I realize that the auto-size mode can be handy, thank you for the idea. I will think how it can be done.

from cosmos.

mohasalahh avatar mohasalahh commented on June 2, 2024 3

Actually, I am using this method, and I would be happy to share it with you:

let countStars = 5
ratingbar.starMargin = 2
ratingbar.starSize = (ratingbar.frame.width/countStars)-(ratingbar.starMargin) //star size gonna stretch with the width of the ratingbar

from cosmos.

acecilia avatar acecilia commented on June 2, 2024 2

@TPAD you can get a similar behavior by setting an aspect ratio constraint to it

from cosmos.

TPAD avatar TPAD commented on June 2, 2024

Hi, has this been fixed yet?

from cosmos.

evgenyneu avatar evgenyneu commented on June 2, 2024

Hi @TPAD, no, unfortunately, the auto-size feature has not been implemented yet.

from cosmos.

tiuya avatar tiuya commented on June 2, 2024

@acecilia I'd like to know how that works? Setting an aspect ratio constraint to the CosmosView doesn't make the stars grow when the View grows.

from cosmos.

siideffect avatar siideffect commented on June 2, 2024

+1

from cosmos.

acecilia avatar acecilia commented on June 2, 2024

@tiuya @siideffect sorry, just saw this. Its been a long time I stopped working with this code and I do not remember how I finally managed.

from cosmos.

Isuru-Nanayakkara avatar Isuru-Nanayakkara commented on June 2, 2024

This feature would be a very useful and actually necessary addition.

from cosmos.

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.