Hey @RGroll,
… struggeling with a layout problem.
The border of the most left oh-button gets cut off somehow when f7-segmented is used…
I also notoced that I had this problem already with the Grafana time ranges widget.
I spent hours trying to fix this.
Normal button works fine (see 1st row).
I tried different ways to use f7-segmented, but no success (rows 2-4).
I suspect that f7-segmented is causing the problem.
YAML:
uid: Button test
tags: []
props:
parameters: []
parameterGroups: []
timestamp: Jan 30, 2021, 4:25:39 PM
component: f7-card
config:
outline: true
class:
- no-padding
slots:
default:
- component: f7-row
config:
class:
- margin-top-half
- margin-left-half
- margin-right-half
- margin-bottom half
slots:
default:
- component: f7-col
slots:
default:
- component: oh-button
config:
class:
- padding-top-half
- display-flex
- flex-direction-column
text: ON/OFF
action: toggle
actionItem: ZWaveNode007FGS223DoubleSwitch2_Switch1
actionCommand: ON
actionCommandAlt: OFF
icon-f7: power
iconSize: 15
iconColor: white
fill: "=(items.ZWaveNode007FGS223DoubleSwitch2_Switch1.state === 'ON') ? true : false"
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255, 255, 255, 0.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
--f7-button-hover-bg-color: rgba(255, 255, 255, 0.15)
--f7-button-pressed-bg-color: rgba(255, 255, 255, 0.05)
--f7-button-fill-hover-bg-color: rgba(var(--f7-theme-color-rgb), .07)
height: auto
font-size: 10px
- component: f7-row
config:
class:
- margin-top-half
- margin-left-half
- margin-right-half
- margin-bottom half
slots:
default:
- component: f7-segmented
config:
class:
- segmented-strong
style:
--f7-segmented-strong-padding: 0px
--f7-segmented-strong-between-buttons: 5px
--f7-segmented-strong-button-font-weight: 300
--f7-segmented-strong-bg-color: transparent
--f7-segmented-strong-button-hover-bg-color: rgba(255, 255, 255, 0.15)
slots:
default:
- component: oh-button
config:
class:
- padding-top-half
- display-flex
- flex-direction-column
text: ON/OFF
action: toggle
actionItem: ZWaveNode007FGS223DoubleSwitch2_Switch1
actionCommand: ON
actionCommandAlt: OFF
icon-f7: power
iconSize: 15
iconColor: white
fill: "=(items.ZWaveNode007FGS223DoubleSwitch2_Switch1.state === 'ON') ? true : false"
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
height: auto
font-size: 10px
- component: f7-segmented
config:
class:
- segmented-strong
- margin-left-half
- margin-right-half
- margin-top
- margin-bottom
style:
--f7-segmented-strong-padding: 0px
--f7-segmented-strong-between-buttons: 5px
--f7-segmented-strong-button-font-weight: 300
--f7-segmented-strong-bg-color: transparent
--f7-segmented-strong-button-hover-bg-color: rgba(255, 255, 255, 0.15)
slots:
default:
- component: oh-button
config:
class:
- padding-top-half
- display-flex
- flex-direction-column
text: ON/OFF
action: toggle
actionItem: ZWaveNode007FGS223DoubleSwitch2_Switch1
actionCommand: ON
actionCommandAlt: OFF
icon-f7: power
iconSize: 15
iconColor: white
fill: "=(items.ZWaveNode007FGS223DoubleSwitch2_Switch1.state === 'ON') ? true : false"
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
height: auto
font-size: 10px
- component: f7-segmented
config:
visible: true
round: false
outline: false
class:
- segmented-strong
- margin-left-half
- margin-right-half
- margin-top
- margin-bottom
style:
--f7-segmented-strong-padding: 0px
--f7-segmented-strong-between-buttons: 5px
--f7-segmented-strong-button-font-weight: 300
--f7-segmented-strong-bg-color: transparent
--f7-segmented-strong-button-hover-bg-color: rgba(255, 255, 255, 0.15)
slots:
default:
- component: oh-button
config:
class:
- padding-top-half
- display-flex
- flex-direction-column
text: ON/OFF
action: toggle
actionItem: ZWaveNode007FGS223DoubleSwitch2_Switch1
actionCommand: ON
actionCommandAlt: OFF
icon-f7: power
iconSize: 15
fill: "=(items.ZWaveNode007FGS223DoubleSwitch2_Switch1.state === 'ON') ? true : false"
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
height: auto
font-size: 8px
- component: oh-button
config:
iconF7: arrow_2_squarepath
iconSize: 15px
fill: "=(items.DaikinACUnit192168040_Mode.state === 'AUTO') ? true : false"
round: false
outline: false
class:
- display-flex
- flex-direction-column
- padding-top-half
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
font-size: 8px
height: auto
text: AUTO
action: command
actionItem: DaikinACUnit192168040_Mode
actionCommand: ="AUTO"
- component: oh-button
config:
iconF7: thermometer_snowflake
iconSize: 15px
fill: "=(items.DaikinACUnit192168040_Mode.state === 'COLD') ? true : false"
round: false
outline: false
class:
- display-flex
- flex-direction-column
- padding-top-half
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 1px
--f7-button-padding-horizontal: 0px
font-size: 8px
height: auto
text: COOL
action: command
actionItem: DaikinACUnit192168040_Mode
actionCommand: ="COLD"
- component: oh-button
config:
iconF7: thermometer_sun
iconSize: 15px
fill: "=(items.DaikinACUnit192168040_Mode.state === 'HEAT') ? true : false"
round: false
outline: false
class:
- display-flex
- flex-direction-column
- padding-top-half
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
font-size: 8px
height: auto
text: HEAT
action: command
actionItem: DaikinACUnit192168040_Mode
actionCommand: ="HEAT"
- component: oh-button
config:
iconF7: drop_fill
iconSize: 15px
fill: "=(items.DaikinACUnit192168040_Mode.state === 'DEHUMIDIFIER') ? true : false"
round: false
outline: false
class:
- display-flex
- flex-direction-column
- padding-top-half
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
font-size: 8px
height: auto
text: DRY
action: command
actionItem: DaikinACUnit192168040_Mode
actionCommand: ="DEHUMIDIFIER"
- component: oh-button
config:
iconF7: wind
iconSize: 15px
fill: "=(items.DaikinACUnit192168040_Mode.state === 'FAN') ? true : false"
round: false
outline: false
class:
- display-flex
- flex-direction-column
- padding-top-half
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
font-size: 8px
height: auto
text: FAN
action: command
actionItem: DaikinACUnit192168040_Mode
actionCommand: ="FAN"
- component: oh-button
config:
iconF7: ellipsis_vertical
iconSize: 15px
action: variable
actionVariable: options
actionVariableValue: "=vars.options || vars.options === undefined ? false : true"
fill: "=vars.options || vars.options === undefined ? false : true"
round: false
outline: false
class:
- display-flex
- flex-direction-column
style:
--f7-button-border-width: 1px
--f7-button-text-color: white
--f7-button-border-color: rgba(255,255,255,.15)
--f7-button-border-radius: 15px
--f7-button-padding-vertical: 0px
--f7-button-padding-horizontal: 0px
font-size: 8px
height: auto
width: 50%
Hope this is not a bug …
Any idea how to fix this?