Dashboard on tablet & RPi w/ touchscreen: fits OK and yet scrollable -> why?

I’m using 2 similar dashboards on a tablet and a RPi with 7" touchscreen.
On the tablet with the companion app, I have the Android topbar (time, battery load) permanently visible.
The dashboard fits the screen, even with blank space but the dashboard can be moved vertically.
No scrollbars are shown.

On the RPi with raspbian and chromium, there is a scrollbar, the dashboard fits here as well

Is this something that can be fixed/changed so there is no scrollbar and the dashboard is fixated?

I know you can use card_mod in a theme to stop scrolling with position: fixed

Something like this. I don’t use themes so there may be other methods. The type of layout may require additional style code.

Scroll Theme:
  modes:
    dark:
     app-header-background-color: transparent
    light:
     app-header-background-color: transparent
  card-mod-root-yaml: |
    .: |
      :host {
        position: fixed; 
         }

  card-mod-theme: Scroll Theme
1 Like

I had the same issue, I was running the pi in Kiosk so I removed the scrollbars as they are not needed with touchscreen.

using --enable-features flag with chromium

1 Like

Thanks guys but I don’t know if I’m doing something wrong since both your solutions are not making a difference…
This is what I have for my theme:

frontend:
  themes:
    my_theme:
      card-mod-more-info-yaml: |
        .: |
          ha-dialog > div:focus {
            outline: none;
          }
      ha-view-sections-column-gap: 7px
      modes:
        dark:
          # primary-color: steelblue
          # accent-color: orange
          dialog-backdrop-filter: blur(5px)
          iron-overlay-backdrop-opacity: 1
          iron-overlay-backdrop-background-color: rgba(0, 0, 0, 0.32)
      card-mod-root-yaml: |
        .: |
          :host {
            position: fixed; 
            }

  extra_module_url:
    - /local/ThemeOverride.js
    - /local/card-mod.js

and for the RPi:

Exec=/usr/bin/chromium-browser --kiosk --disable-pinch --noerrdialogs --disable-infobars --disable-session-crashed-bubble --hide-scrollbars --enable-features http://172.16.0.4:8123

I generally create a theme folder with the specific card_ mod theme in it and only have the following in my config, but will test your setup.

frontend:
  themes: !include_dir_merge_named themes

I am fairly certain you need-

card-mod-theme: my_theme

like this

     card-mod-root-yaml: |
        .: |
          :host {
            position: fixed; 
            }
  
     card-mod-theme: my_theme
1 Like

Your method worked, but I added card-mod-theme: my_theme and selected that theme in the UI

1 Like

Yessss, this works and magically also fixates the dashboard on the RPi! :+1: :bowing_man:
The only thing: on the RPi, the scrollbars are still showing and it would be nice if that could be solved as well.

I’ll see what I can do to get rid of those. It most likely needs an overflow: setting

1 Like

Yes, I saw that: thanks for clarifying!
My theme was working but ofc that last line was missing… :blush:

1 Like

I found this:

--enable-features=OverlayScrollbar,OverlayScrollbarFlashAfterAnyScrollUpdate,OverlayScrollbarFlashWhenMouseEnter

so it becomes

Exec=/usr/bin/chromium-browser --kiosk --disable-pinch --noerrdialogs --disable-infobars --disable-session-crashed-bubble --hide-scrollbars --enable-features=OverlayScrollbar,OverlayScrollbarFlashAfterAnyScrollUpdate,OverlayScrollbarFlashWhenMouseEnter http://172.16.0.4:8123

which is already a lot better.
Scrollbar is gone, only when touching the screen a ‘minimized/smaller’ version of the scrollbar is showing untill releasing.

go to chrome://flags/

Disable

add overflow: hidden to

card-mod-root-yaml: |
        .: |
          :host {
            position: fixed; 
            overflow: hidden !important;
            }

EDIT: was working then scroll bars came back :rage:

Disabling that setting in chromium forces the scrollbars to come back.
If I set this to enable, it’s the same as with that CLI option, even with that overflow setting in the card-mod…

It’s not a big thing that this smaller line shows when touching, it’s just esthetics and even so, much better that the scrollbar is not showing.
The dashboard moving was a bigger annoyance.

I am seeing the same results. I’ll mess with a few other settings.

1 Like

Something about these settings seems to have an effect on my calendar

No matter what view I use, the calendar is only covering a part of the screen…