Giter Site home page Giter Site logo

Comments (6)

KimTisott avatar KimTisott commented on September 4, 2024

@justalemon

I see four possible solutions:

  1. Add a master SubtitleVisible property to control image, text and count rendering;
  2. Render image, text and count separately - and text only if not empty;
  3. Render image, text and count together, but only if all are set to valid values;
  4. Expose SubtitleImage property to allow manual removal of the entire subtitle;

What would you suggest? I will submit a PR.

from lemonui.

justalemon avatar justalemon commented on September 4, 2024

What do you mean with subtitle? Because the subtitle is the white text on a black background.

from lemonui.

KimTisott avatar KimTisott commented on September 4, 2024

What do you mean with subtitle?

The white text on a black background right under the title. In the image, 'Player' is not the subtitle, it's the first item of the menu. The subtitle background renders even when there is no subtitle nor item count.

This is how it's supposed to look when there is no subtitle.
image

from lemonui.

justalemon avatar justalemon commented on September 4, 2024

OH

I see it now.

In that case, to give more customization options, I would suggest an enum like SubtitleBehavior where it defines the behavior of the subtitle to 3 possible styles:

  1. Always show the background even if is empty, which should be the default (AlwaysShow = 0)
  2. Hide when there is no text, show when there is some (HideOnEmpty = 1)
  3. Always hide the subtitle and it's background (AlwaysHide = 2)

from lemonui.

KimTisott avatar KimTisott commented on September 4, 2024

This would conflict with the existing CountVisibility.

Maybe subtitle should be the entire line, which contains the Background, the Text and the Count properties? The count is already within the subtitle background anyways.

IMHO the way you're going with enums, it will get messy really fast with the multiple customizations. We could maybe try using one bit field enum to allow multiple configs, such as AutoCount, ShowText and HideBackground.

Looking at it now, might be better to have a separate Subtitle object, containing Background, Count and Text properties, and either a visibility config for each one, or a master bit field enum.

Either way, these changes imply in breaking changes, which I'm unsure how comfortable you are with. I could just create a PR with the changes I envision so you can review/modify them as you wish.

from lemonui.

justalemon avatar justalemon commented on September 4, 2024

I feel that it will complement CountVisibility to be honest.

With the Flag enums and Subtitle object, those would be a breaking changes which is not something I would like (NativeUI had some nasty breaking changes almost every single release before I helped with the most recent releases, and I wouldn't like to see that again).

from lemonui.

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.