Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Views sizing question #359

Open
apfelflo89 opened this issue Feb 4, 2025 · 5 comments
Open

Views sizing question #359

apfelflo89 opened this issue Feb 4, 2025 · 5 comments

Comments

@apfelflo89
Copy link

Hey first up, thank you for your work! I'm enjoying your project for years on my NSPanel Pro now.

I just started migrating from cards in yaml with wp_style: to the newly introduced views:
but I'm having trouble with sizing.

As you can see there are the same cards
Image

The top one is views: below are the individual cards.

I tried:

 style:
    wallpanel-screensaver-info-box-views:
      width: 450px
      '--ha-card-background': none
      '--ha-card-box-shadow': none
      '--ha-card-border-width': 0px
      right: 0px
      text-shadow: >-
        -0.5px -0.5px 0 rgb(17, 17, 17), 0.5px -0.5px 0 rgb(17, 17, 17), -0.5px
        0.5px 0 rgb(17, 17, 17), 0.5px 0.5px 0 rgb(17, 17, 17)
      '--primary-text-color': '#ffffff'
      '--secondary-text-color': '#dddddd'

and the cards have quite the same:

      wp_style:
        width: 450px
        '--ha-card-background': none
        '--ha-card-box-shadow': none
        '--ha-card-border-width': 0px
        right: 0px
        text-shadow: >-
          -0.5px -0.5px 0 rgb(17, 17, 17), 0.5px -0.5px 0 rgb(17, 17, 17),
          -0.5px 0.5px 0 rgb(17, 17, 17), 0.5px 0.5px 0 rgb(17, 17, 17)
        '--primary-text-color': '#ffffff'
        '--secondary-text-color': '#dddddd'

If you need more details I'm happy to help

@j-a-n
Copy link
Owner

j-a-n commented Feb 5, 2025

Do I understand correctly that you want to get rid of the padding around the view?
If so, you can try the following:

wallpanel:
  style:
    wallpanel-screensaver-info-container:
      padding: 0px

@apfelflo89
Copy link
Author

apfelflo89 commented Feb 5, 2025

style:

   wallpanel-screensaver-info-container:
     padding: 0px
   wallpanel-screensaver-info-box-views:
     background: '#D3D3DF'
     padding: 0px
     width: 450px
     '--ha-card-background': none
     '--ha-card-box-shadow': none
     '--ha-card-border-width': 0px
     right: 0px
     text-shadow: >-
       -0.5px -0.5px 0 rgb(17, 17, 17), 0.5px -0.5px 0 rgb(17, 17, 17), -0.5px
       0.5px 0 rgb(17, 17, 17), 0.5px 0.5px 0 rgb(17, 17, 17)
     '--primary-text-color': '#ffffff'
     '--secondary-text-color': '#dddddd'`
Image

I would say that I'm addressing the padding. But the Cards themselves more than the actual container I guess. I added a background color to see what element is modified. I just wand the view's content the same size as the lower cards. To use the same 450px so to say.

@j-a-n
Copy link
Owner

j-a-n commented Feb 5, 2025

Did you try to increase the width?

wallpanel-screensaver-info-box-views:
     width: 480px

@apfelflo89
Copy link
Author

Yes I tried that I also tried to dig a bit deeper: It seems to occur when using a section based Dashboard site.
With Panel or Mansory the padding is gone.

@j-a-n
Copy link
Owner

j-a-n commented Feb 5, 2025

If you post an example view, I can have a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants