Custom Widget Blinds with Icon

Hello,

I am playing around with Habpanel and I am IMPRESSED. Really impressed. I remember a discussion we had some time ago in the google group (https://groups.google.com/forum/#!searchin/openhab/Ralf$20Klüber|sort:relevance/openhab/lazt7iZBvTE/zqwzEIPUVVMJ) which was in that direction. How far we come since than.

I try to build a custome widget for controlling blinds. I love simplicity and decided to use icons to distinguish different blinds in the same room. This is what I got starting from the excellent work from Pawel Pieczul.

I am stuck with changing the colors of the icons. Can someone point me in the right direction? I want the icons on the blind crontrol widget to be grey like the non active switch buttons.


            <style>
              button {
              border: 0px solid white;
              background-color:initial;
              color: #63748B; 
              height: 1.5em;
              width: 1.5em;
              float: left;
              font-size: 3em;
              margin-right: 12px;
              line-height: 50%;
              padding: 0 0 0 0;
              }
              </style>
            
            <div  style="border: 0px solid white;
                         display: flex;
                         position: absolute; 
                         background-color:initial;
                         top: 0%; left: 0%; width: 100%; height: 100%;         
                         align-items:center;
              				  ">
              <div style="border: 0px solid white;
                          width: 100%;
                          text-align:center;
                          align-items:center;
                          background-color:inherit;
						              foreground-color:white; 
                          display:flex;   
                          justify-content:center;
                          font-size:1em;
                          margin-left:5px;
                          margin-right:5px;
                          ">
								<widget-icon color="white" iconset="config.blind_icon_iconset" icon="config.blind_icon" size="30"></widget-icon>
              </div>
              <span style="border: 0px solid white;
                          width:100%;
                          height: 75%;
                          align-items: center;
                          display:flex;
                          padding-right: 12px;
                          ">
                
                <button ng-click="sendCmd(config.blind_item, 'UP')">
                  <i class="glyphicon glyphicon-chevron-up"></i>
                </button>     
                <button ng-click="sendCmd(config.blind_item, 'STOP')">
                  <i class="glyphicon glyphicon-stop"></i>
                </button>
                <button style="margin-right: 0" ng-click="sendCmd(config.blind_item, 'DOWN')">
                  <i class="glyphicon glyphicon-chevron-down"></i>
                </button>
              </span>               
              </div>
              ```

In your case, it’s not super obvious and a bit tricky but you’ll get what you want when you add a state="'OFF'" attribute to your <widget-icon> like this:

<widget-icon color="white" iconset="config.blind_icon_iconset" icon="config.blind_icon" size="30" state="'OFF'"></widget-icon>

:slight_smile:

That makes perfect sense. Thanks for the fast reply.

Hi.
Any ideas where i could get this icon-set? In my case the blind-icon is not displayed.
Thanks!